diff --git a/dist/tornado.umd.js b/dist/tornado.umd.js index d802b1a..96b29eb 100644 --- a/dist/tornado.umd.js +++ b/dist/tornado.umd.js @@ -66563,7 +66563,18 @@ class AbstractProvider { } this.emit("debug", { action: "sendCcipReadFetchRequest", request, index: i, urls }); let errorMessage = "unknown error"; - const resp = await request.send(); + // Fetch the resource... + let resp; + try { + resp = await request.send(); + } + catch (error) { + // ...low-level fetch error (missing host, bad SSL, etc.), + // so try next URL + errorMessages.push(error.message); + this.emit("debug", { action: "receiveCcipReadFetchError", request, result: { error } }); + continue; + } try { const result = resp.bodyJson; if (result.data) { @@ -161490,7 +161501,7 @@ const poseidonContract=(/* unused pure expression or super */ null && (_poseidon /** * The current version of Ethers. */ -const version = "6.13.2"; +const version = "6.13.3"; //# sourceMappingURL=_version.js.map /***/ }), diff --git a/dist/tornado.umd.min.js b/dist/tornado.umd.min.js index 12ffb56..2849796 100644 --- a/dist/tornado.umd.min.js +++ b/dist/tornado.umd.min.js @@ -5,4 +5,4 @@ || ${n} === "boolean" || ${f} === null`).assign(i,r._`[${f}]`)}}c.else(),h(e),c.endIf(),c.if(r._`${i} !== undefined`,(()=>{c.assign(f,i),function({gen:e,parentData:a,parentDataProperty:t},c){e.if(r._`${a} !== undefined`,(()=>e.assign(r._`${a}[${t}]`,c)))}(e,i)}))}(e,a,n):h(e)}))}return b};const o=new Set(["string","number","integer","boolean","null"]);function s(e,a,t,c=i.Correct){const f=c===i.Correct?r.operators.EQ:r.operators.NEQ;let d;switch(e){case"null":return r._`${a} ${f} null`;case"array":d=r._`Array.isArray(${a})`;break;case"object":d=r._`${a} && typeof ${a} == "object" && !Array.isArray(${a})`;break;case"integer":d=n(r._`!(${a} % 1) && !isNaN(${a})`);break;case"number":d=n();break;default:return r._`typeof ${a} ${f} ${e}`}return c===i.Correct?d:(0,r.not)(d);function n(e=r.nil){return(0,r.and)(r._`typeof ${a} == "number"`,e,t?r._`isFinite(${a})`:r.nil)}}function l(e,a,t,c){if(1===e.length)return s(e[0],a,t,c);let f;const d=(0,n.toHash)(e);if(d.array&&d.object){const e=r._`typeof ${a} != "object"`;f=d.null?e:r._`!${a} || ${e}`,delete d.null,delete d.array,delete d.object}else f=r.nil;d.number&&delete d.integer;for(const e in d)f=(0,r.and)(f,s(e,a,t,c));return f}a.checkDataType=s,a.checkDataTypes=l;const u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:a})=>"string"==typeof e?r._`{type: ${e}}`:r._`{type: ${a}}`};function h(e){const a=function(e){const{gen:a,data:t,schema:c}=e,f=(0,n.schemaRefOrVal)(e,c,"type");return{gen:a,keyword:"type",data:t,schema:c.type,schemaCode:f,schemaValue:f,parentSchema:c,params:{},it:e}}(e);(0,d.reportError)(a,u)}a.reportTypeError=h},7870:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.assignDefaults=void 0;const c=t(99029),f=t(94227);function d(e,a,t){const{gen:d,compositeRule:r,data:n,opts:i}=e;if(void 0===t)return;const b=c._`${n}${(0,c.getProperty)(a)}`;if(r)return void(0,f.checkStrictMode)(e,`default is ignored for: ${b}`);let o=c._`${b} === undefined`;"empty"===i.useDefaults&&(o=c._`${o} || ${b} === null || ${b} === ""`),d.if(o,c._`${b} = ${(0,c.stringify)(t)}`)}a.assignDefaults=function(e,a){const{properties:t,items:c}=e.schema;if("object"===a&&t)for(const a in t)d(e,a,t[a].default);else"array"===a&&Array.isArray(c)&&c.forEach(((a,t)=>d(e,t,a.default)))}},62586:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getData=a.KeywordCxt=a.validateFunctionCode=void 0;const c=t(28727),f=t(10208),d=t(7887),r=t(10208),n=t(7870),i=t(33673),b=t(24495),o=t(99029),s=t(42023),l=t(66939),u=t(94227),h=t(48708);function p({gen:e,validateName:a,schema:t,schemaEnv:c,opts:f},d){f.code.es5?e.func(a,o._`${s.default.data}, ${s.default.valCxt}`,c.$async,(()=>{e.code(o._`"use strict"; ${g(t,f)}`),function(e,a){e.if(s.default.valCxt,(()=>{e.var(s.default.instancePath,o._`${s.default.valCxt}.${s.default.instancePath}`),e.var(s.default.parentData,o._`${s.default.valCxt}.${s.default.parentData}`),e.var(s.default.parentDataProperty,o._`${s.default.valCxt}.${s.default.parentDataProperty}`),e.var(s.default.rootData,o._`${s.default.valCxt}.${s.default.rootData}`),a.dynamicRef&&e.var(s.default.dynamicAnchors,o._`${s.default.valCxt}.${s.default.dynamicAnchors}`)}),(()=>{e.var(s.default.instancePath,o._`""`),e.var(s.default.parentData,o._`undefined`),e.var(s.default.parentDataProperty,o._`undefined`),e.var(s.default.rootData,s.default.data),a.dynamicRef&&e.var(s.default.dynamicAnchors,o._`{}`)}))}(e,f),e.code(d)})):e.func(a,o._`${s.default.data}, ${function(e){return o._`{${s.default.instancePath}="", ${s.default.parentData}, ${s.default.parentDataProperty}, ${s.default.rootData}=${s.default.data}${e.dynamicRef?o._`, ${s.default.dynamicAnchors}={}`:o.nil}}={}`}(f)}`,c.$async,(()=>e.code(g(t,f)).code(d)))}function g(e,a){const t="object"==typeof e&&e[a.schemaId];return t&&(a.code.source||a.code.process)?o._`/*# sourceURL=${t} */`:o.nil}function m({schema:e,self:a}){if("boolean"==typeof e)return!e;for(const t in e)if(a.RULES.all[t])return!0;return!1}function x(e){return"boolean"!=typeof e.schema}function y(e){(0,u.checkUnknownRules)(e),function(e){const{schema:a,errSchemaPath:t,opts:c,self:f}=e;a.$ref&&c.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(a,f.RULES)&&f.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}(e)}function A(e,a){if(e.opts.jtd)return w(e,[],!1,a);const t=(0,f.getSchemaTypes)(e.schema);w(e,t,!(0,f.coerceAndCheckDataType)(e,t),a)}function v({gen:e,schemaEnv:a,schema:t,errSchemaPath:c,opts:f}){const d=t.$comment;if(!0===f.$comment)e.code(o._`${s.default.self}.logger.log(${d})`);else if("function"==typeof f.$comment){const t=o.str`${c}/$comment`,f=e.scopeValue("root",{ref:a.root});e.code(o._`${s.default.self}.opts.$comment(${d}, ${t}, ${f}.schema)`)}}function w(e,a,t,c){const{gen:f,schema:n,data:i,allErrors:b,opts:l,self:h}=e,{RULES:p}=h;function g(u){(0,d.shouldUseGroup)(n,u)&&(u.type?(f.if((0,r.checkDataType)(u.type,i,l.strictNumbers)),_(e,u),1===a.length&&a[0]===u.type&&t&&(f.else(),(0,r.reportTypeError)(e)),f.endIf()):_(e,u),b||f.if(o._`${s.default.errors} === ${c||0}`))}!n.$ref||!l.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(n,p)?(l.jtd||function(e,a){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,a){a.length&&(e.dataTypes.length?(a.forEach((a=>{I(e.dataTypes,a)||E(e,`type "${a}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,a){const t=[];for(const c of e.dataTypes)I(a,c)?t.push(c):a.includes("integer")&&"number"===c&&t.push("integer");e.dataTypes=t}(e,a)):e.dataTypes=a)}(e,a),e.opts.allowUnionTypes||function(e,a){a.length>1&&(2!==a.length||!a.includes("null"))&&E(e,"use allowUnionTypes to allow union type keyword")}(e,a),function(e,a){const t=e.self.RULES.all;for(const c in t){const f=t[c];if("object"==typeof f&&(0,d.shouldUseRule)(e.schema,f)){const{type:t}=f.definition;t.length&&!t.some((e=>{return c=e,(t=a).includes(c)||"number"===c&&t.includes("integer");var t,c}))&&E(e,`missing type "${t.join(",")}" for keyword "${c}"`)}}}(e,e.dataTypes))}(e,a),f.block((()=>{for(const e of p.rules)g(e);g(p.post)}))):f.block((()=>M(e,"$ref",p.all.$ref.definition)))}function _(e,a){const{gen:t,schema:c,opts:{useDefaults:f}}=e;f&&(0,n.assignDefaults)(e,a.type),t.block((()=>{for(const t of a.rules)(0,d.shouldUseRule)(c,t)&&M(e,t.keyword,t.definition,a.type)}))}function I(e,a){return e.includes(a)||"integer"===a&&e.includes("number")}function E(e,a){a+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,u.checkStrictMode)(e,a,e.opts.strictTypes)}a.validateFunctionCode=function(e){x(e)&&(y(e),m(e))?function(e){const{schema:a,opts:t,gen:c}=e;p(e,(()=>{t.$comment&&a.$comment&&v(e),function(e){const{schema:a,opts:t}=e;void 0!==a.default&&t.useDefaults&&t.strictSchema&&(0,u.checkStrictMode)(e,"default is ignored in the schema root")}(e),c.let(s.default.vErrors,null),c.let(s.default.errors,0),t.unevaluated&&function(e){const{gen:a,validateName:t}=e;e.evaluated=a.const("evaluated",o._`${t}.evaluated`),a.if(o._`${e.evaluated}.dynamicProps`,(()=>a.assign(o._`${e.evaluated}.props`,o._`undefined`))),a.if(o._`${e.evaluated}.dynamicItems`,(()=>a.assign(o._`${e.evaluated}.items`,o._`undefined`)))}(e),A(e),function(e){const{gen:a,schemaEnv:t,validateName:c,ValidationError:f,opts:d}=e;t.$async?a.if(o._`${s.default.errors} === 0`,(()=>a.return(s.default.data)),(()=>a.throw(o._`new ${f}(${s.default.vErrors})`))):(a.assign(o._`${c}.errors`,s.default.vErrors),d.unevaluated&&function({gen:e,evaluated:a,props:t,items:c}){t instanceof o.Name&&e.assign(o._`${a}.props`,t),c instanceof o.Name&&e.assign(o._`${a}.items`,c)}(e),a.return(o._`${s.default.errors} === 0`))}(e)}))}(e):p(e,(()=>(0,c.topBoolOrEmptySchema)(e)))};class C{constructor(e,a,t){if((0,i.validateKeywordUsage)(e,a,t),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=t,this.data=e.data,this.schema=e.schema[t],this.$data=a.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(e,this.schema,t,this.$data),this.schemaType=a.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=a,this.$data)this.schemaCode=e.gen.const("vSchema",S(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,a.schemaType,a.allowUndefined))throw new Error(`${t} value must be ${JSON.stringify(a.schemaType)}`);("code"in a?a.trackErrors:!1!==a.errors)&&(this.errsCount=e.gen.const("_errs",s.default.errors))}result(e,a,t){this.failResult((0,o.not)(e),a,t)}failResult(e,a,t){this.gen.if(e),t?t():this.error(),a?(this.gen.else(),a(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,a){this.failResult((0,o.not)(e),void 0,a)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:a}=this;this.fail(o._`${a} !== undefined && (${(0,o.or)(this.invalid$data(),e)})`)}error(e,a,t){if(a)return this.setParams(a),this._error(e,t),void this.setParams({});this._error(e,t)}_error(e,a){(e?h.reportExtraError:h.reportError)(this,this.def.error,a)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,a){a?Object.assign(this.params,e):this.params=e}block$data(e,a,t=o.nil){this.gen.block((()=>{this.check$data(e,t),a()}))}check$data(e=o.nil,a=o.nil){if(!this.$data)return;const{gen:t,schemaCode:c,schemaType:f,def:d}=this;t.if((0,o.or)(o._`${c} === undefined`,a)),e!==o.nil&&t.assign(e,!0),(f.length||d.validateSchema)&&(t.elseIf(this.invalid$data()),this.$dataError(),e!==o.nil&&t.assign(e,!1)),t.else()}invalid$data(){const{gen:e,schemaCode:a,schemaType:t,def:c,it:f}=this;return(0,o.or)(function(){if(t.length){if(!(a instanceof o.Name))throw new Error("ajv implementation error");const e=Array.isArray(t)?t:[t];return o._`${(0,r.checkDataTypes)(e,a,f.opts.strictNumbers,r.DataType.Wrong)}`}return o.nil}(),function(){if(c.validateSchema){const t=e.scopeValue("validate$data",{ref:c.validateSchema});return o._`!${t}(${a})`}return o.nil}())}subschema(e,a){const t=(0,b.getSubschema)(this.it,e);(0,b.extendSubschemaData)(t,this.it,e),(0,b.extendSubschemaMode)(t,e);const f={...this.it,...t,items:void 0,props:void 0};return function(e,a){x(e)&&(y(e),m(e))?function(e,a){const{schema:t,gen:c,opts:f}=e;f.$comment&&t.$comment&&v(e),function(e){const a=e.schema[e.opts.schemaId];a&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,a))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const d=c.const("_errs",s.default.errors);A(e,d),c.var(a,o._`${d} === ${s.default.errors}`)}(e,a):(0,c.boolOrEmptySchema)(e,a)}(f,a),f}mergeEvaluated(e,a){const{it:t,gen:c}=this;t.opts.unevaluated&&(!0!==t.props&&void 0!==e.props&&(t.props=u.mergeEvaluated.props(c,e.props,t.props,a)),!0!==t.items&&void 0!==e.items&&(t.items=u.mergeEvaluated.items(c,e.items,t.items,a)))}mergeValidEvaluated(e,a){const{it:t,gen:c}=this;if(t.opts.unevaluated&&(!0!==t.props||!0!==t.items))return c.if(a,(()=>this.mergeEvaluated(e,o.Name))),!0}}function M(e,a,t,c){const f=new C(e,t,a);"code"in t?t.code(f,c):f.$data&&t.validate?(0,i.funcKeywordCode)(f,t):"macro"in t?(0,i.macroKeywordCode)(f,t):(t.compile||t.validate)&&(0,i.funcKeywordCode)(f,t)}a.KeywordCxt=C;const B=/^\/(?:[^~]|~0|~1)*$/,L=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function S(e,{dataLevel:a,dataNames:t,dataPathArr:c}){let f,d;if(""===e)return s.default.rootData;if("/"===e[0]){if(!B.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);f=e,d=s.default.rootData}else{const r=L.exec(e);if(!r)throw new Error(`Invalid JSON-pointer: ${e}`);const n=+r[1];if(f=r[2],"#"===f){if(n>=a)throw new Error(i("property/index",n));return c[a-n]}if(n>a)throw new Error(i("data",n));if(d=t[a-n],!f)return d}let r=d;const n=f.split("/");for(const e of n)e&&(d=o._`${d}${(0,o.getProperty)((0,u.unescapeJsonPointer)(e))}`,r=o._`${r} && ${d}`);return r;function i(e,t){return`Cannot access ${e} ${t} levels up, current level is ${a}`}}a.getData=S},33673:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateKeywordUsage=a.validSchemaType=a.funcKeywordCode=a.macroKeywordCode=void 0;const c=t(99029),f=t(42023),d=t(15765),r=t(48708);function n(e){const{gen:a,data:t,it:f}=e;a.if(f.parentData,(()=>a.assign(t,c._`${f.parentData}[${f.parentDataProperty}]`)))}function i(e,a,t){if(void 0===t)throw new Error(`keyword "${a}" failed to compile`);return e.scopeValue("keyword","function"==typeof t?{ref:t}:{ref:t,code:(0,c.stringify)(t)})}a.macroKeywordCode=function(e,a){const{gen:t,keyword:f,schema:d,parentSchema:r,it:n}=e,b=a.macro.call(n.self,d,r,n),o=i(t,f,b);!1!==n.opts.validateSchema&&n.self.validateSchema(b,!0);const s=t.name("valid");e.subschema({schema:b,schemaPath:c.nil,errSchemaPath:`${n.errSchemaPath}/${f}`,topSchemaRef:o,compositeRule:!0},s),e.pass(s,(()=>e.error(!0)))},a.funcKeywordCode=function(e,a){var t;const{gen:b,keyword:o,schema:s,parentSchema:l,$data:u,it:h}=e;!function({schemaEnv:e},a){if(a.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,a);const p=!u&&a.compile?a.compile.call(h.self,s,l,h):a.validate,g=i(b,o,p),m=b.let("valid");function x(t=(a.async?c._`await `:c.nil)){const r=h.opts.passContext?f.default.this:f.default.self,n=!("compile"in a&&!u||!1===a.schema);b.assign(m,c._`${t}${(0,d.callValidateCode)(e,g,r,n)}`,a.modifying)}function y(e){var t;b.if((0,c.not)(null!==(t=a.valid)&&void 0!==t?t:m),e)}e.block$data(m,(function(){if(!1===a.errors)x(),a.modifying&&n(e),y((()=>e.error()));else{const t=a.async?function(){const e=b.let("ruleErrs",null);return b.try((()=>x(c._`await `)),(a=>b.assign(m,!1).if(c._`${a} instanceof ${h.ValidationError}`,(()=>b.assign(e,c._`${a}.errors`)),(()=>b.throw(a))))),e}():function(){const e=c._`${g}.errors`;return b.assign(e,null),x(c.nil),e}();a.modifying&&n(e),y((()=>function(e,a){const{gen:t}=e;t.if(c._`Array.isArray(${a})`,(()=>{t.assign(f.default.vErrors,c._`${f.default.vErrors} === null ? ${a} : ${f.default.vErrors}.concat(${a})`).assign(f.default.errors,c._`${f.default.vErrors}.length`),(0,r.extendErrors)(e)}),(()=>e.error()))}(e,t)))}})),e.ok(null!==(t=a.valid)&&void 0!==t?t:m)},a.validSchemaType=function(e,a,t=!1){return!a.length||a.some((a=>"array"===a?Array.isArray(e):"object"===a?e&&"object"==typeof e&&!Array.isArray(e):typeof e==a||t&&void 0===e))},a.validateKeywordUsage=function({schema:e,opts:a,self:t,errSchemaPath:c},f,d){if(Array.isArray(f.keyword)?!f.keyword.includes(d):f.keyword!==d)throw new Error("ajv implementation error");const r=f.dependencies;if(null==r?void 0:r.some((a=>!Object.prototype.hasOwnProperty.call(e,a))))throw new Error(`parent schema must have dependencies of ${d}: ${r.join(",")}`);if(f.validateSchema&&!f.validateSchema(e[d])){const e=`keyword "${d}" value is invalid at path "${c}": `+t.errorsText(f.validateSchema.errors);if("log"!==a.validateSchema)throw new Error(e);t.logger.error(e)}}},24495:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.extendSubschemaMode=a.extendSubschemaData=a.getSubschema=void 0;const c=t(99029),f=t(94227);a.getSubschema=function(e,{keyword:a,schemaProp:t,schema:d,schemaPath:r,errSchemaPath:n,topSchemaRef:i}){if(void 0!==a&&void 0!==d)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==a){const d=e.schema[a];return void 0===t?{schema:d,schemaPath:c._`${e.schemaPath}${(0,c.getProperty)(a)}`,errSchemaPath:`${e.errSchemaPath}/${a}`}:{schema:d[t],schemaPath:c._`${e.schemaPath}${(0,c.getProperty)(a)}${(0,c.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${a}/${(0,f.escapeFragment)(t)}`}}if(void 0!==d){if(void 0===r||void 0===n||void 0===i)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:r,topSchemaRef:i,errSchemaPath:n}}throw new Error('either "keyword" or "schema" must be passed')},a.extendSubschemaData=function(e,a,{dataProp:t,dataPropType:d,data:r,dataTypes:n,propertyName:i}){if(void 0!==r&&void 0!==t)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:b}=a;if(void 0!==t){const{errorPath:r,dataPathArr:n,opts:i}=a;o(b.let("data",c._`${a.data}${(0,c.getProperty)(t)}`,!0)),e.errorPath=c.str`${r}${(0,f.getErrorPath)(t,d,i.jsPropertySyntax)}`,e.parentDataProperty=c._`${t}`,e.dataPathArr=[...n,e.parentDataProperty]}function o(t){e.data=t,e.dataLevel=a.dataLevel+1,e.dataTypes=[],a.definedProperties=new Set,e.parentData=a.data,e.dataNames=[...a.dataNames,t]}void 0!==r&&(o(r instanceof c.Name?r:b.let("data",r,!0)),void 0!==i&&(e.propertyName=i)),n&&(e.dataTypes=n)},a.extendSubschemaMode=function(e,{jtdDiscriminator:a,jtdMetadata:t,compositeRule:c,createErrors:f,allErrors:d}){void 0!==c&&(e.compositeRule=c),void 0!==f&&(e.createErrors=f),void 0!==d&&(e.allErrors=d),e.jtdDiscriminator=a,e.jtdMetadata=t}},4042:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.CodeGen=a.Name=a.nil=a.stringify=a.str=a._=a.KeywordCxt=void 0;var c=t(62586);Object.defineProperty(a,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var f=t(99029);Object.defineProperty(a,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(a,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(a,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(a,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(a,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(a,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});const d=t(13558),r=t(34551),n=t(10396),i=t(73835),b=t(99029),o=t(66939),s=t(10208),l=t(94227),u=t(63837),h=t(55944),p=(e,a)=>new RegExp(e,a);p.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),x={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function A(e){var a,t,c,f,d,r,n,i,b,o,s,l,u,g,m,x,y,A,v,w,_,I,E,C,M;const B=e.strict,L=null===(a=e.code)||void 0===a?void 0:a.optimize,S=!0===L||void 0===L?1:L||0,k=null!==(c=null===(t=e.code)||void 0===t?void 0:t.regExp)&&void 0!==c?c:p,N=null!==(f=e.uriResolver)&&void 0!==f?f:h.default;return{strictSchema:null===(r=null!==(d=e.strictSchema)&&void 0!==d?d:B)||void 0===r||r,strictNumbers:null===(i=null!==(n=e.strictNumbers)&&void 0!==n?n:B)||void 0===i||i,strictTypes:null!==(o=null!==(b=e.strictTypes)&&void 0!==b?b:B)&&void 0!==o?o:"log",strictTuples:null!==(l=null!==(s=e.strictTuples)&&void 0!==s?s:B)&&void 0!==l?l:"log",strictRequired:null!==(g=null!==(u=e.strictRequired)&&void 0!==u?u:B)&&void 0!==g&&g,code:e.code?{...e.code,optimize:S,regExp:k}:{optimize:S,regExp:k},loopRequired:null!==(m=e.loopRequired)&&void 0!==m?m:200,loopEnum:null!==(x=e.loopEnum)&&void 0!==x?x:200,meta:null===(y=e.meta)||void 0===y||y,messages:null===(A=e.messages)||void 0===A||A,inlineRefs:null===(v=e.inlineRefs)||void 0===v||v,schemaId:null!==(w=e.schemaId)&&void 0!==w?w:"$id",addUsedSchema:null===(_=e.addUsedSchema)||void 0===_||_,validateSchema:null===(I=e.validateSchema)||void 0===I||I,validateFormats:null===(E=e.validateFormats)||void 0===E||E,unicodeRegExp:null===(C=e.unicodeRegExp)||void 0===C||C,int32range:null===(M=e.int32range)||void 0===M||M,uriResolver:N}}class v{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...A(e)};const{es5:a,lines:t}=this.opts.code;this.scope=new b.ValueScope({scope:{},prefixes:m,es5:a,lines:t}),this.logger=function(e){if(!1===e)return B;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const c=e.validateFormats;e.validateFormats=!1,this.RULES=(0,n.getRules)(),w.call(this,x,e,"NOT SUPPORTED"),w.call(this,y,e,"DEPRECATED","warn"),this._metaOpts=M.call(this),e.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&C.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),I.call(this),e.validateFormats=c}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:a,schemaId:t}=this.opts;let c=u;"id"===t&&(c={...u},c.id=c.$id,delete c.$id),a&&e&&this.addMetaSchema(c,c[t],!1)}defaultMeta(){const{meta:e,schemaId:a}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[a]||e:void 0}validate(e,a){let t;if("string"==typeof e){if(t=this.getSchema(e),!t)throw new Error(`no schema with key or ref "${e}"`)}else t=this.compile(e);const c=t(a);return"$async"in t||(this.errors=t.errors),c}compile(e,a){const t=this._addSchema(e,a);return t.validate||this._compileSchemaEnv(t)}compileAsync(e,a){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:t}=this.opts;return c.call(this,e,a);async function c(e,a){await f.call(this,e.$schema);const t=this._addSchema(e,a);return t.validate||d.call(this,t)}async function f(e){e&&!this.getSchema(e)&&await c.call(this,{$ref:e},!0)}async function d(e){try{return this._compileSchemaEnv(e)}catch(a){if(!(a instanceof r.default))throw a;return n.call(this,a),await i.call(this,a.missingSchema),d.call(this,e)}}function n({missingSchema:e,missingRef:a}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${a} cannot be resolved`)}async function i(e){const t=await b.call(this,e);this.refs[e]||await f.call(this,t.$schema),this.refs[e]||this.addSchema(t,e,a)}async function b(e){const a=this._loading[e];if(a)return a;try{return await(this._loading[e]=t(e))}finally{delete this._loading[e]}}}addSchema(e,a,t,c=this.opts.validateSchema){if(Array.isArray(e)){for(const a of e)this.addSchema(a,void 0,t,c);return this}let f;if("object"==typeof e){const{schemaId:a}=this.opts;if(f=e[a],void 0!==f&&"string"!=typeof f)throw new Error(`schema ${a} must be string`)}return a=(0,o.normalizeId)(a||f),this._checkUnique(a),this.schemas[a]=this._addSchema(e,t,a,c,!0),this}addMetaSchema(e,a,t=this.opts.validateSchema){return this.addSchema(e,a,!0,t),this}validateSchema(e,a){if("boolean"==typeof e)return!0;let t;if(t=e.$schema,void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(t=t||this.opts.defaultMeta||this.defaultMeta(),!t)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const c=this.validate(t,e);if(!c&&a){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return c}getSchema(e){let a;for(;"string"==typeof(a=_.call(this,e));)e=a;if(void 0===a){const{schemaId:t}=this.opts,c=new i.SchemaEnv({schema:{},schemaId:t});if(a=i.resolveSchema.call(this,c,e),!a)return;this.refs[e]=a}return a.validate||this._compileSchemaEnv(a)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const a=_.call(this,e);return"object"==typeof a&&this._cache.delete(a.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const a=e;this._cache.delete(a);let t=e[this.opts.schemaId];return t&&(t=(0,o.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const a of e)this.addKeyword(a);return this}addKeyword(e,a){let t;if("string"==typeof e)t=e,"object"==typeof a&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),a.keyword=t);else{if("object"!=typeof e||void 0!==a)throw new Error("invalid addKeywords parameters");if(t=(a=e).keyword,Array.isArray(t)&&!t.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(S.call(this,t,a),!a)return(0,l.eachItem)(t,(e=>k.call(this,e))),this;P.call(this,a);const c={...a,type:(0,s.getJSONTypes)(a.type),schemaType:(0,s.getJSONTypes)(a.schemaType)};return(0,l.eachItem)(t,0===c.type.length?e=>k.call(this,e,c):e=>c.type.forEach((a=>k.call(this,e,c,a)))),this}getKeyword(e){const a=this.RULES.all[e];return"object"==typeof a?a.definition:!!a}removeKeyword(e){const{RULES:a}=this;delete a.keywords[e],delete a.all[e];for(const t of a.rules){const a=t.rules.findIndex((a=>a.keyword===e));a>=0&&t.rules.splice(a,1)}return this}addFormat(e,a){return"string"==typeof a&&(a=new RegExp(a)),this.formats[e]=a,this}errorsText(e=this.errors,{separator:a=", ",dataVar:t="data"}={}){return e&&0!==e.length?e.map((e=>`${t}${e.instancePath} ${e.message}`)).reduce(((e,t)=>e+a+t)):"No errors"}$dataMetaSchema(e,a){const t=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const c of a){const a=c.split("/").slice(1);let f=e;for(const e of a)f=f[e];for(const e in t){const a=t[e];if("object"!=typeof a)continue;const{$data:c}=a.definition,d=f[e];c&&d&&(f[e]=O(d))}}return e}_removeAllSchemas(e,a){for(const t in e){const c=e[t];a&&!a.test(t)||("string"==typeof c?delete e[t]:c&&!c.meta&&(this._cache.delete(c.schema),delete e[t]))}}_addSchema(e,a,t,c=this.opts.validateSchema,f=this.opts.addUsedSchema){let d;const{schemaId:r}=this.opts;if("object"==typeof e)d=e[r];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let n=this._cache.get(e);if(void 0!==n)return n;t=(0,o.normalizeId)(d||t);const b=o.getSchemaRefs.call(this,e,t);return n=new i.SchemaEnv({schema:e,schemaId:r,meta:a,baseId:t,localRefs:b}),this._cache.set(n.schema,n),f&&!t.startsWith("#")&&(t&&this._checkUnique(t),this.refs[t]=n),c&&this.validateSchema(e,!0),n}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):i.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const a=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,e)}finally{this.opts=a}}}function w(e,a,t,c="error"){for(const f in e){const d=f;d in a&&this.logger[c](`${t}: option ${f}. ${e[d]}`)}}function _(e){return e=(0,o.normalizeId)(e),this.schemas[e]||this.refs[e]}function I(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const a in e)this.addSchema(e[a],a)}function E(){for(const e in this.opts.formats){const a=this.opts.formats[e];a&&this.addFormat(e,a)}}function C(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const a in e){const t=e[a];t.keyword||(t.keyword=a),this.addKeyword(t)}}}function M(){const e={...this.opts};for(const a of g)delete e[a];return e}v.ValidationError=d.default,v.MissingRefError=r.default,a.default=v;const B={log(){},warn(){},error(){}},L=/^[a-z_$][a-z0-9_$:-]*$/i;function S(e,a){const{RULES:t}=this;if((0,l.eachItem)(e,(e=>{if(t.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!L.test(e))throw new Error(`Keyword ${e} has invalid name`)})),a&&a.$data&&!("code"in a)&&!("validate"in a))throw new Error('$data keyword must have "code" or "validate" function')}function k(e,a,t){var c;const f=null==a?void 0:a.post;if(t&&f)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:d}=this;let r=f?d.post:d.rules.find((({type:e})=>e===t));if(r||(r={type:t,rules:[]},d.rules.push(r)),d.keywords[e]=!0,!a)return;const n={keyword:e,definition:{...a,type:(0,s.getJSONTypes)(a.type),schemaType:(0,s.getJSONTypes)(a.schemaType)}};a.before?N.call(this,r,n,a.before):r.rules.push(n),d.all[e]=n,null===(c=a.implements)||void 0===c||c.forEach((e=>this.addKeyword(e)))}function N(e,a,t){const c=e.rules.findIndex((e=>e.keyword===t));c>=0?e.rules.splice(c,0,a):(e.rules.push(a),this.logger.warn(`rule ${t} is not defined`))}function P(e){let{metaSchema:a}=e;void 0!==a&&(e.$data&&this.opts.$data&&(a=O(a)),e.validateSchema=this.compile(a,!0))}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function O(e){return{anyOf:[e,R]}}},76250:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(32017);c.code='require("ajv/dist/runtime/equal").default',a.default=c},53853:(e,a)=>{"use strict";function t(e){const a=e.length;let t,c=0,f=0;for(;f=55296&&t<=56319&&f{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(48343);c.code='require("ajv/dist/runtime/uri").default',a.default=c},13558:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});class t extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}a.default=t},15457:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateAdditionalItems=void 0;const c=t(99029),f=t(94227),d={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>c.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>c._`{limit: ${e}}`},code(e){const{parentSchema:a,it:t}=e,{items:c}=a;Array.isArray(c)?r(e,c):(0,f.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas')}};function r(e,a){const{gen:t,schema:d,data:r,keyword:n,it:i}=e;i.items=!0;const b=t.const("len",c._`${r}.length`);if(!1===d)e.setParams({len:a.length}),e.pass(c._`${b} <= ${a.length}`);else if("object"==typeof d&&!(0,f.alwaysValidSchema)(i,d)){const d=t.var("valid",c._`${b} <= ${a.length}`);t.if((0,c.not)(d),(()=>function(d){t.forRange("i",a.length,b,(a=>{e.subschema({keyword:n,dataProp:a,dataPropType:f.Type.Num},d),i.allErrors||t.if((0,c.not)(d),(()=>t.break()))}))}(d))),e.ok(d)}}a.validateAdditionalItems=r,a.default=d},38660:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15765),f=t(99029),d=t(42023),r=t(94227),n={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>f._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:a,schema:t,parentSchema:n,data:i,errsCount:b,it:o}=e;if(!b)throw new Error("ajv implementation error");const{allErrors:s,opts:l}=o;if(o.props=!0,"all"!==l.removeAdditional&&(0,r.alwaysValidSchema)(o,t))return;const u=(0,c.allSchemaProperties)(n.properties),h=(0,c.allSchemaProperties)(n.patternProperties);function p(e){a.code(f._`delete ${i}[${e}]`)}function g(c){if("all"===l.removeAdditional||l.removeAdditional&&!1===t)p(c);else{if(!1===t)return e.setParams({additionalProperty:c}),e.error(),void(s||a.break());if("object"==typeof t&&!(0,r.alwaysValidSchema)(o,t)){const t=a.name("valid");"failing"===l.removeAdditional?(m(c,t,!1),a.if((0,f.not)(t),(()=>{e.reset(),p(c)}))):(m(c,t),s||a.if((0,f.not)(t),(()=>a.break())))}}}function m(a,t,c){const f={keyword:"additionalProperties",dataProp:a,dataPropType:r.Type.Str};!1===c&&Object.assign(f,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(f,t)}a.forIn("key",i,(t=>{u.length||h.length?a.if(function(t){let d;if(u.length>8){const e=(0,r.schemaRefOrVal)(o,n.properties,"properties");d=(0,c.isOwnProperty)(a,e,t)}else d=u.length?(0,f.or)(...u.map((e=>f._`${t} === ${e}`))):f.nil;return h.length&&(d=(0,f.or)(d,...h.map((a=>f._`${(0,c.usePattern)(e,a)}.test(${t})`)))),(0,f.not)(d)}(t),(()=>g(t))):g(t)})),e.ok(f._`${b} === ${d.default.errors}`)}};a.default=n},15844:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(94227),f={keyword:"allOf",schemaType:"array",code(e){const{gen:a,schema:t,it:f}=e;if(!Array.isArray(t))throw new Error("ajv implementation error");const d=a.name("valid");t.forEach(((a,t)=>{if((0,c.alwaysValidSchema)(f,a))return;const r=e.subschema({keyword:"allOf",schemaProp:t},d);e.ok(d),e.mergeEvaluated(r)}))}};a.default=f},16505:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:t(15765).validateUnion,error:{message:"must match a schema in anyOf"}};a.default=c},12661:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:a}})=>void 0===a?c.str`must contain at least ${e} valid item(s)`:c.str`must contain at least ${e} and no more than ${a} valid item(s)`,params:({params:{min:e,max:a}})=>void 0===a?c._`{minContains: ${e}}`:c._`{minContains: ${e}, maxContains: ${a}}`},code(e){const{gen:a,schema:t,parentSchema:d,data:r,it:n}=e;let i,b;const{minContains:o,maxContains:s}=d;n.opts.next?(i=void 0===o?1:o,b=s):i=1;const l=a.const("len",c._`${r}.length`);if(e.setParams({min:i,max:b}),void 0===b&&0===i)return void(0,f.checkStrictMode)(n,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==b&&i>b)return(0,f.checkStrictMode)(n,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,f.alwaysValidSchema)(n,t)){let a=c._`${l} >= ${i}`;return void 0!==b&&(a=c._`${a} && ${l} <= ${b}`),void e.pass(a)}n.items=!0;const u=a.name("valid");function h(){const e=a.name("_valid"),t=a.let("count",0);p(e,(()=>a.if(e,(()=>function(e){a.code(c._`${e}++`),void 0===b?a.if(c._`${e} >= ${i}`,(()=>a.assign(u,!0).break())):(a.if(c._`${e} > ${b}`,(()=>a.assign(u,!1).break())),1===i?a.assign(u,!0):a.if(c._`${e} >= ${i}`,(()=>a.assign(u,!0))))}(t)))))}function p(t,c){a.forRange("i",0,l,(a=>{e.subschema({keyword:"contains",dataProp:a,dataPropType:f.Type.Num,compositeRule:!0},t),c()}))}void 0===b&&1===i?p(u,(()=>a.if(u,(()=>a.break())))):0===i?(a.let(u,!0),void 0!==b&&a.if(c._`${r}.length > 0`,h)):(a.let(u,!1),h()),e.result(u,(()=>e.reset()))}};a.default=d},83025:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateSchemaDeps=a.validatePropertyDeps=a.error=void 0;const c=t(99029),f=t(94227),d=t(15765);a.error={message:({params:{property:e,depsCount:a,deps:t}})=>{const f=1===a?"property":"properties";return c.str`must have ${f} ${t} when property ${e} is present`},params:({params:{property:e,depsCount:a,deps:t,missingProperty:f}})=>c._`{property: ${e}, missingProperty: ${f}, depsCount: ${a}, - deps: ${t}}`};const r={keyword:"dependencies",type:"object",schemaType:"object",error:a.error,code(e){const[a,t]=function({schema:e}){const a={},t={};for(const c in e)"__proto__"!==c&&((Array.isArray(e[c])?a:t)[c]=e[c]);return[a,t]}(e);n(e,a),i(e,t)}};function n(e,a=e.schema){const{gen:t,data:f,it:r}=e;if(0===Object.keys(a).length)return;const n=t.let("missing");for(const i in a){const b=a[i];if(0===b.length)continue;const o=(0,d.propertyInData)(t,f,i,r.opts.ownProperties);e.setParams({property:i,depsCount:b.length,deps:b.join(", ")}),r.allErrors?t.if(o,(()=>{for(const a of b)(0,d.checkReportMissingProp)(e,a)})):(t.if(c._`${o} && (${(0,d.checkMissingProp)(e,b,n)})`),(0,d.reportMissingProp)(e,n),t.else())}}function i(e,a=e.schema){const{gen:t,data:c,keyword:r,it:n}=e,i=t.name("valid");for(const b in a)(0,f.alwaysValidSchema)(n,a[b])||(t.if((0,d.propertyInData)(t,c,b,n.opts.ownProperties),(()=>{const a=e.subschema({keyword:r,schemaProp:b},i);e.mergeValidEvaluated(a,i)}),(()=>t.var(i,!0))),e.ok(i))}a.validatePropertyDeps=n,a.validateSchemaDeps=i,a.default=r},1239:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>c.str`must match "${e.ifClause}" schema`,params:({params:e})=>c._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:a,parentSchema:t,it:d}=e;void 0===t.then&&void 0===t.else&&(0,f.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const n=r(d,"then"),i=r(d,"else");if(!n&&!i)return;const b=a.let("valid",!0),o=a.name("_valid");if(function(){const a=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(a)}(),e.reset(),n&&i){const t=a.let("ifClause");e.setParams({ifClause:t}),a.if(o,s("then",t),s("else",t))}else n?a.if(o,s("then")):a.if((0,c.not)(o),s("else"));function s(t,f){return()=>{const d=e.subschema({keyword:t},o);a.assign(b,o),e.mergeValidEvaluated(d,b),f?a.assign(f,c._`${t}`):e.setParams({ifClause:t})}}e.pass(b,(()=>e.error(!0)))}};function r(e,a){const t=e.schema[a];return void 0!==t&&!(0,f.alwaysValidSchema)(e,t)}a.default=d},56378:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15457),f=t(65354),d=t(20494),r=t(93966),n=t(12661),i=t(83025),b=t(19713),o=t(38660),s=t(40117),l=t(45333),u=t(57923),h=t(16505),p=t(96163),g=t(15844),m=t(1239),x=t(14426);a.default=function(e=!1){const a=[u.default,h.default,p.default,g.default,m.default,x.default,b.default,o.default,i.default,s.default,l.default];return e?a.push(f.default,r.default):a.push(c.default,d.default),a.push(n.default),a}},20494:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateTuple=void 0;const c=t(99029),f=t(94227),d=t(15765),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:a,it:t}=e;if(Array.isArray(a))return n(e,"additionalItems",a);t.items=!0,(0,f.alwaysValidSchema)(t,a)||e.ok((0,d.validateArray)(e))}};function n(e,a,t=e.schema){const{gen:d,parentSchema:r,data:n,keyword:i,it:b}=e;!function(e){const{opts:c,errSchemaPath:d}=b,r=t.length,n=r===e.minItems&&(r===e.maxItems||!1===e[a]);if(c.strictTuples&&!n){const e=`"${i}" is ${r}-tuple, but minItems or maxItems/${a} are not specified or different at path "${d}"`;(0,f.checkStrictMode)(b,e,c.strictTuples)}}(r),b.opts.unevaluated&&t.length&&!0!==b.items&&(b.items=f.mergeEvaluated.items(d,t.length,b.items));const o=d.name("valid"),s=d.const("len",c._`${n}.length`);t.forEach(((a,t)=>{(0,f.alwaysValidSchema)(b,a)||(d.if(c._`${s} > ${t}`,(()=>e.subschema({keyword:i,schemaProp:t,dataProp:t},o))),e.ok(o))}))}a.validateTuple=n,a.default=r},93966:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(15765),r=t(15457),n={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>c.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>c._`{limit: ${e}}`},code(e){const{schema:a,parentSchema:t,it:c}=e,{prefixItems:n}=t;c.items=!0,(0,f.alwaysValidSchema)(c,a)||(n?(0,r.validateAdditionalItems)(e,n):e.ok((0,d.validateArray)(e)))}};a.default=n},57923:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(94227),f={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:a,schema:t,it:f}=e;if((0,c.alwaysValidSchema)(f,t))return void e.fail();const d=a.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},d),e.failResult(d,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};a.default=f},96163:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>c._`{passingSchemas: ${e.passing}}`},code(e){const{gen:a,schema:t,parentSchema:d,it:r}=e;if(!Array.isArray(t))throw new Error("ajv implementation error");if(r.opts.discriminator&&d.discriminator)return;const n=t,i=a.let("valid",!1),b=a.let("passing",null),o=a.name("_valid");e.setParams({passing:b}),a.block((function(){n.forEach(((t,d)=>{let n;(0,f.alwaysValidSchema)(r,t)?a.var(o,!0):n=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},o),d>0&&a.if(c._`${o} && ${i}`).assign(i,!1).assign(b,c._`[${b}, ${d}]`).else(),a.if(o,(()=>{a.assign(i,!0),a.assign(b,d),n&&e.mergeEvaluated(n,c.Name)}))}))})),e.result(i,(()=>e.reset()),(()=>e.error(!0)))}};a.default=d},45333:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15765),f=t(99029),d=t(94227),r=t(94227),n={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:a,schema:t,data:n,parentSchema:i,it:b}=e,{opts:o}=b,s=(0,c.allSchemaProperties)(t),l=s.filter((e=>(0,d.alwaysValidSchema)(b,t[e])));if(0===s.length||l.length===s.length&&(!b.opts.unevaluated||!0===b.props))return;const u=o.strictSchema&&!o.allowMatchingProperties&&i.properties,h=a.name("valid");!0===b.props||b.props instanceof f.Name||(b.props=(0,r.evaluatedPropsToName)(a,b.props));const{props:p}=b;function g(e){for(const a in u)new RegExp(e).test(a)&&(0,d.checkStrictMode)(b,`property ${a} matches pattern ${e} (use allowMatchingProperties)`)}function m(t){a.forIn("key",n,(d=>{a.if(f._`${(0,c.usePattern)(e,t)}.test(${d})`,(()=>{const c=l.includes(t);c||e.subschema({keyword:"patternProperties",schemaProp:t,dataProp:d,dataPropType:r.Type.Str},h),b.opts.unevaluated&&!0!==p?a.assign(f._`${p}[${d}]`,!0):c||b.allErrors||a.if((0,f.not)(h),(()=>a.break()))}))}))}!function(){for(const e of s)u&&g(e),b.allErrors?m(e):(a.var(h,!0),m(e),a.if(h))}()}};a.default=n},65354:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(20494),f={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,c.validateTuple)(e,"items")};a.default=f},40117:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(62586),f=t(15765),d=t(94227),r=t(38660),n={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:a,schema:t,parentSchema:n,data:i,it:b}=e;"all"===b.opts.removeAdditional&&void 0===n.additionalProperties&&r.default.code(new c.KeywordCxt(b,r.default,"additionalProperties"));const o=(0,f.allSchemaProperties)(t);for(const e of o)b.definedProperties.add(e);b.opts.unevaluated&&o.length&&!0!==b.props&&(b.props=d.mergeEvaluated.props(a,(0,d.toHash)(o),b.props));const s=o.filter((e=>!(0,d.alwaysValidSchema)(b,t[e])));if(0===s.length)return;const l=a.name("valid");for(const t of s)u(t)?h(t):(a.if((0,f.propertyInData)(a,i,t,b.opts.ownProperties)),h(t),b.allErrors||a.else().var(l,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(l);function u(e){return b.opts.useDefaults&&!b.compositeRule&&void 0!==t[e].default}function h(a){e.subschema({keyword:"properties",schemaProp:a,dataProp:a},l)}}};a.default=n},19713:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>c._`{propertyName: ${e.propertyName}}`},code(e){const{gen:a,schema:t,data:d,it:r}=e;if((0,f.alwaysValidSchema)(r,t))return;const n=a.name("valid");a.forIn("key",d,(t=>{e.setParams({propertyName:t}),e.subschema({keyword:"propertyNames",data:t,dataTypes:["string"],propertyName:t,compositeRule:!0},n),a.if((0,c.not)(n),(()=>{e.error(!0),r.allErrors||a.break()}))})),e.ok(n)}};a.default=d},14426:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(94227),f={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:a,it:t}){void 0===a.if&&(0,c.checkStrictMode)(t,`"${e}" without "if" is ignored`)}};a.default=f},15765:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateUnion=a.validateArray=a.usePattern=a.callValidateCode=a.schemaProperties=a.allSchemaProperties=a.noPropertyInData=a.propertyInData=a.isOwnProperty=a.hasPropFunc=a.reportMissingProp=a.checkMissingProp=a.checkReportMissingProp=void 0;const c=t(99029),f=t(94227),d=t(42023),r=t(94227);function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:c._`Object.prototype.hasOwnProperty`})}function i(e,a,t){return c._`${n(e)}.call(${a}, ${t})`}function b(e,a,t,f){const d=c._`${a}${(0,c.getProperty)(t)} === undefined`;return f?(0,c.or)(d,(0,c.not)(i(e,a,t))):d}function o(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}a.checkReportMissingProp=function(e,a){const{gen:t,data:f,it:d}=e;t.if(b(t,f,a,d.opts.ownProperties),(()=>{e.setParams({missingProperty:c._`${a}`},!0),e.error()}))},a.checkMissingProp=function({gen:e,data:a,it:{opts:t}},f,d){return(0,c.or)(...f.map((f=>(0,c.and)(b(e,a,f,t.ownProperties),c._`${d} = ${f}`))))},a.reportMissingProp=function(e,a){e.setParams({missingProperty:a},!0),e.error()},a.hasPropFunc=n,a.isOwnProperty=i,a.propertyInData=function(e,a,t,f){const d=c._`${a}${(0,c.getProperty)(t)} !== undefined`;return f?c._`${d} && ${i(e,a,t)}`:d},a.noPropertyInData=b,a.allSchemaProperties=o,a.schemaProperties=function(e,a){return o(a).filter((t=>!(0,f.alwaysValidSchema)(e,a[t])))},a.callValidateCode=function({schemaCode:e,data:a,it:{gen:t,topSchemaRef:f,schemaPath:r,errorPath:n},it:i},b,o,s){const l=s?c._`${e}, ${a}, ${f}${r}`:a,u=[[d.default.instancePath,(0,c.strConcat)(d.default.instancePath,n)],[d.default.parentData,i.parentData],[d.default.parentDataProperty,i.parentDataProperty],[d.default.rootData,d.default.rootData]];i.opts.dynamicRef&&u.push([d.default.dynamicAnchors,d.default.dynamicAnchors]);const h=c._`${l}, ${t.object(...u)}`;return o!==c.nil?c._`${b}.call(${o}, ${h})`:c._`${b}(${h})`};const s=c._`new RegExp`;a.usePattern=function({gen:e,it:{opts:a}},t){const f=a.unicodeRegExp?"u":"",{regExp:d}=a.code,n=d(t,f);return e.scopeValue("pattern",{key:n.toString(),ref:n,code:c._`${"new RegExp"===d.code?s:(0,r.useFunc)(e,d)}(${t}, ${f})`})},a.validateArray=function(e){const{gen:a,data:t,keyword:d,it:r}=e,n=a.name("valid");if(r.allErrors){const e=a.let("valid",!0);return i((()=>a.assign(e,!1))),e}return a.var(n,!0),i((()=>a.break())),n;function i(r){const i=a.const("len",c._`${t}.length`);a.forRange("i",0,i,(t=>{e.subschema({keyword:d,dataProp:t,dataPropType:f.Type.Num},n),a.if((0,c.not)(n),r)}))}},a.validateUnion=function(e){const{gen:a,schema:t,keyword:d,it:r}=e;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some((e=>(0,f.alwaysValidSchema)(r,e)))&&!r.opts.unevaluated)return;const n=a.let("valid",!1),i=a.name("_valid");a.block((()=>t.forEach(((t,f)=>{const r=e.subschema({keyword:d,schemaProp:f,compositeRule:!0},i);a.assign(n,c._`${n} || ${i}`),e.mergeValidEvaluated(r,i)||a.if((0,c.not)(n))})))),e.result(n,(()=>e.reset()),(()=>e.error(!0)))}},83463:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};a.default=t},72128:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(83463),f=t(13693),d=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",c.default,f.default];a.default=d},13693:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.callRef=a.getValidate=void 0;const c=t(34551),f=t(15765),d=t(99029),r=t(42023),n=t(73835),i=t(94227),b={keyword:"$ref",schemaType:"string",code(e){const{gen:a,schema:t,it:f}=e,{baseId:r,schemaEnv:i,validateName:b,opts:l,self:u}=f,{root:h}=i;if(("#"===t||"#/"===t)&&r===h.baseId)return function(){if(i===h)return s(e,b,i,i.$async);const t=a.scopeValue("root",{ref:h});return s(e,d._`${t}.validate`,h,h.$async)}();const p=n.resolveRef.call(u,h,r,t);if(void 0===p)throw new c.default(f.opts.uriResolver,r,t);return p instanceof n.SchemaEnv?function(a){const t=o(e,a);s(e,t,a,a.$async)}(p):function(c){const f=a.scopeValue("schema",!0===l.code.source?{ref:c,code:(0,d.stringify)(c)}:{ref:c}),r=a.name("valid"),n=e.subschema({schema:c,dataTypes:[],schemaPath:d.nil,topSchemaRef:f,errSchemaPath:t},r);e.mergeEvaluated(n),e.ok(r)}(p)}};function o(e,a){const{gen:t}=e;return a.validate?t.scopeValue("validate",{ref:a.validate}):d._`${t.scopeValue("wrapper",{ref:a})}.validate`}function s(e,a,t,c){const{gen:n,it:b}=e,{allErrors:o,schemaEnv:s,opts:l}=b,u=l.passContext?r.default.this:d.nil;function h(e){const a=d._`${e}.errors`;n.assign(r.default.vErrors,d._`${r.default.vErrors} === null ? ${a} : ${r.default.vErrors}.concat(${a})`),n.assign(r.default.errors,d._`${r.default.vErrors}.length`)}function p(e){var a;if(!b.opts.unevaluated)return;const c=null===(a=null==t?void 0:t.validate)||void 0===a?void 0:a.evaluated;if(!0!==b.props)if(c&&!c.dynamicProps)void 0!==c.props&&(b.props=i.mergeEvaluated.props(n,c.props,b.props));else{const a=n.var("props",d._`${e}.evaluated.props`);b.props=i.mergeEvaluated.props(n,a,b.props,d.Name)}if(!0!==b.items)if(c&&!c.dynamicItems)void 0!==c.items&&(b.items=i.mergeEvaluated.items(n,c.items,b.items));else{const a=n.var("items",d._`${e}.evaluated.items`);b.items=i.mergeEvaluated.items(n,a,b.items,d.Name)}}c?function(){if(!s.$async)throw new Error("async schema referenced by sync schema");const t=n.let("valid");n.try((()=>{n.code(d._`await ${(0,f.callValidateCode)(e,a,u)}`),p(a),o||n.assign(t,!0)}),(e=>{n.if(d._`!(${e} instanceof ${b.ValidationError})`,(()=>n.throw(e))),h(e),o||n.assign(t,!1)})),e.ok(t)}():e.result((0,f.callValidateCode)(e,a,u),(()=>p(a)),(()=>h(a)))}a.getValidate=o,a.callRef=s,a.default=b},36653:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(97652),d=t(73835),r=t(34551),n=t(94227),i={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:a}})=>e===f.DiscrError.Tag?`tag "${a}" must be string`:`value of tag "${a}" must be in oneOf`,params:({params:{discrError:e,tag:a,tagName:t}})=>c._`{error: ${e}, tag: ${t}, tagValue: ${a}}`},code(e){const{gen:a,data:t,schema:i,parentSchema:b,it:o}=e,{oneOf:s}=b;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=i.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const u=a.let("valid",!1),h=a.const("tag",c._`${t}${(0,c.getProperty)(l)}`);function p(t){const f=a.name("valid"),d=e.subschema({keyword:"oneOf",schemaProp:t},f);return e.mergeEvaluated(d,c.Name),f}a.if(c._`typeof ${h} == "string"`,(()=>function(){const t=function(){var e;const a={},t=f(b);let c=!0;for(let a=0;ae.error(!1,{discrError:f.DiscrError.Tag,tag:h,tagName:l}))),e.ok(u)}};a.default=i},97652:(e,a)=>{"use strict";var t;Object.defineProperty(a,"__esModule",{value:!0}),a.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t||(a.DiscrError=t={}))},86144:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(72128),f=t(67060),d=t(56378),r=t(97532),n=t(69857),i=[c.default,f.default,(0,d.default)(),r.default,n.metadataVocabulary,n.contentVocabulary];a.default=i},94737:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>c.str`must match format "${e}"`,params:({schemaCode:e})=>c._`{format: ${e}}`},code(e,a){const{gen:t,data:f,$data:d,schema:r,schemaCode:n,it:i}=e,{opts:b,errSchemaPath:o,schemaEnv:s,self:l}=i;b.validateFormats&&(d?function(){const d=t.scopeValue("formats",{ref:l.formats,code:b.code.formats}),r=t.const("fDef",c._`${d}[${n}]`),i=t.let("fType"),o=t.let("format");t.if(c._`typeof ${r} == "object" && !(${r} instanceof RegExp)`,(()=>t.assign(i,c._`${r}.type || "string"`).assign(o,c._`${r}.validate`)),(()=>t.assign(i,c._`"string"`).assign(o,r))),e.fail$data((0,c.or)(!1===b.strictSchema?c.nil:c._`${n} && !${o}`,function(){const e=s.$async?c._`(${r}.async ? await ${o}(${f}) : ${o}(${f}))`:c._`${o}(${f})`,t=c._`(typeof ${o} == "function" ? ${e} : ${o}.test(${f}))`;return c._`${o} && ${o} !== true && ${i} === ${a} && !${t}`}()))}():function(){const d=l.formats[r];if(!d)return void function(){if(!1!==b.strictSchema)throw new Error(e());function e(){return`unknown format "${r}" ignored in schema at path "${o}"`}l.logger.warn(e())}();if(!0===d)return;const[n,i,u]=function(e){const a=e instanceof RegExp?(0,c.regexpCode)(e):b.code.formats?c._`${b.code.formats}${(0,c.getProperty)(r)}`:void 0,f=t.scopeValue("formats",{key:r,ref:e,code:a});return"object"!=typeof e||e instanceof RegExp?["string",e,f]:[e.type||"string",e.validate,c._`${f}.validate`]}(d);n===a&&e.pass(function(){if("object"==typeof d&&!(d instanceof RegExp)&&d.async){if(!s.$async)throw new Error("async format in sync schema");return c._`await ${u}(${f})`}return"function"==typeof i?c._`${u}(${f})`:c._`${u}.test(${f})`}())}())}};a.default=f},97532:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=[t(94737).default];a.default=c},69857:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.contentVocabulary=a.metadataVocabulary=void 0,a.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],a.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},27935:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(76250),r={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>c._`{allowedValue: ${e}}`},code(e){const{gen:a,data:t,$data:r,schemaCode:n,schema:i}=e;r||i&&"object"==typeof i?e.fail$data(c._`!${(0,f.useFunc)(a,d.default)}(${t}, ${n})`):e.fail(c._`${i} !== ${t}`)}};a.default=r},28643:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(76250),r={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>c._`{allowedValues: ${e}}`},code(e){const{gen:a,data:t,$data:r,schema:n,schemaCode:i,it:b}=e;if(!r&&0===n.length)throw new Error("enum must have non-empty array");const o=n.length>=b.opts.loopEnum;let s;const l=()=>null!=s?s:s=(0,f.useFunc)(a,d.default);let u;if(o||r)u=a.let("valid"),e.block$data(u,(function(){a.assign(u,!1),a.forOf("v",i,(e=>a.if(c._`${l()}(${t}, ${e})`,(()=>a.assign(u,!0).break()))))}));else{if(!Array.isArray(n))throw new Error("ajv implementation error");const e=a.const("vSchema",i);u=(0,c.or)(...n.map(((a,f)=>function(e,a){const f=n[a];return"object"==typeof f&&null!==f?c._`${l()}(${t}, ${e}[${a}])`:c._`${t} === ${f}`}(e,f))))}e.pass(u)}};a.default=r},67060:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(75882),f=t(63439),d=t(77307),r=t(90422),n=t(34486),i=t(34003),b=t(61163),o=t(60617),s=t(27935),l=t(28643),u=[c.default,f.default,d.default,r.default,n.default,i.default,b.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},s.default,l.default];a.default=u},61163:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:a}){const t="maxItems"===e?"more":"fewer";return c.str`must NOT have ${t} than ${a} items`},params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:a,data:t,schemaCode:f}=e,d="maxItems"===a?c.operators.GT:c.operators.LT;e.fail$data(c._`${t}.length ${d} ${f}`)}};a.default=f},77307:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(53853),r={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:a}){const t="maxLength"===e?"more":"fewer";return c.str`must NOT have ${t} than ${a} characters`},params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:a,data:t,schemaCode:r,it:n}=e,i="maxLength"===a?c.operators.GT:c.operators.LT,b=!1===n.opts.unicode?c._`${t}.length`:c._`${(0,f.useFunc)(e.gen,d.default)}(${t})`;e.fail$data(c._`${b} ${i} ${r}`)}};a.default=r},75882:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=c.operators,d={maximum:{okStr:"<=",ok:f.LTE,fail:f.GT},minimum:{okStr:">=",ok:f.GTE,fail:f.LT},exclusiveMaximum:{okStr:"<",ok:f.LT,fail:f.GTE},exclusiveMinimum:{okStr:">",ok:f.GT,fail:f.LTE}},r={message:({keyword:e,schemaCode:a})=>c.str`must be ${d[e].okStr} ${a}`,params:({keyword:e,schemaCode:a})=>c._`{comparison: ${d[e].okStr}, limit: ${a}}`},n={keyword:Object.keys(d),type:"number",schemaType:"number",$data:!0,error:r,code(e){const{keyword:a,data:t,schemaCode:f}=e;e.fail$data(c._`${t} ${d[a].fail} ${f} || isNaN(${t})`)}};a.default=n},34486:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:a}){const t="maxProperties"===e?"more":"fewer";return c.str`must NOT have ${t} than ${a} properties`},params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:a,data:t,schemaCode:f}=e,d="maxProperties"===a?c.operators.GT:c.operators.LT;e.fail$data(c._`Object.keys(${t}).length ${d} ${f}`)}};a.default=f},63439:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>c.str`must be multiple of ${e}`,params:({schemaCode:e})=>c._`{multipleOf: ${e}}`},code(e){const{gen:a,data:t,schemaCode:f,it:d}=e,r=d.opts.multipleOfPrecision,n=a.let("res"),i=r?c._`Math.abs(Math.round(${n}) - ${n}) > 1e-${r}`:c._`${n} !== parseInt(${n})`;e.fail$data(c._`(${f} === 0 || (${n} = ${t}/${f}, ${i}))`)}};a.default=f},90422:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15765),f=t(99029),d={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>f.str`must match pattern "${e}"`,params:({schemaCode:e})=>f._`{pattern: ${e}}`},code(e){const{data:a,$data:t,schema:d,schemaCode:r,it:n}=e,i=n.opts.unicodeRegExp?"u":"",b=t?f._`(new RegExp(${r}, ${i}))`:(0,c.usePattern)(e,d);e.fail$data(f._`!${b}.test(${a})`)}};a.default=d},34003:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15765),f=t(99029),d=t(94227),r={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>f.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>f._`{missingProperty: ${e}}`},code(e){const{gen:a,schema:t,schemaCode:r,data:n,$data:i,it:b}=e,{opts:o}=b;if(!i&&0===t.length)return;const s=t.length>=o.loopRequired;if(b.allErrors?function(){if(s||i)e.block$data(f.nil,l);else for(const a of t)(0,c.checkReportMissingProp)(e,a)}():function(){const d=a.let("missing");if(s||i){const t=a.let("valid",!0);e.block$data(t,(()=>function(t,d){e.setParams({missingProperty:t}),a.forOf(t,r,(()=>{a.assign(d,(0,c.propertyInData)(a,n,t,o.ownProperties)),a.if((0,f.not)(d),(()=>{e.error(),a.break()}))}),f.nil)}(d,t))),e.ok(t)}else a.if((0,c.checkMissingProp)(e,t,d)),(0,c.reportMissingProp)(e,d),a.else()}(),o.strictRequired){const a=e.parentSchema.properties,{definedProperties:c}=e.it;for(const e of t)if(void 0===(null==a?void 0:a[e])&&!c.has(e)){const a=`required property "${e}" is not defined at "${b.schemaEnv.baseId+b.errSchemaPath}" (strictRequired)`;(0,d.checkStrictMode)(b,a,b.opts.strictRequired)}}function l(){a.forOf("prop",r,(t=>{e.setParams({missingProperty:t}),a.if((0,c.noPropertyInData)(a,n,t,o.ownProperties),(()=>e.error()))}))}}};a.default=r},60617:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(10208),f=t(99029),d=t(94227),r=t(76250),n={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:a}})=>f.str`must NOT have duplicate items (items ## ${a} and ${e} are identical)`,params:({params:{i:e,j:a}})=>f._`{i: ${e}, j: ${a}}`},code(e){const{gen:a,data:t,$data:n,schema:i,parentSchema:b,schemaCode:o,it:s}=e;if(!n&&!i)return;const l=a.let("valid"),u=b.items?(0,c.getSchemaTypes)(b.items):[];function h(d,r){const n=a.name("item"),i=(0,c.checkDataTypes)(u,n,s.opts.strictNumbers,c.DataType.Wrong),b=a.const("indices",f._`{}`);a.for(f._`;${d}--;`,(()=>{a.let(n,f._`${t}[${d}]`),a.if(i,f._`continue`),u.length>1&&a.if(f._`typeof ${n} == "string"`,f._`${n} += "_"`),a.if(f._`typeof ${b}[${n}] == "number"`,(()=>{a.assign(r,f._`${b}[${n}]`),e.error(),a.assign(l,!1).break()})).code(f._`${b}[${n}] = ${d}`)}))}function p(c,n){const i=(0,d.useFunc)(a,r.default),b=a.name("outer");a.label(b).for(f._`;${c}--;`,(()=>a.for(f._`${n} = ${c}; ${n}--;`,(()=>a.if(f._`${i}(${t}[${c}], ${t}[${n}])`,(()=>{e.error(),a.assign(l,!1).break(b)}))))))}e.block$data(l,(function(){const c=a.let("i",f._`${t}.length`),d=a.let("j");e.setParams({i:c,j:d}),a.assign(l,!0),a.if(f._`${c} > 1`,(()=>(u.length>0&&!u.some((e=>"object"===e||"array"===e))?h:p)(c,d)))}),f._`${o} === false`),e.ok(l)}};a.default=n},87568:(e,a,t)=>{var c=a;c.bignum=t(72344),c.define=t(47363).define,c.base=t(9673),c.constants=t(22153),c.decoders=t(22853),c.encoders=t(24669)},47363:(e,a,t)=>{var c=t(87568),f=t(56698);function d(e,a){this.name=e,this.body=a,this.decoders={},this.encoders={}}a.define=function(e,a){return new d(e,a)},d.prototype._createNamed=function(e){var a;try{a=t(68961).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){a=function(e){this._initNamed(e)}}return f(a,e),a.prototype._initNamed=function(a){e.call(this,a)},new a(this)},d.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(c.decoders[e])),this.decoders[e]},d.prototype.decode=function(e,a,t){return this._getDecoder(a).decode(e,t)},d.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(c.encoders[e])),this.encoders[e]},d.prototype.encode=function(e,a,t){return this._getEncoder(a).encode(e,t)}},47227:(e,a,t)=>{var c=t(56698),f=t(9673).Reporter,d=t(48287).Buffer;function r(e,a){f.call(this,a),d.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function n(e,a){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof n||(e=new n(e,a)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return a.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=d.byteLength(e);else{if(!d.isBuffer(e))return a.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}c(r,f),a.t=r,r.prototype.save=function(){return{offset:this.offset,reporter:f.prototype.save.call(this)}},r.prototype.restore=function(e){var a=new r(this.base);return a.offset=e.offset,a.length=this.offset,this.offset=e.offset,f.prototype.restore.call(this,e.reporter),a},r.prototype.isEmpty=function(){return this.offset===this.length},r.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},r.prototype.skip=function(e,a){if(!(this.offset+e<=this.length))return this.error(a||"DecoderBuffer overrun");var t=new r(this.base);return t._reporterState=this._reporterState,t.offset=this.offset,t.length=this.offset+e,this.offset+=e,t},r.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},a.d=n,n.prototype.join=function(e,a){return e||(e=new d(this.length)),a||(a=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(t){t.join(e,a),a+=t.length})):("number"==typeof this.value?e[a]=this.value:"string"==typeof this.value?e.write(this.value,a):d.isBuffer(this.value)&&this.value.copy(e,a),a+=this.length)),e}},9673:(e,a,t)=>{var c=a;c.Reporter=t(89220).a,c.DecoderBuffer=t(47227).t,c.EncoderBuffer=t(47227).d,c.Node=t(90993)},90993:(e,a,t)=>{var c=t(9673).Reporter,f=t(9673).EncoderBuffer,d=t(9673).DecoderBuffer,r=t(43349),n=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],i=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(n);function b(e,a){var t={};this._baseState=t,t.enc=e,t.parent=a||null,t.children=null,t.tag=null,t.args=null,t.reverseArgs=null,t.choice=null,t.optional=!1,t.any=!1,t.obj=!1,t.use=null,t.useDecoder=null,t.key=null,t.default=null,t.explicit=null,t.implicit=null,t.contains=null,t.parent||(t.children=[],this._wrap())}e.exports=b;var o=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];b.prototype.clone=function(){var e=this._baseState,a={};o.forEach((function(t){a[t]=e[t]}));var t=new this.constructor(a.parent);return t._baseState=a,t},b.prototype._wrap=function(){var e=this._baseState;i.forEach((function(a){this[a]=function(){var t=new this.constructor(this);return e.children.push(t),t[a].apply(t,arguments)}}),this)},b.prototype._init=function(e){var a=this._baseState;r(null===a.parent),e.call(this),a.children=a.children.filter((function(e){return e._baseState.parent===this}),this),r.equal(a.children.length,1,"Root node can have only one child")},b.prototype._useArgs=function(e){var a=this._baseState,t=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==t.length&&(r(null===a.children),a.children=t,t.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(r(null===a.args),a.args=e,a.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var a={};return Object.keys(e).forEach((function(t){t==(0|t)&&(t|=0);var c=e[t];a[c]=t})),a})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){b.prototype[e]=function(){var a=this._baseState;throw new Error(e+" not implemented for encoding: "+a.enc)}})),n.forEach((function(e){b.prototype[e]=function(){var a=this._baseState,t=Array.prototype.slice.call(arguments);return r(null===a.tag),a.tag=e,this._useArgs(t),this}})),b.prototype.use=function(e){r(e);var a=this._baseState;return r(null===a.use),a.use=e,this},b.prototype.optional=function(){return this._baseState.optional=!0,this},b.prototype.def=function(e){var a=this._baseState;return r(null===a.default),a.default=e,a.optional=!0,this},b.prototype.explicit=function(e){var a=this._baseState;return r(null===a.explicit&&null===a.implicit),a.explicit=e,this},b.prototype.implicit=function(e){var a=this._baseState;return r(null===a.explicit&&null===a.implicit),a.implicit=e,this},b.prototype.obj=function(){var e=this._baseState,a=Array.prototype.slice.call(arguments);return e.obj=!0,0!==a.length&&this._useArgs(a),this},b.prototype.key=function(e){var a=this._baseState;return r(null===a.key),a.key=e,this},b.prototype.any=function(){return this._baseState.any=!0,this},b.prototype.choice=function(e){var a=this._baseState;return r(null===a.choice),a.choice=e,this._useArgs(Object.keys(e).map((function(a){return e[a]}))),this},b.prototype.contains=function(e){var a=this._baseState;return r(null===a.use),a.contains=e,this},b.prototype._decode=function(e,a){var t=this._baseState;if(null===t.parent)return e.wrapResult(t.children[0]._decode(e,a));var c,f=t.default,r=!0,n=null;if(null!==t.key&&(n=e.enterKey(t.key)),t.optional){var i=null;if(null!==t.explicit?i=t.explicit:null!==t.implicit?i=t.implicit:null!==t.tag&&(i=t.tag),null!==i||t.any){if(r=this._peekTag(e,i,t.any),e.isError(r))return r}else{var b=e.save();try{null===t.choice?this._decodeGeneric(t.tag,e,a):this._decodeChoice(e,a),r=!0}catch(e){r=!1}e.restore(b)}}if(t.obj&&r&&(c=e.enterObject()),r){if(null!==t.explicit){var o=this._decodeTag(e,t.explicit);if(e.isError(o))return o;e=o}var s=e.offset;if(null===t.use&&null===t.choice){t.any&&(b=e.save());var l=this._decodeTag(e,null!==t.implicit?t.implicit:t.tag,t.any);if(e.isError(l))return l;t.any?f=e.raw(b):e=l}if(a&&a.track&&null!==t.tag&&a.track(e.path(),s,e.length,"tagged"),a&&a.track&&null!==t.tag&&a.track(e.path(),e.offset,e.length,"content"),t.any||(f=null===t.choice?this._decodeGeneric(t.tag,e,a):this._decodeChoice(e,a)),e.isError(f))return f;if(t.any||null!==t.choice||null===t.children||t.children.forEach((function(t){t._decode(e,a)})),t.contains&&("octstr"===t.tag||"bitstr"===t.tag)){var u=new d(f);f=this._getUse(t.contains,e._reporterState.obj)._decode(u,a)}}return t.obj&&r&&(f=e.leaveObject(c)),null===t.key||null===f&&!0!==r?null!==n&&e.exitKey(n):e.leaveKey(n,t.key,f),f},b.prototype._decodeGeneric=function(e,a,t){var c=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(a,e,c.args[0],t):/str$/.test(e)?this._decodeStr(a,e,t):"objid"===e&&c.args?this._decodeObjid(a,c.args[0],c.args[1],t):"objid"===e?this._decodeObjid(a,null,null,t):"gentime"===e||"utctime"===e?this._decodeTime(a,e,t):"null_"===e?this._decodeNull(a,t):"bool"===e?this._decodeBool(a,t):"objDesc"===e?this._decodeStr(a,e,t):"int"===e||"enum"===e?this._decodeInt(a,c.args&&c.args[0],t):null!==c.use?this._getUse(c.use,a._reporterState.obj)._decode(a,t):a.error("unknown tag: "+e)},b.prototype._getUse=function(e,a){var t=this._baseState;return t.useDecoder=this._use(e,a),r(null===t.useDecoder._baseState.parent),t.useDecoder=t.useDecoder._baseState.children[0],t.implicit!==t.useDecoder._baseState.implicit&&(t.useDecoder=t.useDecoder.clone(),t.useDecoder._baseState.implicit=t.implicit),t.useDecoder},b.prototype._decodeChoice=function(e,a){var t=this._baseState,c=null,f=!1;return Object.keys(t.choice).some((function(d){var r=e.save(),n=t.choice[d];try{var i=n._decode(e,a);if(e.isError(i))return!1;c={type:d,value:i},f=!0}catch(a){return e.restore(r),!1}return!0}),this),f?c:e.error("Choice not matched")},b.prototype._createEncoderBuffer=function(e){return new f(e,this.reporter)},b.prototype._encode=function(e,a,t){var c=this._baseState;if(null===c.default||c.default!==e){var f=this._encodeValue(e,a,t);if(void 0!==f&&!this._skipDefault(f,a,t))return f}},b.prototype._encodeValue=function(e,a,t){var f=this._baseState;if(null===f.parent)return f.children[0]._encode(e,a||new c);var d=null;if(this.reporter=a,f.optional&&void 0===e){if(null===f.default)return;e=f.default}var r=null,n=!1;if(f.any)d=this._createEncoderBuffer(e);else if(f.choice)d=this._encodeChoice(e,a);else if(f.contains)r=this._getUse(f.contains,t)._encode(e,a),n=!0;else if(f.children)r=f.children.map((function(t){if("null_"===t._baseState.tag)return t._encode(null,a,e);if(null===t._baseState.key)return a.error("Child should have a key");var c=a.enterKey(t._baseState.key);if("object"!=typeof e)return a.error("Child expected, but input is not object");var f=t._encode(e[t._baseState.key],a,e);return a.leaveKey(c),f}),this).filter((function(e){return e})),r=this._createEncoderBuffer(r);else if("seqof"===f.tag||"setof"===f.tag){if(!f.args||1!==f.args.length)return a.error("Too many args for : "+f.tag);if(!Array.isArray(e))return a.error("seqof/setof, but data is not Array");var i=this.clone();i._baseState.implicit=null,r=this._createEncoderBuffer(e.map((function(t){var c=this._baseState;return this._getUse(c.args[0],e)._encode(t,a)}),i))}else null!==f.use?d=this._getUse(f.use,t)._encode(e,a):(r=this._encodePrimitive(f.tag,e),n=!0);if(!f.any&&null===f.choice){var b=null!==f.implicit?f.implicit:f.tag,o=null===f.implicit?"universal":"context";null===b?null===f.use&&a.error("Tag could be omitted only for .use()"):null===f.use&&(d=this._encodeComposite(b,n,o,r))}return null!==f.explicit&&(d=this._encodeComposite(f.explicit,!1,"context",d)),d},b.prototype._encodeChoice=function(e,a){var t=this._baseState,c=t.choice[e.type];return c||r(!1,e.type+" not found in "+JSON.stringify(Object.keys(t.choice))),c._encode(e.value,a)},b.prototype._encodePrimitive=function(e,a){var t=this._baseState;if(/str$/.test(e))return this._encodeStr(a,e);if("objid"===e&&t.args)return this._encodeObjid(a,t.reverseArgs[0],t.args[1]);if("objid"===e)return this._encodeObjid(a,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(a,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(a,t.args&&t.reverseArgs[0]);if("bool"===e)return this._encodeBool(a);if("objDesc"===e)return this._encodeStr(a,e);throw new Error("Unsupported tag: "+e)},b.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},b.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},89220:(e,a,t)=>{var c=t(56698);function f(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function d(e,a){this.path=e,this.rethrow(a)}a.a=f,f.prototype.isError=function(e){return e instanceof d},f.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},f.prototype.restore=function(e){var a=this._reporterState;a.obj=e.obj,a.path=a.path.slice(0,e.pathLen)},f.prototype.enterKey=function(e){return this._reporterState.path.push(e)},f.prototype.exitKey=function(e){var a=this._reporterState;a.path=a.path.slice(0,e-1)},f.prototype.leaveKey=function(e,a,t){var c=this._reporterState;this.exitKey(e),null!==c.obj&&(c.obj[a]=t)},f.prototype.path=function(){return this._reporterState.path.join("/")},f.prototype.enterObject=function(){var e=this._reporterState,a=e.obj;return e.obj={},a},f.prototype.leaveObject=function(e){var a=this._reporterState,t=a.obj;return a.obj=e,t},f.prototype.error=function(e){var a,t=this._reporterState,c=e instanceof d;if(a=c?e:new d(t.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!t.options.partial)throw a;return c||t.errors.push(a),a},f.prototype.wrapResult=function(e){var a=this._reporterState;return a.options.partial?{result:this.isError(e)?null:e,errors:a.errors}:e},c(d,Error),d.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,d),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},74598:(e,a,t)=>{var c=t(22153);a.tagClass={0:"universal",1:"application",2:"context",3:"private"},a.tagClassByName=c._reverse(a.tagClass),a.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},a.tagByName=c._reverse(a.tag)},22153:(e,a,t)=>{var c=a;c._reverse=function(e){var a={};return Object.keys(e).forEach((function(t){(0|t)==t&&(t|=0);var c=e[t];a[c]=t})),a},c.der=t(74598)},62010:(e,a,t)=>{var c=t(56698),f=t(87568),d=f.base,r=f.bignum,n=f.constants.der;function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new b,this.tree._init(e.body)}function b(e){d.Node.call(this,"der",e)}function o(e,a){var t=e.readUInt8(a);if(e.isError(t))return t;var c=n.tagClass[t>>6],f=!(32&t);if(31&~t)t&=31;else{var d=t;for(t=0;!(128&~d);){if(d=e.readUInt8(a),e.isError(d))return d;t<<=7,t|=127&d}}return{cls:c,primitive:f,tag:t,tagStr:n.tag[t]}}function s(e,a,t){var c=e.readUInt8(t);if(e.isError(c))return c;if(!a&&128===c)return null;if(!(128&c))return c;var f=127&c;if(f>4)return e.error("length octect is too long");c=0;for(var d=0;d{var c=a;c.der=t(62010),c.pem=t(58903)},58903:(e,a,t)=>{var c=t(56698),f=t(48287).Buffer,d=t(62010);function r(e){d.call(this,e),this.enc="pem"}c(r,d),e.exports=r,r.prototype.decode=function(e,a){for(var t=e.toString().split(/[\r\n]+/g),c=a.label.toUpperCase(),r=/^-----(BEGIN|END) ([^-]+)-----$/,n=-1,i=-1,b=0;b{var c=t(56698),f=t(48287).Buffer,d=t(87568),r=d.base,n=d.constants.der;function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new b,this.tree._init(e.body)}function b(e){r.Node.call(this,"der",e)}function o(e){return e<10?"0"+e:e}e.exports=i,i.prototype.encode=function(e,a){return this.tree._encode(e,a).join()},c(b,r.Node),b.prototype._encodeComposite=function(e,a,t,c){var d,r=function(e,a,t,c){var f;if("seqof"===e?e="seq":"setof"===e&&(e="set"),n.tagByName.hasOwnProperty(e))f=n.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return c.error("Unknown tag: "+e);f=e}return f>=31?c.error("Multi-octet tag encoding unsupported"):(a||(f|=32),f|=n.tagClassByName[t||"universal"]<<6)}(e,a,t,this.reporter);if(c.length<128)return(d=new f(2))[0]=r,d[1]=c.length,this._createEncoderBuffer([d,c]);for(var i=1,b=c.length;b>=256;b>>=8)i++;(d=new f(2+i))[0]=r,d[1]=128|i,b=1+i;for(var o=c.length;o>0;b--,o>>=8)d[b]=255&o;return this._createEncoderBuffer([d,c])},b.prototype._encodeStr=function(e,a){if("bitstr"===a)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===a){for(var t=new f(2*e.length),c=0;c=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var d=0;for(c=0;c=128;r>>=7)d++}var n=new f(d),i=n.length-1;for(c=e.length-1;c>=0;c--)for(r=e[c],n[i--]=127&r;(r>>=7)>0;)n[i--]=128|127&r;return this._createEncoderBuffer(n)},b.prototype._encodeTime=function(e,a){var t,c=new Date(e);return"gentime"===a?t=[o(c.getFullYear()),o(c.getUTCMonth()+1),o(c.getUTCDate()),o(c.getUTCHours()),o(c.getUTCMinutes()),o(c.getUTCSeconds()),"Z"].join(""):"utctime"===a?t=[o(c.getFullYear()%100),o(c.getUTCMonth()+1),o(c.getUTCDate()),o(c.getUTCHours()),o(c.getUTCMinutes()),o(c.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+a+" time is not supported yet"),this._encodeStr(t,"octstr")},b.prototype._encodeNull=function(){return this._createEncoderBuffer("")},b.prototype._encodeInt=function(e,a){if("string"==typeof e){if(!a)return this.reporter.error("String int or enum given, but no values map");if(!a.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=a[e]}if("number"!=typeof e&&!f.isBuffer(e)){var t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=new f(t)}if(f.isBuffer(e)){var c=e.length;0===e.length&&c++;var d=new f(c);return e.copy(d),0===e.length&&(d[0]=0),this._createEncoderBuffer(d)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);c=1;for(var r=e;r>=256;r>>=8)c++;for(r=(d=new Array(c)).length-1;r>=0;r--)d[r]=255&e,e>>=8;return 128&d[0]&&d.unshift(0),this._createEncoderBuffer(new f(d))},b.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},b.prototype._use=function(e,a){return"function"==typeof e&&(e=e(a)),e._getEncoder("der").tree},b.prototype._skipDefault=function(e,a,t){var c,f=this._baseState;if(null===f.default)return!1;var d=e.join();if(void 0===f.defaultBuffer&&(f.defaultBuffer=this._encodeValue(f.default,a,t).join()),d.length!==f.defaultBuffer.length)return!1;for(c=0;c{var c=a;c.der=t(70082),c.pem=t(90735)},90735:(e,a,t)=>{var c=t(56698),f=t(70082);function d(e){f.call(this,e),this.enc="pem"}c(d,f),e.exports=d,d.prototype.encode=function(e,a){for(var t=f.prototype.encode.call(this,e).toString("base64"),c=["-----BEGIN "+a.label+"-----"],d=0;d=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},94148:(e,a,t)=>{"use strict";function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(e,a){for(var t=0;t1?t-1:0),f=1;f1?t-1:0),f=1;f1?t-1:0),f=1;f1?t-1:0),f=1;f{"use strict";function c(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);a&&(c=c.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var a=1;ae.length)&&(t=e.length),e.substring(t-a.length,t)===a}var x="",y="",A="",v="",w={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(e){var a=Object.keys(e),t=Object.create(Object.getPrototypeOf(e));return a.forEach((function(a){t[a]=e[a]})),Object.defineProperty(t,"message",{value:e.message}),t}function I(e){return p(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var E=function(e,a){!function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&l(e,a)}(E,e);var t,c,r,b,o=(t=E,c=s(),function(){var e,a=u(t);if(c){var f=u(this).constructor;e=Reflect.construct(a,arguments,f)}else e=a.apply(this,arguments);return n(this,e)});function E(e){var a;if(function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this,E),"object"!==h(e)||null===e)throw new g("options","Object",e);var t=e.message,c=e.operator,f=e.stackStartFn,d=e.actual,r=e.expected,b=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=t)a=o.call(this,String(t));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(x="",y="",v="",A=""):(x="",y="",v="",A="")),"object"===h(d)&&null!==d&&"object"===h(r)&&null!==r&&"stack"in d&&d instanceof Error&&"stack"in r&&r instanceof Error&&(d=_(d),r=_(r)),"deepStrictEqual"===c||"strictEqual"===c)a=o.call(this,function(e,a,t){var c="",f="",d=0,r="",n=!1,i=I(e),b=i.split("\n"),o=I(a).split("\n"),s=0,l="";if("strictEqual"===t&&"object"===h(e)&&"object"===h(a)&&null!==e&&null!==a&&(t="strictEqualObject"),1===b.length&&1===o.length&&b[0]!==o[0]){var u=b[0].length+o[0].length;if(u<=10){if(!("object"===h(e)&&null!==e||"object"===h(a)&&null!==a||0===e&&0===a))return"".concat(w[t],"\n\n")+"".concat(b[0]," !== ").concat(o[0],"\n")}else if("strictEqualObject"!==t&&u<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;b[0][s]===o[0][s];)s++;s>2&&(l="\n ".concat(function(e,a){if(a=Math.floor(a),0==e.length||0==a)return"";var t=e.length*a;for(a=Math.floor(Math.log(a)/Math.log(2));a;)e+=e,a--;return e+e.substring(0,t-e.length)}(" ",s),"^"),s=0)}}for(var p=b[b.length-1],g=o[o.length-1];p===g&&(s++<2?r="\n ".concat(p).concat(r):c=p,b.pop(),o.pop(),0!==b.length&&0!==o.length);)p=b[b.length-1],g=o[o.length-1];var _=Math.max(b.length,o.length);if(0===_){var E=i.split("\n");if(E.length>30)for(E[26]="".concat(x,"...").concat(v);E.length>27;)E.pop();return"".concat(w.notIdentical,"\n\n").concat(E.join("\n"),"\n")}s>3&&(r="\n".concat(x,"...").concat(v).concat(r),n=!0),""!==c&&(r="\n ".concat(c).concat(r),c="");var C=0,M=w[t]+"\n".concat(y,"+ actual").concat(v," ").concat(A,"- expected").concat(v),B=" ".concat(x,"...").concat(v," Lines skipped");for(s=0;s<_;s++){var L=s-d;if(b.length1&&s>2&&(L>4?(f+="\n".concat(x,"...").concat(v),n=!0):L>3&&(f+="\n ".concat(o[s-2]),C++),f+="\n ".concat(o[s-1]),C++),d=s,c+="\n".concat(A,"-").concat(v," ").concat(o[s]),C++;else if(o.length1&&s>2&&(L>4?(f+="\n".concat(x,"...").concat(v),n=!0):L>3&&(f+="\n ".concat(b[s-2]),C++),f+="\n ".concat(b[s-1]),C++),d=s,f+="\n".concat(y,"+").concat(v," ").concat(b[s]),C++;else{var S=o[s],k=b[s],N=k!==S&&(!m(k,",")||k.slice(0,-1)!==S);N&&m(S,",")&&S.slice(0,-1)===k&&(N=!1,k+=","),N?(L>1&&s>2&&(L>4?(f+="\n".concat(x,"...").concat(v),n=!0):L>3&&(f+="\n ".concat(b[s-2]),C++),f+="\n ".concat(b[s-1]),C++),d=s,f+="\n".concat(y,"+").concat(v," ").concat(k),c+="\n".concat(A,"-").concat(v," ").concat(S),C+=2):(f+=c,c="",1!==L&&0!==s||(f+="\n ".concat(k),C++))}if(C>20&&s<_-2)return"".concat(M).concat(B,"\n").concat(f,"\n").concat(x,"...").concat(v).concat(c,"\n")+"".concat(x,"...").concat(v)}return"".concat(M).concat(n?B:"","\n").concat(f).concat(c).concat(r).concat(l)}(d,r,c));else if("notDeepStrictEqual"===c||"notStrictEqual"===c){var s=w[c],l=I(d).split("\n");if("notStrictEqual"===c&&"object"===h(d)&&null!==d&&(s=w.notStrictEqualObject),l.length>30)for(l[26]="".concat(x,"...").concat(v);l.length>27;)l.pop();a=1===l.length?o.call(this,"".concat(s," ").concat(l[0])):o.call(this,"".concat(s,"\n\n").concat(l.join("\n"),"\n"))}else{var u=I(d),p="",C=w[c];"notDeepEqual"===c||"notEqual"===c?(u="".concat(w[c],"\n\n").concat(u)).length>1024&&(u="".concat(u.slice(0,1021),"...")):(p="".concat(I(r)),u.length>512&&(u="".concat(u.slice(0,509),"...")),p.length>512&&(p="".concat(p.slice(0,509),"...")),"deepEqual"===c||"equal"===c?u="".concat(C,"\n\n").concat(u,"\n\nshould equal\n\n"):p=" ".concat(c," ").concat(p)),a=o.call(this,"".concat(u).concat(p))}return Error.stackTraceLimit=b,a.generatedMessage=!t,Object.defineProperty(i(a),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),a.code="ERR_ASSERTION",a.actual=d,a.expected=r,a.operator=c,Error.captureStackTrace&&Error.captureStackTrace(i(a),f),a.stack,a.name="AssertionError",n(a)}return r=E,(b=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:a,value:function(e,a){return p(this,f(f({},a),{},{customInspect:!1,depth:0}))}}])&&d(r.prototype,b),Object.defineProperty(r,"prototype",{writable:!1}),E}(b(Error),p.custom);e.exports=E},69597:(e,a,t)=>{"use strict";function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(e,a){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,a){return e.__proto__=a,e},f(e,a)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var r,n,i={};function b(e,a,t){t||(t=Error);var r=function(t){!function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&f(e,a)}(o,t);var r,n,i,b=(n=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=d(n);if(i){var t=d(this).constructor;e=Reflect.construct(a,arguments,t)}else e=a.apply(this,arguments);return function(e,a){if(a&&("object"===c(a)||"function"==typeof a))return a;if(void 0!==a)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function o(t,c,f){var d;return function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this,o),d=b.call(this,function(e,t,c){return"string"==typeof a?a:a(e,t,c)}(t,c,f)),d.code=e,d}return r=o,Object.defineProperty(r,"prototype",{writable:!1}),r}(t);i[e]=r}function o(e,a){if(Array.isArray(e)){var t=e.length;return e=e.map((function(e){return String(e)})),t>2?"one of ".concat(a," ").concat(e.slice(0,t-1).join(", "),", or ")+e[t-1]:2===t?"one of ".concat(a," ").concat(e[0]," or ").concat(e[1]):"of ".concat(a," ").concat(e[0])}return"of ".concat(a," ").concat(String(e))}b("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),b("ERR_INVALID_ARG_TYPE",(function(e,a,f){var d,n,i,b,s;if(void 0===r&&(r=t(94148)),r("string"==typeof e,"'name' must be a string"),"string"==typeof a&&(n="not ",a.substr(0,4)===n)?(d="must not be",a=a.replace(/^not /,"")):d="must be",function(e,a,t){return(void 0===t||t>e.length)&&(t=e.length),e.substring(t-9,t)===a}(e," argument"))i="The ".concat(e," ").concat(d," ").concat(o(a,"type"));else{var l=("number"!=typeof s&&(s=0),s+1>(b=e).length||-1===b.indexOf(".",s)?"argument":"property");i='The "'.concat(e,'" ').concat(l," ").concat(d," ").concat(o(a,"type"))}return i+". Received type ".concat(c(f))}),TypeError),b("ERR_INVALID_ARG_VALUE",(function(e,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===n&&(n=t(40537));var f=n.inspect(a);return f.length>128&&(f="".concat(f.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(c,". Received ").concat(f)}),TypeError,RangeError),b("ERR_INVALID_RETURN_VALUE",(function(e,a,t){var f;return f=t&&t.constructor&&t.constructor.name?"instance of ".concat(t.constructor.name):"type ".concat(c(t)),"Expected ".concat(e,' to be returned from the "').concat(a,'"')+" function but got ".concat(f,".")}),TypeError),b("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,a=new Array(e),c=0;c0,"At least one arg needs to be specified");var f="The ",d=a.length;switch(a=a.map((function(e){return'"'.concat(e,'"')})),d){case 1:f+="".concat(a[0]," argument");break;case 2:f+="".concat(a[0]," and ").concat(a[1]," arguments");break;default:f+=a.slice(0,d-1).join(", "),f+=", and ".concat(a[d-1]," arguments")}return"".concat(f," must be specified")}),TypeError),e.exports.codes=i},82299:(e,a,t)=>{"use strict";function c(e,a){return function(e){if(Array.isArray(e))return e}(e)||function(e,a){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var c,f,d,r,n=[],i=!0,b=!1;try{if(d=(t=t.call(e)).next,0===a){if(Object(t)!==t)return;i=!1}else for(;!(i=(c=d.call(t)).done)&&(n.push(c.value),n.length!==a);i=!0);}catch(e){b=!0,f=e}finally{try{if(!i&&null!=t.return&&(r=t.return(),Object(r)!==r))return}finally{if(b)throw f}}return n}}(e,a)||function(e,a){if(e){if("string"==typeof e)return f(e,a);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,a):void 0}}(e,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,a){(null==a||a>e.length)&&(a=e.length);for(var t=0,c=new Array(a);t10)return!0;for(var a=0;a57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function P(e){return Object.keys(e).filter(N).concat(o(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function R(e,a){if(e===a)return 0;for(var t=e.length,c=a.length,f=0,d=Math.min(t,c);f{const c=t(36209),f=t(10943),d=t(51847),r=t(86679),n=t(65435),i=255===new Uint8Array(Uint16Array.of(255).buffer)[0];function b(e){switch(e){case"ascii":return c;case"base64":return f;case"hex":return d;case"utf8":case"utf-8":case void 0:return r;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n;default:throw new Error(`Unknown encoding: ${e}`)}}function o(e){return e instanceof Uint8Array}function s(e,a,t){return"string"==typeof e?function(e,a){const t=b(a),c=new Uint8Array(t.byteLength(e));return t.write(c,e,0,c.byteLength),c}(e,a):Array.isArray(e)?function(e){const a=new Uint8Array(e.length);return a.set(e),a}(e):ArrayBuffer.isView(e)?function(e){const a=new Uint8Array(e.byteLength);return a.set(e),a}(e):function(e,a,t){return new Uint8Array(e,a,t)}(e,a,t)}function l(e,a,t,c,f){if(0===e.byteLength)return-1;if("string"==typeof t?(c=t,t=0):void 0===t?t=f?0:e.length-1:t<0&&(t+=e.byteLength),t>=e.byteLength){if(f)return-1;t=e.byteLength-1}else if(t<0){if(!f)return-1;t=0}if("string"==typeof a)a=s(a,c);else if("number"==typeof a)return a&=255,f?e.indexOf(a,t):e.lastIndexOf(a,t);if(0===a.byteLength)return-1;if(f){let c=-1;for(let f=t;fe.byteLength&&(t=e.byteLength-a.byteLength);for(let c=t;c>=0;c--){let t=!0;for(let f=0;ff)return 1}return e.byteLength>a.byteLength?1:e.byteLengthe+a.byteLength),0));const t=new Uint8Array(a);let c=0;for(const a of e){if(c+a.byteLength>t.byteLength){const e=a.subarray(0,t.byteLength-c);return t.set(e,c),t}t.set(a,c),c+=a.byteLength}return t},copy:function(e,a,t=0,c=0,f=e.byteLength){if(f>0&&f=e.byteLength)throw new RangeError("sourceStart is out of range");if(f<0)throw new RangeError("sourceEnd is out of range");t>=a.byteLength&&(t=a.byteLength),f>e.byteLength&&(f=e.byteLength),a.byteLength-t=f||c<=t?"":(t<0&&(t=0),c>f&&(c=f),(0!==t||c{function a(e){return e.length}e.exports={byteLength:a,toString:function(e){const a=e.byteLength;let t="";for(let c=0;c{const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256);for(let e=0;e<64;e++)t[a.charCodeAt(e)]=e;function c(e){let a=e.length;return 61===e.charCodeAt(a-1)&&a--,a>1&&61===e.charCodeAt(a-1)&&a--,3*a>>>2}t[45]=62,t[95]=63,e.exports={byteLength:c,toString:function(e){const t=e.byteLength;let c="";for(let f=0;f>2]+a[(3&e[f])<<4|e[f+1]>>4]+a[(15&e[f+1])<<2|e[f+2]>>6]+a[63&e[f+2]];return t%3==2?c=c.substring(0,c.length-1)+"=":t%3==1&&(c=c.substring(0,c.length-2)+"=="),c},write:function(e,a,f=0,d=c(a)){const r=Math.min(d,e.byteLength-f);for(let c=0,f=0;f>4,e[f++]=(15&r)<<4|n>>2,e[f++]=(3&n)<<6|63&i}return r}}},51847:e=>{function a(e){return e.length>>>1}function t(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:void 0}e.exports={byteLength:a,toString:function(e){const a=e.byteLength;e=new DataView(e.buffer,e.byteOffset,a);let t="",c=0;for(let f=a-a%4;c{function a(e){return 2*e.length}e.exports={byteLength:a,toString:function(e){const a=e.byteLength;let t="";for(let c=0;c>8,r=f%256;e[c+2*a]=r,e[c+2*a+1]=d}return d}}},86679:e=>{function a(e){let a=0;for(let t=0,c=e.length;t=55296&&f<=56319&&t+1=56320&&c<=57343){a+=4,t++;continue}}a+=f<=127?1:f<=2047?2:3}return a}let t,c;if("undefined"!=typeof TextDecoder){const e=new TextDecoder;t=function(a){return e.decode(a)}}else t=function(e){const a=e.byteLength;let t="",c=0;for(;c0){let a=0;for(;a>c,c-=6;c>=0;)e[n++]=128|a>>c&63,c-=6;r+=a>=65536?2:1}return d};e.exports={byteLength:a,toString:t,write:c}},67526:(e,a)=>{"use strict";a.byteLength=function(e){var a=n(e),t=a[0],c=a[1];return 3*(t+c)/4-c},a.toByteArray=function(e){var a,t,d=n(e),r=d[0],i=d[1],b=new f(function(e,a,t){return 3*(a+t)/4-t}(0,r,i)),o=0,s=i>0?r-4:r;for(t=0;t>16&255,b[o++]=a>>8&255,b[o++]=255&a;return 2===i&&(a=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,b[o++]=255&a),1===i&&(a=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,b[o++]=a>>8&255,b[o++]=255&a),b},a.fromByteArray=function(e){for(var a,c=e.length,f=c%3,d=[],r=16383,n=0,b=c-f;nb?b:n+r));return 1===f?(a=e[c-1],d.push(t[a>>2]+t[a<<4&63]+"==")):2===f&&(a=(e[c-2]<<8)+e[c-1],d.push(t[a>>10]+t[a>>4&63]+t[a<<2&63]+"=")),d.join("")};for(var t=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0;r<64;++r)t[r]=d[r],c[d.charCodeAt(r)]=r;function n(e){var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=a),[t,t===a?0:4-t%4]}function i(e,a,c){for(var f,d,r=[],n=a;n>18&63]+t[d>>12&63]+t[d>>6&63]+t[63&d]);return r.join("")}c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},92096:(e,a,t)=>{var c;e=t.nmd(e);var f=function(e){"use strict";var a=1e7,t=9007199254740992,c=l(t),d="0123456789abcdefghijklmnopqrstuvwxyz",r="function"==typeof BigInt;function n(e,a,t,c){return void 0===e?n[0]:void 0===a||10==+a&&!t?Z(e):q(e,a,t,c)}function i(e,a){this.value=e,this.sign=a,this.isSmall=!1}function b(e){this.value=e,this.sign=e<0,this.isSmall=!0}function o(e){this.value=e}function s(e){return-t0?Math.floor(e):Math.ceil(e)}function m(e,t){var c,f,d=e.length,r=t.length,n=new Array(d),i=0,b=a;for(f=0;f=b?1:0,n[f]=c-i*b;for(;f0&&n.push(i),n}function x(e,a){return e.length>=a.length?m(e,a):m(a,e)}function y(e,t){var c,f,d=e.length,r=new Array(d),n=a;for(f=0;f0;)r[f++]=t%n,t=Math.floor(t/n);return r}function A(e,t){var c,f,d=e.length,r=t.length,n=new Array(d),i=0,b=a;for(c=0;c0;)r[f++]=i%n,i=Math.floor(i/n);return r}function I(e,a){for(var t=[];a-- >0;)t.push(0);return t.concat(e)}function E(e,a){var t=Math.max(e.length,a.length);if(t<=30)return w(e,a);t=Math.ceil(t/2);var c=e.slice(t),f=e.slice(0,t),d=a.slice(t),r=a.slice(0,t),n=E(f,r),i=E(c,d),b=E(x(f,c),x(r,d)),o=x(x(n,I(A(A(b,n),i),t)),I(i,2*t));return h(o),o}function C(e,t,c){return new i(e=0;--c)d=(r=d*b+e[c])-(f=g(r/t))*t,i[c]=0|f;return[i,0|d]}function L(e,t){var c,f=Z(t);if(r)return[new o(e.value/f.value),new o(e.value%f.value)];var d,s=e.value,m=f.value;if(0===m)throw new Error("Cannot divide by zero");if(e.isSmall)return f.isSmall?[new b(g(s/m)),new b(s%m)]:[n[0],e];if(f.isSmall){if(1===m)return[e,n[0]];if(-1==m)return[e.negate(),n[0]];var x=Math.abs(m);if(x=0;f--){for(c=l-1,x[f+s]!==g&&(c=Math.floor((x[f+s]*l+x[f+s-1])/g)),d=0,r=0,i=y.length,n=0;nb&&(d=(d+1)*l),c=Math.ceil(d/r);do{if(S(n=_(t,c),s)<=0)break;c--}while(c);o.push(c),s=A(s,n)}return o.reverse(),[u(o),u(s)]}(s,m),d=c[0];var w=e.sign!==f.sign,I=c[1],E=e.sign;return"number"==typeof d?(w&&(d=-d),d=new b(d)):d=new i(d,w),"number"==typeof I?(E&&(I=-I),I=new b(I)):I=new i(I,E),[d,I]}function S(e,a){if(e.length!==a.length)return e.length>a.length?1:-1;for(var t=e.length-1;t>=0;t--)if(e[t]!==a[t])return e[t]>a[t]?1:-1;return 0}function k(e){var a=e.abs();return!a.isUnit()&&(!!(a.equals(2)||a.equals(3)||a.equals(5))||!(a.isEven()||a.isDivisibleBy(3)||a.isDivisibleBy(5))&&(!!a.lesser(49)||void 0))}function N(e,a){for(var t,c,d,r=e.prev(),n=r,i=0;n.isEven();)n=n.divide(2),i++;e:for(c=0;c=0?c=A(e,a):(c=A(a,e),t=!t),"number"==typeof(c=u(c))?(t&&(c=-c),new b(c)):new i(c,t)}(t,c,this.sign)},i.prototype.minus=i.prototype.subtract,b.prototype.subtract=function(e){var a=Z(e),t=this.value;if(t<0!==a.sign)return this.add(a.negate());var c=a.value;return a.isSmall?new b(t-c):v(c,Math.abs(t),t>=0)},b.prototype.minus=b.prototype.subtract,o.prototype.subtract=function(e){return new o(this.value-Z(e).value)},o.prototype.minus=o.prototype.subtract,i.prototype.negate=function(){return new i(this.value,!this.sign)},b.prototype.negate=function(){var e=this.sign,a=new b(-this.value);return a.sign=!e,a},o.prototype.negate=function(){return new o(-this.value)},i.prototype.abs=function(){return new i(this.value,!1)},b.prototype.abs=function(){return new b(Math.abs(this.value))},o.prototype.abs=function(){return new o(this.value>=0?this.value:-this.value)},i.prototype.multiply=function(e){var t,c,f,d=Z(e),r=this.value,b=d.value,o=this.sign!==d.sign;if(d.isSmall){if(0===b)return n[0];if(1===b)return this;if(-1===b)return this.negate();if((t=Math.abs(b))0?E(r,b):w(r,b),o)},i.prototype.times=i.prototype.multiply,b.prototype._multiplyBySmall=function(e){return s(e.value*this.value)?new b(e.value*this.value):C(Math.abs(e.value),l(Math.abs(this.value)),this.sign!==e.sign)},i.prototype._multiplyBySmall=function(e){return 0===e.value?n[0]:1===e.value?this:-1===e.value?this.negate():C(Math.abs(e.value),this.value,this.sign!==e.sign)},b.prototype.multiply=function(e){return Z(e)._multiplyBySmall(this)},b.prototype.times=b.prototype.multiply,o.prototype.multiply=function(e){return new o(this.value*Z(e).value)},o.prototype.times=o.prototype.multiply,i.prototype.square=function(){return new i(M(this.value),!1)},b.prototype.square=function(){var e=this.value*this.value;return s(e)?new b(e):new i(M(l(Math.abs(this.value))),!1)},o.prototype.square=function(e){return new o(this.value*this.value)},i.prototype.divmod=function(e){var a=L(this,e);return{quotient:a[0],remainder:a[1]}},o.prototype.divmod=b.prototype.divmod=i.prototype.divmod,i.prototype.divide=function(e){return L(this,e)[0]},o.prototype.over=o.prototype.divide=function(e){return new o(this.value/Z(e).value)},b.prototype.over=b.prototype.divide=i.prototype.over=i.prototype.divide,i.prototype.mod=function(e){return L(this,e)[1]},o.prototype.mod=o.prototype.remainder=function(e){return new o(this.value%Z(e).value)},b.prototype.remainder=b.prototype.mod=i.prototype.remainder=i.prototype.mod,i.prototype.pow=function(e){var a,t,c,f=Z(e),d=this.value,r=f.value;if(0===r)return n[1];if(0===d)return n[0];if(1===d)return n[1];if(-1===d)return f.isEven()?n[1]:n[-1];if(f.sign)return n[0];if(!f.isSmall)throw new Error("The exponent "+f.toString()+" is too large.");if(this.isSmall&&s(a=Math.pow(d,r)))return new b(g(a));for(t=this,c=n[1];!0&r&&(c=c.times(t),--r),0!==r;)r/=2,t=t.square();return c},b.prototype.pow=i.prototype.pow,o.prototype.pow=function(e){var a=Z(e),t=this.value,c=a.value,f=BigInt(0),d=BigInt(1),r=BigInt(2);if(c===f)return n[1];if(t===f)return n[0];if(t===d)return n[1];if(t===BigInt(-1))return a.isEven()?n[1]:n[-1];if(a.isNegative())return new o(f);for(var i=this,b=n[1];(c&d)===d&&(b=b.times(i),--c),c!==f;)c/=r,i=i.square();return b},i.prototype.modPow=function(e,a){if(e=Z(e),(a=Z(a)).isZero())throw new Error("Cannot take modPow with modulus 0");var t=n[1],c=this.mod(a);for(e.isNegative()&&(e=e.multiply(n[-1]),c=c.modInv(a));e.isPositive();){if(c.isZero())return n[0];e.isOdd()&&(t=t.multiply(c).mod(a)),e=e.divide(2),c=c.square().mod(a)}return t},o.prototype.modPow=b.prototype.modPow=i.prototype.modPow,i.prototype.compareAbs=function(e){var a=Z(e),t=this.value,c=a.value;return a.isSmall?1:S(t,c)},b.prototype.compareAbs=function(e){var a=Z(e),t=Math.abs(this.value),c=a.value;return a.isSmall?t===(c=Math.abs(c))?0:t>c?1:-1:-1},o.prototype.compareAbs=function(e){var a=this.value,t=Z(e).value;return(a=a>=0?a:-a)===(t=t>=0?t:-t)?0:a>t?1:-1},i.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var a=Z(e),t=this.value,c=a.value;return this.sign!==a.sign?a.sign?1:-1:a.isSmall?this.sign?-1:1:S(t,c)*(this.sign?-1:1)},i.prototype.compareTo=i.prototype.compare,b.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var a=Z(e),t=this.value,c=a.value;return a.isSmall?t==c?0:t>c?1:-1:t<0!==a.sign?t<0?-1:1:t<0?1:-1},b.prototype.compareTo=b.prototype.compare,o.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var a=this.value,t=Z(e).value;return a===t?0:a>t?1:-1},o.prototype.compareTo=o.prototype.compare,i.prototype.equals=function(e){return 0===this.compare(e)},o.prototype.eq=o.prototype.equals=b.prototype.eq=b.prototype.equals=i.prototype.eq=i.prototype.equals,i.prototype.notEquals=function(e){return 0!==this.compare(e)},o.prototype.neq=o.prototype.notEquals=b.prototype.neq=b.prototype.notEquals=i.prototype.neq=i.prototype.notEquals,i.prototype.greater=function(e){return this.compare(e)>0},o.prototype.gt=o.prototype.greater=b.prototype.gt=b.prototype.greater=i.prototype.gt=i.prototype.greater,i.prototype.lesser=function(e){return this.compare(e)<0},o.prototype.lt=o.prototype.lesser=b.prototype.lt=b.prototype.lesser=i.prototype.lt=i.prototype.lesser,i.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},o.prototype.geq=o.prototype.greaterOrEquals=b.prototype.geq=b.prototype.greaterOrEquals=i.prototype.geq=i.prototype.greaterOrEquals,i.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},o.prototype.leq=o.prototype.lesserOrEquals=b.prototype.leq=b.prototype.lesserOrEquals=i.prototype.leq=i.prototype.lesserOrEquals,i.prototype.isEven=function(){return!(1&this.value[0])},b.prototype.isEven=function(){return!(1&this.value)},o.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},i.prototype.isOdd=function(){return!(1&~this.value[0])},b.prototype.isOdd=function(){return!(1&~this.value)},o.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},i.prototype.isPositive=function(){return!this.sign},b.prototype.isPositive=function(){return this.value>0},o.prototype.isPositive=b.prototype.isPositive,i.prototype.isNegative=function(){return this.sign},b.prototype.isNegative=function(){return this.value<0},o.prototype.isNegative=b.prototype.isNegative,i.prototype.isUnit=function(){return!1},b.prototype.isUnit=function(){return 1===Math.abs(this.value)},o.prototype.isUnit=function(){return this.abs().value===BigInt(1)},i.prototype.isZero=function(){return!1},b.prototype.isZero=function(){return 0===this.value},o.prototype.isZero=function(){return this.value===BigInt(0)},i.prototype.isDivisibleBy=function(e){var a=Z(e);return!a.isZero()&&(!!a.isUnit()||(0===a.compareAbs(2)?this.isEven():this.mod(a).isZero()))},o.prototype.isDivisibleBy=b.prototype.isDivisibleBy=i.prototype.isDivisibleBy,i.prototype.isPrime=function(a){var t=k(this);if(t!==e)return t;var c=this.abs(),d=c.bitLength();if(d<=64)return N(c,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var r=Math.log(2)*d.toJSNumber(),n=Math.ceil(!0===a?2*Math.pow(r,2):r),i=[],b=0;b-t?new b(e-1):new i(c,!0)},o.prototype.prev=function(){return new o(this.value-BigInt(1))};for(var P=[1];2*P[P.length-1]<=a;)P.push(2*P[P.length-1]);var R=P.length,O=P[R-1];function D(e){return Math.abs(e)<=a}function T(e,a,t){a=Z(a);for(var c=e.isNegative(),d=a.isNegative(),r=c?e.not():e,n=d?a.not():a,i=0,b=0,o=null,s=null,l=[];!r.isZero()||!n.isZero();)i=(o=L(r,O))[1].toJSNumber(),c&&(i=O-1-i),b=(s=L(n,O))[1].toJSNumber(),d&&(b=O-1-b),r=o[0],n=s[0],l.push(t(i,b));for(var u=0!==t(c?1:0,d?1:0)?f(-1):f(0),h=l.length-1;h>=0;h-=1)u=u.multiply(O).add(f(l[h]));return u}i.prototype.shiftLeft=function(e){var a=Z(e).toJSNumber();if(!D(a))throw new Error(String(a)+" is too large for shifting.");if(a<0)return this.shiftRight(-a);var t=this;if(t.isZero())return t;for(;a>=R;)t=t.multiply(O),a-=R-1;return t.multiply(P[a])},o.prototype.shiftLeft=b.prototype.shiftLeft=i.prototype.shiftLeft,i.prototype.shiftRight=function(e){var a,t=Z(e).toJSNumber();if(!D(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftLeft(-t);for(var c=this;t>=R;){if(c.isZero()||c.isNegative()&&c.isUnit())return c;c=(a=L(c,O))[1].isNegative()?a[0].prev():a[0],t-=R-1}return(a=L(c,P[t]))[1].isNegative()?a[0].prev():a[0]},o.prototype.shiftRight=b.prototype.shiftRight=i.prototype.shiftRight,i.prototype.not=function(){return this.negate().prev()},o.prototype.not=b.prototype.not=i.prototype.not,i.prototype.and=function(e){return T(this,e,(function(e,a){return e&a}))},o.prototype.and=b.prototype.and=i.prototype.and,i.prototype.or=function(e){return T(this,e,(function(e,a){return e|a}))},o.prototype.or=b.prototype.or=i.prototype.or,i.prototype.xor=function(e){return T(this,e,(function(e,a){return e^a}))},o.prototype.xor=b.prototype.xor=i.prototype.xor;var F=1<<30;function Q(e){var t=e.value,c="number"==typeof t?t|F:"bigint"==typeof t?t|BigInt(F):t[0]+t[1]*a|1073758208;return c&-c}function U(e,a){if(a.compareTo(e)<=0){var t=U(e,a.square(a)),c=t.p,d=t.e,r=c.multiply(a);return r.compareTo(e)<=0?{p:r,e:2*d+1}:{p:c,e:2*d}}return{p:f(1),e:0}}function j(e,a){return e=Z(e),a=Z(a),e.greater(a)?e:a}function H(e,a){return e=Z(e),a=Z(a),e.lesser(a)?e:a}function $(e,a){if(e=Z(e).abs(),a=Z(a).abs(),e.equals(a))return e;if(e.isZero())return a;if(a.isZero())return e;for(var t,c,f=n[1];e.isEven()&&a.isEven();)t=H(Q(e),Q(a)),e=e.divide(t),a=a.divide(t),f=f.multiply(t);for(;e.isEven();)e=e.divide(Q(e));do{for(;a.isEven();)a=a.divide(Q(a));e.greater(a)&&(c=a,a=e,e=c),a=a.subtract(e)}while(!a.isZero());return f.isUnit()?e:e.multiply(f)}i.prototype.bitLength=function(){var e=this;return e.compareTo(f(0))<0&&(e=e.negate().subtract(f(1))),0===e.compareTo(f(0))?f(0):f(U(e,f(2)).e).add(f(1))},o.prototype.bitLength=b.prototype.bitLength=i.prototype.bitLength;var q=function(e,a,t,c){t=t||d,e=String(e),c||(e=e.toLowerCase(),t=t.toLowerCase());var f,r=e.length,n=Math.abs(a),i={};for(f=0;f=n){if("1"===s&&1===n)continue;throw new Error(s+" is not a valid digit in base "+a+".")}a=Z(a);var b=[],o="-"===e[0];for(f=o?1:0;f"!==e[f]&&f=0;c--)f=f.add(e[c].times(d)),d=d.times(a);return t?f.negate():f}function z(e,a){if((a=f(a)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(a.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var t=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return t.unshift([1]),{value:[].concat.apply([],t),isNegative:!1}}var c=!1;if(e.isNegative()&&a.isPositive()&&(c=!0,e=e.abs()),a.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:c};for(var d,r=[],n=e;n.isNegative()||n.compareAbs(a)>=0;){d=n.divmod(a),n=d.quotient;var i=d.remainder;i.isNegative()&&(i=a.minus(i).abs(),n=n.next()),r.push(i.toJSNumber())}return r.push(n.toJSNumber()),{value:r.reverse(),isNegative:c}}function K(e,a,t){var c=z(e,a);return(c.isNegative?"-":"")+c.value.map((function(e){return function(e,a){return e<(a=a||d).length?a[e]:"<"+e+">"}(e,t)})).join("")}function V(e){if(s(+e)){var a=+e;if(a===g(a))return r?new o(BigInt(a)):new b(a);throw new Error("Invalid integer: "+e)}var t="-"===e[0];t&&(e=e.slice(1));var c=e.split(/e/i);if(c.length>2)throw new Error("Invalid integer: "+c.join("e"));if(2===c.length){var f=c[1];if("+"===f[0]&&(f=f.slice(1)),(f=+f)!==g(f)||!s(f))throw new Error("Invalid integer: "+f+" is not a valid exponent.");var d=c[0],n=d.indexOf(".");if(n>=0&&(f-=d.length-n-1,d=d.slice(0,n)+d.slice(n+1)),f<0)throw new Error("Cannot include negative exponent part for integers");e=d+=new Array(f+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(r)return new o(BigInt(t?"-"+e:e));for(var l=[],u=e.length,p=u-7;u>0;)l.push(+e.slice(p,u)),(p-=7)<0&&(p=0),u-=7;return h(l),new i(l,t)}function Z(e){return"number"==typeof e?function(e){if(r)return new o(BigInt(e));if(s(e)){if(e!==g(e))throw new Error(e+" is not an integer.");return new b(e)}return V(e.toString())}(e):"string"==typeof e?V(e):"bigint"==typeof e?new o(e):e}i.prototype.toArray=function(e){return z(this,e)},b.prototype.toArray=function(e){return z(this,e)},o.prototype.toArray=function(e){return z(this,e)},i.prototype.toString=function(a,t){if(a===e&&(a=10),10!==a||t)return K(this,a,t);for(var c,f=this.value,d=f.length,r=String(f[--d]);--d>=0;)c=String(f[d]),r+="0000000".slice(c.length)+c;return(this.sign?"-":"")+r},b.prototype.toString=function(a,t){return a===e&&(a=10),10!=a||t?K(this,a,t):String(this.value)},o.prototype.toString=b.prototype.toString,o.prototype.toJSON=i.prototype.toJSON=b.prototype.toJSON=function(){return this.toString()},i.prototype.valueOf=function(){return parseInt(this.toString(),10)},i.prototype.toJSNumber=i.prototype.valueOf,b.prototype.valueOf=function(){return this.value},b.prototype.toJSNumber=b.prototype.valueOf,o.prototype.valueOf=o.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var J=0;J<1e3;J++)n[J]=Z(J),J>0&&(n[-J]=Z(-J));return n.one=n[1],n.zero=n[0],n.minusOne=n[-1],n.max=j,n.min=H,n.gcd=$,n.lcm=function(e,a){return e=Z(e).abs(),a=Z(a).abs(),e.divide($(e,a)).multiply(a)},n.isInstance=function(e){return e instanceof i||e instanceof b||e instanceof o},n.randBetween=function(e,t,c){e=Z(e),t=Z(t);var f=c||Math.random,d=H(e,t),r=j(e,t).subtract(d).add(1);if(r.isSmall)return d.add(Math.floor(f()*r));for(var i=z(r,a).value,b=[],o=!0,s=0;s{e.exports=t(85702)(t(86989))},4315:(e,a,t)=>{var c=t(48287).Buffer;const f=t(28399).Transform;e.exports=class extends f{constructor(e,a){super(a),this._engine=e,this._finalized=!1}_transform(e,a,t){let c=null;try{this.update(e,a)}catch(e){c=e}t(c)}_flush(e){let a=null;try{this.push(this.digest())}catch(e){a=e}e(a)}update(e,a){if(!c.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return c.isBuffer(e)||(e=c.from(e,a)),this._engine.update(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;let a=this._engine.digest();return void 0!==e&&(a=a.toString(e)),a}}},85702:(e,a,t)=>{const c=t(4315);e.exports=e=>(a,t)=>{const f=(a=>{switch("string"==typeof a?a.toLowerCase():a){case"blake224":return e.Blake224;case"blake256":return e.Blake256;case"blake384":return e.Blake384;case"blake512":return e.Blake512;default:throw new Error("Invald algorithm: "+a)}})(a);return new c(new f,t)}},34588:(e,a,t)=>{var c=t(48287).Buffer;class f{_lengthCarry(e){for(let a=0;a=a.length;){for(let c=this._blockOffset;c{var c=t(48287).Buffer;const f=t(23287),d=c.from([0]),r=c.from([128]);e.exports=class extends f{constructor(){super(),this._h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],this._zo=d,this._oo=r}digest(){this._padding();const e=c.alloc(28);for(let a=0;a<7;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},23287:(e,a,t)=>{var c=t(48287).Buffer;const f=t(34588),d=c.from([1]),r=c.from([129]),n=(e,a)=>(e<<32-a|e>>>a)>>>0;function i(e,a,t,c,d,r,i,b){const o=f.sigma,s=f.u256;e[c]=e[c]+((a[o[t][b]]^s[o[t][b+1]])>>>0)+e[d]>>>0,e[i]=n(e[i]^e[c],16),e[r]=e[r]+e[i]>>>0,e[d]=n(e[d]^e[r],12),e[c]=e[c]+((a[o[t][b+1]]^s[o[t][b]])>>>0)+e[d]>>>0,e[i]=n(e[i]^e[c],8),e[r]=e[r]+e[i]>>>0,e[d]=n(e[d]^e[r],7)}e.exports=class extends f{constructor(){super(),this._h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this._s=[0,0,0,0],this._block=c.alloc(64),this._blockOffset=0,this._length=[0,0],this._nullt=!1,this._zo=d,this._oo=r}_compress(){const e=f.u256,a=new Array(16),t=new Array(16);let c;for(c=0;c<16;++c)t[c]=this._block.readUInt32BE(4*c);for(c=0;c<8;++c)a[c]=this._h[c]>>>0;for(c=8;c<12;++c)a[c]=(this._s[c-8]^e[c-8])>>>0;for(c=12;c<16;++c)a[c]=e[c-8];for(this._nullt||(a[12]=(a[12]^this._length[0])>>>0,a[13]=(a[13]^this._length[0])>>>0,a[14]=(a[14]^this._length[1])>>>0,a[15]=(a[15]^this._length[1])>>>0),c=0;c<14;++c)i(a,t,c,0,4,8,12,0),i(a,t,c,1,5,9,13,2),i(a,t,c,2,6,10,14,4),i(a,t,c,3,7,11,15,6),i(a,t,c,0,5,10,15,8),i(a,t,c,1,6,11,12,10),i(a,t,c,2,7,8,13,12),i(a,t,c,3,4,9,14,14);for(c=0;c<16;++c)this._h[c%8]=(this._h[c%8]^a[c])>>>0;for(c=0;c<8;++c)this._h[c]=(this._h[c]^this._s[c%4])>>>0}_padding(){let e=this._length[0]+8*this._blockOffset,a=this._length[1];e>=4294967296&&(e-=4294967296,a+=1);const t=c.alloc(8);t.writeUInt32BE(a,0),t.writeUInt32BE(e,4),55===this._blockOffset?(this._length[0]-=8,this.update(this._oo)):(this._blockOffset<55?(0===this._blockOffset&&(this._nullt=!0),this._length[0]-=8*(55-this._blockOffset),this.update(f.padding.slice(0,55-this._blockOffset))):(this._length[0]-=8*(64-this._blockOffset),this.update(f.padding.slice(0,64-this._blockOffset)),this._length[0]-=440,this.update(f.padding.slice(1,56)),this._nullt=!0),this.update(this._zo),this._length[0]-=8),this._length[0]-=64,this.update(t)}digest(){this._padding();const e=c.alloc(32);for(let a=0;a<8;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},399:(e,a,t)=>{var c=t(48287).Buffer;const f=t(61070),d=c.from([0]),r=c.from([128]);e.exports=class extends f{constructor(){super(),this._h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428],this._zo=d,this._oo=r}digest(){this._padding();const e=c.alloc(48);for(let a=0;a<12;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},61070:(e,a,t)=>{var c=t(48287).Buffer;const f=t(34588),d=c.from([1]),r=c.from([129]);function n(e,a,t,c){let f=e[2*a]^e[2*t],d=e[2*a+1]^e[2*t+1];c>=32&&(d^=f,f^=d,d^=f,c-=32),0===c?(e[2*a]=f>>>0,e[2*a+1]=d>>>0):(e[2*a]=(f>>>c|d<<32-c)>>>0,e[2*a+1]=(d>>>c|f<<32-c)>>>0)}function i(e,a,t,c,d,r,i,b){const o=f.sigma,s=f.u512;let l;l=e[2*c+1]+((a[2*o[t][b]+1]^s[2*o[t][b+1]+1])>>>0)+e[2*d+1],e[2*c]=e[2*c]+((a[2*o[t][b]]^s[2*o[t][b+1]])>>>0)+e[2*d]+~~(l/4294967296)>>>0,e[2*c+1]=l>>>0,n(e,i,c,32),l=e[2*r+1]+e[2*i+1],e[2*r]=e[2*r]+e[2*i]+~~(l/4294967296)>>>0,e[2*r+1]=l>>>0,n(e,d,r,25),l=e[2*c+1]+((a[2*o[t][b+1]+1]^s[2*o[t][b]+1])>>>0)+e[2*d+1],e[2*c]=e[2*c]+((a[2*o[t][b+1]]^s[2*o[t][b]])>>>0)+e[2*d]+~~(l/4294967296)>>>0,e[2*c+1]=l>>>0,n(e,i,c,16),l=e[2*r+1]+e[2*i+1],e[2*r]=e[2*r]+e[2*i]+~~(l/4294967296)>>>0,e[2*r+1]=l>>>0,n(e,d,r,11)}e.exports=class extends f{constructor(){super(),this._h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this._s=[0,0,0,0,0,0,0,0],this._block=c.alloc(128),this._blockOffset=0,this._length=[0,0,0,0],this._nullt=!1,this._zo=d,this._oo=r}_compress(){const e=f.u512,a=new Array(32),t=new Array(32);let c;for(c=0;c<32;++c)t[c]=this._block.readUInt32BE(4*c);for(c=0;c<16;++c)a[c]=this._h[c]>>>0;for(c=16;c<24;++c)a[c]=(this._s[c-16]^e[c-16])>>>0;for(c=24;c<32;++c)a[c]=e[c-16];for(this._nullt||(a[24]=(a[24]^this._length[1])>>>0,a[25]=(a[25]^this._length[0])>>>0,a[26]=(a[26]^this._length[1])>>>0,a[27]=(a[27]^this._length[0])>>>0,a[28]=(a[28]^this._length[3])>>>0,a[29]=(a[29]^this._length[2])>>>0,a[30]=(a[30]^this._length[3])>>>0,a[31]=(a[31]^this._length[2])>>>0),c=0;c<16;++c)i(a,t,c,0,4,8,12,0),i(a,t,c,1,5,9,13,2),i(a,t,c,2,6,10,14,4),i(a,t,c,3,7,11,15,6),i(a,t,c,0,5,10,15,8),i(a,t,c,1,6,11,12,10),i(a,t,c,2,7,8,13,12),i(a,t,c,3,4,9,14,14);for(c=0;c<16;++c)this._h[c%8*2]=(this._h[c%8*2]^a[2*c])>>>0,this._h[c%8*2+1]=(this._h[c%8*2+1]^a[2*c+1])>>>0;for(c=0;c<8;++c)this._h[2*c]=(this._h[2*c]^this._s[c%4*2])>>>0,this._h[2*c+1]=(this._h[2*c+1]^this._s[c%4*2+1])>>>0}_padding(){const e=this._length.slice();e[0]+=8*this._blockOffset,this._lengthCarry(e);const a=c.alloc(16);for(let t=0;t<4;++t)a.writeUInt32BE(e[3-t],4*t);111===this._blockOffset?(this._length[0]-=8,this.update(this._oo)):(this._blockOffset<111?(0===this._blockOffset&&(this._nullt=!0),this._length[0]-=8*(111-this._blockOffset),this.update(f.padding.slice(0,111-this._blockOffset))):(this._length[0]-=8*(128-this._blockOffset),this.update(f.padding.slice(0,128-this._blockOffset)),this._length[0]-=888,this.update(f.padding.slice(1,112)),this._nullt=!0),this.update(this._zo),this._length[0]-=8),this._length[0]-=128,this.update(a)}digest(){this._padding();const e=c.alloc(64);for(let a=0;a<16;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},86989:(e,a,t)=>{e.exports={Blake224:t(48746),Blake256:t(23287),Blake384:t(399),Blake512:t(61070)}},91892:e=>{var a,t,c=(()=>{for(var e=new Uint8Array(128),a=0;a<64;a++)e[a<26?a+65:a<52?a+71:a<62?a-4:4*a-205]=a;return a=>{for(var t=a.length,c=new Uint8Array(3*(t-("="==a[t-1])-("="==a[t-2]))/4|0),f=0,d=0;f>4,c[d++]=n<<4|i>>2,c[d++]=i<<6|b}return c}})(),f=(a={"wasm-binary:./blake2b.wat"(e,a){a.exports=c("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMKvz8EwAIAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAQgA3AzggAEIANwNAIABCADcDSCAAQgA3A1AgAEIANwNYIABCADcDYCAAQgA3A2ggAEIANwNwIABCADcDeCAAQoiS853/zPmE6gBBACkDAIU3A4ABIABCu86qptjQ67O7f0EIKQMAhTcDiAEgAEKr8NP0r+68tzxBECkDAIU3A5ABIABC8e30+KWn/aelf0EYKQMAhTcDmAEgAELRhZrv+s+Uh9EAQSApAwCFNwOgASAAQp/Y+dnCkdqCm39BKCkDAIU3A6gBIABC6/qG2r+19sEfQTApAwCFNwOwASAAQvnC+JuRo7Pw2wBBOCkDAIU3A7gBIABCADcDwAEgAEIANwPIASAAQgA3A9ABC20BA38gAEHAAWohAyAAQcgBaiEEIAQpAwCnIQUCQANAIAEgAkYNASAFQYABRgRAIAMgAykDACAFrXw3AwBBACEFIAAQAwsgACAFaiABLQAAOgAAIAVBAWohBSABQQFqIQEMAAsLIAQgBa03AwALYQEDfyAAQcABaiEBIABByAFqIQIgASABKQMAIAIpAwB8NwMAIABCfzcD0AEgAikDAKchAwJAA0AgA0GAAUYNASAAIANqQQA6AAAgA0EBaiEDDAALCyACIAOtNwMAIAAQAwuqOwIgfgl/IABBgAFqISEgAEGIAWohIiAAQZABaiEjIABBmAFqISQgAEGgAWohJSAAQagBaiEmIABBsAFqIScgAEG4AWohKCAhKQMAIQEgIikDACECICMpAwAhAyAkKQMAIQQgJSkDACEFICYpAwAhBiAnKQMAIQcgKCkDACEIQoiS853/zPmE6gAhCUK7zqqm2NDrs7t/IQpCq/DT9K/uvLc8IQtC8e30+KWn/aelfyEMQtGFmu/6z5SH0QAhDUKf2PnZwpHagpt/IQ5C6/qG2r+19sEfIQ9C+cL4m5Gjs/DbACEQIAApAwAhESAAKQMIIRIgACkDECETIAApAxghFCAAKQMgIRUgACkDKCEWIAApAzAhFyAAKQM4IRggACkDQCEZIAApA0ghGiAAKQNQIRsgACkDWCEcIAApA2AhHSAAKQNoIR4gACkDcCEfIAApA3ghICANIAApA8ABhSENIA8gACkD0AGFIQ8gASAFIBF8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSASfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgE3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBR8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAVfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBd8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAYfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgGXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBp8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAbfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgHHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIB18fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAefHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgH3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFICB8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAffHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgG3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBV8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAZfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHICB8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAefHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggF3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBJ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAdfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgEXx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBN8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAcfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGHx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBZ8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAUfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHHx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBl8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAdfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgEXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBZ8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByATfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggIHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIB58fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAbfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgH3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBR8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAXfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBJ8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAafHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFXx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBh8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAafHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFHx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBJ8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAefHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHXx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBx8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAffHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgE3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBd8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAWfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgG3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBV8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCARfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgIHx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBl8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAafHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEXx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBZ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAYfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgE3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBV8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAbfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggIHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIB98fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiASfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgHHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB18fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAXfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBR8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAefHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgE3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIB18fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAXfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgG3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBF8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAcfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggGXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBR8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAVfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBh8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAWfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggIHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB98fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSASfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgGnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB18fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAWfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgEnx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGICB8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAffHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBV8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAbfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBh8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAXfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBp8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCATfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGXx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBx8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAefHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgHHx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBh8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAffHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBJ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAUfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBZ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiARfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgIHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBV8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAZfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggF3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBN8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAbfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgF3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFICB8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAffHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGnx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBx8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAUfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggEXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBl8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAdfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgE3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIB58fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAYfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggEnx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBV8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAbfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBt8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSATfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgGXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBV8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAYfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgF3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBJ8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAWfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgIHx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBx8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAafHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgH3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBR8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAdfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgHnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBF8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgISAhKQMAIAEgCYWFNwMAICIgIikDACACIAqFhTcDACAjICMpAwAgAyALhYU3AwAgJCAkKQMAIAQgDIWFNwMAICUgJSkDACAFIA2FhTcDACAmICYpAwAgBiAOhYU3AwAgJyAnKQMAIAcgD4WFNwMAICggKCkDACAIIBCFhTcDAAs=")}},function(){return t||(0,a[Object.keys(a)[0]])((t={exports:{}}).exports,t),t.exports})(),d=WebAssembly.compile(f);e.exports=async e=>(await WebAssembly.instantiate(await d,e)).exports},51685:(e,a,t)=>{var c=t(86889),f=t(35682),d=null,r="undefined"!=typeof WebAssembly&&t(91892)().then((e=>{d=e})),n=64,i=[];e.exports=p;var b=e.exports.BYTES_MIN=16,o=e.exports.BYTES_MAX=64,s=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),l=e.exports.KEYBYTES_MAX=64,u=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),h=e.exports.PERSONALBYTES=16;function p(e,a,t,f,r){if(!(this instanceof p))return new p(e,a,t,f,r);if(!d)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");e||(e=32),!0!==r&&(c(e>=b,"digestLength must be at least "+b+", was given "+e),c(e<=o,"digestLength must be at most "+o+", was given "+e),null!=a&&(c(a instanceof Uint8Array,"key must be Uint8Array or Buffer"),c(a.length>=s,"key must be at least "+s+", was given "+a.length),c(a.length<=l,"key must be at least "+l+", was given "+a.length)),null!=t&&(c(t instanceof Uint8Array,"salt must be Uint8Array or Buffer"),c(t.length===u,"salt must be exactly "+u+", was given "+t.length)),null!=f&&(c(f instanceof Uint8Array,"personal must be Uint8Array or Buffer"),c(f.length===h,"personal must be exactly "+h+", was given "+f.length))),i.length||(i.push(n),n+=216),this.digestLength=e,this.finalized=!1,this.pointer=i.pop(),this._memory=new Uint8Array(d.memory.buffer),this._memory.fill(0,0,64),this._memory[0]=this.digestLength,this._memory[1]=a?a.length:0,this._memory[2]=1,this._memory[3]=1,t&&this._memory.set(t,32),f&&this._memory.set(f,48),this.pointer+216>this._memory.length&&this._realloc(this.pointer+216),d.blake2b_init(this.pointer,this.digestLength),a&&(this.update(a),this._memory.fill(0,n,n+a.length),this._memory[this.pointer+200]=128)}function g(){}p.prototype._realloc=function(e){d.memory.grow(Math.max(0,Math.ceil(Math.abs(e-this._memory.length)/65536))),this._memory=new Uint8Array(d.memory.buffer)},p.prototype.update=function(e){return c(!1===this.finalized,"Hash instance finalized"),c(e instanceof Uint8Array,"input must be Uint8Array or Buffer"),n+e.length>this._memory.length&&this._realloc(n+e.length),this._memory.set(e,n),d.blake2b_update(this.pointer,n,n+e.length),this},p.prototype.digest=function(e){if(c(!1===this.finalized,"Hash instance finalized"),this.finalized=!0,i.push(this.pointer),d.blake2b_final(this.pointer),!e||"binary"===e)return this._memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if("string"==typeof e)return f.toString(this._memory,e,this.pointer+128,this.pointer+128+this.digestLength);c(e instanceof Uint8Array&&e.length>=this.digestLength,"input must be Uint8Array or Buffer");for(var a=0;ae()),e):e(new Error("WebAssembly not supported"))},p.prototype.ready=p.ready,p.prototype.getPartialHash=function(){return this._memory.slice(this.pointer,this.pointer+216)},p.prototype.setPartialHash=function(e){this._memory.set(e,this.pointer)}},72206:(e,a,t)=>{var c=t(86889),f=t(51685);function d(e,a,t){var c=e[a]+e[t],f=e[a+1]+e[t+1];c>=4294967296&&f++,e[a]=c,e[a+1]=f}function r(e,a,t,c){var f=e[a]+t;t<0&&(f+=4294967296);var d=e[a+1]+c;f>=4294967296&&d++,e[a]=f,e[a+1]=d}function n(e,a){return e[a]^e[a+1]<<8^e[a+2]<<16^e[a+3]<<24}function i(e,a,t,c,f,n){var i=l[f],b=l[f+1],o=l[n],u=l[n+1];d(s,e,a),r(s,e,i,b);var h=s[c]^s[e],p=s[c+1]^s[e+1];s[c]=p,s[c+1]=h,d(s,t,c),h=s[a]^s[t],p=s[a+1]^s[t+1],s[a]=h>>>24^p<<8,s[a+1]=p>>>24^h<<8,d(s,e,a),r(s,e,o,u),h=s[c]^s[e],p=s[c+1]^s[e+1],s[c]=h>>>16^p<<16,s[c+1]=p>>>16^h<<16,d(s,t,c),h=s[a]^s[t],p=s[a+1]^s[t+1],s[a]=p>>>31^h<<1,s[a+1]=h>>>31^p<<1}var b=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),o=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),s=new Uint32Array(32),l=new Uint32Array(32);function u(e,a){var t=0;for(t=0;t<16;t++)s[t]=e.h[t],s[t+16]=b[t];for(s[24]=s[24]^e.t,s[25]=s[25]^e.t/4294967296,a&&(s[28]=~s[28],s[29]=~s[29]),t=0;t<32;t++)l[t]=n(e.b,4*t);for(t=0;t<12;t++)i(0,8,16,24,o[16*t+0],o[16*t+1]),i(2,10,18,26,o[16*t+2],o[16*t+3]),i(4,12,20,28,o[16*t+4],o[16*t+5]),i(6,14,22,30,o[16*t+6],o[16*t+7]),i(0,10,20,30,o[16*t+8],o[16*t+9]),i(2,12,22,24,o[16*t+10],o[16*t+11]),i(4,14,16,26,o[16*t+12],o[16*t+13]),i(6,8,18,28,o[16*t+14],o[16*t+15]);for(t=0;t<16;t++)e.h[t]=e.h[t]^s[t]^s[t+16]}var h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function p(e,a,t,c){h.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=e,h[0]=e,a&&(h[1]=a.length),h[2]=1,h[3]=1,t&&h.set(t,32),c&&h.set(c,48);for(var f=0;f<16;f++)this.h[f]=b[f]^n(h,4*f);a&&(g(this,a),this.c=128)}function g(e,a){for(var t=0;t=this.outlen,"out must have at least outlen bytes of space"),function(e,a){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;u(e,!0);for(var t=0;t>2]>>8*(3&t)}(this,a),"hex"===e?function(e){for(var a="",t=0;t=x,"outlen must be at least "+x+", was given "+e),c(e<=y,"outlen must be at most "+y+", was given "+e),null!=a&&(c(a instanceof Uint8Array,"key must be Uint8Array or Buffer"),c(a.length>=A,"key must be at least "+A+", was given "+a.length),c(a.length<=v,"key must be at most "+v+", was given "+a.length)),null!=t&&(c(t instanceof Uint8Array,"salt must be Uint8Array or Buffer"),c(t.length===w,"salt must be exactly "+w+", was given "+t.length)),null!=f&&(c(f instanceof Uint8Array,"personal must be Uint8Array or Buffer"),c(f.length===_,"personal must be exactly "+_+", was given "+f.length))),new m(e,a,t,f)},e.exports.ready=function(e){f.ready((function(){e()}))},e.exports.WASM_SUPPORTED=f.SUPPORTED,e.exports.WASM_LOADED=!1;var x=e.exports.BYTES_MIN=16,y=e.exports.BYTES_MAX=64,A=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),v=e.exports.KEYBYTES_MAX=64,w=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),_=e.exports.PERSONALBYTES=16;f.ready((function(a){a||(e.exports.WASM_LOADED=!0,e.exports=f)}))},39404:function(e,a,t){!function(e,a){"use strict";function c(e,a){if(!e)throw new Error(a||"Assertion failed")}function f(e,a){e.super_=a;var t=function(){};t.prototype=a.prototype,e.prototype=new t,e.prototype.constructor=e}function d(e,a,t){if(d.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==a&&"be"!==a||(t=a,a=10),this._init(e||0,a||10,t||"be"))}var r;"object"==typeof e?e.exports=d:a.BN=d,d.BN=d,d.wordSize=26;try{r="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(47790).Buffer}catch(e){}function n(e,a){var t=e.charCodeAt(a);return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:void c(!1,"Invalid character in "+e)}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,f){for(var d=0,r=0,n=Math.min(e.length,t),i=a;i=49?b-49+10:b>=17?b-17+10:b,c(b>=0&&r0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this._strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this._strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{d.prototype[Symbol.for("nodejs.util.inspect.custom")]=s}catch(e){d.prototype.inspect=s}else d.prototype.inspect=s;function s(){return(this.red?""}var l=["","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"],u=[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],h=[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];function p(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t._strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215,(f+=2)>=26&&(f-=26,r--),t=0!==d||r!==this.length-1?l[6-i.length]+i+t:i+t}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=u[e],o=h[e];t="";var s=this.clone();for(s.negative=0;!s.isZero();){var p=s.modrn(o).toString(e);t=(s=s.idivn(o)).isZero()?p+t:l[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16,2)},r&&(d.prototype.toBuffer=function(e,a){return this.toArrayLike(r,e,a)}),d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){this._strip();var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0");var r=function(e,a){return e.allocUnsafe?e.allocUnsafe(a):new e(a)}(e,d);return this["_toArrayLike"+("le"===a?"LE":"BE")](r,f),r},d.prototype._toArrayLikeLE=function(e,a){for(var t=0,c=0,f=0,d=0;f>8&255),t>16&255),6===d?(t>24&255),c=0,d=0):(c=r>>>24,d+=2)}if(t=0&&(e[t--]=r>>8&255),t>=0&&(e[t--]=r>>16&255),6===d?(t>=0&&(e[t--]=r>>24&255),c=0,d=0):(c=r>>>24,d+=2)}if(t>=0)for(e[t--]=c;t>=0;)e[t--]=0},Math.clz32?d.prototype._countBits=function(e){return 32-Math.clz32(e)}:d.prototype._countBits=function(e){var a=e,t=0;return a>=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this._strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function m(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t._strip()}function x(e,a,t){return m(e,a,t)}function y(e,a){this.x=e,this.y=a}Math.imul||(g=p),d.prototype.mulTo=function(e,a){var t=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,a):t<63?p(this,e,a):t<1024?m(this,e,a):x(this,e,a)},y.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},y.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,t+=d/67108864|0,t+=r>>>26,this.words[f]=67108863&r}return 0!==t&&(this.words[f]=t,this.length++),a?this.ineg():this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f&1}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this._strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this._strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n._strip(),c._strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modrn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modrn=function(e){var a=e<0;a&&(e=-e),c(e<=67108863);for(var t=(1<<26)%e,f=0,d=this.length-1;d>=0;d--)f=(t*f+(0|this.words[d]))%e;return a?-f:f},d.prototype.modn=function(e){return this.modrn(e)},d.prototype.idivn=function(e){var a=e<0;a&&(e=-e),c(e<=67108863);for(var t=0,f=this.length-1;f>=0;f--){var d=(0|this.words[f])+67108864*t;this.words[f]=d/e|0,t=d%e}return this._strip(),a?this.ineg():this},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this._strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new C(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function v(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}v.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},v.prototype.split=function(e,a){e.iushrn(this.n,0,a)},v.prototype.imulK=function(e){return e.imul(this.k)},f(w,v),w.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(A[e])return A[e];var a;if("k256"===e)a=new w;else if("p224"===e)a=new _;else if("p192"===e)a=new I;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new E}return A[e]=a,a},C.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(o(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},C.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},C.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},C.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},C.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},C.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},C.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},C.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},C.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new M(e)},f(M,C),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},M.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},M.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},15037:(e,a,t)=>{var c;function f(e){this.rand=e}if(e.exports=function(e){return c||(c=new f(null)),c.generate(e)},e.exports.Rand=f,f.prototype.generate=function(e){return this._rand(e)},f.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var a=new Uint8Array(e),t=0;t{var c=t(92861).Buffer;function f(e){c.isBuffer(e)||(e=c.from(e));for(var a=e.length/4|0,t=new Array(a),f=0;f>>24]^o[h>>>16&255]^s[p>>>8&255]^l[255&g]^a[m++],r=b[h>>>24]^o[p>>>16&255]^s[g>>>8&255]^l[255&u]^a[m++],n=b[p>>>24]^o[g>>>16&255]^s[u>>>8&255]^l[255&h]^a[m++],i=b[g>>>24]^o[u>>>16&255]^s[h>>>8&255]^l[255&p]^a[m++],u=d,h=r,p=n,g=i;return d=(c[u>>>24]<<24|c[h>>>16&255]<<16|c[p>>>8&255]<<8|c[255&g])^a[m++],r=(c[h>>>24]<<24|c[p>>>16&255]<<16|c[g>>>8&255]<<8|c[255&u])^a[m++],n=(c[p>>>24]<<24|c[g>>>16&255]<<16|c[u>>>8&255]<<8|c[255&h])^a[m++],i=(c[g>>>24]<<24|c[u>>>16&255]<<16|c[h>>>8&255]<<8|c[255&p])^a[m++],[d>>>=0,r>>>=0,n>>>=0,i>>>=0]}var n=[0,1,2,4,8,16,32,64,128,27,54],i=function(){for(var e=new Array(256),a=0;a<256;a++)e[a]=a<128?a<<1:a<<1^283;for(var t=[],c=[],f=[[],[],[],[]],d=[[],[],[],[]],r=0,n=0,i=0;i<256;++i){var b=n^n<<1^n<<2^n<<3^n<<4;b=b>>>8^255&b^99,t[r]=b,c[b]=r;var o=e[r],s=e[o],l=e[s],u=257*e[b]^16843008*b;f[0][r]=u<<24|u>>>8,f[1][r]=u<<16|u>>>16,f[2][r]=u<<8|u>>>24,f[3][r]=u,u=16843009*l^65537*s^257*o^16843008*r,d[0][b]=u<<24|u>>>8,d[1][b]=u<<16|u>>>16,d[2][b]=u<<8|u>>>24,d[3][b]=u,0===r?r=n=1:(r=o^e[e[e[l^o]]],n^=e[e[n]])}return{SBOX:t,INV_SBOX:c,SUB_MIX:f,INV_SUB_MIX:d}}();function b(e){this._key=f(e),this._reset()}b.blockSize=16,b.keySize=32,b.prototype.blockSize=b.blockSize,b.prototype.keySize=b.keySize,b.prototype._reset=function(){for(var e=this._key,a=e.length,t=a+6,c=4*(t+1),f=[],d=0;d>>24,r=i.SBOX[r>>>24]<<24|i.SBOX[r>>>16&255]<<16|i.SBOX[r>>>8&255]<<8|i.SBOX[255&r],r^=n[d/a|0]<<24):a>6&&d%a==4&&(r=i.SBOX[r>>>24]<<24|i.SBOX[r>>>16&255]<<16|i.SBOX[r>>>8&255]<<8|i.SBOX[255&r]),f[d]=f[d-a]^r}for(var b=[],o=0;o>>24]]^i.INV_SUB_MIX[1][i.SBOX[l>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[l>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[255&l]]}this._nRounds=t,this._keySchedule=f,this._invKeySchedule=b},b.prototype.encryptBlockRaw=function(e){return r(e=f(e),this._keySchedule,i.SUB_MIX,i.SBOX,this._nRounds)},b.prototype.encryptBlock=function(e){var a=this.encryptBlockRaw(e),t=c.allocUnsafe(16);return t.writeUInt32BE(a[0],0),t.writeUInt32BE(a[1],4),t.writeUInt32BE(a[2],8),t.writeUInt32BE(a[3],12),t},b.prototype.decryptBlock=function(e){var a=(e=f(e))[1];e[1]=e[3],e[3]=a;var t=r(e,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX,this._nRounds),d=c.allocUnsafe(16);return d.writeUInt32BE(t[0],0),d.writeUInt32BE(t[3],4),d.writeUInt32BE(t[2],8),d.writeUInt32BE(t[1],12),d},b.prototype.scrub=function(){d(this._keySchedule),d(this._invKeySchedule),d(this._key)},e.exports.AES=b},92356:(e,a,t)=>{var c=t(50462),f=t(92861).Buffer,d=t(56168),r=t(56698),n=t(25892),i=t(30295),b=t(45122);function o(e,a,t,r){d.call(this);var i=f.alloc(4,0);this._cipher=new c.AES(a);var o=this._cipher.encryptBlock(i);this._ghash=new n(o),t=function(e,a,t){if(12===a.length)return e._finID=f.concat([a,f.from([0,0,0,1])]),f.concat([a,f.from([0,0,0,2])]);var c=new n(t),d=a.length,r=d%16;c.update(a),r&&(r=16-r,c.update(f.alloc(r,0))),c.update(f.alloc(8,0));var i=8*d,o=f.alloc(8);o.writeUIntBE(i,0,8),c.update(o),e._finID=c.state;var s=f.from(e._finID);return b(s),s}(this,t,o),this._prev=f.from(t),this._cache=f.allocUnsafe(0),this._secCache=f.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}r(o,d),o.prototype._update=function(e){if(!this._called&&this._alen){var a=16-this._alen%16;a<16&&(a=f.alloc(a,0),this._ghash.update(a))}this._called=!0;var t=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(t),this._len+=e.length,t},o.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=i(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,a){var t=0;e.length!==a.length&&t++;for(var c=Math.min(e.length,a.length),f=0;f{var c=t(25799),f=t(36171),d=t(3219);a.createCipher=a.Cipher=c.createCipher,a.createCipheriv=a.Cipheriv=c.createCipheriv,a.createDecipher=a.Decipher=f.createDecipher,a.createDecipheriv=a.Decipheriv=f.createDecipheriv,a.listCiphers=a.getCiphers=function(){return Object.keys(d)}},36171:(e,a,t)=>{var c=t(92356),f=t(92861).Buffer,d=t(530),r=t(50650),n=t(56168),i=t(50462),b=t(68078);function o(e,a,t){n.call(this),this._cache=new s,this._last=void 0,this._cipher=new i.AES(a),this._prev=f.from(t),this._mode=e,this._autopadding=!0}function s(){this.cache=f.allocUnsafe(0)}function l(e,a,t){var n=d[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=f.from(t)),"GCM"!==n.mode&&t.length!==n.iv)throw new TypeError("invalid iv length "+t.length);if("string"==typeof a&&(a=f.from(a)),a.length!==n.key/8)throw new TypeError("invalid key length "+a.length);return"stream"===n.type?new r(n.module,a,t,!0):"auth"===n.type?new c(n.module,a,t,!0):new o(n.module,a,t)}t(56698)(o,n),o.prototype._update=function(e){var a,t;this._cache.add(e);for(var c=[];a=this._cache.get(this._autopadding);)t=this._mode.decrypt(this,a),c.push(t);return f.concat(c)},o.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var a=e[15];if(a<1||a>16)throw new Error("unable to decrypt data");for(var t=-1;++t16)return a=this.cache.slice(0,16),this.cache=this.cache.slice(16),a}else if(this.cache.length>=16)return a=this.cache.slice(0,16),this.cache=this.cache.slice(16),a;return null},s.prototype.flush=function(){if(this.cache.length)return this.cache},a.createDecipher=function(e,a){var t=d[e.toLowerCase()];if(!t)throw new TypeError("invalid suite type");var c=b(a,!1,t.key,t.iv);return l(e,c.key,c.iv)},a.createDecipheriv=l},25799:(e,a,t)=>{var c=t(530),f=t(92356),d=t(92861).Buffer,r=t(50650),n=t(56168),i=t(50462),b=t(68078);function o(e,a,t){n.call(this),this._cache=new l,this._cipher=new i.AES(a),this._prev=d.from(t),this._mode=e,this._autopadding=!0}t(56698)(o,n),o.prototype._update=function(e){var a,t;this._cache.add(e);for(var c=[];a=this._cache.get();)t=this._mode.encrypt(this,a),c.push(t);return d.concat(c)};var s=d.alloc(16,16);function l(){this.cache=d.allocUnsafe(0)}function u(e,a,t){var n=c[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof a&&(a=d.from(a)),a.length!==n.key/8)throw new TypeError("invalid key length "+a.length);if("string"==typeof t&&(t=d.from(t)),"GCM"!==n.mode&&t.length!==n.iv)throw new TypeError("invalid iv length "+t.length);return"stream"===n.type?new r(n.module,a,t):"auth"===n.type?new f(n.module,a,t):new o(n.module,a,t)}o.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(s))throw this._cipher.scrub(),new Error("data not multiple of block length")},o.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=d.concat([this.cache,e])},l.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,a=d.allocUnsafe(e),t=-1;++t{var c=t(92861).Buffer,f=c.alloc(16,0);function d(e){var a=c.allocUnsafe(16);return a.writeUInt32BE(e[0]>>>0,0),a.writeUInt32BE(e[1]>>>0,4),a.writeUInt32BE(e[2]>>>0,8),a.writeUInt32BE(e[3]>>>0,12),a}function r(e){this.h=e,this.state=c.alloc(16,0),this.cache=c.allocUnsafe(0)}r.prototype.ghash=function(e){for(var a=-1;++a0;a--)c[a]=c[a]>>>1|(1&c[a-1])<<31;c[0]=c[0]>>>1,t&&(c[0]=c[0]^225<<24)}this.state=d(f)},r.prototype.update=function(e){var a;for(this.cache=c.concat([this.cache,e]);this.cache.length>=16;)a=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(a)},r.prototype.final=function(e,a){return this.cache.length&&this.ghash(c.concat([this.cache,f],16)),this.ghash(d([0,e,0,a])),this.state},e.exports=r},45122:e=>{e.exports=function(e){for(var a,t=e.length;t--;){if(255!==(a=e.readUInt8(t))){a++,e.writeUInt8(a,t);break}e.writeUInt8(0,t)}}},92884:(e,a,t)=>{var c=t(30295);a.encrypt=function(e,a){var t=c(a,e._prev);return e._prev=e._cipher.encryptBlock(t),e._prev},a.decrypt=function(e,a){var t=e._prev;e._prev=a;var f=e._cipher.decryptBlock(a);return c(f,t)}},46383:(e,a,t)=>{var c=t(92861).Buffer,f=t(30295);function d(e,a,t){var d=a.length,r=f(a,e._cache);return e._cache=e._cache.slice(d),e._prev=c.concat([e._prev,t?a:r]),r}a.encrypt=function(e,a,t){for(var f,r=c.allocUnsafe(0);a.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=c.allocUnsafe(0)),!(e._cache.length<=a.length)){r=c.concat([r,d(e,a,t)]);break}f=e._cache.length,r=c.concat([r,d(e,a.slice(0,f),t)]),a=a.slice(f)}return r}},55264:(e,a,t)=>{var c=t(92861).Buffer;function f(e,a,t){for(var c,f,r=-1,n=0;++r<8;)c=a&1<<7-r?128:0,n+=(128&(f=e._cipher.encryptBlock(e._prev)[0]^c))>>r%8,e._prev=d(e._prev,t?c:f);return n}function d(e,a){var t=e.length,f=-1,d=c.allocUnsafe(e.length);for(e=c.concat([e,c.from([a])]);++f>7;return d}a.encrypt=function(e,a,t){for(var d=a.length,r=c.allocUnsafe(d),n=-1;++n{var c=t(92861).Buffer;function f(e,a,t){var f=e._cipher.encryptBlock(e._prev)[0]^a;return e._prev=c.concat([e._prev.slice(1),c.from([t?a:f])]),f}a.encrypt=function(e,a,t){for(var d=a.length,r=c.allocUnsafe(d),n=-1;++n{var c=t(30295),f=t(92861).Buffer,d=t(45122);function r(e){var a=e._cipher.encryptBlockRaw(e._prev);return d(e._prev),a}a.encrypt=function(e,a){var t=Math.ceil(a.length/16),d=e._cache.length;e._cache=f.concat([e._cache,f.allocUnsafe(16*t)]);for(var n=0;n{a.encrypt=function(e,a){return e._cipher.encryptBlock(a)},a.decrypt=function(e,a){return e._cipher.decryptBlock(a)}},530:(e,a,t)=>{var c={ECB:t(52632),CBC:t(92884),CFB:t(46383),CFB8:t(86975),CFB1:t(55264),OFB:t(46843),CTR:t(63053),GCM:t(63053)},f=t(3219);for(var d in f)f[d].module=c[f[d].mode];e.exports=f},46843:(e,a,t)=>{var c=t(48287).Buffer,f=t(30295);function d(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}a.encrypt=function(e,a){for(;e._cache.length{var c=t(50462),f=t(92861).Buffer,d=t(56168);function r(e,a,t,r){d.call(this),this._cipher=new c.AES(a),this._prev=f.from(t),this._cache=f.allocUnsafe(0),this._secCache=f.allocUnsafe(0),this._decrypt=r,this._mode=e}t(56698)(r,d),r.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},r.prototype._final=function(){this._cipher.scrub()},e.exports=r},30125:(e,a,t)=>{var c=t(84050),f=t(1241),d=t(530),r=t(32438),n=t(68078);function i(e,a,t){if(e=e.toLowerCase(),d[e])return f.createCipheriv(e,a,t);if(r[e])return new c({key:a,iv:t,mode:e});throw new TypeError("invalid suite type")}function b(e,a,t){if(e=e.toLowerCase(),d[e])return f.createDecipheriv(e,a,t);if(r[e])return new c({key:a,iv:t,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}a.createCipher=a.Cipher=function(e,a){var t,c;if(e=e.toLowerCase(),d[e])t=d[e].key,c=d[e].iv;else{if(!r[e])throw new TypeError("invalid suite type");t=8*r[e].key,c=r[e].iv}var f=n(a,!1,t,c);return i(e,f.key,f.iv)},a.createCipheriv=a.Cipheriv=i,a.createDecipher=a.Decipher=function(e,a){var t,c;if(e=e.toLowerCase(),d[e])t=d[e].key,c=d[e].iv;else{if(!r[e])throw new TypeError("invalid suite type");t=8*r[e].key,c=r[e].iv}var f=n(a,!1,t,c);return b(e,f.key,f.iv)},a.createDecipheriv=a.Decipheriv=b,a.listCiphers=a.getCiphers=function(){return Object.keys(r).concat(f.getCiphers())}},84050:(e,a,t)=>{var c=t(56168),f=t(29560),d=t(56698),r=t(92861).Buffer,n={"des-ede3-cbc":f.CBC.instantiate(f.EDE),"des-ede3":f.EDE,"des-ede-cbc":f.CBC.instantiate(f.EDE),"des-ede":f.EDE,"des-cbc":f.CBC.instantiate(f.DES),"des-ecb":f.DES};function i(e){c.call(this);var a,t=e.mode.toLowerCase(),f=n[t];a=e.decrypt?"decrypt":"encrypt";var d=e.key;r.isBuffer(d)||(d=r.from(d)),"des-ede"!==t&&"des-ede-cbc"!==t||(d=r.concat([d,d.slice(0,8)]));var i=e.iv;r.isBuffer(i)||(i=r.from(i)),this._des=f.create({key:d,iv:i,type:a})}n.des=n["des-cbc"],n.des3=n["des-ede3-cbc"],e.exports=i,d(i,c),i.prototype._update=function(e){return r.from(this._des.update(e))},i.prototype._final=function(){return r.from(this._des.final())}},32438:(e,a)=>{a["des-ecb"]={key:8,iv:0},a["des-cbc"]=a.des={key:8,iv:8},a["des-ede3-cbc"]=a.des3={key:24,iv:8},a["des-ede3"]={key:24,iv:0},a["des-ede-cbc"]={key:16,iv:8},a["des-ede"]={key:16,iv:0}},67332:(e,a,t)=>{var c=t(48287).Buffer,f=t(39404),d=t(53209);function r(e){var a,t=e.modulus.byteLength();do{a=new f(d(t))}while(a.cmp(e.modulus)>=0||!a.umod(e.prime1)||!a.umod(e.prime2));return a}function n(e,a){var t=function(e){var a=r(e);return{blinder:a.toRed(f.mont(e.modulus)).redPow(new f(e.publicExponent)).fromRed(),unblinder:a.invm(e.modulus)}}(a),d=a.modulus.byteLength(),n=new f(e).mul(t.blinder).umod(a.modulus),i=n.toRed(f.mont(a.prime1)),b=n.toRed(f.mont(a.prime2)),o=a.coefficient,s=a.prime1,l=a.prime2,u=i.redPow(a.exponent1).fromRed(),h=b.redPow(a.exponent2).fromRed(),p=u.isub(h).imul(o).umod(s).imul(l);return h.iadd(p).imul(t.unblinder).umod(a.modulus).toArrayLike(c,"be",d)}n.getr=r,e.exports=n},55715:(e,a,t)=>{"use strict";e.exports=t(62951)},20:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=t(47108),d=t(46737),r=t(56698),n=t(35359),i=t(74847),b=t(62951);function o(e){d.Writable.call(this);var a=b[e];if(!a)throw new Error("Unknown message digest");this._hashType=a.hash,this._hash=f(a.hash),this._tag=a.id,this._signType=a.sign}function s(e){d.Writable.call(this);var a=b[e];if(!a)throw new Error("Unknown message digest");this._hash=f(a.hash),this._tag=a.id,this._signType=a.sign}function l(e){return new o(e)}function u(e){return new s(e)}Object.keys(b).forEach((function(e){b[e].id=c.from(b[e].id,"hex"),b[e.toLowerCase()]=b[e]})),r(o,d.Writable),o.prototype._write=function(e,a,t){this._hash.update(e),t()},o.prototype.update=function(e,a){return this._hash.update("string"==typeof e?c.from(e,a):e),this},o.prototype.sign=function(e,a){this.end();var t=this._hash.digest(),c=n(t,e,this._hashType,this._signType,this._tag);return a?c.toString(a):c},r(s,d.Writable),s.prototype._write=function(e,a,t){this._hash.update(e),t()},s.prototype.update=function(e,a){return this._hash.update("string"==typeof e?c.from(e,a):e),this},s.prototype.verify=function(e,a,t){var f="string"==typeof a?c.from(a,t):a;this.end();var d=this._hash.digest();return i(f,d,e,this._signType,this._tag)},e.exports={Sign:l,Verify:u,createSign:l,createVerify:u}},35359:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=t(83507),d=t(67332),r=t(86729).ec,n=t(39404),i=t(78170),b=t(64589);function o(e,a,t,d){if((e=c.from(e.toArray())).length0&&t.ishrn(c),t}function l(e,a,t){var d,r;do{for(d=c.alloc(0);8*d.length{"use strict";var c=t(92861).Buffer,f=t(39404),d=t(86729).ec,r=t(78170),n=t(64589);function i(e,a){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(a)>=0)throw new Error("invalid sig")}e.exports=function(e,a,t,b,o){var s=r(t);if("ec"===s.type){if("ecdsa"!==b&&"ecdsa/rsa"!==b)throw new Error("wrong public key type");return function(e,a,t){var c=n[t.data.algorithm.curve.join(".")];if(!c)throw new Error("unknown curve "+t.data.algorithm.curve.join("."));var f=new d(c),r=t.data.subjectPrivateKey.data;return f.verify(a,e,r)}(e,a,s)}if("dsa"===s.type){if("dsa"!==b)throw new Error("wrong public key type");return function(e,a,t){var c=t.data.p,d=t.data.q,n=t.data.g,b=t.data.pub_key,o=r.signature.decode(e,"der"),s=o.s,l=o.r;i(s,d),i(l,d);var u=f.mont(c),h=s.invm(d);return 0===n.toRed(u).redPow(new f(a).mul(h).mod(d)).fromRed().mul(b.toRed(u).redPow(l.mul(h).mod(d)).fromRed()).mod(c).mod(d).cmp(l)}(e,a,s)}if("rsa"!==b&&"ecdsa/rsa"!==b)throw new Error("wrong public key type");a=c.concat([o,a]);for(var l=s.modulus.byteLength(),u=[1],h=0;a.length+u.length+2{var a={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==a.call(e)}},26248:(e,a,t)=>{"use strict";var c=t(33225),f=Object.keys||function(e){var a=[];for(var t in e)a.push(t);return a};e.exports=s;var d=Object.create(t(15622));d.inherits=t(56698);var r=t(30206),n=t(7314);d.inherits(s,r);for(var i=f(n.prototype),b=0;b{"use strict";e.exports=d;var c=t(81816),f=Object.create(t(15622));function d(e){if(!(this instanceof d))return new d(e);c.call(this,e)}f.inherits=t(56698),f.inherits(d,c),d.prototype._transform=function(e,a,t){t(null,e)}},30206:(e,a,t)=>{"use strict";var c=t(33225);e.exports=x;var f,d=t(32240);x.ReadableState=m,t(37007).EventEmitter;var r=function(e,a){return e.listeners(a).length},n=t(5567),i=t(24116).Buffer,b=(void 0!==t.g?t.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},o=Object.create(t(15622));o.inherits=t(56698);var s=t(92668),l=void 0;l=s&&s.debuglog?s.debuglog("stream"):function(){};var u,h=t(20672),p=t(36278);o.inherits(x,n);var g=["error","close","destroy","pause","resume"];function m(e,a){e=e||{};var c=a instanceof(f=f||t(26248));this.objectMode=!!e.objectMode,c&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var d=e.highWaterMark,r=e.readableHighWaterMark,n=this.objectMode?16:16384;this.highWaterMark=d||0===d?d:c&&(r||0===r)?r:n,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=t(6427).I),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function x(e){if(f=f||t(26248),!(this instanceof x))return new x(e);this._readableState=new m(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),n.call(this)}function y(e,a,t,c,f){var d,r=e._readableState;return null===a?(r.reading=!1,function(e,a){if(!a.ended){if(a.decoder){var t=a.decoder.end();t&&t.length&&(a.buffer.push(t),a.length+=a.objectMode?1:t.length)}a.ended=!0,_(e)}}(e,r)):(f||(d=function(e,a){var t,c;return c=a,i.isBuffer(c)||c instanceof b||"string"==typeof a||void 0===a||e.objectMode||(t=new TypeError("Invalid non-string/buffer chunk")),t}(r,a)),d?e.emit("error",d):r.objectMode||a&&a.length>0?("string"==typeof a||r.objectMode||Object.getPrototypeOf(a)===i.prototype||(a=function(e){return i.from(e)}(a)),c?r.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):A(e,r,a,!0):r.ended?e.emit("error",new Error("stream.push() after EOF")):(r.reading=!1,r.decoder&&!t?(a=r.decoder.write(a),r.objectMode||0!==a.length?A(e,r,a,!1):E(e,r)):A(e,r,a,!1))):c||(r.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.lengtha.highWaterMark&&(a.highWaterMark=function(e){return e>=v?e=v:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=a.length?e:a.ended?a.length:(a.needReadable=!0,0))}function _(e){var a=e._readableState;a.needReadable=!1,a.emittedReadable||(l("emitReadable",a.flowing),a.emittedReadable=!0,a.sync?c.nextTick(I,e):I(e))}function I(e){l("emit readable"),e.emit("readable"),L(e)}function E(e,a){a.readingMore||(a.readingMore=!0,c.nextTick(C,e,a))}function C(e,a){for(var t=a.length;!a.reading&&!a.flowing&&!a.ended&&a.length=a.length?(t=a.decoder?a.buffer.join(""):1===a.buffer.length?a.buffer.head.data:a.buffer.concat(a.length),a.buffer.clear()):t=function(e,a,t){var c;return ed.length?d.length:e;if(r===d.length?f+=d:f+=d.slice(0,e),0==(e-=r)){r===d.length?(++c,t.next?a.head=t.next:a.head=a.tail=null):(a.head=t,t.data=d.slice(r));break}++c}return a.length-=c,f}(e,a):function(e,a){var t=i.allocUnsafe(e),c=a.head,f=1;for(c.data.copy(t),e-=c.data.length;c=c.next;){var d=c.data,r=e>d.length?d.length:e;if(d.copy(t,t.length-e,0,r),0==(e-=r)){r===d.length?(++f,c.next?a.head=c.next:a.head=a.tail=null):(a.head=c,c.data=d.slice(r));break}++f}return a.length-=f,t}(e,a),c}(e,a.buffer,a.decoder),t);var t}function k(e){var a=e._readableState;if(a.length>0)throw new Error('"endReadable()" called on non-empty stream');a.endEmitted||(a.ended=!0,c.nextTick(N,a,e))}function N(e,a){e.endEmitted||0!==e.length||(e.endEmitted=!0,a.readable=!1,a.emit("end"))}function P(e,a){for(var t=0,c=e.length;t=a.highWaterMark||a.ended))return l("read: emitReadable",a.length,a.ended),0===a.length&&a.ended?k(this):_(this),null;if(0===(e=w(e,a))&&a.ended)return 0===a.length&&k(this),null;var c,f=a.needReadable;return l("need readable",f),(0===a.length||a.length-e0?S(e,a):null)?(a.needReadable=!0,e=0):a.length-=e,0===a.length&&(a.ended||(a.needReadable=!0),t!==e&&a.ended&&k(this)),null!==c&&this.emit("data",c),c},x.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(e,a){var t=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1,l("pipe count=%d opts=%j",f.pipesCount,a);var n=a&&!1===a.end||e===process.stdout||e===process.stderr?m:i;function i(){l("onend"),e.end()}f.endEmitted?c.nextTick(n):t.once("end",n),e.on("unpipe",(function a(c,d){l("onunpipe"),c===t&&d&&!1===d.hasUnpiped&&(d.hasUnpiped=!0,l("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",b),e.removeListener("error",h),e.removeListener("unpipe",a),t.removeListener("end",i),t.removeListener("end",m),t.removeListener("data",u),o=!0,!f.awaitDrain||e._writableState&&!e._writableState.needDrain||b())}));var b=function(e){return function(){var a=e._readableState;l("pipeOnDrain",a.awaitDrain),a.awaitDrain&&a.awaitDrain--,0===a.awaitDrain&&r(e,"data")&&(a.flowing=!0,L(e))}}(t);e.on("drain",b);var o=!1,s=!1;function u(a){l("ondata"),s=!1,!1!==e.write(a)||s||((1===f.pipesCount&&f.pipes===e||f.pipesCount>1&&-1!==P(f.pipes,e))&&!o&&(l("false write response, pause",f.awaitDrain),f.awaitDrain++,s=!0),t.pause())}function h(a){l("onerror",a),m(),e.removeListener("error",h),0===r(e,"error")&&e.emit("error",a)}function p(){e.removeListener("finish",g),m()}function g(){l("onfinish"),e.removeListener("close",p),m()}function m(){l("unpipe"),t.unpipe(e)}return t.on("data",u),function(e,a,t){if("function"==typeof e.prependListener)return e.prependListener(a,t);e._events&&e._events[a]?d(e._events[a])?e._events[a].unshift(t):e._events[a]=[t,e._events[a]]:e.on(a,t)}(e,"error",h),e.once("close",p),e.once("finish",g),e.emit("pipe",t),f.flowing||(l("pipe resume"),t.resume()),e},x.prototype.unpipe=function(e){var a=this._readableState,t={hasUnpiped:!1};if(0===a.pipesCount)return this;if(1===a.pipesCount)return e&&e!==a.pipes||(e||(e=a.pipes),a.pipes=null,a.pipesCount=0,a.flowing=!1,e&&e.emit("unpipe",this,t)),this;if(!e){var c=a.pipes,f=a.pipesCount;a.pipes=null,a.pipesCount=0,a.flowing=!1;for(var d=0;d{"use strict";e.exports=r;var c=t(26248),f=Object.create(t(15622));function d(e,a){var t=this._transformState;t.transforming=!1;var c=t.writecb;if(!c)return this.emit("error",new Error("write callback called multiple times"));t.writechunk=null,t.writecb=null,null!=a&&this.push(a),c(e);var f=this._readableState;f.reading=!1,(f.needReadable||f.length{"use strict";var c=t(33225);function f(e){var a=this;this.next=null,this.entry=null,this.finish=function(){!function(e,a){var t=e.entry;for(e.entry=null;t;){var c=t.callback;a.pendingcb--,c(undefined),t=t.next}a.corkedRequestsFree.next=e}(a,e)}}e.exports=g;var d,r=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:c.nextTick;g.WritableState=p;var n=Object.create(t(15622));n.inherits=t(56698);var i,b={deprecate:t(94643)},o=t(5567),s=t(24116).Buffer,l=(void 0!==t.g?t.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},u=t(36278);function h(){}function p(e,a){d=d||t(26248),e=e||{};var n=a instanceof d;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,b=e.writableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(b||0===b)?b:o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,a){var t=e._writableState,f=t.sync,d=t.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(t),a)!function(e,a,t,f,d){--a.pendingcb,t?(c.nextTick(d,f),c.nextTick(w,e,a),e._writableState.errorEmitted=!0,e.emit("error",f)):(d(f),e._writableState.errorEmitted=!0,e.emit("error",f),w(e,a))}(e,t,f,a,d);else{var n=A(t);n||t.corked||t.bufferProcessing||!t.bufferedRequest||y(e,t),f?r(x,e,t,n,d):x(e,t,n,d)}}(a,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new f(this)}function g(e){if(d=d||t(26248),!(i.call(g,this)||this instanceof d))return new g(e);this._writableState=new p(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function m(e,a,t,c,f,d,r){a.writelen=c,a.writecb=r,a.writing=!0,a.sync=!0,t?e._writev(f,a.onwrite):e._write(f,d,a.onwrite),a.sync=!1}function x(e,a,t,c){t||function(e,a){0===a.length&&a.needDrain&&(a.needDrain=!1,e.emit("drain"))}(e,a),a.pendingcb--,c(),w(e,a)}function y(e,a){a.bufferProcessing=!0;var t=a.bufferedRequest;if(e._writev&&t&&t.next){var c=a.bufferedRequestCount,d=new Array(c),r=a.corkedRequestsFree;r.entry=t;for(var n=0,i=!0;t;)d[n]=t,t.isBuf||(i=!1),t=t.next,n+=1;d.allBuffers=i,m(e,a,!0,a.length,d,"",r.finish),a.pendingcb++,a.lastBufferedRequest=null,r.next?(a.corkedRequestsFree=r.next,r.next=null):a.corkedRequestsFree=new f(a),a.bufferedRequestCount=0}else{for(;t;){var b=t.chunk,o=t.encoding,s=t.callback;if(m(e,a,!1,a.objectMode?1:b.length,b,o,s),t=t.next,a.bufferedRequestCount--,a.writing)break}null===t&&(a.lastBufferedRequest=null)}a.bufferedRequest=t,a.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,a){e._final((function(t){a.pendingcb--,t&&e.emit("error",t),a.prefinished=!0,e.emit("prefinish"),w(e,a)}))}function w(e,a){var t=A(a);return t&&(function(e,a){a.prefinished||a.finalCalled||("function"==typeof e._final?(a.pendingcb++,a.finalCalled=!0,c.nextTick(v,e,a)):(a.prefinished=!0,e.emit("prefinish")))}(e,a),0===a.pendingcb&&(a.finished=!0,e.emit("finish"))),t}n.inherits(g,o),p.prototype.getBuffer=function(){for(var e=this.bufferedRequest,a=[];e;)a.push(e),e=e.next;return a},function(){try{Object.defineProperty(p.prototype,"buffer",{get:b.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===g&&e&&e._writableState instanceof p}})):i=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,a,t){var f,d=this._writableState,r=!1,n=!d.objectMode&&(f=e,s.isBuffer(f)||f instanceof l);return n&&!s.isBuffer(e)&&(e=function(e){return s.from(e)}(e)),"function"==typeof a&&(t=a,a=null),n?a="buffer":a||(a=d.defaultEncoding),"function"!=typeof t&&(t=h),d.ended?function(e,a){var t=new Error("write after end");e.emit("error",t),c.nextTick(a,t)}(this,t):(n||function(e,a,t,f){var d=!0,r=!1;return null===t?r=new TypeError("May not write null values to stream"):"string"==typeof t||void 0===t||a.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r&&(e.emit("error",r),c.nextTick(f,r),d=!1),d}(this,d,e,t))&&(d.pendingcb++,r=function(e,a,t,c,f,d){if(!t){var r=function(e,a,t){return e.objectMode||!1===e.decodeStrings||"string"!=typeof a||(a=s.from(a,t)),a}(a,c,f);c!==r&&(t=!0,f="buffer",c=r)}var n=a.objectMode?1:c.length;a.length+=n;var i=a.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,a,t){t(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,a,t){var f=this._writableState;"function"==typeof e?(t=e,e=null,a=null):"function"==typeof a&&(t=a,a=null),null!=e&&this.write(e,a),f.corked&&(f.corked=1,this.uncork()),f.ending||function(e,a,t){a.ending=!0,w(e,a),t&&(a.finished?c.nextTick(t):e.once("finish",t)),a.ended=!0,e.writable=!1}(this,f,t)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=u.destroy,g.prototype._undestroy=u.undestroy,g.prototype._destroy=function(e,a){this.end(),a(e)}},20672:(e,a,t)=>{"use strict";var c=t(24116).Buffer,f=t(21638);e.exports=function(){function e(){!function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var a={data:e,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length},e.prototype.unshift=function(e){var a={data:e,next:this.head};0===this.length&&(this.tail=a),this.head=a,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var a=this.head,t=""+a.data;a=a.next;)t+=e+a.data;return t},e.prototype.concat=function(e){if(0===this.length)return c.alloc(0);for(var a,t,f=c.allocUnsafe(e>>>0),d=this.head,r=0;d;)a=f,t=r,d.data.copy(a,t),r+=d.data.length,d=d.next;return f},e}(),f&&f.inspect&&f.inspect.custom&&(e.exports.prototype[f.inspect.custom]=function(){var e=f.inspect({length:this.length});return this.constructor.name+" "+e})},36278:(e,a,t)=>{"use strict";var c=t(33225);function f(e,a){e.emit("error",a)}e.exports={destroy:function(e,a){var t=this,d=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return d||r?(a?a(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,c.nextTick(f,this,e)):c.nextTick(f,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?t._writableState?t._writableState.errorEmitted||(t._writableState.errorEmitted=!0,c.nextTick(f,t,e)):c.nextTick(f,t,e):a&&a(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},5567:(e,a,t)=>{e.exports=t(37007).EventEmitter},24116:(e,a,t)=>{var c=t(48287),f=c.Buffer;function d(e,a){for(var t in e)a[t]=e[t]}function r(e,a,t){return f(e,a,t)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?e.exports=c:(d(c,a),a.Buffer=r),d(f,r),r.from=function(e,a,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return f(e,a,t)},r.alloc=function(e,a,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var c=f(e);return void 0!==a?"string"==typeof t?c.fill(a,t):c.fill(a):c.fill(0),c},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return f(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return c.SlowBuffer(e)}},46737:(e,a,t)=>{(a=e.exports=t(30206)).Stream=a,a.Readable=a,a.Writable=t(7314),a.Duplex=t(26248),a.Transform=t(81816),a.PassThrough=t(75242)},6427:(e,a,t)=>{"use strict";var c=t(88393).Buffer,f=c.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function d(e){var a;switch(this.encoding=function(e){var a=function(e){if(!e)return"utf8";for(var a;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(a)return;e=(""+e).toLowerCase(),a=!0}}(e);if("string"!=typeof a&&(c.isEncoding===f||!f(e)))throw new Error("Unknown encoding: "+e);return a||e}(e),this.encoding){case"utf16le":this.text=i,this.end=b,a=4;break;case"utf8":this.fillLast=n,a=4;break;case"base64":this.text=o,this.end=s,a=3;break;default:return this.write=l,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=c.allocUnsafe(a)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function n(e){var a=this.lastTotal-this.lastNeed,t=function(e,a){if(128!=(192&a[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&a.length>1){if(128!=(192&a[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&a.length>2&&128!=(192&a[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==t?t:this.lastNeed<=e.length?(e.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,a,0,e.length),void(this.lastNeed-=e.length))}function i(e,a){if((e.length-a)%2==0){var t=e.toString("utf16le",a);if(t){var c=t.charCodeAt(t.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",a,e.length-1)}function b(e){var a=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,t)}return a}function o(e,a){var t=(e.length-a)%3;return 0===t?e.toString("base64",a):(this.lastNeed=3-t,this.lastTotal=3,1===t?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",a,e.length-t))}function s(e){var a=e&&e.length?this.write(e):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function l(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}a.I=d,d.prototype.write=function(e){if(0===e.length)return"";var a,t;if(this.lastNeed){if(void 0===(a=this.fillLast(e)))return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t=0?(f>0&&(e.lastNeed=f-1),f):--c=0?(f>0&&(e.lastNeed=f-2),f):--c=0?(f>0&&(2===f?f=0:e.lastNeed=f-3),f):0}(this,e,a);if(!this.lastNeed)return e.toString("utf8",a);this.lastTotal=t;var c=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,c),e.toString("utf8",a,c)},d.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},88393:(e,a,t)=>{var c=t(48287),f=c.Buffer;function d(e,a){for(var t in e)a[t]=e[t]}function r(e,a,t){return f(e,a,t)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?e.exports=c:(d(c,a),a.Buffer=r),d(f,r),r.from=function(e,a,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return f(e,a,t)},r.alloc=function(e,a,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var c=f(e);return void 0!==a?"string"==typeof t?c.fill(a,t):c.fill(a):c.fill(0),c},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return f(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return c.SlowBuffer(e)}},5974:(e,a,t)=>{"use strict";var c=t(48287).Buffer,f=t(94148),d=t(44442),r=t(58411),n=t(71447),i=t(19681);for(var b in i)a[b]=i[b];function o(e){if("number"!=typeof e||ea.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}a.NONE=0,a.DEFLATE=1,a.INFLATE=2,a.GZIP=3,a.GUNZIP=4,a.DEFLATERAW=5,a.INFLATERAW=6,a.UNZIP=7,o.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,f(this.init_done,"close before init"),f(this.mode<=a.UNZIP),this.mode===a.DEFLATE||this.mode===a.GZIP||this.mode===a.DEFLATERAW?r.deflateEnd(this.strm):this.mode!==a.INFLATE&&this.mode!==a.GUNZIP&&this.mode!==a.INFLATERAW&&this.mode!==a.UNZIP||n.inflateEnd(this.strm),this.mode=a.NONE,this.dictionary=null)},o.prototype.write=function(e,a,t,c,f,d,r){return this._write(!0,e,a,t,c,f,d,r)},o.prototype.writeSync=function(e,a,t,c,f,d,r){return this._write(!1,e,a,t,c,f,d,r)},o.prototype._write=function(e,t,d,r,n,i,b,o){if(f.equal(arguments.length,8),f(this.init_done,"write before init"),f(this.mode!==a.NONE,"already finalized"),f.equal(!1,this.write_in_progress,"write already in progress"),f.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,f.equal(!1,void 0===t,"must provide flush value"),this.write_in_progress=!0,t!==a.Z_NO_FLUSH&&t!==a.Z_PARTIAL_FLUSH&&t!==a.Z_SYNC_FLUSH&&t!==a.Z_FULL_FLUSH&&t!==a.Z_FINISH&&t!==a.Z_BLOCK)throw new Error("Invalid flush value");if(null==d&&(d=c.alloc(0),n=0,r=0),this.strm.avail_in=n,this.strm.input=d,this.strm.next_in=r,this.strm.avail_out=o,this.strm.output=i,this.strm.next_out=b,this.flush=t,!e)return this._process(),this._checkError()?this._afterSync():void 0;var s=this;return process.nextTick((function(){s._process(),s._after()})),this},o.prototype._afterSync=function(){var e=this.strm.avail_out,a=this.strm.avail_in;return this.write_in_progress=!1,[a,e]},o.prototype._process=function(){var e=null;switch(this.mode){case a.DEFLATE:case a.GZIP:case a.DEFLATERAW:this.err=r.deflate(this.strm,this.flush);break;case a.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=a.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=a.GUNZIP):this.mode=a.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case a.INFLATE:case a.GUNZIP:case a.INFLATERAW:for(this.err=n.inflate(this.strm,this.flush),this.err===a.Z_NEED_DICT&&this.dictionary&&(this.err=n.inflateSetDictionary(this.strm,this.dictionary),this.err===a.Z_OK?this.err=n.inflate(this.strm,this.flush):this.err===a.Z_DATA_ERROR&&(this.err=a.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===a.GUNZIP&&this.err===a.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=n.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},o.prototype._checkError=function(){switch(this.err){case a.Z_OK:case a.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===a.Z_FINISH)return this._error("unexpected end of file"),!1;break;case a.Z_STREAM_END:break;case a.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},o.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,a=this.strm.avail_in;this.write_in_progress=!1,this.callback(a,e),this.pending_close&&this.close()}},o.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},o.prototype.init=function(e,t,c,d,r){f(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),f(e>=8&&e<=15,"invalid windowBits"),f(t>=-1&&t<=9,"invalid compression level"),f(c>=1&&c<=9,"invalid memlevel"),f(d===a.Z_FILTERED||d===a.Z_HUFFMAN_ONLY||d===a.Z_RLE||d===a.Z_FIXED||d===a.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(t,e,c,d,r),this._setDictionary()},o.prototype.params=function(){throw new Error("deflateParams Not supported")},o.prototype.reset=function(){this._reset(),this._setDictionary()},o.prototype._init=function(e,t,c,f,i){switch(this.level=e,this.windowBits=t,this.memLevel=c,this.strategy=f,this.flush=a.Z_NO_FLUSH,this.err=a.Z_OK,this.mode!==a.GZIP&&this.mode!==a.GUNZIP||(this.windowBits+=16),this.mode===a.UNZIP&&(this.windowBits+=32),this.mode!==a.DEFLATERAW&&this.mode!==a.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new d,this.mode){case a.DEFLATE:case a.GZIP:case a.DEFLATERAW:this.err=r.deflateInit2(this.strm,this.level,a.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case a.INFLATE:case a.GUNZIP:case a.INFLATERAW:case a.UNZIP:this.err=n.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==a.Z_OK&&this._error("Init error"),this.dictionary=i,this.write_in_progress=!1,this.init_done=!0},o.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=a.Z_OK,this.mode){case a.DEFLATE:case a.DEFLATERAW:this.err=r.deflateSetDictionary(this.strm,this.dictionary)}this.err!==a.Z_OK&&this._error("Failed to set dictionary")}},o.prototype._reset=function(){switch(this.err=a.Z_OK,this.mode){case a.DEFLATE:case a.DEFLATERAW:case a.GZIP:this.err=r.deflateReset(this.strm);break;case a.INFLATE:case a.INFLATERAW:case a.GUNZIP:this.err=n.inflateReset(this.strm)}this.err!==a.Z_OK&&this._error("Failed to reset stream")},a.Zlib=o},78559:(e,a,t)=>{"use strict";var c=t(48287).Buffer,f=t(88310).Transform,d=t(5974),r=t(40537),n=t(94148).ok,i=t(48287).kMaxLength,b="Cannot create final Buffer. It would be larger than 0x"+i.toString(16)+" bytes";d.Z_MIN_WINDOWBITS=8,d.Z_MAX_WINDOWBITS=15,d.Z_DEFAULT_WINDOWBITS=15,d.Z_MIN_CHUNK=64,d.Z_MAX_CHUNK=1/0,d.Z_DEFAULT_CHUNK=16384,d.Z_MIN_MEMLEVEL=1,d.Z_MAX_MEMLEVEL=9,d.Z_DEFAULT_MEMLEVEL=8,d.Z_MIN_LEVEL=-1,d.Z_MAX_LEVEL=9,d.Z_DEFAULT_LEVEL=d.Z_DEFAULT_COMPRESSION;for(var o=Object.keys(d),s=0;s=i?r=new RangeError(b):a=c.concat(f,d),f=[],e.close(),t(r,a)}e.on("error",(function(a){e.removeListener("end",n),e.removeListener("readable",r),t(a)})),e.on("end",n),e.end(a),r()}function x(e,a){if("string"==typeof a&&(a=c.from(a)),!c.isBuffer(a))throw new TypeError("Not a string or buffer");var t=e._finishFlushFlag;return e._processChunk(a,t)}function y(e){if(!(this instanceof y))return new y(e);M.call(this,e,d.DEFLATE)}function A(e){if(!(this instanceof A))return new A(e);M.call(this,e,d.INFLATE)}function v(e){if(!(this instanceof v))return new v(e);M.call(this,e,d.GZIP)}function w(e){if(!(this instanceof w))return new w(e);M.call(this,e,d.GUNZIP)}function _(e){if(!(this instanceof _))return new _(e);M.call(this,e,d.DEFLATERAW)}function I(e){if(!(this instanceof I))return new I(e);M.call(this,e,d.INFLATERAW)}function E(e){if(!(this instanceof E))return new E(e);M.call(this,e,d.UNZIP)}function C(e){return e===d.Z_NO_FLUSH||e===d.Z_PARTIAL_FLUSH||e===d.Z_SYNC_FLUSH||e===d.Z_FULL_FLUSH||e===d.Z_FINISH||e===d.Z_BLOCK}function M(e,t){var r=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||a.Z_DEFAULT_CHUNK,f.call(this,e),e.flush&&!C(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!C(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||d.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:d.Z_FINISH,e.chunkSize&&(e.chunkSizea.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitsa.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levela.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevela.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=a.Z_FILTERED&&e.strategy!=a.Z_HUFFMAN_ONLY&&e.strategy!=a.Z_RLE&&e.strategy!=a.Z_FIXED&&e.strategy!=a.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!c.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new d.Zlib(t);var n=this;this._hadError=!1,this._handle.onerror=function(e,t){B(n),n._hadError=!0;var c=new Error(e);c.errno=t,c.code=a.codes[t],n.emit("error",c)};var i=a.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(i=e.level);var b=a.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(b=e.strategy),this._handle.init(e.windowBits||a.Z_DEFAULT_WINDOWBITS,i,e.memLevel||a.Z_DEFAULT_MEMLEVEL,b,e.dictionary),this._buffer=c.allocUnsafe(this._chunkSize),this._offset=0,this._level=i,this._strategy=b,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!r._handle},configurable:!0,enumerable:!0})}function B(e,a){a&&process.nextTick(a),e._handle&&(e._handle.close(),e._handle=null)}function L(e){e.emit("close")}Object.defineProperty(a,"codes",{enumerable:!0,value:Object.freeze(u),writable:!1}),a.Deflate=y,a.Inflate=A,a.Gzip=v,a.Gunzip=w,a.DeflateRaw=_,a.InflateRaw=I,a.Unzip=E,a.createDeflate=function(e){return new y(e)},a.createInflate=function(e){return new A(e)},a.createDeflateRaw=function(e){return new _(e)},a.createInflateRaw=function(e){return new I(e)},a.createGzip=function(e){return new v(e)},a.createGunzip=function(e){return new w(e)},a.createUnzip=function(e){return new E(e)},a.deflate=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new y(a),e,t)},a.deflateSync=function(e,a){return x(new y(a),e)},a.gzip=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new v(a),e,t)},a.gzipSync=function(e,a){return x(new v(a),e)},a.deflateRaw=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new _(a),e,t)},a.deflateRawSync=function(e,a){return x(new _(a),e)},a.unzip=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new E(a),e,t)},a.unzipSync=function(e,a){return x(new E(a),e)},a.inflate=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new A(a),e,t)},a.inflateSync=function(e,a){return x(new A(a),e)},a.gunzip=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new w(a),e,t)},a.gunzipSync=function(e,a){return x(new w(a),e)},a.inflateRaw=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new I(a),e,t)},a.inflateRawSync=function(e,a){return x(new I(a),e)},r.inherits(M,f),M.prototype.params=function(e,t,c){if(ea.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=a.Z_FILTERED&&t!=a.Z_HUFFMAN_ONLY&&t!=a.Z_RLE&&t!=a.Z_FIXED&&t!=a.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var f=this;this.flush(d.Z_SYNC_FLUSH,(function(){n(f._handle,"zlib binding closed"),f._handle.params(e,t),f._hadError||(f._level=e,f._strategy=t,c&&c())}))}else process.nextTick(c)},M.prototype.reset=function(){return n(this._handle,"zlib binding closed"),this._handle.reset()},M.prototype._flush=function(e){this._transform(c.alloc(0),"",e)},M.prototype.flush=function(e,a){var t=this,f=this._writableState;("function"==typeof e||void 0===e&&!a)&&(a=e,e=d.Z_FULL_FLUSH),f.ended?a&&process.nextTick(a):f.ending?a&&this.once("end",a):f.needDrain?a&&this.once("drain",(function(){return t.flush(e,a)})):(this._flushFlag=e,this.write(c.alloc(0),"",a))},M.prototype.close=function(e){B(this,e),process.nextTick(L,this)},M.prototype._transform=function(e,a,t){var f,r=this._writableState,n=(r.ending||r.ended)&&(!e||r.length===e.length);return null===e||c.isBuffer(e)?this._handle?(n?f=this._finishFlushFlag:(f=this._flushFlag,e.length>=r.length&&(this._flushFlag=this._opts.flush||d.Z_NO_FLUSH)),void this._processChunk(e,f,t)):t(new Error("zlib binding closed")):t(new Error("invalid input"))},M.prototype._processChunk=function(e,a,t){var f=e&&e.length,d=this._chunkSize-this._offset,r=0,o=this,s="function"==typeof t;if(!s){var l,u=[],h=0;this.on("error",(function(e){l=e})),n(this._handle,"zlib binding closed");do{var p=this._handle.writeSync(a,e,r,f,this._buffer,this._offset,d)}while(!this._hadError&&x(p[0],p[1]));if(this._hadError)throw l;if(h>=i)throw B(this),new RangeError(b);var g=c.concat(u,h);return B(this),g}n(this._handle,"zlib binding closed");var m=this._handle.write(a,e,r,f,this._buffer,this._offset,d);function x(i,b){if(this&&(this.buffer=null,this.callback=null),!o._hadError){var l=d-b;if(n(l>=0,"have should not go down"),l>0){var p=o._buffer.slice(o._offset,o._offset+l);o._offset+=l,s?o.push(p):(u.push(p),h+=p.length)}if((0===b||o._offset>=o._chunkSize)&&(d=o._chunkSize,o._offset=0,o._buffer=c.allocUnsafe(o._chunkSize)),0===b){if(r+=f-i,f=i,!s)return!0;var g=o._handle.write(a,e,r,f,o._buffer,o._offset,o._chunkSize);return g.callback=x,void(g.buffer=e)}if(!s)return!1;t()}}m.buffer=e,m.callback=x},r.inherits(y,M),r.inherits(A,M),r.inherits(v,M),r.inherits(w,M),r.inherits(_,M),r.inherits(I,M),r.inherits(E,M)},30295:(e,a,t)=>{var c=t(48287).Buffer;e.exports=function(e,a){for(var t=Math.min(e.length,a.length),f=new c(t),d=0;d{"use strict";const c=t(67526),f=t(251),d="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=i,a.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},a.INSPECT_MAX_BYTES=50;const r=2147483647;function n(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');const a=new Uint8Array(e);return Object.setPrototypeOf(a,i.prototype),a}function i(e,a,t){if("number"==typeof e){if("string"==typeof a)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return b(e,a,t)}function b(e,a,t){if("string"==typeof e)return function(e,a){if("string"==typeof a&&""!==a||(a="utf8"),!i.isEncoding(a))throw new TypeError("Unknown encoding: "+a);const t=0|p(e,a);let c=n(t);const f=c.write(e,a);return f!==t&&(c=c.slice(0,f)),c}(e,a);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const a=new Uint8Array(e);return u(a.buffer,a.byteOffset,a.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return u(e,a,t);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return u(e,a,t);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const c=e.valueOf&&e.valueOf();if(null!=c&&c!==e)return i.from(c,a,t);const f=function(e){if(i.isBuffer(e)){const a=0|h(e.length),t=n(a);return 0===t.length||e.copy(t,0,0,a),t}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?n(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(f)return f;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),a,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return o(e),n(e<0?0:0|h(e))}function l(e){const a=e.length<0?0:0|h(e.length),t=n(a);for(let c=0;c=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function p(e,a){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const t=e.length,c=arguments.length>2&&!0===arguments[2];if(!c&&0===t)return 0;let f=!1;for(;;)switch(a){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return K(e).length;default:if(f)return c?-1:z(e).length;a=(""+a).toLowerCase(),f=!0}}function g(e,a,t){let c=!1;if((void 0===a||a<0)&&(a=0),a>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(a>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,a,t);case"utf8":case"utf-8":return C(this,a,t);case"ascii":return B(this,a,t);case"latin1":case"binary":return L(this,a,t);case"base64":return E(this,a,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,a,t);default:if(c)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),c=!0}}function m(e,a,t){const c=e[a];e[a]=e[t],e[t]=c}function x(e,a,t,c,f){if(0===e.length)return-1;if("string"==typeof t?(c=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),J(t=+t)&&(t=f?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(f)return-1;t=e.length-1}else if(t<0){if(!f)return-1;t=0}if("string"==typeof a&&(a=i.from(a,c)),i.isBuffer(a))return 0===a.length?-1:y(e,a,t,c,f);if("number"==typeof a)return a&=255,"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(e,a,t):Uint8Array.prototype.lastIndexOf.call(e,a,t):y(e,[a],t,c,f);throw new TypeError("val must be string, number or Buffer")}function y(e,a,t,c,f){let d,r=1,n=e.length,i=a.length;if(void 0!==c&&("ucs2"===(c=String(c).toLowerCase())||"ucs-2"===c||"utf16le"===c||"utf-16le"===c)){if(e.length<2||a.length<2)return-1;r=2,n/=2,i/=2,t/=2}function b(e,a){return 1===r?e[a]:e.readUInt16BE(a*r)}if(f){let c=-1;for(d=t;dn&&(t=n-i),d=t;d>=0;d--){let t=!0;for(let c=0;cf&&(c=f):c=f;const d=a.length;let r;for(c>d/2&&(c=d/2),r=0;r>8,f=t%256,d.push(f),d.push(c);return d}(a,e.length-t),e,t,c)}function E(e,a,t){return 0===a&&t===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(a,t))}function C(e,a,t){t=Math.min(e.length,t);const c=[];let f=a;for(;f239?4:a>223?3:a>191?2:1;if(f+r<=t){let t,c,n,i;switch(r){case 1:a<128&&(d=a);break;case 2:t=e[f+1],128==(192&t)&&(i=(31&a)<<6|63&t,i>127&&(d=i));break;case 3:t=e[f+1],c=e[f+2],128==(192&t)&&128==(192&c)&&(i=(15&a)<<12|(63&t)<<6|63&c,i>2047&&(i<55296||i>57343)&&(d=i));break;case 4:t=e[f+1],c=e[f+2],n=e[f+3],128==(192&t)&&128==(192&c)&&128==(192&n)&&(i=(15&a)<<18|(63&t)<<12|(63&c)<<6|63&n,i>65535&&i<1114112&&(d=i))}}null===d?(d=65533,r=1):d>65535&&(d-=65536,c.push(d>>>10&1023|55296),d=56320|1023&d),c.push(d),f+=r}return function(e){const a=e.length;if(a<=M)return String.fromCharCode.apply(String,e);let t="",c=0;for(;cc.length?(i.isBuffer(a)||(a=i.from(a)),a.copy(c,f)):Uint8Array.prototype.set.call(c,a,f);else{if(!i.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(c,f)}f+=a.length}return c},i.byteLength=p,i.prototype._isBuffer=!0,i.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let a=0;at&&(e+=" ... "),""},d&&(i.prototype[d]=i.prototype.inspect),i.prototype.compare=function(e,a,t,c,f){if(Z(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===a&&(a=0),void 0===t&&(t=e?e.length:0),void 0===c&&(c=0),void 0===f&&(f=this.length),a<0||t>e.length||c<0||f>this.length)throw new RangeError("out of range index");if(c>=f&&a>=t)return 0;if(c>=f)return-1;if(a>=t)return 1;if(this===e)return 0;let d=(f>>>=0)-(c>>>=0),r=(t>>>=0)-(a>>>=0);const n=Math.min(d,r),b=this.slice(c,f),o=e.slice(a,t);for(let e=0;e>>=0,isFinite(t)?(t>>>=0,void 0===c&&(c="utf8")):(c=t,t=void 0)}const f=this.length-a;if((void 0===t||t>f)&&(t=f),e.length>0&&(t<0||a<0)||a>this.length)throw new RangeError("Attempt to write outside buffer bounds");c||(c="utf8");let d=!1;for(;;)switch(c){case"hex":return A(this,e,a,t);case"utf8":case"utf-8":return v(this,e,a,t);case"ascii":case"latin1":case"binary":return w(this,e,a,t);case"base64":return _(this,e,a,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,a,t);default:if(d)throw new TypeError("Unknown encoding: "+c);c=(""+c).toLowerCase(),d=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const M=4096;function B(e,a,t){let c="";t=Math.min(e.length,t);for(let f=a;fc)&&(t=c);let f="";for(let c=a;ct)throw new RangeError("Trying to access beyond buffer length")}function P(e,a,t,c,f,d){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>f||ae.length)throw new RangeError("Index out of range")}function R(e,a,t,c,f){H(a,c,f,e,t,7);let d=Number(a&BigInt(4294967295));e[t++]=d,d>>=8,e[t++]=d,d>>=8,e[t++]=d,d>>=8,e[t++]=d;let r=Number(a>>BigInt(32)&BigInt(4294967295));return e[t++]=r,r>>=8,e[t++]=r,r>>=8,e[t++]=r,r>>=8,e[t++]=r,t}function O(e,a,t,c,f){H(a,c,f,e,t,7);let d=Number(a&BigInt(4294967295));e[t+7]=d,d>>=8,e[t+6]=d,d>>=8,e[t+5]=d,d>>=8,e[t+4]=d;let r=Number(a>>BigInt(32)&BigInt(4294967295));return e[t+3]=r,r>>=8,e[t+2]=r,r>>=8,e[t+1]=r,r>>=8,e[t]=r,t+8}function D(e,a,t,c,f,d){if(t+c>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function T(e,a,t,c,d){return a=+a,t>>>=0,d||D(e,0,t,4),f.write(e,a,t,c,23,4),t+4}function F(e,a,t,c,d){return a=+a,t>>>=0,d||D(e,0,t,8),f.write(e,a,t,c,52,8),t+8}i.prototype.slice=function(e,a){const t=this.length;(e=~~e)<0?(e+=t)<0&&(e=0):e>t&&(e=t),(a=void 0===a?t:~~a)<0?(a+=t)<0&&(a=0):a>t&&(a=t),a>>=0,a>>>=0,t||N(e,a,this.length);let c=this[e],f=1,d=0;for(;++d>>=0,a>>>=0,t||N(e,a,this.length);let c=this[e+--a],f=1;for(;a>0&&(f*=256);)c+=this[e+--a]*f;return c},i.prototype.readUint8=i.prototype.readUInt8=function(e,a){return e>>>=0,a||N(e,1,this.length),this[e]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(e,a){return e>>>=0,a||N(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(e,a){return e>>>=0,a||N(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(e,a){return e>>>=0,a||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(e,a){return e>>>=0,a||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readBigUInt64LE=Y((function(e){$(e>>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=a+256*this[++e]+65536*this[++e]+this[++e]*2**24,f=this[++e]+256*this[++e]+65536*this[++e]+t*2**24;return BigInt(c)+(BigInt(f)<>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=a*2**24+65536*this[++e]+256*this[++e]+this[++e],f=this[++e]*2**24+65536*this[++e]+256*this[++e]+t;return(BigInt(c)<>>=0,a>>>=0,t||N(e,a,this.length);let c=this[e],f=1,d=0;for(;++d=f&&(c-=Math.pow(2,8*a)),c},i.prototype.readIntBE=function(e,a,t){e>>>=0,a>>>=0,t||N(e,a,this.length);let c=a,f=1,d=this[e+--c];for(;c>0&&(f*=256);)d+=this[e+--c]*f;return f*=128,d>=f&&(d-=Math.pow(2,8*a)),d},i.prototype.readInt8=function(e,a){return e>>>=0,a||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,a){e>>>=0,a||N(e,2,this.length);const t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt16BE=function(e,a){e>>>=0,a||N(e,2,this.length);const t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt32LE=function(e,a){return e>>>=0,a||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,a){return e>>>=0,a||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readBigInt64LE=Y((function(e){$(e>>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=this[e+4]+256*this[e+5]+65536*this[e+6]+(t<<24);return(BigInt(c)<>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=(a<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(c)<>>=0,a||N(e,4,this.length),f.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,a){return e>>>=0,a||N(e,4,this.length),f.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,a){return e>>>=0,a||N(e,8,this.length),f.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,a){return e>>>=0,a||N(e,8,this.length),f.read(this,e,!1,52,8)},i.prototype.writeUintLE=i.prototype.writeUIntLE=function(e,a,t,c){e=+e,a>>>=0,t>>>=0,c||P(this,e,a,t,Math.pow(2,8*t)-1,0);let f=1,d=0;for(this[a]=255&e;++d>>=0,t>>>=0,c||P(this,e,a,t,Math.pow(2,8*t)-1,0);let f=t-1,d=1;for(this[a+f]=255&e;--f>=0&&(d*=256);)this[a+f]=e/d&255;return a+t},i.prototype.writeUint8=i.prototype.writeUInt8=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,1,255,0),this[a]=255&e,a+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,65535,0),this[a]=255&e,this[a+1]=e>>>8,a+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,65535,0),this[a]=e>>>8,this[a+1]=255&e,a+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,4294967295,0),this[a+3]=e>>>24,this[a+2]=e>>>16,this[a+1]=e>>>8,this[a]=255&e,a+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,4294967295,0),this[a]=e>>>24,this[a+1]=e>>>16,this[a+2]=e>>>8,this[a+3]=255&e,a+4},i.prototype.writeBigUInt64LE=Y((function(e,a=0){return R(this,e,a,BigInt(0),BigInt("0xffffffffffffffff"))})),i.prototype.writeBigUInt64BE=Y((function(e,a=0){return O(this,e,a,BigInt(0),BigInt("0xffffffffffffffff"))})),i.prototype.writeIntLE=function(e,a,t,c){if(e=+e,a>>>=0,!c){const c=Math.pow(2,8*t-1);P(this,e,a,t,c-1,-c)}let f=0,d=1,r=0;for(this[a]=255&e;++f>>=0,!c){const c=Math.pow(2,8*t-1);P(this,e,a,t,c-1,-c)}let f=t-1,d=1,r=0;for(this[a+f]=255&e;--f>=0&&(d*=256);)e<0&&0===r&&0!==this[a+f+1]&&(r=1),this[a+f]=(e/d|0)-r&255;return a+t},i.prototype.writeInt8=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,1,127,-128),e<0&&(e=255+e+1),this[a]=255&e,a+1},i.prototype.writeInt16LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,32767,-32768),this[a]=255&e,this[a+1]=e>>>8,a+2},i.prototype.writeInt16BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,32767,-32768),this[a]=e>>>8,this[a+1]=255&e,a+2},i.prototype.writeInt32LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,2147483647,-2147483648),this[a]=255&e,this[a+1]=e>>>8,this[a+2]=e>>>16,this[a+3]=e>>>24,a+4},i.prototype.writeInt32BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[a]=e>>>24,this[a+1]=e>>>16,this[a+2]=e>>>8,this[a+3]=255&e,a+4},i.prototype.writeBigInt64LE=Y((function(e,a=0){return R(this,e,a,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),i.prototype.writeBigInt64BE=Y((function(e,a=0){return O(this,e,a,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),i.prototype.writeFloatLE=function(e,a,t){return T(this,e,a,!0,t)},i.prototype.writeFloatBE=function(e,a,t){return T(this,e,a,!1,t)},i.prototype.writeDoubleLE=function(e,a,t){return F(this,e,a,!0,t)},i.prototype.writeDoubleBE=function(e,a,t){return F(this,e,a,!1,t)},i.prototype.copy=function(e,a,t,c){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(t||(t=0),c||0===c||(c=this.length),a>=e.length&&(a=e.length),a||(a=0),c>0&&c=this.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("sourceEnd out of bounds");c>this.length&&(c=this.length),e.length-a>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(f=a;f=c+4;t-=3)a=`_${e.slice(t-3,t)}${a}`;return`${e.slice(0,t)}${a}`}function H(e,a,t,c,f,d){if(e>t||e3?0===a||a===BigInt(0)?`>= 0${c} and < 2${c} ** ${8*(d+1)}${c}`:`>= -(2${c} ** ${8*(d+1)-1}${c}) and < 2 ** ${8*(d+1)-1}${c}`:`>= ${a}${c} and <= ${t}${c}`,new Q.ERR_OUT_OF_RANGE("value",f,e)}!function(e,a,t){$(a,"offset"),void 0!==e[a]&&void 0!==e[a+t]||q(a,e.length-(t+1))}(c,f,d)}function $(e,a){if("number"!=typeof e)throw new Q.ERR_INVALID_ARG_TYPE(a,"number",e)}function q(e,a,t){if(Math.floor(e)!==e)throw $(e,t),new Q.ERR_OUT_OF_RANGE(t||"offset","an integer",e);if(a<0)throw new Q.ERR_BUFFER_OUT_OF_BOUNDS;throw new Q.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${a}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,a){return`The "${e}" argument must be of type number. Received type ${typeof a}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,a,t){let c=`The value of "${e}" is out of range.`,f=t;return Number.isInteger(t)&&Math.abs(t)>2**32?f=j(String(t)):"bigint"==typeof t&&(f=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(f=j(f)),f+="n"),c+=` It must be ${a}. Received ${f}`,c}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function z(e,a){let t;a=a||1/0;const c=e.length;let f=null;const d=[];for(let r=0;r55295&&t<57344){if(!f){if(t>56319){(a-=3)>-1&&d.push(239,191,189);continue}if(r+1===c){(a-=3)>-1&&d.push(239,191,189);continue}f=t;continue}if(t<56320){(a-=3)>-1&&d.push(239,191,189),f=t;continue}t=65536+(f-55296<<10|t-56320)}else f&&(a-=3)>-1&&d.push(239,191,189);if(f=null,t<128){if((a-=1)<0)break;d.push(t)}else if(t<2048){if((a-=2)<0)break;d.push(t>>6|192,63&t|128)}else if(t<65536){if((a-=3)<0)break;d.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((a-=4)<0)break;d.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return d}function K(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,a,t,c){let f;for(f=0;f=a.length||f>=e.length);++f)a[f+t]=e[f];return f}function Z(e,a){return e instanceof a||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===a.name}function J(e){return e!=e}const W=function(){const e="0123456789abcdef",a=new Array(256);for(let t=0;t<16;++t){const c=16*t;for(let f=0;f<16;++f)a[c+f]=e[t]+e[f]}return a}();function Y(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},86866:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},38075:(e,a,t)=>{"use strict";var c=t(70453),f=t(10487),d=f(c("String.prototype.indexOf"));e.exports=function(e,a){var t=c(e,!!a);return"function"==typeof t&&d(e,".prototype.")>-1?f(t):t}},10487:(e,a,t)=>{"use strict";var c=t(66743),f=t(70453),d=t(96897),r=t(69675),n=f("%Function.prototype.apply%"),i=f("%Function.prototype.call%"),b=f("%Reflect.apply%",!0)||c.call(i,n),o=t(30655),s=f("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new r("a function is required");var a=b(c,i,arguments);return d(a,1+s(0,e.length-(arguments.length-1)),!0)};var l=function(){return b(c,n,arguments)};o?o(e.exports,"apply",{value:l}):e.exports.apply=l},56168:(e,a,t)=>{var c=t(92861).Buffer,f=t(88310).Transform,d=t(83141).I;function r(e){f.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}t(56698)(r,f),r.prototype.update=function(e,a,t){"string"==typeof e&&(e=c.from(e,a));var f=this._update(e);return this.hashMode?this:(t&&(f=this._toString(f,t)),f)},r.prototype.setAutoPadding=function(){},r.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},r.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},r.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},r.prototype._transform=function(e,a,t){var c;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){c=e}finally{t(c)}},r.prototype._flush=function(e){var a;try{this.push(this.__final())}catch(e){a=e}e(a)},r.prototype._finalOrDigest=function(e){var a=this.__final()||c.alloc(0);return e&&(a=this._toString(a,e,!0)),a},r.prototype._toString=function(e,a,t){if(this._decoder||(this._decoder=new d(a),this._encoding=a),this._encoding!==a)throw new Error("can't switch encodings");var c=this._decoder.write(e);return t&&(c+=this._decoder.end()),c},e.exports=r},15622:(e,a,t)=>{function c(e){return Object.prototype.toString.call(e)}a.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===c(e)},a.isBoolean=function(e){return"boolean"==typeof e},a.isNull=function(e){return null===e},a.isNullOrUndefined=function(e){return null==e},a.isNumber=function(e){return"number"==typeof e},a.isString=function(e){return"string"==typeof e},a.isSymbol=function(e){return"symbol"==typeof e},a.isUndefined=function(e){return void 0===e},a.isRegExp=function(e){return"[object RegExp]"===c(e)},a.isObject=function(e){return"object"==typeof e&&null!==e},a.isDate=function(e){return"[object Date]"===c(e)},a.isError=function(e){return"[object Error]"===c(e)||e instanceof Error},a.isFunction=function(e){return"function"==typeof e},a.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},a.isBuffer=t(48287).Buffer.isBuffer},61324:(e,a,t)=>{var c=t(48287).Buffer,f=t(86729),d=t(92801);e.exports=function(e){return new n(e)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function n(e){this.curveType=r[e],this.curveType||(this.curveType={name:e}),this.curve=new f.ec(this.curveType.name),this.keys=void 0}function i(e,a,t){Array.isArray(e)||(e=e.toArray());var f=new c(e);if(t&&f.length=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},47108:(e,a,t)=>{"use strict";var c=t(56698),f=t(88276),d=t(66011),r=t(62802),n=t(56168);function i(e){n.call(this,"digest"),this._hash=e}c(i,n),i.prototype._update=function(e){this._hash.update(e)},i.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new f:"rmd160"===e||"ripemd160"===e?new d:new i(r(e))}},20320:(e,a,t)=>{var c=t(88276);e.exports=function(e){return(new c).update(e).digest()}},83507:(e,a,t)=>{"use strict";var c=t(56698),f=t(41800),d=t(56168),r=t(92861).Buffer,n=t(20320),i=t(66011),b=t(62802),o=r.alloc(128);function s(e,a){d.call(this,"digest"),"string"==typeof a&&(a=r.from(a));var t="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=a,a.length>t?a=("rmd160"===e?new i:b(e)).update(a).digest():a.length{"use strict";var c=t(56698),f=t(92861).Buffer,d=t(56168),r=f.alloc(128),n=64;function i(e,a){d.call(this,"digest"),"string"==typeof a&&(a=f.from(a)),this._alg=e,this._key=a,a.length>n?a=e(a):a.length{var c="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==t.g&&t.g,f=function(){function e(){this.fetch=!1,this.DOMException=c.DOMException}return e.prototype=c,new e}();!function(e){!function(a){var t=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==t&&t,c="URLSearchParams"in t,f="Symbol"in t&&"iterator"in Symbol,d="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),r="FormData"in t,n="ArrayBuffer"in t;if(n)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function s(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var a={next:function(){var a=e.shift();return{done:void 0===a,value:a}}};return f&&(a[Symbol.iterator]=function(){return a}),a}function u(e){this.map={},e instanceof u?e.forEach((function(e,a){this.append(a,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(a){this.append(a,e[a])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(a,t){e.onload=function(){a(e.result)},e.onerror=function(){t(e.error)}}))}function g(e){var a=new FileReader,t=p(a);return a.readAsArrayBuffer(e),t}function m(e){if(e.slice)return e.slice(0);var a=new Uint8Array(e.byteLength);return a.set(new Uint8Array(e)),a.buffer}function x(){return this.bodyUsed=!1,this._initBody=function(e){var a;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:d&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:c&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():n&&d&&(a=e)&&DataView.prototype.isPrototypeOf(a)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n&&(ArrayBuffer.prototype.isPrototypeOf(e)||b(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):c&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},d&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,a,t,c=h(this);if(c)return c;if(this._bodyBlob)return e=this._bodyBlob,t=p(a=new FileReader),a.readAsText(e),t;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var a=new Uint8Array(e),t=new Array(a.length),c=0;c-1?c:t),this.mode=a.mode||this.mode||null,this.signal=a.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&f)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(f),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==a.cache&&"no-cache"!==a.cache)){var d=/([?&])_=[^&]*/;d.test(this.url)?this.url=this.url.replace(d,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function v(e){var a=new FormData;return e.trim().split("&").forEach((function(e){if(e){var t=e.split("="),c=t.shift().replace(/\+/g," "),f=t.join("=").replace(/\+/g," ");a.append(decodeURIComponent(c),decodeURIComponent(f))}})),a}function w(e,a){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');a||(a={}),this.type="default",this.status=void 0===a.status?200:a.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===a.statusText?"":""+a.statusText,this.headers=new u(a.headers),this.url=a.url||"",this._initBody(e)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})},x.call(A.prototype),x.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var _=[301,302,303,307,308];w.redirect=function(e,a){if(-1===_.indexOf(a))throw new RangeError("Invalid status code");return new w(null,{status:a,headers:{location:e}})},a.DOMException=t.DOMException;try{new a.DOMException}catch(e){a.DOMException=function(e,a){this.message=e,this.name=a;var t=Error(e);this.stack=t.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function I(e,c){return new Promise((function(f,r){var i=new A(e,c);if(i.signal&&i.signal.aborted)return r(new a.DOMException("Aborted","AbortError"));var b=new XMLHttpRequest;function o(){b.abort()}b.onload=function(){var e,a,t={status:b.status,statusText:b.statusText,headers:(e=b.getAllResponseHeaders()||"",a=new u,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var t=e.split(":"),c=t.shift().trim();if(c){var f=t.join(":").trim();a.append(c,f)}})),a)};t.url="responseURL"in b?b.responseURL:t.headers.get("X-Request-URL");var c="response"in b?b.response:b.responseText;setTimeout((function(){f(new w(c,t))}),0)},b.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},b.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},b.onabort=function(){setTimeout((function(){r(new a.DOMException("Aborted","AbortError"))}),0)},b.open(i.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(a){return e}}(i.url),!0),"include"===i.credentials?b.withCredentials=!0:"omit"===i.credentials&&(b.withCredentials=!1),"responseType"in b&&(d?b.responseType="blob":n&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(b.responseType="arraybuffer")),!c||"object"!=typeof c.headers||c.headers instanceof u?i.headers.forEach((function(e,a){b.setRequestHeader(a,e)})):Object.getOwnPropertyNames(c.headers).forEach((function(e){b.setRequestHeader(e,s(c.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",o),b.onreadystatechange=function(){4===b.readyState&&i.signal.removeEventListener("abort",o)}),b.send(void 0===i._bodyInit?null:i._bodyInit)}))}I.polyfill=!0,t.fetch||(t.fetch=I,t.Headers=u,t.Request=A,t.Response=w),a.Headers=u,a.Request=A,a.Response=w,a.fetch=I}({})}(f),f.fetch.ponyfill=!0,delete f.fetch.polyfill;var d=c.fetch?c:f;(a=d.fetch).default=d.fetch,a.fetch=d.fetch,a.Headers=d.Headers,a.Request=d.Request,a.Response=d.Response,e.exports=a},91565:(e,a,t)=>{"use strict";a.randomBytes=a.rng=a.pseudoRandomBytes=a.prng=t(53209),a.createHash=a.Hash=t(47108),a.createHmac=a.Hmac=t(83507);var c=t(55715),f=Object.keys(c),d=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(f);a.getHashes=function(){return d};var r=t(78396);a.pbkdf2=r.pbkdf2,a.pbkdf2Sync=r.pbkdf2Sync;var n=t(30125);a.Cipher=n.Cipher,a.createCipher=n.createCipher,a.Cipheriv=n.Cipheriv,a.createCipheriv=n.createCipheriv,a.Decipher=n.Decipher,a.createDecipher=n.createDecipher,a.Decipheriv=n.Decipheriv,a.createDecipheriv=n.createDecipheriv,a.getCiphers=n.getCiphers,a.listCiphers=n.listCiphers;var i=t(15380);a.DiffieHellmanGroup=i.DiffieHellmanGroup,a.createDiffieHellmanGroup=i.createDiffieHellmanGroup,a.getDiffieHellman=i.getDiffieHellman,a.createDiffieHellman=i.createDiffieHellman,a.DiffieHellman=i.DiffieHellman;var b=t(20);a.createSign=b.createSign,a.Sign=b.Sign,a.createVerify=b.createVerify,a.Verify=b.Verify,a.createECDH=t(61324);var o=t(97168);a.publicEncrypt=o.publicEncrypt,a.privateEncrypt=o.privateEncrypt,a.publicDecrypt=o.publicDecrypt,a.privateDecrypt=o.privateDecrypt;var s=t(76983);a.randomFill=s.randomFill,a.randomFillSync=s.randomFillSync,a.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},a.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},17833:(e,a,t)=>{a.formatArgs=function(a){if(a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const t="color: "+this.color;a.splice(1,0,t,"color: inherit");let c=0,f=0;a[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(c++,"%c"===e&&(f=c))})),a.splice(f,0,t)},a.save=function(e){try{e?a.storage.setItem("debug",e):a.storage.removeItem("debug")}catch(e){}},a.load=function(){let e;try{e=a.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},a.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},a.storage=function(){try{return localStorage}catch(e){}}(),a.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],a.log=console.debug||console.log||(()=>{}),e.exports=t(40736)(a);const{formatters:c}=e.exports;c.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},40736:(e,a,t)=>{e.exports=function(e){function a(e){let t,f,d,r=null;function n(...e){if(!n.enabled)return;const c=n,f=Number(new Date),d=f-(t||f);c.diff=d,c.prev=t,c.curr=f,t=f,e[0]=a.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let r=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,f)=>{if("%%"===t)return"%";r++;const d=a.formatters[f];if("function"==typeof d){const a=e[r];t=d.call(c,a),e.splice(r,1),r--}return t})),a.formatArgs.call(c,e),(c.log||a.log).apply(c,e)}return n.namespace=e,n.useColors=a.useColors(),n.color=a.selectColor(e),n.extend=c,n.destroy=a.destroy,Object.defineProperty(n,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==r?r:(f!==a.namespaces&&(f=a.namespaces,d=a.enabled(e)),d),set:e=>{r=e}}),"function"==typeof a.init&&a.init(n),n}function c(e,t){const c=a(this.namespace+(void 0===t?":":t)+e);return c.log=this.log,c}function f(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return a.debug=a,a.default=a,a.coerce=function(e){return e instanceof Error?e.stack||e.message:e},a.disable=function(){const e=[...a.names.map(f),...a.skips.map(f).map((e=>"-"+e))].join(",");return a.enable(""),e},a.enable=function(e){let t;a.save(e),a.namespaces=e,a.names=[],a.skips=[];const c=("string"==typeof e?e:"").split(/[\s,]+/),f=c.length;for(t=0;t{a[t]=e[t]})),a.names=[],a.skips=[],a.formatters={},a.selectColor=function(e){let t=0;for(let a=0;a{"use strict";var c=t(30655),f=t(58068),d=t(69675),r=t(75795);e.exports=function(e,a,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new d("`obj` must be an object or a function`");if("string"!=typeof a&&"symbol"!=typeof a)throw new d("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new d("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new d("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new d("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new d("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,b=arguments.length>5?arguments[5]:null,o=arguments.length>6&&arguments[6],s=!!r&&r(e,a);if(c)c(e,a,{configurable:null===b&&s?s.configurable:!b,enumerable:null===n&&s?s.enumerable:!n,value:t,writable:null===i&&s?s.writable:!i});else{if(!o&&(n||i||b))throw new f("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[a]=t}}},38452:(e,a,t)=>{"use strict";var c=t(1189),f="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),d=Object.prototype.toString,r=Array.prototype.concat,n=t(30041),i=t(30592)(),b=function(e,a,t,c){if(a in e)if(!0===c){if(e[a]===t)return}else if("function"!=typeof(f=c)||"[object Function]"!==d.call(f)||!c())return;var f;i?n(e,a,t,!0):n(e,a,t)},o=function(e,a){var t=arguments.length>2?arguments[2]:{},d=c(a);f&&(d=r.call(d,Object.getOwnPropertySymbols(a)));for(var n=0;n{"use strict";a.utils=t(87626),a.Cipher=t(82808),a.DES=t(82211),a.CBC=t(3389),a.EDE=t(65279)},3389:(e,a,t)=>{"use strict";var c=t(43349),f=t(56698),d={};function r(e){c.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var a=0;a{"use strict";var c=t(43349);function f(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}e.exports=f,f.prototype._init=function(){},f.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},f.prototype._buffer=function(e,a){for(var t=Math.min(this.buffer.length-this.bufferOff,e.length-a),c=0;c0;c--)a+=this._buffer(e,a),t+=this._flushBuffer(f,t);return a+=this._buffer(e,a),f},f.prototype.final=function(e){var a,t;return e&&(a=this.update(e)),t="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),a?a.concat(t):t},f.prototype._pad=function(e,a){if(0===a)return!1;for(;a{"use strict";var c=t(43349),f=t(56698),d=t(87626),r=t(82808);function n(){this.tmp=new Array(2),this.keys=null}function i(e){r.call(this,e);var a=new n;this._desState=a,this.deriveKeys(a,e.key)}f(i,r),e.exports=i,i.create=function(e){return new i(e)};var b=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];i.prototype.deriveKeys=function(e,a){e.keys=new Array(32),c.equal(a.length,this.blockSize,"Invalid key length");var t=d.readUInt32BE(a,0),f=d.readUInt32BE(a,4);d.pc1(t,f,e.tmp,0),t=e.tmp[0],f=e.tmp[1];for(var r=0;r>>1];t=d.r28shl(t,n),f=d.r28shl(f,n),d.pc2(t,f,e.keys,r)}},i.prototype._update=function(e,a,t,c){var f=this._desState,r=d.readUInt32BE(e,a),n=d.readUInt32BE(e,a+4);d.ip(r,n,f.tmp,0),r=f.tmp[0],n=f.tmp[1],"encrypt"===this.type?this._encrypt(f,r,n,f.tmp,0):this._decrypt(f,r,n,f.tmp,0),r=f.tmp[0],n=f.tmp[1],d.writeUInt32BE(t,r,c),d.writeUInt32BE(t,n,c+4)},i.prototype._pad=function(e,a){if(!1===this.padding)return!1;for(var t=e.length-a,c=a;c>>0,r=l}d.rip(n,r,c,f)},i.prototype._decrypt=function(e,a,t,c,f){for(var r=t,n=a,i=e.keys.length-2;i>=0;i-=2){var b=e.keys[i],o=e.keys[i+1];d.expand(r,e.tmp,0),b^=e.tmp[0],o^=e.tmp[1];var s=d.substitute(b,o),l=r;r=(n^d.permute(s))>>>0,n=l}d.rip(r,n,c,f)}},65279:(e,a,t)=>{"use strict";var c=t(43349),f=t(56698),d=t(82808),r=t(82211);function n(e,a){c.equal(a.length,24,"Invalid key length");var t=a.slice(0,8),f=a.slice(8,16),d=a.slice(16,24);this.ciphers="encrypt"===e?[r.create({type:"encrypt",key:t}),r.create({type:"decrypt",key:f}),r.create({type:"encrypt",key:d})]:[r.create({type:"decrypt",key:d}),r.create({type:"encrypt",key:f}),r.create({type:"decrypt",key:t})]}function i(e){d.call(this,e);var a=new n(this.type,this.options.key);this._edeState=a}f(i,d),e.exports=i,i.create=function(e){return new i(e)},i.prototype._update=function(e,a,t,c){var f=this._edeState;f.ciphers[0]._update(e,a,t,c),f.ciphers[1]._update(t,c,t,c),f.ciphers[2]._update(t,c,t,c)},i.prototype._pad=r.prototype._pad,i.prototype._unpad=r.prototype._unpad},87626:(e,a)=>{"use strict";a.readUInt32BE=function(e,a){return(e[0+a]<<24|e[1+a]<<16|e[2+a]<<8|e[3+a])>>>0},a.writeUInt32BE=function(e,a,t){e[0+t]=a>>>24,e[1+t]=a>>>16&255,e[2+t]=a>>>8&255,e[3+t]=255&a},a.ip=function(e,a,t,c){for(var f=0,d=0,r=6;r>=0;r-=2){for(var n=0;n<=24;n+=8)f<<=1,f|=a>>>n+r&1;for(n=0;n<=24;n+=8)f<<=1,f|=e>>>n+r&1}for(r=6;r>=0;r-=2){for(n=1;n<=25;n+=8)d<<=1,d|=a>>>n+r&1;for(n=1;n<=25;n+=8)d<<=1,d|=e>>>n+r&1}t[c+0]=f>>>0,t[c+1]=d>>>0},a.rip=function(e,a,t,c){for(var f=0,d=0,r=0;r<4;r++)for(var n=24;n>=0;n-=8)f<<=1,f|=a>>>n+r&1,f<<=1,f|=e>>>n+r&1;for(r=4;r<8;r++)for(n=24;n>=0;n-=8)d<<=1,d|=a>>>n+r&1,d<<=1,d|=e>>>n+r&1;t[c+0]=f>>>0,t[c+1]=d>>>0},a.pc1=function(e,a,t,c){for(var f=0,d=0,r=7;r>=5;r--){for(var n=0;n<=24;n+=8)f<<=1,f|=a>>n+r&1;for(n=0;n<=24;n+=8)f<<=1,f|=e>>n+r&1}for(n=0;n<=24;n+=8)f<<=1,f|=a>>n+r&1;for(r=1;r<=3;r++){for(n=0;n<=24;n+=8)d<<=1,d|=a>>n+r&1;for(n=0;n<=24;n+=8)d<<=1,d|=e>>n+r&1}for(n=0;n<=24;n+=8)d<<=1,d|=e>>n+r&1;t[c+0]=f>>>0,t[c+1]=d>>>0},a.r28shl=function(e,a){return e<>>28-a};var t=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];a.pc2=function(e,a,c,f){for(var d=0,r=0,n=t.length>>>1,i=0;i>>t[i]&1;for(i=n;i>>t[i]&1;c[f+0]=d>>>0,c[f+1]=r>>>0},a.expand=function(e,a,t){var c=0,f=0;c=(1&e)<<5|e>>>27;for(var d=23;d>=15;d-=4)c<<=6,c|=e>>>d&63;for(d=11;d>=3;d-=4)f|=e>>>d&63,f<<=6;f|=(31&e)<<1|e>>>31,a[t+0]=c>>>0,a[t+1]=f>>>0};var c=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];a.substitute=function(e,a){for(var t=0,f=0;f<4;f++)t<<=4,t|=c[64*f+(e>>>18-6*f&63)];for(f=0;f<4;f++)t<<=4,t|=c[256+64*f+(a>>>18-6*f&63)];return t>>>0};var f=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];a.permute=function(e){for(var a=0,t=0;t>>f[t]&1;return a>>>0},a.padSplit=function(e,a,t){for(var c=e.toString(2);c.length{var c=t(48287).Buffer,f=t(4934),d=t(23241),r=t(14910),n={binary:!0,hex:!0,base64:!0};a.DiffieHellmanGroup=a.createDiffieHellmanGroup=a.getDiffieHellman=function(e){var a=new c(d[e].prime,"hex"),t=new c(d[e].gen,"hex");return new r(a,t)},a.createDiffieHellman=a.DiffieHellman=function e(a,t,d,i){return c.isBuffer(t)||void 0===n[t]?e(a,"binary",t,d):(t=t||"binary",i=i||"binary",d=d||new c([2]),c.isBuffer(d)||(d=new c(d,i)),"number"==typeof a?new r(f(a,d),d,!0):(c.isBuffer(a)||(a=new c(a,t)),new r(a,d,!0)))}},14910:(e,a,t)=>{var c=t(48287).Buffer,f=t(66473),d=new(t(52244)),r=new f(24),n=new f(11),i=new f(10),b=new f(3),o=new f(7),s=t(4934),l=t(53209);function u(e,a){return a=a||"utf8",c.isBuffer(e)||(e=new c(e,a)),this._pub=new f(e),this}function h(e,a){return a=a||"utf8",c.isBuffer(e)||(e=new c(e,a)),this._priv=new f(e),this}e.exports=g;var p={};function g(e,a,t){this.setGenerator(a),this.__prime=new f(e),this._prime=f.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,t?(this.setPublicKey=u,this.setPrivateKey=h):this._primeCode=8}function m(e,a){var t=new c(e.toArray());return a?t.toString(a):t}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,a){var t=a.toString("hex"),c=[t,e.toString(16)].join("_");if(c in p)return p[c];var f,l=0;if(e.isEven()||!s.simpleSieve||!s.fermatTest(e)||!d.test(e))return l+=1,l+="02"===t||"05"===t?8:4,p[c]=l,l;switch(d.test(e.shrn(1))||(l+=2),t){case"02":e.mod(r).cmp(n)&&(l+=8);break;case"05":(f=e.mod(i)).cmp(b)&&f.cmp(o)&&(l+=8);break;default:l+=4}return p[c]=l,l}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new f(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(e){var a=(e=(e=new f(e)).toRed(this._prime)).redPow(this._priv).fromRed(),t=new c(a.toArray()),d=this.getPrime();if(t.length{var c=t(53209);e.exports=x,x.simpleSieve=g,x.fermatTest=m;var f=t(66473),d=new f(24),r=new(t(52244)),n=new f(1),i=new f(2),b=new f(5),o=(new f(16),new f(8),new f(10)),s=new f(3),l=(new f(7),new f(11)),u=new f(4),h=(new f(12),null);function p(){if(null!==h)return h;var e=[];e[0]=2;for(var a=1,t=3;t<1048576;t+=2){for(var c=Math.ceil(Math.sqrt(t)),f=0;fe;)t.ishrn(1);if(t.isEven()&&t.iadd(n),t.testn(1)||t.iadd(i),a.cmp(i)){if(!a.cmp(b))for(;t.mod(o).cmp(s);)t.iadd(u)}else for(;t.mod(d).cmp(l);)t.iadd(u);if(g(h=t.shrn(1))&&g(t)&&m(h)&&m(t)&&r.test(h)&&r.test(t))return t}}},66473:function(e,a,t){!function(e,a){"use strict";function c(e,a){if(!e)throw new Error(a||"Assertion failed")}function f(e,a){e.super_=a;var t=function(){};t.prototype=a.prototype,e.prototype=new t,e.prototype.constructor=e}function d(e,a,t){if(d.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==a&&"be"!==a||(t=a,a=10),this._init(e||0,a||10,t||"be"))}var r;"object"==typeof e?e.exports=d:a.BN=d,d.BN=d,d.wordSize=26;try{r="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(66089).Buffer}catch(e){}function n(e,a){var t=e.charCodeAt(a);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},86729:(e,a,t)=>{"use strict";var c=a;c.version=t(1636).rE,c.utils=t(47011),c.rand=t(15037),c.curve=t(894),c.curves=t(60480),c.ec=t(57447),c.eddsa=t(8650)},36677:(e,a,t)=>{"use strict";var c=t(28490),f=t(47011),d=f.getNAF,r=f.getJSF,n=f.assert;function i(e,a){this.type=e,this.p=new c(a.p,16),this.red=a.prime?c.red(a.prime):c.mont(this.p),this.zero=new c(0).toRed(this.red),this.one=new c(1).toRed(this.red),this.two=new c(2).toRed(this.red),this.n=a.n&&new c(a.n,16),this.g=a.g&&this.pointFromJSON(a.g,a.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))}function b(e,a){this.curve=e,this.type=a,this.precomputed=null}e.exports=i,i.prototype.point=function(){throw new Error("Not implemented")},i.prototype.validate=function(){throw new Error("Not implemented")},i.prototype._fixedNafMul=function(e,a){n(e.precomputed);var t=e._getDoubles(),c=d(a,1,this._bitLength),f=(1<=r;o--)i=(i<<1)+c[o];b.push(i)}for(var s=this.jpoint(null,null,null),l=this.jpoint(null,null,null),u=f;u>0;u--){for(r=0;r=0;b--){for(var o=0;b>=0&&0===r[b];b--)o++;if(b>=0&&o++,i=i.dblp(o),b<0)break;var s=r[b];n(0!==s),i="affine"===e.type?s>0?i.mixedAdd(f[s-1>>1]):i.mixedAdd(f[-s-1>>1].neg()):s>0?i.add(f[s-1>>1]):i.add(f[-s-1>>1].neg())}return"affine"===e.type?i.toP():i},i.prototype._wnafMulAdd=function(e,a,t,c,f){var n,i,b,o=this._wnafT1,s=this._wnafT2,l=this._wnafT3,u=0;for(n=0;n=1;n-=2){var p=n-1,g=n;if(1===o[p]&&1===o[g]){var m=[a[p],null,null,a[g]];0===a[p].y.cmp(a[g].y)?(m[1]=a[p].add(a[g]),m[2]=a[p].toJ().mixedAdd(a[g].neg())):0===a[p].y.cmp(a[g].y.redNeg())?(m[1]=a[p].toJ().mixedAdd(a[g]),m[2]=a[p].add(a[g].neg())):(m[1]=a[p].toJ().mixedAdd(a[g]),m[2]=a[p].toJ().mixedAdd(a[g].neg()));var x=[-3,-1,-5,-7,0,7,5,1,3],y=r(t[p],t[g]);for(u=Math.max(y[0].length,u),l[p]=new Array(u),l[g]=new Array(u),i=0;i=0;n--){for(var I=0;n>=0;){var E=!0;for(i=0;i=0&&I++,w=w.dblp(I),n<0)break;for(i=0;i0?b=s[i][C-1>>1]:C<0&&(b=s[i][-C-1>>1].neg()),w="affine"===b.type?w.mixedAdd(b):w.add(b))}}for(n=0;n=Math.ceil((e.bitLength()+1)/a.step)},b.prototype._getDoubles=function(e,a){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var t=[this],c=this,f=0;f{"use strict";var c=t(47011),f=t(28490),d=t(56698),r=t(36677),n=c.assert;function i(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,r.call(this,"edwards",e),this.a=new f(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new f(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new f(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),n(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function b(e,a,t,c,d){r.BasePoint.call(this,e,"projective"),null===a&&null===t&&null===c?(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 f(a,16),this.y=new f(t,16),this.z=c?new f(c,16):this.curve.one,this.t=d&&new f(d,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()))))}d(i,r),e.exports=i,i.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},i.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},i.prototype.jpoint=function(e,a,t,c){return this.point(e,a,t,c)},i.prototype.pointFromX=function(e,a){(e=new f(e,16)).red||(e=e.toRed(this.red));var t=e.redSqr(),c=this.c2.redSub(this.a.redMul(t)),d=this.one.redSub(this.c2.redMul(this.d).redMul(t)),r=c.redMul(d.redInvm()),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(a&&!i||!a&&i)&&(n=n.redNeg()),this.point(e,n)},i.prototype.pointFromY=function(e,a){(e=new f(e,16)).red||(e=e.toRed(this.red));var t=e.redSqr(),c=t.redSub(this.c2),d=t.redMul(this.d).redMul(this.c2).redSub(this.a),r=c.redMul(d.redInvm());if(0===r.cmp(this.zero)){if(a)throw new Error("invalid point");return this.point(this.zero,e)}var n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");return n.fromRed().isOdd()!==a&&(n=n.redNeg()),this.point(n,e)},i.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var a=e.x.redSqr(),t=e.y.redSqr(),c=a.redMul(this.a).redAdd(t),f=this.c2.redMul(this.one.redAdd(this.d.redMul(a).redMul(t)));return 0===c.cmp(f)},d(b,r.BasePoint),i.prototype.pointFromJSON=function(e){return b.fromJSON(this,e)},i.prototype.point=function(e,a,t,c){return new b(this,e,a,t,c)},b.fromJSON=function(e,a){return new b(e,a[0],a[1],a[2])},b.prototype.inspect=function(){return this.isInfinity()?"":""},b.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},b.prototype._extDbl=function(){var e=this.x.redSqr(),a=this.y.redSqr(),t=this.z.redSqr();t=t.redIAdd(t);var c=this.curve._mulA(e),f=this.x.redAdd(this.y).redSqr().redISub(e).redISub(a),d=c.redAdd(a),r=d.redSub(t),n=c.redSub(a),i=f.redMul(r),b=d.redMul(n),o=f.redMul(n),s=r.redMul(d);return this.curve.point(i,b,s,o)},b.prototype._projDbl=function(){var e,a,t,c,f,d,r=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),i=this.y.redSqr();if(this.curve.twisted){var b=(c=this.curve._mulA(n)).redAdd(i);this.zOne?(e=r.redSub(n).redSub(i).redMul(b.redSub(this.curve.two)),a=b.redMul(c.redSub(i)),t=b.redSqr().redSub(b).redSub(b)):(f=this.z.redSqr(),d=b.redSub(f).redISub(f),e=r.redSub(n).redISub(i).redMul(d),a=b.redMul(c.redSub(i)),t=b.redMul(d))}else c=n.redAdd(i),f=this.curve._mulC(this.z).redSqr(),d=c.redSub(f).redSub(f),e=this.curve._mulC(r.redISub(c)).redMul(d),a=this.curve._mulC(c).redMul(n.redISub(i)),t=c.redMul(d);return this.curve.point(e,a,t)},b.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},b.prototype._extAdd=function(e){var a=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),t=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),c=this.t.redMul(this.curve.dd).redMul(e.t),f=this.z.redMul(e.z.redAdd(e.z)),d=t.redSub(a),r=f.redSub(c),n=f.redAdd(c),i=t.redAdd(a),b=d.redMul(r),o=n.redMul(i),s=d.redMul(i),l=r.redMul(n);return this.curve.point(b,o,l,s)},b.prototype._projAdd=function(e){var a,t,c=this.z.redMul(e.z),f=c.redSqr(),d=this.x.redMul(e.x),r=this.y.redMul(e.y),n=this.curve.d.redMul(d).redMul(r),i=f.redSub(n),b=f.redAdd(n),o=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(d).redISub(r),s=c.redMul(i).redMul(o);return this.curve.twisted?(a=c.redMul(b).redMul(r.redSub(this.curve._mulA(d))),t=i.redMul(b)):(a=c.redMul(b).redMul(r.redSub(d)),t=this.curve._mulC(i).redMul(b)),this.curve.point(s,a,t)},b.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},b.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},b.prototype.mulAdd=function(e,a,t){return this.curve._wnafMulAdd(1,[this,a],[e,t],2,!1)},b.prototype.jmulAdd=function(e,a,t){return this.curve._wnafMulAdd(1,[this,a],[e,t],2,!0)},b.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},b.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},b.prototype.getX=function(){return this.normalize(),this.x.fromRed()},b.prototype.getY=function(){return this.normalize(),this.y.fromRed()},b.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},b.prototype.eqXToP=function(e){var a=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(a))return!0;for(var t=e.clone(),c=this.curve.redN.redMul(this.z);;){if(t.iadd(this.curve.n),t.cmp(this.curve.p)>=0)return!1;if(a.redIAdd(c),0===this.x.cmp(a))return!0}},b.prototype.toP=b.prototype.normalize,b.prototype.mixedAdd=b.prototype.add},894:(e,a,t)=>{"use strict";var c=a;c.base=t(36677),c.short=t(39188),c.mont=t(30370),c.edwards=t(31298)},30370:(e,a,t)=>{"use strict";var c=t(28490),f=t(56698),d=t(36677),r=t(47011);function n(e){d.call(this,"mont",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.b,16).toRed(this.red),this.i4=new c(4).toRed(this.red).redInvm(),this.two=new c(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(e,a,t){d.BasePoint.call(this,e,"projective"),null===a&&null===t?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new c(a,16),this.z=new c(t,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}f(n,d),e.exports=n,n.prototype.validate=function(e){var a=e.normalize().x,t=a.redSqr(),c=t.redMul(a).redAdd(t.redMul(this.a)).redAdd(a);return 0===c.redSqrt().redSqr().cmp(c)},f(i,d.BasePoint),n.prototype.decodePoint=function(e,a){return this.point(r.toArray(e,a),1)},n.prototype.point=function(e,a){return new i(this,e,a)},n.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},i.prototype.precompute=function(){},i.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},i.fromJSON=function(e,a){return new i(e,a[0],a[1]||e.one)},i.prototype.inspect=function(){return this.isInfinity()?"":""},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),a=this.x.redSub(this.z).redSqr(),t=e.redSub(a),c=e.redMul(a),f=t.redMul(a.redAdd(this.curve.a24.redMul(t)));return this.curve.point(c,f)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(e,a){var t=this.x.redAdd(this.z),c=this.x.redSub(this.z),f=e.x.redAdd(e.z),d=e.x.redSub(e.z).redMul(t),r=f.redMul(c),n=a.z.redMul(d.redAdd(r).redSqr()),i=a.x.redMul(d.redISub(r).redSqr());return this.curve.point(n,i)},i.prototype.mul=function(e){for(var a=e.clone(),t=this,c=this.curve.point(null,null),f=[];0!==a.cmpn(0);a.iushrn(1))f.push(a.andln(1));for(var d=f.length-1;d>=0;d--)0===f[d]?(t=t.diffAdd(c,this),c=c.dbl()):(c=t.diffAdd(c,this),t=t.dbl());return c},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},39188:(e,a,t)=>{"use strict";var c=t(47011),f=t(28490),d=t(56698),r=t(36677),n=c.assert;function i(e){r.call(this,"short",e),this.a=new f(e.a,16).toRed(this.red),this.b=new f(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function b(e,a,t,c){r.BasePoint.call(this,e,"affine"),null===a&&null===t?(this.x=null,this.y=null,this.inf=!0):(this.x=new f(a,16),this.y=new f(t,16),c&&(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)}function o(e,a,t,c){r.BasePoint.call(this,e,"jacobian"),null===a&&null===t&&null===c?(this.x=this.curve.one,this.y=this.curve.one,this.z=new f(0)):(this.x=new f(a,16),this.y=new f(t,16),this.z=new f(c,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}d(i,r),e.exports=i,i.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var a,t;if(e.beta)a=new f(e.beta,16).toRed(this.red);else{var c=this._getEndoRoots(this.p);a=(a=c[0].cmp(c[1])<0?c[0]:c[1]).toRed(this.red)}if(e.lambda)t=new f(e.lambda,16);else{var d=this._getEndoRoots(this.n);0===this.g.mul(d[0]).x.cmp(this.g.x.redMul(a))?t=d[0]:(t=d[1],n(0===this.g.mul(t).x.cmp(this.g.x.redMul(a))))}return{beta:a,lambda:t,basis:e.basis?e.basis.map((function(e){return{a:new f(e.a,16),b:new f(e.b,16)}})):this._getEndoBasis(t)}}},i.prototype._getEndoRoots=function(e){var a=e===this.p?this.red:f.mont(e),t=new f(2).toRed(a).redInvm(),c=t.redNeg(),d=new f(3).toRed(a).redNeg().redSqrt().redMul(t);return[c.redAdd(d).fromRed(),c.redSub(d).fromRed()]},i.prototype._getEndoBasis=function(e){for(var a,t,c,d,r,n,i,b,o,s=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,u=this.n.clone(),h=new f(1),p=new f(0),g=new f(0),m=new f(1),x=0;0!==l.cmpn(0);){var y=u.div(l);b=u.sub(y.mul(l)),o=g.sub(y.mul(h));var A=m.sub(y.mul(p));if(!c&&b.cmp(s)<0)a=i.neg(),t=h,c=b.neg(),d=o;else if(c&&2==++x)break;i=b,u=l,l=b,g=h,h=o,m=p,p=A}r=b.neg(),n=o;var v=c.sqr().add(d.sqr());return r.sqr().add(n.sqr()).cmp(v)>=0&&(r=a,n=t),c.negative&&(c=c.neg(),d=d.neg()),r.negative&&(r=r.neg(),n=n.neg()),[{a:c,b:d},{a:r,b:n}]},i.prototype._endoSplit=function(e){var a=this.endo.basis,t=a[0],c=a[1],f=c.b.mul(e).divRound(this.n),d=t.b.neg().mul(e).divRound(this.n),r=f.mul(t.a),n=d.mul(c.a),i=f.mul(t.b),b=d.mul(c.b);return{k1:e.sub(r).sub(n),k2:i.add(b).neg()}},i.prototype.pointFromX=function(e,a){(e=new f(e,16)).red||(e=e.toRed(this.red));var t=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),c=t.redSqrt();if(0!==c.redSqr().redSub(t).cmp(this.zero))throw new Error("invalid point");var d=c.fromRed().isOdd();return(a&&!d||!a&&d)&&(c=c.redNeg()),this.point(e,c)},i.prototype.validate=function(e){if(e.inf)return!0;var a=e.x,t=e.y,c=this.a.redMul(a),f=a.redSqr().redMul(a).redIAdd(c).redIAdd(this.b);return 0===t.redSqr().redISub(f).cmpn(0)},i.prototype._endoWnafMulAdd=function(e,a,t){for(var c=this._endoWnafT1,f=this._endoWnafT2,d=0;d":""},b.prototype.isInfinity=function(){return this.inf},b.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(0===this.x.cmp(e.x))return this.curve.point(null,null);var a=this.y.redSub(e.y);0!==a.cmpn(0)&&(a=a.redMul(this.x.redSub(e.x).redInvm()));var t=a.redSqr().redISub(this.x).redISub(e.x),c=a.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,c)},b.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var a=this.curve.a,t=this.x.redSqr(),c=e.redInvm(),f=t.redAdd(t).redIAdd(t).redIAdd(a).redMul(c),d=f.redSqr().redISub(this.x.redAdd(this.x)),r=f.redMul(this.x.redSub(d)).redISub(this.y);return this.curve.point(d,r)},b.prototype.getX=function(){return this.x.fromRed()},b.prototype.getY=function(){return this.y.fromRed()},b.prototype.mul=function(e){return e=new f(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)},b.prototype.mulAdd=function(e,a,t){var c=[this,a],f=[e,t];return this.curve.endo?this.curve._endoWnafMulAdd(c,f):this.curve._wnafMulAdd(1,c,f,2)},b.prototype.jmulAdd=function(e,a,t){var c=[this,a],f=[e,t];return this.curve.endo?this.curve._endoWnafMulAdd(c,f,!0):this.curve._wnafMulAdd(1,c,f,2,!0)},b.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},b.prototype.neg=function(e){if(this.inf)return this;var a=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var t=this.precomputed,c=function(e){return e.neg()};a.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(c)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(c)}}}return a},b.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},d(o,r.BasePoint),i.prototype.jpoint=function(e,a,t){return new o(this,e,a,t)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),a=e.redSqr(),t=this.x.redMul(a),c=this.y.redMul(a).redMul(e);return this.curve.point(t,c)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var a=e.z.redSqr(),t=this.z.redSqr(),c=this.x.redMul(a),f=e.x.redMul(t),d=this.y.redMul(a.redMul(e.z)),r=e.y.redMul(t.redMul(this.z)),n=c.redSub(f),i=d.redSub(r);if(0===n.cmpn(0))return 0!==i.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var b=n.redSqr(),o=b.redMul(n),s=c.redMul(b),l=i.redSqr().redIAdd(o).redISub(s).redISub(s),u=i.redMul(s.redISub(l)).redISub(d.redMul(o)),h=this.z.redMul(e.z).redMul(n);return this.curve.jpoint(l,u,h)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var a=this.z.redSqr(),t=this.x,c=e.x.redMul(a),f=this.y,d=e.y.redMul(a).redMul(this.z),r=t.redSub(c),n=f.redSub(d);if(0===r.cmpn(0))return 0!==n.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var i=r.redSqr(),b=i.redMul(r),o=t.redMul(i),s=n.redSqr().redIAdd(b).redISub(o).redISub(o),l=n.redMul(o.redISub(s)).redISub(f.redMul(b)),u=this.z.redMul(r);return this.curve.jpoint(s,l,u)},o.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var a;if(this.curve.zeroA||this.curve.threeA){var t=this;for(a=0;a=0)return!1;if(t.redIAdd(f),0===this.x.cmp(t))return!0}},o.prototype.inspect=function(){return this.isInfinity()?"":""},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},60480:(e,a,t)=>{"use strict";var c,f=a,d=t(77952),r=t(894),n=t(47011).assert;function i(e){"short"===e.type?this.curve=new r.short(e):"edwards"===e.type?this.curve=new r.edwards(e):this.curve=new r.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function b(e,a){Object.defineProperty(f,e,{configurable:!0,enumerable:!0,get:function(){var t=new i(a);return Object.defineProperty(f,e,{configurable:!0,enumerable:!0,value:t}),t}})}f.PresetCurve=i,b("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:d.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),b("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:d.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),b("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:d.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),b("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:d.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"]}),b("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:d.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"]}),b("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:d.sha256,gRed:!1,g:["9"]}),b("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:d.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{c=t(74011)}catch(e){c=void 0}b("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:d.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",c]})},57447:(e,a,t)=>{"use strict";var c=t(28490),f=t(32723),d=t(47011),r=t(60480),n=t(15037),i=d.assert,b=t(61200),o=t(28545);function s(e){if(!(this instanceof s))return new s(e);"string"==typeof e&&(i(Object.prototype.hasOwnProperty.call(r,e),"Unknown curve "+e),e=r[e]),e instanceof r.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=s,s.prototype.keyPair=function(e){return new b(this,e)},s.prototype.keyFromPrivate=function(e,a){return b.fromPrivate(this,e,a)},s.prototype.keyFromPublic=function(e,a){return b.fromPublic(this,e,a)},s.prototype.genKeyPair=function(e){e||(e={});for(var a=new f({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||n(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),t=this.n.byteLength(),d=this.n.sub(new c(2));;){var r=new c(a.generate(t));if(!(r.cmp(d)>0))return r.iaddn(1),this.keyFromPrivate(r)}},s.prototype._truncateToN=function(e,a){var t=8*e.byteLength()-this.n.bitLength();return t>0&&(e=e.ushrn(t)),!a&&e.cmp(this.n)>=0?e.sub(this.n):e},s.prototype.sign=function(e,a,t,d){"object"==typeof t&&(d=t,t=null),d||(d={}),a=this.keyFromPrivate(a,t),e=this._truncateToN(new c(e,16));for(var r=this.n.byteLength(),n=a.getPrivate().toArray("be",r),i=e.toArray("be",r),b=new f({hash:this.hash,entropy:n,nonce:i,pers:d.pers,persEnc:d.persEnc||"utf8"}),s=this.n.sub(new c(1)),l=0;;l++){var u=d.k?d.k(l):new c(b.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(s)>=0)){var h=this.g.mul(u);if(!h.isInfinity()){var p=h.getX(),g=p.umod(this.n);if(0!==g.cmpn(0)){var m=u.invm(this.n).mul(g.mul(a.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var x=(h.getY().isOdd()?1:0)|(0!==p.cmp(g)?2:0);return d.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),x^=1),new o({r:g,s:m,recoveryParam:x})}}}}}},s.prototype.verify=function(e,a,t,f){e=this._truncateToN(new c(e,16)),t=this.keyFromPublic(t,f);var d=(a=new o(a,"hex")).r,r=a.s;if(d.cmpn(1)<0||d.cmp(this.n)>=0)return!1;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;var n,i=r.invm(this.n),b=i.mul(e).umod(this.n),s=i.mul(d).umod(this.n);return this.curve._maxwellTrick?!(n=this.g.jmulAdd(b,t.getPublic(),s)).isInfinity()&&n.eqXToP(d):!(n=this.g.mulAdd(b,t.getPublic(),s)).isInfinity()&&0===n.getX().umod(this.n).cmp(d)},s.prototype.recoverPubKey=function(e,a,t,f){i((3&t)===t,"The recovery param is more than two bits"),a=new o(a,f);var d=this.n,r=new c(e),n=a.r,b=a.s,s=1&t,l=t>>1;if(n.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");n=l?this.curve.pointFromX(n.add(this.curve.n),s):this.curve.pointFromX(n,s);var u=a.r.invm(d),h=d.sub(r).mul(u).umod(d),p=b.mul(u).umod(d);return this.g.mulAdd(h,n,p)},s.prototype.getKeyRecoveryParam=function(e,a,t,c){if(null!==(a=new o(a,c)).recoveryParam)return a.recoveryParam;for(var f=0;f<4;f++){var d;try{d=this.recoverPubKey(e,a,f)}catch(e){continue}if(d.eq(t))return f}throw new Error("Unable to find valid recovery factor")}},61200:(e,a,t)=>{"use strict";var c=t(28490),f=t(47011).assert;function d(e,a){this.ec=e,this.priv=null,this.pub=null,a.priv&&this._importPrivate(a.priv,a.privEnc),a.pub&&this._importPublic(a.pub,a.pubEnc)}e.exports=d,d.fromPublic=function(e,a,t){return a instanceof d?a:new d(e,{pub:a,pubEnc:t})},d.fromPrivate=function(e,a,t){return a instanceof d?a:new d(e,{priv:a,privEnc:t})},d.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"}},d.prototype.getPublic=function(e,a){return"string"==typeof e&&(a=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),a?this.pub.encode(a,e):this.pub},d.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},d.prototype._importPrivate=function(e,a){this.priv=new c(e,a||16),this.priv=this.priv.umod(this.ec.curve.n)},d.prototype._importPublic=function(e,a){if(e.x||e.y)return"mont"===this.ec.curve.type?f(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||f(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,a)},d.prototype.derive=function(e){return e.validate()||f(e.validate(),"public point not validated"),e.mul(this.priv).getX()},d.prototype.sign=function(e,a,t){return this.ec.sign(e,this,a,t)},d.prototype.verify=function(e,a){return this.ec.verify(e,a,this)},d.prototype.inspect=function(){return""}},28545:(e,a,t)=>{"use strict";var c=t(28490),f=t(47011),d=f.assert;function r(e,a){if(e instanceof r)return e;this._importDER(e,a)||(d(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function n(){this.place=0}function i(e,a){var t=e[a.place++];if(!(128&t))return t;var c=15&t;if(0===c||c>4)return!1;if(0===e[a.place])return!1;for(var f=0,d=0,r=a.place;d>>=0;return!(f<=127)&&(a.place=r,f)}function b(e){for(var a=0,t=e.length-1;!e[a]&&!(128&e[a+1])&&a>>3);for(e.push(128|t);--t;)e.push(a>>>(t<<3)&255);e.push(a)}}e.exports=r,r.prototype._importDER=function(e,a){e=f.toArray(e,a);var t=new n;if(48!==e[t.place++])return!1;var d=i(e,t);if(!1===d)return!1;if(d+t.place!==e.length)return!1;if(2!==e[t.place++])return!1;var r=i(e,t);if(!1===r)return!1;if(128&e[t.place])return!1;var b=e.slice(t.place,r+t.place);if(t.place+=r,2!==e[t.place++])return!1;var o=i(e,t);if(!1===o)return!1;if(e.length!==o+t.place)return!1;if(128&e[t.place])return!1;var s=e.slice(t.place,o+t.place);if(0===b[0]){if(!(128&b[1]))return!1;b=b.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new c(b),this.s=new c(s),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var a=this.r.toArray(),t=this.s.toArray();for(128&a[0]&&(a=[0].concat(a)),128&t[0]&&(t=[0].concat(t)),a=b(a),t=b(t);!(t[0]||128&t[1]);)t=t.slice(1);var c=[2];o(c,a.length),(c=c.concat(a)).push(2),o(c,t.length);var d=c.concat(t),r=[48];return o(r,d.length),r=r.concat(d),f.encode(r,e)}},8650:(e,a,t)=>{"use strict";var c=t(77952),f=t(60480),d=t(47011),r=d.assert,n=d.parseBytes,i=t(46661),b=t(90220);function o(e){if(r("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof o))return new o(e);e=f[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=c.sha512}e.exports=o,o.prototype.sign=function(e,a){e=n(e);var t=this.keyFromSecret(a),c=this.hashInt(t.messagePrefix(),e),f=this.g.mul(c),d=this.encodePoint(f),r=this.hashInt(d,t.pubBytes(),e).mul(t.priv()),i=c.add(r).umod(this.curve.n);return this.makeSignature({R:f,S:i,Rencoded:d})},o.prototype.verify=function(e,a,t){if(e=n(e),(a=this.makeSignature(a)).S().gte(a.eddsa.curve.n)||a.S().isNeg())return!1;var c=this.keyFromPublic(t),f=this.hashInt(a.Rencoded(),c.pubBytes(),e),d=this.g.mul(a.S());return a.R().add(c.pub().mul(f)).eq(d)},o.prototype.hashInt=function(){for(var e=this.hash(),a=0;a{"use strict";var c=t(47011),f=c.assert,d=c.parseBytes,r=c.cachedProperty;function n(e,a){this.eddsa=e,this._secret=d(a.secret),e.isPoint(a.pub)?this._pub=a.pub:this._pubBytes=d(a.pub)}n.fromPublic=function(e,a){return a instanceof n?a:new n(e,{pub:a})},n.fromSecret=function(e,a){return a instanceof n?a:new n(e,{secret:a})},n.prototype.secret=function(){return this._secret},r(n,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),r(n,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),r(n,"privBytes",(function(){var e=this.eddsa,a=this.hash(),t=e.encodingLength-1,c=a.slice(0,e.encodingLength);return c[0]&=248,c[t]&=127,c[t]|=64,c})),r(n,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),r(n,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),r(n,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),n.prototype.sign=function(e){return f(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},n.prototype.verify=function(e,a){return this.eddsa.verify(e,a,this)},n.prototype.getSecret=function(e){return f(this._secret,"KeyPair is public only"),c.encode(this.secret(),e)},n.prototype.getPublic=function(e){return c.encode(this.pubBytes(),e)},e.exports=n},90220:(e,a,t)=>{"use strict";var c=t(28490),f=t(47011),d=f.assert,r=f.cachedProperty,n=f.parseBytes;function i(e,a){this.eddsa=e,"object"!=typeof a&&(a=n(a)),Array.isArray(a)&&(d(a.length===2*e.encodingLength,"Signature has invalid size"),a={R:a.slice(0,e.encodingLength),S:a.slice(e.encodingLength)}),d(a.R&&a.S,"Signature without R or S"),e.isPoint(a.R)&&(this._R=a.R),a.S instanceof c&&(this._S=a.S),this._Rencoded=Array.isArray(a.R)?a.R:a.Rencoded,this._Sencoded=Array.isArray(a.S)?a.S:a.Sencoded}r(i,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),r(i,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),r(i,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),r(i,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),i.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},i.prototype.toHex=function(){return f.encode(this.toBytes(),"hex").toUpperCase()},e.exports=i},74011:e=>{e.exports={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"]]}}},47011:(e,a,t)=>{"use strict";var c=a,f=t(28490),d=t(43349),r=t(64367);c.assert=d,c.toArray=r.toArray,c.zero2=r.zero2,c.toHex=r.toHex,c.encode=r.encode,c.getNAF=function(e,a,t){var c,f=new Array(Math.max(e.bitLength(),t)+1);for(c=0;c(d>>1)-1?(d>>1)-i:i,r.isubn(n)):n=0,f[c]=n,r.iushrn(1)}return f},c.getJSF=function(e,a){var t=[[],[]];e=e.clone(),a=a.clone();for(var c,f=0,d=0;e.cmpn(-f)>0||a.cmpn(-d)>0;){var r,n,i=e.andln(3)+f&3,b=a.andln(3)+d&3;3===i&&(i=-1),3===b&&(b=-1),r=1&i?3!=(c=e.andln(7)+f&7)&&5!==c||2!==b?i:-i:0,t[0].push(r),n=1&b?3!=(c=a.andln(7)+d&7)&&5!==c||2!==i?b:-b:0,t[1].push(n),2*f===r+1&&(f=1-f),2*d===n+1&&(d=1-d),e.iushrn(1),a.iushrn(1)}return t},c.cachedProperty=function(e,a,t){var c="_"+a;e.prototype[a]=function(){return void 0!==this[c]?this[c]:this[c]=t.call(this)}},c.parseBytes=function(e){return"string"==typeof e?c.toArray(e,"hex"):e},c.intFromLE=function(e){return new f(e,"hex","le")}},28490:function(e,a,t){!function(e,a){"use strict";function c(e,a){if(!e)throw new Error(a||"Assertion failed")}function f(e,a){e.super_=a;var t=function(){};t.prototype=a.prototype,e.prototype=new t,e.prototype.constructor=e}function d(e,a,t){if(d.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==a&&"be"!==a||(t=a,a=10),this._init(e||0,a||10,t||"be"))}var r;"object"==typeof e?e.exports=d:a.BN=d,d.BN=d,d.wordSize=26;try{r="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(79368).Buffer}catch(e){}function n(e,a){var t=e.charCodeAt(a);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},30655:(e,a,t)=>{"use strict";var c=t(70453)("%Object.defineProperty%",!0)||!1;if(c)try{c({},"a",{value:1})}catch(e){c=!1}e.exports=c},41237:e=>{"use strict";e.exports=EvalError},69383:e=>{"use strict";e.exports=Error},79290:e=>{"use strict";e.exports=RangeError},79538:e=>{"use strict";e.exports=ReferenceError},58068:e=>{"use strict";e.exports=SyntaxError},69675:e=>{"use strict";e.exports=TypeError},35345:e=>{"use strict";e.exports=URIError},9723:(e,a,t)=>{"use strict";t.d(a,{AF:()=>r,B3:()=>d,JY:()=>n});var c=t(67418),f=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));class d{constructor({provider:e,onProgress:a,concurrencySize:t=10,batchSize:c=10,shouldRetry:f=!0,retryMax:d=5,retryOn:r=500}){this.provider=e,this.onProgress=a,this.concurrencySize=t,this.batchSize=c,this.shouldRetry=f,this.retryMax=d,this.retryOn=r}getBlock(e){return f(this,null,(function*(){const a=yield this.provider.getBlock(e);if(!a)throw new Error(`No block for ${e}`);return a}))}createBatchRequest(e){return e.map(((e,a)=>f(this,null,(function*(){return yield(0,c.yy)(20*a),(()=>f(this,null,(function*(){let a,t=0;for(;!this.shouldRetry&&0===t||this.shouldRetry&&tthis.getBlock(e))))}catch(e){t++,a=e,yield(0,c.yy)(this.retryOn)}throw a})))()}))))}getBatchBlocks(e){return f(this,null,(function*(){let a=0;const t=[];for(const f of(0,c.iv)(e,this.concurrencySize*this.batchSize)){const d=(yield Promise.all(this.createBatchRequest((0,c.iv)(f,this.batchSize)))).flat();t.push(...d),a+=f.length,"function"==typeof this.onProgress&&this.onProgress({percentage:a/e.length,currentIndex:a,totalIndex:e.length})}return t}))}}class r{constructor({provider:e,onProgress:a,concurrencySize:t=10,batchSize:c=10,shouldRetry:f=!0,retryMax:d=5,retryOn:r=500}){this.provider=e,this.onProgress=a,this.concurrencySize=t,this.batchSize=c,this.shouldRetry=f,this.retryMax=d,this.retryOn=r}getTransaction(e){return f(this,null,(function*(){const a=yield this.provider.getTransaction(e);if(!a)throw new Error(`No transaction for ${e}`);return a}))}createBatchRequest(e){return e.map(((e,a)=>f(this,null,(function*(){return yield(0,c.yy)(20*a),(()=>f(this,null,(function*(){let a,t=0;for(;!this.shouldRetry&&0===t||this.shouldRetry&&tthis.getTransaction(e))))}catch(e){t++,a=e,yield(0,c.yy)(this.retryOn)}throw a})))()}))))}getBatchTransactions(e){return f(this,null,(function*(){let a=0;const t=[];for(const f of(0,c.iv)(e,this.concurrencySize*this.batchSize)){const d=(yield Promise.all(this.createBatchRequest((0,c.iv)(f,this.batchSize)))).flat();t.push(...d),a+=f.length,"function"==typeof this.onProgress&&this.onProgress({percentage:a/e.length,currentIndex:a,totalIndex:e.length})}return t}))}}class n{constructor({provider:e,contract:a,onProgress:t,concurrencySize:c=10,blocksPerRequest:f=2e3,shouldRetry:d=!0,retryMax:r=5,retryOn:n=500}){this.provider=e,this.contract=a,this.onProgress=t,this.concurrencySize=c,this.blocksPerRequest=f,this.shouldRetry=d,this.retryMax=r,this.retryOn=n}getPastEvents(e){return f(this,arguments,(function*({fromBlock:e,toBlock:a,type:t}){let f,d=0;for(;!this.shouldRetry&&0===d||this.shouldRetry&&df(this,null,(function*(){return yield(0,c.yy)(20*a),this.getPastEvents(e)}))))}getBatchEvents(e){return f(this,arguments,(function*({fromBlock:e,toBlock:a,type:t="*"}){a||(a=yield this.provider.getBlockNumber());const f=[];for(let c=e;ca?a:c+this.blocksPerRequest-1;f.push({fromBlock:c,toBlock:e,type:t})}const d=[],r=(0,c.iv)(f,this.concurrencySize);let n=0;for(const e of r){n++;const a=(yield Promise.all(this.createBatchRequest(e))).flat();d.push(...a),"function"==typeof this.onProgress&&this.onProgress({percentage:n/r.length,type:t,fromBlock:e[0].fromBlock,toBlock:e[e.length-1].toBlock,count:a.length})}return d}))}}},7240:(e,a,t)=>{"use strict";t.d(a,{Hr:()=>r,dA:()=>n,qO:()=>i});var c=t(67418),f=t(85111),d=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));function r(e){return d(this,arguments,(function*({nullifier:e,secret:a}){const t=new Uint8Array([...(0,c.EI)(e),...(0,c.EI)(a)]),d=(0,c.$W)((0,c.Ju)(t),62),r=BigInt(yield(0,f.UB)(t)),n=(0,c.$W)(r),i=BigInt(yield(0,f.UB)((0,c.EI)(e)));return{preimage:t,noteHex:d,commitment:r,commitmentHex:n,nullifierHash:i,nullifierHex:(0,c.$W)(i)}}))}class n{constructor({currency:e,amount:a,netId:t,nullifier:c,secret:f,note:d,noteHex:r,invoice:n,commitmentHex:i,nullifierHex:b}){this.currency=e,this.amount=a,this.netId=t,this.nullifier=c,this.secret=f,this.note=d,this.noteHex=r,this.invoice=n,this.commitmentHex=i,this.nullifierHex=b}toString(){return JSON.stringify({currency:this.currency,amount:this.amount,netId:this.netId,nullifier:this.nullifier,secret:this.secret,note:this.note,noteHex:this.noteHex,invoice:this.invoice,commitmentHex:this.commitmentHex,nullifierHex:this.nullifierHex},null,2)}static createNote(e){return d(this,arguments,(function*({currency:e,amount:a,netId:t,nullifier:f,secret:d}){f||(f=(0,c.ib)(31)),d||(d=(0,c.ib)(31));const i=yield r({nullifier:f,secret:d});return new n({currency:e.toLowerCase(),amount:a,netId:t,note:`tornado-${e.toLowerCase()}-${a}-${t}-${i.noteHex}`,noteHex:i.noteHex,invoice:`tornadoInvoice-${e.toLowerCase()}-${a}-${t}-${i.commitmentHex}`,nullifier:f,secret:d,commitmentHex:i.commitmentHex,nullifierHex:i.nullifierHex})}))}static parseNote(e){return d(this,null,(function*(){const a=new RegExp("tornado-(?\\w+)-(?[\\d.]+)-(?\\d+)-0x(?[0-9a-fA-F]{124})","g").exec(e);if(!a)throw new Error("The note has invalid format");const t=null==a?void 0:a.groups,f=t.currency.toLowerCase(),d=t.amount,i=Number(t.netId),b=(0,c.jm)("0x"+t.note),o=BigInt((0,c.ae)(b.slice(0,31)).toString()),s=BigInt((0,c.ae)(b.slice(31,62)).toString()),l=yield r({nullifier:o,secret:s}),u=`tornadoInvoice-${f}-${d}-${i}-${l.commitmentHex}`;return new n({currency:f,amount:d,netId:i,note:e,noteHex:l.noteHex,invoice:u,nullifier:o,secret:s,commitmentHex:l.commitmentHex,nullifierHex:l.nullifierHex})}))}}class i{constructor(e){const a=new RegExp("tornadoInvoice-(?\\w+)-(?[\\d.]+)-(?\\d+)-0x(?[0-9a-fA-F]{64})","g").exec(e);if(!a)throw new Error("The note has invalid format");const t=null==a?void 0:a.groups,c=t.currency.toLowerCase(),f=t.amount,d=Number(t.netId);this.currency=c,this.amount=f,this.netId=d,this.commitment="0x"+t.commitment,this.invoice=e}toString(){return JSON.stringify({currency:this.currency,amount:this.amount,netId:this.netId,commitment:this.commitment,invoice:this.invoice},null,2)}}},33298:(e,a,t)=>{"use strict";t.d(a,{Ad:()=>b,Fr:()=>n,ol:()=>i});var c=t(51594),f=t(20415),d=t(30031),r=t(67418);function n({nonce:e,ephemPublicKey:a,ciphertext:t}){const c=(0,r.$W)((0,r.My)((0,r.Kp)(e)),24),f=(0,r.$W)((0,r.My)((0,r.Kp)(a)),32),d=(0,r.My)((0,r.Kp)(t)),n=(0,r.Id)((0,r.aT)(c),(0,r.aT)(f),(0,r.aT)(d));return(0,r.My)(n)}function i(e){const a=(0,r.aT)(e),t=(0,r.if)(a.slice(0,24)),c=(0,r.if)(a.slice(24,56)),f=(0,r.if)(a.slice(56));return{messageBuff:(0,r.My)(a),version:"x25519-xsalsa20-poly1305",nonce:t,ephemPublicKey:c,ciphertext:f}}class b{constructor({netId:e,blockNumber:a,recoveryKey:t,Echoer:d}){t||(t=(0,r.My)(r.Et.getRandomValues(new Uint8Array(32))).slice(2)),this.netId=Math.floor(Number(e)),this.blockNumber=a,this.recoveryKey=t,this.recoveryAddress=(0,f.K)("0x"+t),this.recoveryPublicKey=(0,c.getEncryptionPublicKey)(t),this.Echoer=d}static getWalletPublicKey(e){let{privateKey:a}=e;return a.startsWith("0x")&&(a=a.replace("0x","")),(0,c.getEncryptionPublicKey)(a)}getEncryptedAccount(e){const a=(0,c.encrypt)({publicKey:e,data:this.recoveryKey,version:"x25519-xsalsa20-poly1305"});return{encryptedData:a,data:n(a)}}decryptAccountsWithWallet(e,a){let{privateKey:t}=e;t.startsWith("0x")&&(t=t.replace("0x",""));const f=[];for(const e of a)try{const a=i(e.encryptedAccount),d=(0,c.decrypt)({encryptedData:a,privateKey:t});f.push(new b({netId:this.netId,blockNumber:e.blockNumber,recoveryKey:d,Echoer:this.Echoer}))}catch(e){continue}return f}decryptNotes(e){const a=[];for(const t of e)try{const e=i(t.encryptedNote),[f,r]=(0,c.decrypt)({encryptedData:e,privateKey:this.recoveryKey}).split("-");a.push({blockNumber:t.blockNumber,address:(0,d.b)(f),noteHex:r})}catch(e){continue}return a}encryptNote({address:e,noteHex:a}){return n((0,c.encrypt)({publicKey:this.recoveryPublicKey,data:`${e}-${a}`,version:"x25519-xsalsa20-poly1305"}))}}},71304:(e,a,t)=>{"use strict";t.d(a,{EU:()=>k,GS:()=>B,JJ:()=>S,Lx:()=>I,O_:()=>L,cE:()=>P,e0:()=>M,oW:()=>E,uw:()=>C});var c=t(30031),f=t(64563),d=t(99770),r=t(52049),n=t(9723),i=t(68434),b=t(59499),o=t(57194),s=Object.defineProperty,l=Object.defineProperties,u=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,p=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,x=Reflect.get,y=(e,a,t)=>a in e?s(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,A=(e,a)=>{for(var t in a||(a={}))g.call(a,t)&&y(e,t,a[t]);if(h)for(var t of h(a))m.call(a,t)&&y(e,t,a[t]);return e},v=(e,a)=>l(e,u(a)),w=(e,a,t)=>x(p(e),t,a),_=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const I="deposit",E="withdrawal";class C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,type:d="",deployedBlock:r=0,fetchDataOptions:i,tovarishClient:b}){this.netId=e,this.provider=a,this.graphApi=t,this.subgraphName=c,this.fetchDataOptions=i,this.contract=f,this.type=d,this.deployedBlock=r,this.batchEventsService=new n.JY({provider:a,contract:f,onProgress:this.updateEventProgress}),this.tovarishClient=b}getInstanceName(){return""}getType(){return this.type||""}getTovarishType(){return String(this.getType()||"").toLowerCase()}getGraphMethod(){return""}getGraphParams(){return{graphApi:this.graphApi||"",subgraphName:this.subgraphName||"",fetchDataOptions:this.fetchDataOptions,onProgress:this.updateGraphProgress}}updateEventProgress({percentage:e,type:a,fromBlock:t,toBlock:c,count:f}){}updateBlockProgress({percentage:e,currentIndex:a,totalIndex:t}){}updateTransactionProgress({percentage:e,currentIndex:a,totalIndex:t}){}updateGraphProgress({type:e,fromBlock:a,toBlock:t,count:c}){}formatEvents(e){return _(this,null,(function*(){return yield new Promise((a=>a(e)))}))}getEventsFromDB(){return _(this,null,(function*(){return{events:[],lastBlock:0}}))}getEventsFromCache(){return _(this,null,(function*(){return{events:[],lastBlock:0,fromCache:!0}}))}getSavedEvents(){return _(this,null,(function*(){let e=yield this.getEventsFromDB();return e.lastBlock||(e=yield this.getEventsFromCache()),e}))}getEventsFromGraph(e){return _(this,arguments,(function*({fromBlock:e,methodName:a=""}){if(!this.graphApi||!this.subgraphName)return{events:[],lastBlock:e};const{events:t,lastSyncBlock:c}=yield r[a||this.getGraphMethod()](A({fromBlock:e},this.getGraphParams()));return{events:t,lastBlock:c}}))}getEventsFromRpc(e){return _(this,arguments,(function*({fromBlock:e,toBlock:a}){try{return a||(a=yield this.provider.getBlockNumber()),e>=a?{events:[],lastBlock:a}:(this.updateEventProgress({percentage:0,type:this.getType()}),{events:yield this.formatEvents(yield this.batchEventsService.getBatchEvents({fromBlock:e,toBlock:a,type:this.getType()})),lastBlock:a})}catch(a){return console.log(a),{events:[],lastBlock:e}}}))}getLatestEvents(e){return _(this,arguments,(function*({fromBlock:e}){var a;if((null==(a=this.tovarishClient)?void 0:a.selectedRelayer)&&![I,E].includes(this.type.toLowerCase())){const{events:a,lastSyncBlock:t}=yield this.tovarishClient.getEvents({type:this.getTovarishType(),fromBlock:e});return{events:a,lastBlock:t}}const t=yield this.getEventsFromGraph({fromBlock:e}),c=t.lastBlock&&t.lastBlock>=e?t.lastBlock:e,f=yield this.getEventsFromRpc({fromBlock:c});return{events:[...t.events,...f.events],lastBlock:f.lastBlock}}))}validateEvents({events:e,lastBlock:a}){}saveEvents(e){return _(this,arguments,(function*({events:e,lastBlock:a}){}))}updateEvents(){return _(this,null,(function*(){var e;const a=yield this.getSavedEvents();let t=this.deployedBlock;a&&a.lastBlock&&(t=a.lastBlock+1);const c=yield this.getLatestEvents({fromBlock:t}),f=new Set,d=[...a.events,...c.events].sort(((e,a)=>e.blockNumber===a.blockNumber?e.logIndex-a.logIndex:e.blockNumber-a.blockNumber)).filter((({transactionHash:e,logIndex:a})=>{const t=`${e}_${a}`,c=f.has(t);return f.add(t),!c})),r=c.lastBlock||(null==(e=d[d.length-1])?void 0:e.blockNumber);return this.validateEvents({events:d,lastBlock:r}),(a.fromCache||c.events.length)&&(yield this.saveEvents({events:d,lastBlock:r})),{events:d,lastBlock:r}}))}}class M extends C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,Tornado:f,type:d,amount:r,currency:i,deployedBlock:b,fetchDataOptions:o,tovarishClient:s}){super({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,type:d,deployedBlock:b,fetchDataOptions:o,tovarishClient:s}),this.amount=r,this.currency=i,this.batchTransactionService=new n.AF({provider:a,onProgress:this.updateTransactionProgress}),this.batchBlockService=new n.B3({provider:a,onProgress:this.updateBlockProgress})}getInstanceName(){return`${this.getType().toLowerCase()}s_${this.netId}_${this.currency}_${this.amount}`}getGraphMethod(){return`getAll${this.getType()}s`}getGraphParams(){return{graphApi:this.graphApi||"",subgraphName:this.subgraphName||"",amount:this.amount,currency:this.currency,fetchDataOptions:this.fetchDataOptions,onProgress:this.updateGraphProgress}}formatEvents(e){return _(this,null,(function*(){if(this.getType().toLowerCase()===I){const a=e.map((({blockNumber:e,index:a,transactionHash:t,args:c})=>{const{commitment:f,leafIndex:d,timestamp:r}=c;return{blockNumber:e,logIndex:a,transactionHash:t,commitment:f,leafIndex:Number(d),timestamp:Number(r)}})),t=yield this.batchTransactionService.getBatchTransactions([...new Set(a.map((({transactionHash:e})=>e)))]);return a.map((e=>{const{from:a}=t.find((({hash:a})=>a===e.transactionHash));return v(A({},e),{from:a})}))}{const a=e.map((({blockNumber:e,index:a,transactionHash:t,args:f})=>{const{nullifierHash:d,to:r,fee:n}=f;return{blockNumber:e,logIndex:a,transactionHash:t,nullifierHash:String(d),to:(0,c.b)(r),fee:String(n)}})),t=yield this.batchBlockService.getBatchBlocks([...new Set(a.map((({blockNumber:e})=>e)))]);return a.map((e=>{const{timestamp:a}=t.find((({number:a})=>a===e.blockNumber));return v(A({},e),{timestamp:a})}))}}))}validateEvents({events:e}){if(e.length&&this.getType().toLowerCase()===I){const a=e[e.length-1];if(a.leafIndex!==e.length-1){const t=`Deposit events invalid wants ${e.length-1} leafIndex have ${a.leafIndex}`;throw new Error(t)}}}getLatestEvents(e){return _(this,arguments,(function*({fromBlock:e}){var a;if(null==(a=this.tovarishClient)?void 0:a.selectedRelayer){const{events:a,lastSyncBlock:t}=yield this.tovarishClient.getEvents({type:this.getTovarishType(),currency:this.currency,amount:this.amount,fromBlock:e});return{events:a,lastBlock:t}}return w(M.prototype,this,"getLatestEvents").call(this,{fromBlock:e})}))}}class B extends C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,Echoer:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:n}){super({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:n})}getInstanceName(){return`echo_${this.netId}`}getType(){return"Echo"}getGraphMethod(){return"getAllGraphEchoEvents"}formatEvents(e){return _(this,null,(function*(){return e.map((({blockNumber:e,index:a,transactionHash:t,args:c})=>{const{who:f,data:d}=c;if(f&&d)return v(A({},{blockNumber:e,logIndex:a,transactionHash:t}),{address:f,encryptedAccount:d})})).filter((e=>e))}))}getEventsFromGraph(e){return _(this,arguments,(function*({fromBlock:e}){return!this.graphApi||this.graphApi.includes("api.thegraph.com")?{events:[],lastBlock:e}:w(B.prototype,this,"getEventsFromGraph").call(this,{fromBlock:e})}))}}class L extends C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,Router:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:n}){super({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:n})}getInstanceName(){return`encrypted_notes_${this.netId}`}getType(){return"EncryptedNote"}getTovarishType(){return"encrypted_notes"}getGraphMethod(){return"getAllEncryptedNotes"}formatEvents(e){return _(this,null,(function*(){return e.map((({blockNumber:e,index:a,transactionHash:t,args:c})=>{const{encryptedNote:f}=c;if(f&&"0x"!==f)return v(A({},{blockNumber:e,logIndex:a,transactionHash:t}),{encryptedNote:f})})).filter((e=>e))}))}}class S extends C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,Governance:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:i}){super({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:i}),this.batchTransactionService=new n.AF({provider:a,onProgress:this.updateTransactionProgress})}getInstanceName(){return`governance_${this.netId}`}getType(){return"*"}getTovarishType(){return"governance"}getGraphMethod(){return"getAllGovernanceEvents"}formatEvents(e){return _(this,null,(function*(){const a=[],t=[],c=[],f=[];if(e.forEach((({blockNumber:e,index:d,transactionHash:r,args:n,eventName:i})=>{const b={blockNumber:e,logIndex:d,transactionHash:r,event:i};if("ProposalCreated"===i){const{id:e,proposer:t,target:c,startTime:f,endTime:d,description:r}=n;a.push(v(A({},b),{id:Number(e),proposer:t,target:c,startTime:Number(f),endTime:Number(d),description:r}))}if("Voted"===i){const{proposalId:e,voter:a,support:c,votes:f}=n;t.push(v(A({},b),{proposalId:Number(e),voter:a,support:c,votes:f,from:"",input:""}))}if("Delegated"===i){const{account:e,to:a}=n;c.push(v(A({},b),{account:e,delegateTo:a}))}if("Undelegated"===i){const{account:e,from:a}=n;f.push(v(A({},b),{account:e,delegateFrom:a}))}})),t.length){this.updateTransactionProgress({percentage:0});const e=yield this.batchTransactionService.getBatchTransactions([...new Set(t.map((({transactionHash:e})=>e)))]);t.forEach(((a,c)=>{let{data:f,from:d}=e.find((e=>e.hash===a.transactionHash));(!f||f.length>2048)&&(f=""),t[c].from=d,t[c].input=f}))}return[...a,...t,...c,...f]}))}getEventsFromGraph(e){return _(this,arguments,(function*({fromBlock:e}){return this.graphApi&&this.subgraphName&&!this.graphApi.includes("api.thegraph.com")?w(S.prototype,this,"getEventsFromGraph").call(this,{fromBlock:e}):{events:[],lastBlock:e}}))}}function k(e,a){return _(this,null,(function*(){yield Promise.all(a.filter((e=>e.tovarishHost)).map((a=>_(this,null,(function*(){var t;try{a.tovarishNetworks=yield(0,i.Fd)(a.tovarishHost,v(A({},e.fetchDataOptions),{headers:{"Content-Type":"application/json"},timeout:6e4,maxRetry:(null==(t=e.fetchDataOptions)?void 0:t.torPort)?2:0}))}catch(e){a.tovarishNetworks=[]}})))))}))}const N=[{ensName:"tornadowithdraw.eth",relayerAddress:"0x40c3d1656a26C9266f4A10fed0D87EFf79F54E64",hostnames:{},tovarishHost:"tornadowithdraw.com",tovarishNetworks:b.Af}];class P extends C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,RelayerRegistry:f,Aggregator:d,relayerEnsSubdomains:r,deployedBlock:n,fetchDataOptions:i,tovarishClient:b}){super({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,deployedBlock:n,fetchDataOptions:i,tovarishClient:b}),this.Aggregator=d,this.relayerEnsSubdomains=r,this.updateInterval=86400}getInstanceName(){return`registered_${this.netId}`}getType(){return"RelayerRegistered"}getTovarishType(){return"registered"}getGraphMethod(){return"getAllRegisters"}formatEvents(e){return _(this,null,(function*(){return e.map((({blockNumber:e,index:a,transactionHash:t,args:c})=>v(A({},{blockNumber:e,logIndex:a,transactionHash:t}),{ensName:c.ensName,relayerAddress:c.relayerAddress})))}))}getRelayersFromDB(){return _(this,null,(function*(){return{lastBlock:0,timestamp:0,relayers:[]}}))}getRelayersFromCache(){return _(this,null,(function*(){return{lastBlock:0,timestamp:0,relayers:[],fromCache:!0}}))}getSavedRelayers(){return _(this,null,(function*(){let e=yield this.getRelayersFromDB();return e&&e.relayers.length||(e=yield this.getRelayersFromCache()),e}))}getLatestRelayers(){return _(this,null,(function*(){const{events:e,lastBlock:a}=yield this.updateEvents(),t=Object.values(this.relayerEnsSubdomains),c=new Set,r=e.filter((({ensName:e})=>!c.has(e)&&(c.add(e),!0))),n=r.map((e=>(0,f.kM)(e.ensName))),[i,b]=yield Promise.all([this.Aggregator.relayersData.staticCall(n,t.concat("tovarish-relayer")),this.provider.getBlock(a).then((e=>Number(null==e?void 0:e.timestamp)))]),s=i.map((({owner:e,balance:a,records:t,isRegistered:c},f)=>{const{ensName:n,relayerAddress:i}=r[f];let b;const s=t.reduce(((e,a,c)=>{if(a){if(c===t.length-1)return b=a,e;e[Number(Object.keys(this.relayerEnsSubdomains)[c])]=a}return e}),{}),l=!i||i===e,u=a>=o.pO;if(Object.keys(s).length&&l&&c&&u)return{ensName:n,relayerAddress:i,isRegistered:c,owner:e,stakeBalance:(0,d.ck)(a),hostnames:s,tovarishHost:b}})).filter((e=>e));yield k(this,s);const l=[...N,...s];return{lastBlock:a,timestamp:b,relayers:[...l.filter((e=>e.tovarishHost)),...l.filter((e=>!e.tovarishHost))]}}))}saveRelayers(e){return _(this,arguments,(function*({lastBlock:e,timestamp:a,relayers:t}){}))}updateRelayers(){return _(this,null,(function*(){let{lastBlock:e,timestamp:a,relayers:t,fromCache:c}=yield this.getSavedRelayers(),f=null!=c&&c;return(!t.length||a+this.updateInterval{"use strict";t.d(a,{Fb:()=>r,Oz:()=>i,f8:()=>b,w8:()=>n});var c=t(18995),f=t(71304),d=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));function r(e){return d(this,arguments,(function*({idb:e,instanceName:a,events:t,lastBlock:c}){try{yield e.createMultipleTransactions({data:t,storeName:a}),yield e.putItem({data:{blockNumber:c,name:a},storeName:"lastEvents"})}catch(e){console.log("Method saveDBEvents has error"),console.log(e)}}))}function n(e){return d(this,arguments,(function*({idb:e,instanceName:a}){try{const t=yield e.getItem({storeName:"lastEvents",key:a});return(null==t?void 0:t.blockNumber)?{events:yield e.getAll({storeName:a}),lastBlock:t.blockNumber}:{events:[],lastBlock:0}}catch(e){return console.log("Method loadDBEvents has error"),console.log(e),{events:[],lastBlock:0}}}))}function i(e){return d(this,arguments,(function*({staticUrl:e,instanceName:a,deployedBlock:t,zipDigest:f}){var d;try{const r=`${a}.json`.toLowerCase(),n=yield(0,c._6)({staticUrl:e,zipName:r,zipDigest:f});if(!Array.isArray(n)){const a=`Invalid events from ${e}/${r}`;throw new Error(a)}return{events:n,lastBlock:(null==(d=n[n.length-1])?void 0:d.blockNumber)||t,fromCache:!0}}catch(e){return console.log("Method loadRemoteEvents has error"),console.log(e),{events:[],lastBlock:t,fromCache:!0}}}))}class b extends f.e0{constructor(e){super(e),this.staticUrl=e.staticUrl,this.idb=e.idb}getEventsFromDB(){return d(this,null,(function*(){return yield n({idb:this.idb,instanceName:this.getInstanceName()})}))}getEventsFromCache(){return d(this,null,(function*(){return yield i({staticUrl:this.staticUrl,instanceName:this.getInstanceName(),deployedBlock:this.deployedBlock,zipDigest:this.zipDigest})}))}saveEvents(e){return d(this,arguments,(function*({events:e,lastBlock:a}){yield r({idb:this.idb,instanceName:this.getInstanceName(),events:e,lastBlock:a})}))}}},94513:(e,a,t)=>{"use strict";t.r(a),t.d(a,{BaseEchoService:()=>d.GS,BaseEncryptedNotesService:()=>d.O_,BaseEventsService:()=>d.uw,BaseGovernanceService:()=>d.JJ,BaseRegistryService:()=>d.cE,BaseTornadoService:()=>d.e0,DBTornadoService:()=>r.f8,DEPOSIT:()=>d.Lx,WITHDRAWAL:()=>d.oW,getTovarishNetworks:()=>d.EU,loadDBEvents:()=>r.w8,loadRemoteEvents:()=>r.Oz,saveDBEvents:()=>r.Fb});var c=t(61060),f={};for(const e in c)"default"!==e&&(f[e]=()=>c[e]);t.d(a,f);var d=t(71304),r=t(12591)},61060:()=>{},37182:(e,a,t)=>{"use strict";t.d(a,{N:()=>d,o:()=>r});var c=t(99770),f=t(79453);function d(e,a,t=18){const c=BigInt(10**Number(t));return BigInt(e)*c/BigInt(a)}class r{constructor(e){e&&(this.ovmGasPriceOracle=e)}fetchL1OptimismFee(e){return this.ovmGasPriceOracle?(e||(e={type:0,gasLimit:1e6,nonce:1024,data:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",gasPrice:(0,c.XS)("1","gwei"),to:"0x1111111111111111111111111111111111111111"}),this.ovmGasPriceOracle.getL1Fee.staticCall(f.Z.from(e).unsignedSerialized)):new Promise((e=>e(BigInt(0))))}defaultEthRefund(e,a){return(e?BigInt(e):(0,c.XS)("30","gwei"))*BigInt(a||1e6)}calculateTokenAmount(e,a,t){return d(e,a,t)}calculateRelayerFee({gasPrice:e,gasLimit:a=6e5,l1Fee:t=0,denomination:c,ethRefund:f=BigInt(0),tokenPriceInWei:r,tokenDecimals:n=18,relayerFeePercent:i=.33,isEth:b=!0,premiumPercent:o=20}){const s=BigInt(e)*BigInt(a)+BigInt(t),l=BigInt(c)*BigInt(Math.floor(1e4*i))/BigInt(1e6);return b?(s+l)*BigInt(o?100+o:100)/BigInt(100):(d(s+BigInt(f),r,n)+l)*BigInt(o?100+o:100)/BigInt(100)}}},52049:(e,a,t)=>{"use strict";t.r(a),t.d(a,{GET_DEPOSITS:()=>i,GET_ECHO_EVENTS:()=>s,GET_ENCRYPTED_NOTES:()=>l,GET_GOVERNANCE_APY:()=>h,GET_GOVERNANCE_EVENTS:()=>u,GET_NOTE_ACCOUNTS:()=>o,GET_REGISTERED:()=>n,GET_STATISTIC:()=>d,GET_WITHDRAWALS:()=>b,_META:()=>r,getAllDeposits:()=>P,getAllEncryptedNotes:()=>U,getAllGovernanceEvents:()=>H,getAllGraphEchoEvents:()=>F,getAllRegisters:()=>k,getAllWithdrawals:()=>O,getDeposits:()=>N,getEncryptedNotes:()=>Q,getGovernanceEvents:()=>j,getGraphEchoEvents:()=>T,getMeta:()=>L,getNoteAccounts:()=>D,getRegisters:()=>S,getStatistic:()=>B,getWithdrawals:()=>R,queryGraph:()=>M});var c=t(30031),f=t(68434);const d="\n query getStatistic($currency: String!, $amount: String!, $first: Int, $orderBy: BigInt, $orderDirection: String) {\n deposits(first: $first, orderBy: $orderBy, orderDirection: $orderDirection, where: { currency: $currency, amount: $amount }) {\n index\n timestamp\n blockNumber\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",r="\n query getMeta {\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",n="\n query getRegistered($first: Int, $fromBlock: Int) {\n relayers(first: $first, orderBy: blockRegistration, orderDirection: asc, where: {\n blockRegistration_gte: $fromBlock\n }) {\n id\n address\n ensName\n blockRegistration\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",i="\n query getDeposits($currency: String!, $amount: String!, $first: Int, $fromBlock: Int) {\n deposits(first: $first, orderBy: index, orderDirection: asc, where: { \n amount: $amount,\n currency: $currency,\n blockNumber_gte: $fromBlock\n }) {\n id\n blockNumber\n commitment\n index\n timestamp\n from\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",b="\n query getWithdrawals($currency: String!, $amount: String!, $first: Int, $fromBlock: Int!) {\n withdrawals(first: $first, orderBy: blockNumber, orderDirection: asc, where: { \n currency: $currency,\n amount: $amount,\n blockNumber_gte: $fromBlock\n }) {\n id\n blockNumber\n nullifier\n to\n fee\n timestamp\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",o="\n query getNoteAccount($address: String!) {\n noteAccounts(where: { address: $address }) {\n id\n index\n address\n encryptedAccount\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",s="\n query getNoteAccounts($first: Int, $fromBlock: Int) {\n noteAccounts(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n id\n blockNumber\n address\n encryptedAccount\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",l="\n query getEncryptedNotes($first: Int, $fromBlock: Int) {\n encryptedNotes(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n blockNumber\n index\n transactionHash\n encryptedNote\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",u="\n query getGovernanceEvents($first: Int, $fromBlock: Int) {\n proposals(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n blockNumber\n logIndex\n transactionHash\n proposalId\n proposer\n target\n startTime\n endTime\n description\n }\n votes(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n blockNumber\n logIndex\n transactionHash\n proposalId\n voter\n support\n votes\n from\n input\n }\n delegates(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n blockNumber\n logIndex\n transactionHash\n account\n delegateTo\n }\n undelegates(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n blockNumber\n logIndex\n transactionHash\n account\n delegateFrom\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",h="\n stakeDailyBurns(first: 30, orderBy: date, orderDirection: desc) {\n id\n date\n dailyAmountBurned\n }\n";var p=Object.defineProperty,g=Object.defineProperties,m=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,v=(e,a,t)=>a in e?p(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,w=(e,a)=>{for(var t in a||(a={}))y.call(a,t)&&v(e,t,a[t]);if(x)for(var t of x(a))A.call(a,t)&&v(e,t,a[t]);return e},_=(e,a)=>g(e,m(a)),I=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const E=e=>!Array.isArray(e)||!e.length,C=1e3;function M(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,query:t,variables:c,fetchDataOptions:d}){var r;const n=`${e}/subgraphs/name/${a}`,{data:i,errors:b}=yield(0,f.Fd)(n,_(w({},d),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:t,variables:c})}));if(b)throw new Error(JSON.stringify(b));if(null==(r=null==i?void 0:i._meta)?void 0:r.hasIndexingErrors)throw new Error("Subgraph has indexing errors");return i}))}function B(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,currency:t,amount:c,fetchDataOptions:f}){try{const{deposits:r,_meta:{block:{number:n}}}=yield M({graphApi:e,subgraphName:a,query:d,variables:{currency:t,first:10,orderBy:"index",orderDirection:"desc",amount:c},fetchDataOptions:f}),i=r.map((e=>({timestamp:Number(e.timestamp),leafIndex:Number(e.index),blockNumber:Number(e.blockNumber)}))).reverse(),[b]=i.slice(-1);return{events:i,lastSyncBlock:b&&b.blockNumber>=n?b.blockNumber+1:n}}catch(e){return console.log("Error from getStatistic query"),console.log(e),{events:[],lastSyncBlock:null}}}))}function L(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,fetchDataOptions:t}){try{const{_meta:{block:{number:c},hasIndexingErrors:f}}=yield M({graphApi:e,subgraphName:a,query:r,fetchDataOptions:t});return{lastSyncBlock:c,hasIndexingErrors:f}}catch(e){return console.log("Error from getMeta query"),console.log(e),{lastSyncBlock:null,hasIndexingErrors:null}}}))}function S({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c}){return M({graphApi:e,subgraphName:a,query:n,variables:{first:C,fromBlock:t},fetchDataOptions:c})}function k(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f,onProgress:d}){try{const r=[];let n=t;for(;;){let{relayers:c,_meta:{block:{number:i}}}=yield S({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f});if(n=i,E(c))break;const[b]=c,[o]=c.slice(-1);if("function"==typeof d&&d({type:"Registers",fromBlock:Number(b.blockRegistration),toBlock:Number(o.blockRegistration),count:c.length}),c.length<900){r.push(...c);break}c=c.filter((({blockRegistration:e})=>e!==o.blockRegistration)),t=Number(o.blockRegistration),r.push(...c)}return r.length?{events:r.map((({id:e,address:a,ensName:t,blockRegistration:f})=>{const[d,r]=e.split("-");return{blockNumber:Number(f),logIndex:Number(r),transactionHash:d,ensName:t,relayerAddress:(0,c.b)(a)}})),lastSyncBlock:n}:{events:[],lastSyncBlock:n}}catch(e){return console.log("Error from getAllRegisters query"),console.log(e),{events:[],lastSyncBlock:t}}}))}function N({graphApi:e,subgraphName:a,currency:t,amount:c,fromBlock:f,fetchDataOptions:d}){return M({graphApi:e,subgraphName:a,query:i,variables:{currency:t,amount:c,first:C,fromBlock:f},fetchDataOptions:d})}function P(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,currency:t,amount:f,fromBlock:d,fetchDataOptions:r,onProgress:n}){try{const i=[];let b=d;for(;;){let{deposits:c,_meta:{block:{number:o}}}=yield N({graphApi:e,subgraphName:a,currency:t,amount:f,fromBlock:d,fetchDataOptions:r});if(b=o,E(c))break;const[s]=c,[l]=c.slice(-1);if("function"==typeof n&&n({type:"Deposits",fromBlock:Number(s.blockNumber),toBlock:Number(l.blockNumber),count:c.length}),c.length<900){i.push(...c);break}c=c.filter((({blockNumber:e})=>e!==l.blockNumber)),d=Number(l.blockNumber),i.push(...c)}if(!i.length)return{events:[],lastSyncBlock:b};const o=i.map((({id:e,blockNumber:a,commitment:t,index:f,timestamp:d,from:r})=>{const[n,i]=e.split("-");return{blockNumber:Number(a),logIndex:Number(i),transactionHash:n,commitment:t,leafIndex:Number(f),timestamp:Number(d),from:(0,c.b)(r)}})),[s]=o.slice(-1);return{events:o,lastSyncBlock:s&&s.blockNumber>=b?s.blockNumber+1:b}}catch(e){return console.log("Error from getAllDeposits query"),console.log(e),{events:[],lastSyncBlock:d}}}))}function R({graphApi:e,subgraphName:a,currency:t,amount:c,fromBlock:f,fetchDataOptions:d}){return M({graphApi:e,subgraphName:a,query:b,variables:{currency:t,amount:c,first:C,fromBlock:f},fetchDataOptions:d})}function O(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,currency:t,amount:f,fromBlock:d,fetchDataOptions:r,onProgress:n}){try{const i=[];let b=d;for(;;){let{withdrawals:c,_meta:{block:{number:o}}}=yield R({graphApi:e,subgraphName:a,currency:t,amount:f,fromBlock:d,fetchDataOptions:r});if(b=o,E(c))break;const[s]=c,[l]=c.slice(-1);if("function"==typeof n&&n({type:"Withdrawals",fromBlock:Number(s.blockNumber),toBlock:Number(l.blockNumber),count:c.length}),c.length<900){i.push(...c);break}c=c.filter((({blockNumber:e})=>e!==l.blockNumber)),d=Number(l.blockNumber),i.push(...c)}if(!i.length)return{events:[],lastSyncBlock:b};const o=i.map((({id:e,blockNumber:a,nullifier:t,to:f,fee:d,timestamp:r})=>{const[n,i]=e.split("-");return{blockNumber:Number(a),logIndex:Number(i),transactionHash:n,nullifierHash:t,to:(0,c.b)(f),fee:d,timestamp:Number(r)}})),[s]=o.slice(-1);return{events:o,lastSyncBlock:s&&s.blockNumber>=b?s.blockNumber+1:b}}catch(e){return console.log("Error from getAllWithdrawals query"),console.log(e),{events:[],lastSyncBlock:d}}}))}function D(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,address:t,fetchDataOptions:c}){try{const{noteAccounts:f,_meta:{block:{number:d}}}=yield M({graphApi:e,subgraphName:a,query:o,variables:{address:t.toLowerCase()},fetchDataOptions:c});return{events:f,lastSyncBlock:d}}catch(e){return console.log("Error from getNoteAccounts query"),console.log(e),{events:[],lastSyncBlock:null}}}))}function T({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c}){return M({graphApi:e,subgraphName:a,query:s,variables:{first:C,fromBlock:t},fetchDataOptions:c})}function F(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f,onProgress:d}){try{const r=[];let n=t;for(;;){let{noteAccounts:c,_meta:{block:{number:i}}}=yield T({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f});if(n=i,E(c))break;const[b]=c,[o]=c.slice(-1);if("function"==typeof d&&d({type:"EchoEvents",fromBlock:Number(b.blockNumber),toBlock:Number(o.blockNumber),count:c.length}),c.length<900){r.push(...c);break}c=c.filter((({blockNumber:e})=>e!==o.blockNumber)),t=Number(o.blockNumber),r.push(...c)}if(!r.length)return{events:[],lastSyncBlock:n};const i=r.map((e=>{const[a,t]=e.id.split("-");return{blockNumber:Number(e.blockNumber),logIndex:Number(t),transactionHash:a,address:(0,c.b)(e.address),encryptedAccount:e.encryptedAccount}})),[b]=i.slice(-1);return{events:i,lastSyncBlock:b&&b.blockNumber>=n?b.blockNumber+1:n}}catch(e){return console.log("Error from getAllGraphEchoEvents query"),console.log(e),{events:[],lastSyncBlock:t}}}))}function Q({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c}){return M({graphApi:e,subgraphName:a,query:l,variables:{first:C,fromBlock:t},fetchDataOptions:c})}function U(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c,onProgress:f}){try{const d=[];let r=t;for(;;){let{encryptedNotes:n,_meta:{block:{number:i}}}=yield Q({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c});if(r=i,E(n))break;const[b]=n,[o]=n.slice(-1);if("function"==typeof f&&f({type:"EncryptedNotes",fromBlock:Number(b.blockNumber),toBlock:Number(o.blockNumber),count:n.length}),n.length<900){d.push(...n);break}n=n.filter((({blockNumber:e})=>e!==o.blockNumber)),t=Number(o.blockNumber),d.push(...n)}if(!d.length)return{events:[],lastSyncBlock:r};const n=d.map((e=>({blockNumber:Number(e.blockNumber),logIndex:Number(e.index),transactionHash:e.transactionHash,encryptedNote:e.encryptedNote}))),[i]=n.slice(-1);return{events:n,lastSyncBlock:i&&i.blockNumber>=r?i.blockNumber+1:r}}catch(e){return console.log("Error from getAllEncryptedNotes query"),console.log(e),{events:[],lastSyncBlock:t}}}))}function j({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c}){return M({graphApi:e,subgraphName:a,query:u,variables:{first:C,fromBlock:t},fetchDataOptions:c})}function H(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f,onProgress:d}){try{const r=[];let n=t;for(;;){const{proposals:i,votes:b,delegates:o,undelegates:s,_meta:{block:{number:l}}}=yield j({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f});n=l;const u=i.length+b.length+o.length+s.length;if(0===u)break;const h=i.map((({blockNumber:e,logIndex:a,transactionHash:t,proposalId:f,proposer:d,target:r,startTime:n,endTime:i,description:b})=>({blockNumber:Number(e),logIndex:Number(a),transactionHash:t,event:"ProposalCreated",id:Number(f),proposer:(0,c.b)(d),target:(0,c.b)(r),startTime:Number(n),endTime:Number(i),description:b}))),p=b.map((({blockNumber:e,logIndex:a,transactionHash:t,proposalId:f,voter:d,support:r,votes:n,from:i,input:b})=>((!b||b.length>2048)&&(b=""),{blockNumber:Number(e),logIndex:Number(a),transactionHash:t,event:"Voted",proposalId:Number(f),voter:(0,c.b)(d),support:r,votes:n,from:(0,c.b)(i),input:b}))),g=o.map((({blockNumber:e,logIndex:a,transactionHash:t,account:f,delegateTo:d})=>({blockNumber:Number(e),logIndex:Number(a),transactionHash:t,event:"Delegated",account:(0,c.b)(f),delegateTo:(0,c.b)(d)}))),m=s.map((({blockNumber:e,logIndex:a,transactionHash:t,account:f,delegateFrom:d})=>({blockNumber:Number(e),logIndex:Number(a),transactionHash:t,event:"Undelegated",account:(0,c.b)(f),delegateFrom:(0,c.b)(d)})));let x=[...h,...p,...g,...m].sort(((e,a)=>e.blockNumber===a.blockNumber?e.logIndex-a.logIndex:e.blockNumber-a.blockNumber));if(u<900){r.push(...x);break}const[y]=x,[A]=x.slice(-1);"function"==typeof d&&d({type:"Governance Events",fromBlock:Number(y.blockNumber),toBlock:Number(A.blockNumber),count:u}),x=x.filter((({blockNumber:e})=>e!==A.blockNumber)),t=Number(A.blockNumber),r.push(...x)}const[i]=r.slice(-1);return{events:r,lastSyncBlock:i&&i.blockNumber>=n?i.blockNumber+1:n}}catch(e){return console.log("Error from getAllGovernance query"),console.log(e),{events:[],lastSyncBlock:t}}}))}},83968:(e,a,t)=>{"use strict";t.d(a,{Fl:()=>P,mc:()=>R,W7:()=>O});const c=(e,a)=>a.some((a=>e instanceof a));let f,d;const r=new WeakMap,n=new WeakMap,i=new WeakMap;let b={get(e,a,t){if(e instanceof IDBTransaction){if("done"===a)return r.get(e);if("store"===a)return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return l(e[a])},set:(e,a,t)=>(e[a]=t,!0),has:(e,a)=>e instanceof IDBTransaction&&("done"===a||"store"===a)||a in e};function o(e){b=e(b)}function s(e){return"function"==typeof e?(a=e,(d||(d=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(a)?function(...e){return a.apply(u(this),e),l(this.request)}:function(...e){return l(a.apply(u(this),e))}):(e instanceof IDBTransaction&&function(e){if(r.has(e))return;const a=new Promise(((a,t)=>{const c=()=>{e.removeEventListener("complete",f),e.removeEventListener("error",d),e.removeEventListener("abort",d)},f=()=>{a(),c()},d=()=>{t(e.error||new DOMException("AbortError","AbortError")),c()};e.addEventListener("complete",f),e.addEventListener("error",d),e.addEventListener("abort",d)}));r.set(e,a)}(e),c(e,f||(f=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,b):e);var a}function l(e){if(e instanceof IDBRequest)return function(e){const a=new Promise(((a,t)=>{const c=()=>{e.removeEventListener("success",f),e.removeEventListener("error",d)},f=()=>{a(l(e.result)),c()},d=()=>{t(e.error),c()};e.addEventListener("success",f),e.addEventListener("error",d)}));return i.set(a,e),a}(e);if(n.has(e))return n.get(e);const a=s(e);return a!==e&&(n.set(e,a),i.set(a,e)),a}const u=e=>i.get(e),h=["get","getKey","getAll","getAllKeys","count"],p=["put","add","delete","clear"],g=new Map;function m(e,a){if(!(e instanceof IDBDatabase)||a in e||"string"!=typeof a)return;if(g.get(a))return g.get(a);const t=a.replace(/FromIndex$/,""),c=a!==t,f=p.includes(t);if(!(t in(c?IDBIndex:IDBObjectStore).prototype)||!f&&!h.includes(t))return;const d=async function(e,...a){const d=this.transaction(e,f?"readwrite":"readonly");let r=d.store;return c&&(r=r.index(a.shift())),(await Promise.all([r[t](...a),f&&d.done]))[0]};return g.set(a,d),d}o((e=>({...e,get:(a,t,c)=>m(a,t)||e.get(a,t,c),has:(a,t)=>!!m(a,t)||e.has(a,t)})));const x=["continue","continuePrimaryKey","advance"],y={},A=new WeakMap,v=new WeakMap,w={get(e,a){if(!x.includes(a))return e[a];let t=y[a];return t||(t=y[a]=function(...e){A.set(this,v.get(this)[a](...e))}),t}};async function*_(...e){let a=this;if(a instanceof IDBCursor||(a=await a.openCursor(...e)),!a)return;const t=new Proxy(a,w);for(v.set(t,a),i.set(t,u(a));a;)yield t,a=await(A.get(t)||a.continue()),A.delete(t)}function I(e,a){return a===Symbol.asyncIterator&&c(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===a&&c(e,[IDBIndex,IDBObjectStore])}o((e=>({...e,get:(a,t,c)=>I(a,t)?_:e.get(a,t,c),has:(a,t)=>I(a,t)||e.has(a,t)})));var E=t(59499),C=Object.defineProperty,M=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable,S=(e,a,t)=>a in e?C(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,k=(e,a)=>{for(var t in a||(a={}))B.call(a,t)&&S(e,t,a[t]);if(M)for(var t of M(a))L.call(a,t)&&S(e,t,a[t]);return e},N=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const P="A mutation operation was attempted on a database that did not allow mutations.";class R{constructor({dbName:e,stores:a}){this.dbExists=!1,this.isBlocked=!1,this.options={upgrade(e){Object.values(e.objectStoreNames).forEach((a=>{e.deleteObjectStore(a)})),[{name:"keyval"},...a||[]].forEach((({name:a,keyPath:t,indexes:c})=>{const f=e.createObjectStore(a,{keyPath:t,autoIncrement:!0});Array.isArray(c)&&c.forEach((({name:e,unique:a=!1})=>{f.createIndex(e,e,{unique:a})}))}))}},this.dbName=e,this.dbVersion=34}initDB(){return N(this,null,(function*(){try{if(this.dbExists||this.isBlocked)return;this.db=yield function(e,a,{blocked:t,upgrade:c,blocking:f,terminated:d}={}){const r=indexedDB.open(e,a),n=l(r);return c&&r.addEventListener("upgradeneeded",(e=>{c(l(r.result),e.oldVersion,e.newVersion,l(r.transaction),e)})),t&&r.addEventListener("blocked",(e=>t(e.oldVersion,e.newVersion,e))),n.then((e=>{d&&e.addEventListener("close",(()=>d())),f&&e.addEventListener("versionchange",(e=>f(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),n}(this.dbName,this.dbVersion,this.options),this.db.addEventListener("onupgradeneeded",(()=>N(this,null,(function*(){yield this._removeExist()})))),this.dbExists=!0}catch(e){if(e.message.includes(P))return console.log("This browser does not support IndexedDB!"),void(this.isBlocked=!0);if(e.message.includes("less than the existing version"))return console.log(`Upgrading DB ${this.dbName} to ${this.dbVersion}`),void(yield this._removeExist());console.error(`Method initDB has error: ${e.message}`)}}))}_removeExist(){return N(this,null,(function*(){yield function(e,{blocked:a}={}){const t=indexedDB.deleteDatabase(e);return a&&t.addEventListener("blocked",(e=>a(e.oldVersion,e))),l(t).then((()=>{}))}(this.dbName),this.dbExists=!1,yield this.initDB()}))}getFromIndex(e){return N(this,arguments,(function*({storeName:e,indexName:a,key:t}){if(yield this.initDB(),this.db)try{return yield this.db.getFromIndex(e,a,t)}catch(e){throw new Error(`Method getFromIndex has error: ${e.message}`)}}))}getAllFromIndex(e){return N(this,arguments,(function*({storeName:e,indexName:a,key:t,count:c}){if(yield this.initDB(),!this.db)return[];try{return yield this.db.getAllFromIndex(e,a,t,c)}catch(e){throw new Error(`Method getAllFromIndex has error: ${e.message}`)}}))}getItem(e){return N(this,arguments,(function*({storeName:e,key:a}){if(yield this.initDB(),this.db)try{const t=this.db.transaction(e).objectStore(e);return yield t.get(a)}catch(e){throw new Error(`Method getItem has error: ${e.message}`)}}))}addItem(e){return N(this,arguments,(function*({storeName:e,data:a,key:t=""}){if(yield this.initDB(),this.db)try{const c=this.db.transaction(e,"readwrite");(yield c.objectStore(e).get(t))||(yield c.objectStore(e).add(a))}catch(e){throw new Error(`Method addItem has error: ${e.message}`)}}))}putItem(e){return N(this,arguments,(function*({storeName:e,data:a,key:t}){if(yield this.initDB(),this.db)try{const c=this.db.transaction(e,"readwrite");yield c.objectStore(e).put(a,t)}catch(e){throw new Error(`Method putItem has error: ${e.message}`)}}))}deleteItem(e){return N(this,arguments,(function*({storeName:e,key:a}){if(yield this.initDB(),this.db)try{const t=this.db.transaction(e,"readwrite");yield t.objectStore(e).delete(a)}catch(e){throw new Error(`Method deleteItem has error: ${e.message}`)}}))}getAll(e){return N(this,arguments,(function*({storeName:e}){if(yield this.initDB(),!this.db)return[];try{const a=this.db.transaction(e,"readonly");return yield a.objectStore(e).getAll()}catch(e){throw new Error(`Method getAll has error: ${e.message}`)}}))}getValue(e){return this.getItem({storeName:"keyval",key:e})}setValue(e,a){return this.putItem({storeName:"keyval",key:e,data:a})}delValue(e){return this.deleteItem({storeName:"keyval",key:e})}clearStore(e){return N(this,arguments,(function*({storeName:e,mode:a="readwrite"}){if(yield this.initDB(),this.db)try{const t=this.db.transaction(e,a);yield t.objectStore(e).clear()}catch(e){throw new Error(`Method clearStore has error: ${e.message}`)}}))}createTransactions(e){return N(this,arguments,(function*({storeName:e,data:a,mode:t="readwrite"}){if(yield this.initDB(),this.db)try{const c=this.db.transaction(e,t);yield c.objectStore(e).add(a),yield c.done}catch(e){throw new Error(`Method createTransactions has error: ${e.message}`)}}))}createMultipleTransactions(e){return N(this,arguments,(function*({storeName:e,data:a,index:t,mode:c="readwrite"}){if(yield this.initDB(),this.db)try{const f=this.db.transaction(e,c);for(const e of a)e&&(yield f.store.put(k(k({},e),t)))}catch(e){throw new Error(`Method createMultipleTransactions has error: ${e.message}`)}}))}}function O(e){return N(this,null,(function*(){if(!e){const e=new R({dbName:"tornado-core"});return yield e.initDB(),e}const a=[{name:"transactionHash",unique:!1},{name:"commitment",unique:!0}],t=[{name:"nullifierHash",unique:!0}],c=(0,E.zj)(e),{tokens:f,nativeCurrency:d}=c,r=[{name:"encrypted_events",keyPath:"transactionHash"},{name:"lastEvents",keyPath:"name",indexes:[{name:"name",unique:!1}]}];e===E.zr.MAINNET&&r.push({name:"register_events",keyPath:"ensName"}),Object.entries(f).forEach((([c,{instanceAddress:f}])=>{Object.keys(f).forEach((f=>{d===c&&r.push({name:`stringify_bloom_${e}_${c}_${f}`,keyPath:"hashBloom"}),r.push({name:`deposits_${e}_${c}_${f}`,keyPath:"leafIndex",indexes:a},{name:`withdrawals_${e}_${c}_${f}`,keyPath:"blockNumber",indexes:t},{name:`stringify_tree_${e}_${c}_${f}`,keyPath:"hashTree"})}))}));const n=new R({dbName:`tornado_core_${e}`,stores:r});return yield n.initDB(),n}))}},5217:(e,a,t)=>{"use strict";t.d(a,{s:()=>i});var c=t(47882),f=t(41217),d=t(67418),r=t(22901),n=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));class i{constructor({netId:e,amount:a,currency:t,Tornado:c,commitmentHex:f,merkleTreeHeight:d=20,emptyElement:r="21663839004416932945382355908790599225266501822907911457504978515578255421292",merkleWorkerPath:n}){const i=`${e}_${t}_${a}`;this.currency=t,this.amount=a,this.netId=Number(e),this.Tornado=c,this.instanceName=i,this.commitmentHex=f,this.merkleTreeHeight=d,this.emptyElement=r,this.merkleWorkerPath=n}createTree(e){return n(this,null,(function*(){const{hash:a}=yield r.f.getHash();if(this.merkleWorkerPath){console.log("Using merkleWorker\n");try{if(d.Ll){const t=new Promise(((a,t)=>{const f=new c.Worker(this.merkleWorkerPath,{workerData:{merkleTreeHeight:this.merkleTreeHeight,elements:e,zeroElement:this.emptyElement}});f.on("message",a),f.on("error",t),f.on("exit",(e=>{0!==e&&t(new Error(`Worker stopped with exit code ${e}`))}))}));return f.MerkleTree.deserialize(JSON.parse(yield t),a)}{const t=new Promise(((a,t)=>{const c=new Worker(this.merkleWorkerPath);c.onmessage=e=>{a(e.data)},c.onerror=e=>{t(e)},c.postMessage({merkleTreeHeight:this.merkleTreeHeight,elements:e,zeroElement:this.emptyElement})}));return f.MerkleTree.deserialize(JSON.parse(yield t),a)}}catch(e){console.log("merkleWorker failed, falling back to synchronous merkle tree"),console.log(e)}}return new f.MerkleTree(this.merkleTreeHeight,e,{zeroElement:this.emptyElement,hashFunction:a})}))}createPartialTree(e){return n(this,arguments,(function*({edge:e,elements:a}){const{hash:t}=yield r.f.getHash();if(this.merkleWorkerPath){console.log("Using merkleWorker\n");try{if(d.Ll){const d=new Promise(((t,f)=>{const d=new c.Worker(this.merkleWorkerPath,{workerData:{merkleTreeHeight:this.merkleTreeHeight,edge:e,elements:a,zeroElement:this.emptyElement}});d.on("message",t),d.on("error",f),d.on("exit",(e=>{0!==e&&f(new Error(`Worker stopped with exit code ${e}`))}))}));return f.PartialMerkleTree.deserialize(JSON.parse(yield d),t)}{const c=new Promise(((t,c)=>{const f=new Worker(this.merkleWorkerPath);f.onmessage=e=>{t(e.data)},f.onerror=e=>{c(e)},f.postMessage({merkleTreeHeight:this.merkleTreeHeight,edge:e,elements:a,zeroElement:this.emptyElement})}));return f.PartialMerkleTree.deserialize(JSON.parse(yield c),t)}}catch(e){console.log("merkleWorker failed, falling back to synchronous merkle tree"),console.log(e)}}return new f.PartialMerkleTree(this.merkleTreeHeight,e,a,{zeroElement:this.emptyElement,hashFunction:t})}))}verifyTree(e){return n(this,null,(function*(){console.log(`\nCreating deposit tree for ${this.netId} ${this.amount} ${this.currency.toUpperCase()} would take a while\n`),console.time("Created tree in");const a=yield this.createTree(e.map((({commitment:e})=>e)));if(console.timeEnd("Created tree in"),console.log(""),!(yield this.Tornado.isKnownRoot((0,d.$W)(BigInt(a.root))))){const e=`Deposit Event ${this.netId} ${this.amount} ${this.currency} is invalid`;throw new Error(e)}return a}))}}},22901:(e,a,t)=>{"use strict";t.d(a,{f:()=>r,p:()=>d});var c=t(90294),f=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));class d{constructor(){this.mimcPromise=this.initMimc()}initMimc(){return f(this,null,(function*(){this.sponge=yield(0,c.HI)(),this.hash=(e,a)=>{var t,c;return null==(c=this.sponge)?void 0:c.F.toString(null==(t=this.sponge)?void 0:t.multiHash([BigInt(e),BigInt(a)]))}}))}getHash(){return f(this,null,(function*(){return yield this.mimcPromise,{sponge:this.sponge,hash:this.hash}}))}}const r=new d},48486:(e,a,t)=>{"use strict";t.d(a,{C:()=>f});var c=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));function f(e,a){return c(this,null,(function*(){const t=a.map((e=>{var a,t,c;return{target:(null==(a=e.contract)?void 0:a.target)||e.address,callData:((null==(t=e.contract)?void 0:t.interface)||e.interface).encodeFunctionData(e.name,e.params),allowFailure:null!=(c=e.allowFailure)&&c}}));return(yield e.aggregate3.staticCall(t)).map(((e,t)=>{var c;const f=(null==(c=a[t].contract)?void 0:c.interface)||a[t].interface,[d,r]=e,n=d&&r&&"0x"!==r?f.decodeFunctionResult(a[t].name,r):null;return n?1===n.length?n[0]:n:null}))}))}},59499:(e,a,t)=>{"use strict";t.d(a,{AE:()=>u,Af:()=>s,RY:()=>h,Zh:()=>x,cX:()=>l,h9:()=>g,o2:()=>y,oY:()=>m,sb:()=>o,zj:()=>p,zr:()=>b});var c=Object.defineProperty,f=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,n=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,i=(e,a)=>{for(var t in a||(a={}))d.call(a,t)&&n(e,t,a[t]);if(f)for(var t of f(a))r.call(a,t)&&n(e,t,a[t]);return e},b=(e=>(e[e.MAINNET=1]="MAINNET",e[e.BSC=56]="BSC",e[e.POLYGON=137]="POLYGON",e[e.OPTIMISM=10]="OPTIMISM",e[e.ARBITRUM=42161]="ARBITRUM",e[e.GNOSIS=100]="GNOSIS",e[e.AVALANCHE=43114]="AVALANCHE",e[e.SEPOLIA=11155111]="SEPOLIA",e))(b||{});const o={1:{rpcCallRetryAttempt:15,gasPrices:{instant:80,fast:50,standard:25,low:8},nativeCurrency:"eth",currencyName:"ETH",explorerUrl:"https://etherscan.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Ethereum Mainnet",deployedBlock:9116966,rpcUrls:{mevblockerRPC:{name:"MevblockerRPC",url:"https://rpc.mevblocker.io"},keydonix:{name:"keydonix",url:"https://ethereum.keydonix.com/v1/mainnet"},SecureRpc:{name:"SecureRpc",url:"https://api.securerpc.com/v1"},stackup:{name:"Stackup RPC",url:"https://public.stackup.sh/api/v1/node/ethereum-mainnet"},oneRPC:{name:"1RPC",url:"https://1rpc.io/eth"}},multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0xd90e2f925DA726b50C4Ed8D0Fb90Ad053324F31b",echoContract:"0x9B27DD5Bb15d42DC224FCD0B7caEbBe16161Df42",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornContract:"0x77777FeDdddFfC19Ff86DB637967013e6C6A116C",governanceContract:"0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce",stakingRewardsContract:"0x5B3f656C80E8ddb9ec01Dd9018815576E9238c29",registryContract:"0x58E8dCC13BE9780fC42E8723D8EaD4CF46943dF2",aggregatorContract:"0xE8F47A78A6D52D317D0D2FFFac56739fE14D1b49",reverseRecordsContract:"0x3671aE578E63FdF66ad4F3E12CC0c0d71Ac7510C",tornadoSubgraph:"tornadocash/mainnet-tornado-subgraph",registrySubgraph:"tornadocash/tornado-relayer-registry",governanceSubgraph:"tornadocash/tornado-governance",subgraphs:{},tokens:{eth:{instanceAddress:{.1:"0x12D66f87A04A9E220743712cE6d9bB1B5616B8Fc",1:"0x47CE0C6eD5B0Ce3d3A51fdb1C52DC66a7c3c2936",10:"0x910Cbd523D972eb0a6f4cAe4618aD62622b39DbF",100:"0xA160cdAB225685dA1d56aa342Ad8841c3b53f291"},symbol:"ETH",decimals:18},dai:{instanceAddress:{100:"0xD4B88Df4D29F5CedD6857912842cff3b20C8Cfa3",1e3:"0xFD8610d20aA15b7B2E3Be39B396a1bC3516c7144",1e4:"0x07687e702b410Fa43f4cB4Af7FA097918ffD2730",1e5:"0x23773E65ed146A459791799d01336DB287f25334"},tokenAddress:"0x6B175474E89094C44Da98b954EedeAC495271d0F",tokenGasLimit:7e4,symbol:"DAI",decimals:18,gasLimit:7e5},cdai:{instanceAddress:{5e3:"0x22aaA7720ddd5388A3c0A3333430953C68f1849b",5e4:"0x03893a7c7463AE47D46bc7f091665f1893656003",5e5:"0x2717c5e28cf931547B621a5dddb772Ab6A35B701",5e6:"0xD21be7248e0197Ee08E0c20D4a96DEBdaC3D20Af"},tokenAddress:"0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643",tokenGasLimit:2e5,symbol:"cDAI",decimals:8,gasLimit:7e5},usdc:{instanceAddress:{100:"0xd96f2B1c14Db8458374d9Aca76E26c3D18364307",1e3:"0x4736dCf1b7A3d580672CcE6E7c65cd5cc9cFBa9D"},tokenAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",tokenGasLimit:7e4,symbol:"USDC",decimals:6,gasLimit:7e5},usdt:{instanceAddress:{100:"0x169AD27A470D064DEDE56a2D3ff727986b15D52B",1e3:"0x0836222F2B2B24A3F36f98668Ed8F0B38D1a872f"},tokenAddress:"0xdAC17F958D2ee523a2206206994597C13D831ec7",tokenGasLimit:7e4,symbol:"USDT",decimals:6,gasLimit:7e5},wbtc:{instanceAddress:{.1:"0x178169B423a011fff22B9e3F3abeA13414dDD0F1",1:"0x610B717796ad172B316836AC95a2ffad065CeaB4",10:"0xbB93e510BbCD0B7beb5A853875f9eC60275CF498"},tokenAddress:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",tokenGasLimit:7e4,symbol:"WBTC",decimals:8,gasLimit:7e5}},disabledTokens:["cdai","usdt","usdc"],relayerEnsSubdomain:"mainnet-tornado",pollInterval:15,constants:{GOVERNANCE_BLOCK:11474695,NOTE_ACCOUNT_BLOCK:11842486,ENCRYPTED_NOTES_BLOCK:12143762,REGISTRY_BLOCK:14173129,MINING_BLOCK_TIME:15}},56:{rpcCallRetryAttempt:15,gasPrices:{instant:5,fast:5,standard:5,low:5},nativeCurrency:"bnb",currencyName:"BNB",explorerUrl:"https://bscscan.com",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Binance Smart Chain",deployedBlock:8158799,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornadoSubgraph:"tornadocash/bsc-tornado-subgraph",subgraphs:{},rpcUrls:{bnbchain:{name:"BNB Chain",url:"https://bsc-dataseed.bnbchain.org"},ninicoin:{name:"ninicoin",url:"https://bsc-dataseed1.ninicoin.io"},nodereal:{name:"NodeReal",url:"https://binance.nodereal.io"},stackup:{name:"Stackup RPC",url:"https://public.stackup.sh/api/v1/node/bsc-mainnet"},oneRPC:{name:"1RPC",url:"https://1rpc.io/bnb"}},tokens:{bnb:{instanceAddress:{.1:"0x84443CFd09A48AF6eF360C6976C5392aC5023a1F",1:"0xd47438C816c9E7f2E2888E060936a499Af9582b3",10:"0x330bdFADE01eE9bF63C209Ee33102DD334618e0a",100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD"},symbol:"BNB",decimals:18}},relayerEnsSubdomain:"bsc-tornado",pollInterval:10,constants:{NOTE_ACCOUNT_BLOCK:8159269,ENCRYPTED_NOTES_BLOCK:8159269}},137:{rpcCallRetryAttempt:15,gasPrices:{instant:100,fast:75,standard:50,low:30},nativeCurrency:"matic",currencyName:"MATIC",explorerUrl:"https://polygonscan.com",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Polygon (Matic) Network",deployedBlock:16257962,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornadoSubgraph:"tornadocash/matic-tornado-subgraph",subgraphs:{},rpcUrls:{oneRpc:{name:"1RPC",url:"https://1rpc.io/matic"},stackup:{name:"Stackup RPC",url:"https://public.stackup.sh/api/v1/node/polygon-mainnet"}},tokens:{matic:{instanceAddress:{100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD",1e3:"0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178",1e4:"0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040",1e5:"0xa5C2254e4253490C54cef0a4347fddb8f75A4998"},symbol:"MATIC",decimals:18}},relayerEnsSubdomain:"polygon-tornado",pollInterval:10,constants:{NOTE_ACCOUNT_BLOCK:16257996,ENCRYPTED_NOTES_BLOCK:16257996}},10:{rpcCallRetryAttempt:15,gasPrices:{instant:.001,fast:.001,standard:.001,low:.001},nativeCurrency:"eth",currencyName:"ETH",explorerUrl:"https://optimistic.etherscan.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Optimism",deployedBlock:2243689,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",ovmGasPriceOracleContract:"0x420000000000000000000000000000000000000F",tornadoSubgraph:"tornadocash/optimism-tornado-subgraph",subgraphs:{},rpcUrls:{optimism:{name:"Optimism",url:"https://mainnet.optimism.io"},stackup:{name:"Stackup RPC",url:"https://public.stackup.sh/api/v1/node/optimism-mainnet"},oneRpc:{name:"1RPC",url:"https://1rpc.io/op"}},tokens:{eth:{instanceAddress:{.1:"0x84443CFd09A48AF6eF360C6976C5392aC5023a1F",1:"0xd47438C816c9E7f2E2888E060936a499Af9582b3",10:"0x330bdFADE01eE9bF63C209Ee33102DD334618e0a",100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD"},symbol:"ETH",decimals:18}},relayerEnsSubdomain:"optimism-tornado",pollInterval:15,constants:{NOTE_ACCOUNT_BLOCK:2243694,ENCRYPTED_NOTES_BLOCK:2243694}},42161:{rpcCallRetryAttempt:15,gasPrices:{instant:4,fast:3,standard:2.52,low:2.29},nativeCurrency:"eth",currencyName:"ETH",explorerUrl:"https://arbiscan.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Arbitrum One",deployedBlock:3430648,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornadoSubgraph:"tornadocash/arbitrum-tornado-subgraph",subgraphs:{},rpcUrls:{Arbitrum:{name:"Arbitrum RPC",url:"https://arb1.arbitrum.io/rpc"},stackup:{name:"Stackup RPC",url:"https://public.stackup.sh/api/v1/node/arbitrum-one"},oneRpc:{name:"1rpc",url:"https://1rpc.io/arb"}},tokens:{eth:{instanceAddress:{.1:"0x84443CFd09A48AF6eF360C6976C5392aC5023a1F",1:"0xd47438C816c9E7f2E2888E060936a499Af9582b3",10:"0x330bdFADE01eE9bF63C209Ee33102DD334618e0a",100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD"},symbol:"ETH",decimals:18}},relayerEnsSubdomain:"arbitrum-tornado",pollInterval:15,constants:{NOTE_ACCOUNT_BLOCK:3430605,ENCRYPTED_NOTES_BLOCK:3430605}},100:{rpcCallRetryAttempt:15,gasPrices:{instant:6,fast:5,standard:4,low:1},nativeCurrency:"xdai",currencyName:"xDAI",explorerUrl:"https://gnosisscan.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Gnosis Chain",deployedBlock:17754561,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornadoSubgraph:"tornadocash/xdai-tornado-subgraph",subgraphs:{},rpcUrls:{gnosis:{name:"Gnosis",url:"https://rpc.gnosischain.com"},blockPi:{name:"BlockPi",url:"https://gnosis.blockpi.network/v1/rpc/public"},oneRpc:{name:"1rpc",url:"https://1rpc.io/gnosis"}},tokens:{xdai:{instanceAddress:{100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD",1e3:"0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178",1e4:"0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040",1e5:"0xa5C2254e4253490C54cef0a4347fddb8f75A4998"},symbol:"xDAI",decimals:18}},relayerEnsSubdomain:"gnosis-tornado",pollInterval:15,constants:{NOTE_ACCOUNT_BLOCK:17754564,ENCRYPTED_NOTES_BLOCK:17754564}},43114:{rpcCallRetryAttempt:15,gasPrices:{instant:225,fast:35,standard:25,low:25},nativeCurrency:"avax",currencyName:"AVAX",explorerUrl:"https://snowtrace.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Avalanche Mainnet",deployedBlock:4429818,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornadoSubgraph:"tornadocash/avalanche-tornado-subgraph",subgraphs:{},rpcUrls:{publicRpc:{name:"Avalanche RPC",url:"https://api.avax.network/ext/bc/C/rpc"},oneRPC:{name:"OneRPC",url:"https://1rpc.io/avax/c"}},tokens:{avax:{instanceAddress:{10:"0x330bdFADE01eE9bF63C209Ee33102DD334618e0a",100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD",500:"0xaf8d1839c3c67cf571aa74B5c12398d4901147B3"},symbol:"AVAX",decimals:18}},relayerEnsSubdomain:"avalanche-tornado",pollInterval:10,constants:{NOTE_ACCOUNT_BLOCK:4429813,ENCRYPTED_NOTES_BLOCK:4429813}},11155111:{rpcCallRetryAttempt:15,gasPrices:{instant:2,fast:2,standard:2,low:2},nativeCurrency:"eth",currencyName:"SepoliaETH",explorerUrl:"https://sepolia.etherscan.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Ethereum Sepolia",deployedBlock:5594395,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x1572AFE6949fdF51Cb3E0856216670ae9Ee160Ee",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",tornContract:"0x3AE6667167C0f44394106E197904519D808323cA",governanceContract:"0xe5324cD7602eeb387418e594B87aCADee08aeCAD",stakingRewardsContract:"0x6d0018890751Efd31feb8166711B16732E2b496b",registryContract:"0x1428e5d2356b13778A13108b10c440C83011dfB8",aggregatorContract:"0x4088712AC9fad39ea133cdb9130E465d235e9642",reverseRecordsContract:"0xEc29700C0283e5Be64AcdFe8077d6cC95dE23C23",tornadoSubgraph:"tornadocash/sepolia-tornado-subgraph",subgraphs:{},rpcUrls:{sepolia:{name:"Sepolia RPC",url:"https://rpc.sepolia.org"},stackup:{name:"Stackup",url:"https://public.stackup.sh/api/v1/node/ethereum-sepolia"},onerpc:{name:"1rpc",url:"https://1rpc.io/sepolia"},ethpandaops:{name:"ethpandaops",url:"https://rpc.sepolia.ethpandaops.io"}},tokens:{eth:{instanceAddress:{.1:"0x8C4A04d872a6C1BE37964A21ba3a138525dFF50b",1:"0x8cc930096B4Df705A007c4A039BDFA1320Ed2508",10:"0x8D10d506D29Fc62ABb8A290B99F66dB27Fc43585",100:"0x44c5C92ed73dB43888210264f0C8b36Fd68D8379"},symbol:"ETH",decimals:18},dai:{instanceAddress:{100:"0x6921fd1a97441dd603a997ED6DDF388658daf754",1e3:"0x50a637770F5d161999420F7d70d888DE47207145",1e4:"0xecD649870407cD43923A816Cc6334a5bdf113621",1e5:"0x73B4BD04bF83206B6e979BE2507098F92EDf4F90"},tokenAddress:"0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357",tokenGasLimit:7e4,symbol:"DAI",decimals:18,gasLimit:7e5}},relayerEnsSubdomain:"sepolia-tornado",pollInterval:15,constants:{GOVERNANCE_BLOCK:5594395,NOTE_ACCOUNT_BLOCK:5594395,ENCRYPTED_NOTES_BLOCK:5594395,MINING_BLOCK_TIME:15}}},s=Object.values(b).filter((e=>"number"==typeof e));let l={};function u(e){s.push(...Object.keys(e).map((e=>Number(e))).filter((e=>!s.includes(e)))),l=i(i({},l),e)}function h(){const e=i(i({},o),l);return s.reduce(((a,t)=>(a[t]=e[t],a)),{})}function p(e){const a=h()[e];if(!a)throw new Error(`No config found for network ${e}!`);return a}function g(e){const{tokens:a,disabledTokens:t}=e;return Object.keys(a).filter((e=>!(null==t?void 0:t.includes(e))))}function m(e){const{tokens:a,disabledTokens:t}=e;return Object.entries(a).reduce(((e,[a,c])=>((null==t?void 0:t.includes(a))||(e[a]=c),e)),{})}function x(e,a){const{tokens:t,disabledTokens:c}=e;for(const[e,{instanceAddress:f}]of Object.entries(t))if(!(null==c?void 0:c.includes(e)))for(const[t,c]of Object.entries(f))if(c===a)return{amount:t,currency:e}}function y(){const e=h();return s.reduce(((a,t)=>(a[t]=e[t].relayerEnsSubdomain,a)),{})}},85111:(e,a,t)=>{"use strict";t.d(a,{Hr:()=>d,NO:()=>r,UB:()=>n});var c=t(90294),f=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));class d{constructor(){this.pedersenPromise=this.initPedersen()}initPedersen(){return f(this,null,(function*(){this.pedersenHash=yield(0,c.vu)(),this.babyJub=this.pedersenHash.babyJub}))}unpackPoint(e){return f(this,null,(function*(){var a,t;return yield this.pedersenPromise,null==(t=this.babyJub)?void 0:t.unpackPoint(null==(a=this.pedersenHash)?void 0:a.hash(e))}))}toStringBuffer(e){var a;return null==(a=this.babyJub)?void 0:a.F.toString(e)}}const r=new d;function n(e){return f(this,null,(function*(){const[a]=yield r.unpackPoint(e);return r.toStringBuffer(a)}))}},34525:(e,a,t)=>{"use strict";t.d(a,{T:()=>d});var c=t(99770),f=t(48486);class d{constructor(e,a,t){this.provider=e,this.multicall=a,this.oracle=t}fetchPrices(e){return a=this,t=function*(){return this.oracle?(yield(0,f.C)(this.multicall,e.map((({tokenAddress:e})=>({contract:this.oracle,name:"getRateToEth",params:[e,!0]}))))).map(((a,t)=>a*BigInt(10**e[t].decimals)/BigInt(10**18))):new Promise((a=>a(e.map((()=>(0,c.g5)("0.0001"))))))},new Promise(((e,c)=>{var f=e=>{try{r(t.next(e))}catch(e){c(e)}},d=e=>{try{r(t.throw(e))}catch(e){c(e)}},r=a=>a.done?e(a.value):Promise.resolve(a.value).then(f,d);r((t=t.apply(a,null)).next())}));var a,t}}},68434:(e,a,t)=>{"use strict";t.d(a,{D2:()=>of,Vr:()=>bf,Gd:()=>nf,nA:()=>rf,mJ:()=>Yc,hd:()=>Xc,Fd:()=>af,uY:()=>tf,WU:()=>ef,sO:()=>cf,MF:()=>ff,zr:()=>df});var c=t(74945),f=t.n(c),d=t(36212),r=t(57339),n=t(88081),i=t(87303);function b(e){return async function(e,a){(0,r.vA)(null==a||!a.cancelled,"request cancelled before sending","CANCELLED");const t=e.url.split(":")[0].toLowerCase();(0,r.vA)("http"===t||"https"===t,`unsupported protocol ${t}`,"UNSUPPORTED_OPERATION",{info:{protocol:t},operation:"request"}),(0,r.vA)("https"===t||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let c=null;const f=new AbortController,d=setTimeout((()=>{c=(0,r.xz)("request timeout","TIMEOUT"),f.abort()}),e.timeout);a&&a.addListener((()=>{c=(0,r.xz)("request cancelled","CANCELLED"),f.abort()}));const n={method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:f.signal};let i;try{i=await fetch(e.url,n)}catch(e){if(clearTimeout(d),c)throw c;throw e}clearTimeout(d);const b={};i.headers.forEach(((e,a)=>{b[a.toLowerCase()]=e}));const o=await i.arrayBuffer(),s=null==o?null:new Uint8Array(o);return{statusCode:i.status,statusMessage:i.statusText,headers:b,body:s}}}b();let o=b();const s=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),l=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let u=!1;async function h(e,a){try{const a=e.match(s);if(!a)throw new Error("invalid data");return new v(200,"OK",{"content-type":a[1]||"text/plain"},a[2]?function(e){e=atob(e);const a=new Uint8Array(e.length);for(let t=0;tString.fromCharCode(parseInt(a,16)))))))}catch(a){return new v(599,"BAD REQUEST (invalid data: URI)",{},null,new A(e))}var t}function p(e){return async function(a,t){try{const t=a.match(l);if(!t)throw new Error("invalid link");return new A(`${e}${t[2]}`)}catch(e){return new v(599,"BAD REQUEST (invalid IPFS URI)",{},null,new A(a))}}}const g={data:h,ipfs:p("https://gateway.ipfs.io/ipfs/")},m=new WeakMap;class x{#e;#a;constructor(e){this.#e=[],this.#a=!1,m.set(e,(()=>{if(!this.#a){this.#a=!0;for(const e of this.#e)setTimeout((()=>{e()}),0);this.#e=[]}}))}addListener(e){(0,r.vA)(!this.#a,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#e.push(e)}get cancelled(){return this.#a}checkSignal(){(0,r.vA)(!this.cancelled,"cancelled","CANCELLED",{})}}function y(e){if(null==e)throw new Error("missing signal; should not happen");return e.checkSignal(),e}class A{#t;#c;#f;#d;#r;#n;#i;#b;#o;#s;#l;#u;#h;#p;#g;get url(){return this.#n}set url(e){this.#n=String(e)}get body(){return null==this.#i?null:new Uint8Array(this.#i)}set body(e){if(null==e)this.#i=void 0,this.#b=void 0;else if("string"==typeof e)this.#i=(0,i.YW)(e),this.#b="text/plain";else if(e instanceof Uint8Array)this.#i=e,this.#b="application/octet-stream";else{if("object"!=typeof e)throw new Error("invalid body");this.#i=(0,i.YW)(JSON.stringify(e)),this.#b="application/json"}}hasBody(){return null!=this.#i}get method(){return this.#d?this.#d:this.hasBody()?"POST":"GET"}set method(e){null==e&&(e=""),this.#d=String(e).toUpperCase()}get headers(){const e=Object.assign({},this.#f);return this.#o&&(e.authorization=`Basic ${function(e){const a=(0,d.q5)(e);let t="";for(let e=0;e{if(t=0,"timeout must be non-zero","timeout",e),this.#r=e}get preflightFunc(){return this.#s||null}set preflightFunc(e){this.#s=e}get processFunc(){return this.#l||null}set processFunc(e){this.#l=e}get retryFunc(){return this.#u||null}set retryFunc(e){this.#u=e}get getUrlFunc(){return this.#g||o}set getUrlFunc(e){this.#g=e}constructor(e){this.#n=String(e),this.#t=!1,this.#c=!0,this.#f={},this.#d="",this.#r=3e5,this.#p={slotInterval:250,maxAttempts:12},this.#g=null}toString(){return``}setThrottleParams(e){null!=e.slotInterval&&(this.#p.slotInterval=e.slotInterval),null!=e.maxAttempts&&(this.#p.maxAttempts=e.maxAttempts)}async#m(e,a,t,c,f){if(e>=this.#p.maxAttempts)return f.makeServerError("exceeded maximum retry limit");(0,r.vA)(w()<=a,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:c}),t>0&&await function(e){return new Promise((a=>setTimeout(a,e)))}(t);let d=this.clone();const n=(d.url.split(":")[0]||"").toLowerCase();if(n in g){const e=await g[n](d.url,y(c.#h));if(e instanceof v){let a=e;if(this.processFunc){y(c.#h);try{a=await this.processFunc(d,a)}catch(e){null!=e.throttle&&"number"==typeof e.stall||a.makeServerError("error in post-processing function",e).assertOk()}}return a}d=e}this.preflightFunc&&(d=await this.preflightFunc(d));const i=await this.getUrlFunc(d,y(c.#h));let b=new v(i.statusCode,i.statusMessage,i.headers,i.body,c);if(301===b.statusCode||302===b.statusCode){try{const t=b.headers.location||"";return d.redirect(t).#m(e+1,a,0,c,b)}catch(e){}return b}if(429===b.statusCode&&(null==this.retryFunc||await this.retryFunc(d,b,e))){const t=b.headers["retry-after"];let f=this.#p.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return"string"==typeof t&&t.match(/^[1-9][0-9]*$/)&&(f=parseInt(t)),d.clone().#m(e+1,a,f,c,b)}if(this.processFunc){y(c.#h);try{b=await this.processFunc(d,b)}catch(t){null!=t.throttle&&"number"==typeof t.stall||b.makeServerError("error in post-processing function",t).assertOk();let f=this.#p.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return t.stall>=0&&(f=t.stall),d.clone().#m(e+1,a,f,c,b)}}return b}send(){return(0,r.vA)(null==this.#h,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#h=new x(this),this.#m(0,w()+this.timeout,0,this,new v(0,"",{},null,this))}cancel(){(0,r.vA)(null!=this.#h,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=m.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const a=this.url.split(":")[0].toLowerCase(),t=e.split(":")[0].toLowerCase();(0,r.vA)("GET"===this.method&&("https"!==a||"http"!==t)&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const c=new A(e);return c.method="GET",c.allowGzip=this.allowGzip,c.timeout=this.timeout,c.#f=Object.assign({},this.#f),this.#i&&(c.#i=new Uint8Array(this.#i)),c.#b=this.#b,c}clone(){const e=new A(this.url);return e.#d=this.#d,this.#i&&(e.#i=this.#i),e.#b=this.#b,e.#f=Object.assign({},this.#f),e.#o=this.#o,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#s=this.#s,e.#l=this.#l,e.#u=this.#u,e.#p=Object.assign({},this.#p),e.#g=this.#g,e}static lockConfig(){u=!0}static getGateway(e){return g[e.toLowerCase()]||null}static registerGateway(e,a){if("http"===(e=e.toLowerCase())||"https"===e)throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(u)throw new Error("gateways locked");g[e]=a}static registerGetUrl(e){if(u)throw new Error("gateways locked");o=e}static createGetUrlFunc(e){return b()}static createDataGateway(){return h}static createIpfsGatewayFunc(e){return p(e)}}class v{#x;#y;#f;#i;#A;#v;toString(){return``}get statusCode(){return this.#x}get statusMessage(){return this.#y}get headers(){return Object.assign({},this.#f)}get body(){return null==this.#i?null:new Uint8Array(this.#i)}get bodyText(){try{return null==this.#i?"":(0,i._v)(this.#i)}catch(e){(0,r.vA)(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(e){(0,r.vA)(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,a=Object.keys(e);let t=0;return{next:()=>{if(t(e[a.toLowerCase()]=String(t[a]),e)),{}),this.#i=null==c?null:new Uint8Array(c),this.#A=f||null,this.#v={message:""}}makeServerError(e,a){let t;t=e?`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:`CLIENT ESCALATED SERVER ERROR (${e=`${this.statusCode} ${this.statusMessage}`})`;const c=new v(599,t,this.headers,this.body,this.#A||void 0);return c.#v={message:e,error:a},c}throwThrottleError(e,a){null==a?a=-1:(0,r.MR)(Number.isInteger(a)&&a>=0,"invalid stall timeout","stall",a);const t=new Error(e||"throttling requests");throw(0,n.n)(t,{stall:a,throttle:!0}),t}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return null!=this.#i}get request(){return this.#A}ok(){return""===this.#v.message&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:a}=this.#v;""===e&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let t=null;this.request&&(t=this.request.url);let c=null;try{this.#i&&(c=(0,i._v)(this.#i))}catch(e){}(0,r.vA)(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:a,info:{requestUrl:t,responseBody:c,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function w(){return(new Date).getTime()}var _=t(35273),I=t(30031),E=t(41442),C=t(15539),M=t(27033),B=t(38264);const L=new Uint8Array(32);L.fill(0);const S=BigInt(-1),k=BigInt(0),N=BigInt(1),P=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),R=(0,M.up)(N,32),O=(0,M.up)(k,32),D={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},T=["name","version","chainId","verifyingContract","salt"];function F(e){return function(a){return(0,r.MR)("string"==typeof a,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,a),a}}const Q={name:F("name"),version:F("version"),chainId:function(e){const a=(0,M.Ab)(e,"domain.chainId");return(0,r.MR)(a>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(a)?Number(a):(0,M.nD)(a)},verifyingContract:function(e){try{return(0,I.b)(e).toLowerCase()}catch(e){}(0,r.MR)(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const a=(0,d.q5)(e,"domain.salt");return(0,r.MR)(32===a.length,'invalid domain value "salt"',"domain.salt",e),(0,d.c$)(a)}};function U(e){{const a=e.match(/^(u?)int(\d+)$/);if(a){const t=""===a[1],c=parseInt(a[2]);(0,r.MR)(c%8==0&&0!==c&&c<=256&&a[2]===String(c),"invalid numeric width","type",e);const f=(0,M.dK)(P,t?c-1:c),d=t?(f+N)*S:k;return function(a){const c=(0,M.Ab)(a,"value");return(0,r.MR)(c>=d&&c<=f,`value out-of-bounds for ${e}`,"value",c),(0,M.up)(t?(0,M.JJ)(c,256):c,32)}}}{const a=e.match(/^bytes(\d+)$/);if(a){const t=parseInt(a[1]);return(0,r.MR)(0!==t&&t<=32&&a[1]===String(t),"invalid bytes width","type",e),function(a){const c=(0,d.q5)(a);return(0,r.MR)(c.length===t,`invalid length for ${e}`,"value",a),function(e){const a=(0,d.q5)(e),t=a.length%32;return t?(0,d.xW)([a,L.slice(t)]):(0,d.c$)(a)}(a)}}}switch(e){case"address":return function(e){return(0,d.nx)((0,I.b)(e),32)};case"bool":return function(e){return e?R:O};case"bytes":return function(e){return(0,C.S)(e)};case"string":return function(e){return(0,B.id)(e)}}return null}function j(e,a){return`${e}(${a.map((({name:e,type:a})=>a+" "+e)).join(",")})`}function H(e){const a=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return a?{base:a[1],index:a[2]+a[4],array:{base:a[1],prefix:a[1]+a[2],count:a[5]?parseInt(a[5]):-1}}:{base:e}}class ${primaryType;#w;get types(){return JSON.parse(this.#w)}#_;#I;constructor(e){this.#_=new Map,this.#I=new Map;const a=new Map,t=new Map,c=new Map,f={};Object.keys(e).forEach((d=>{f[d]=e[d].map((({name:a,type:t})=>{let{base:c,index:f}=H(t);return"int"!==c||e.int||(c="int256"),"uint"!==c||e.uint||(c="uint256"),{name:a,type:c+(f||"")}})),a.set(d,new Set),t.set(d,[]),c.set(d,new Set)})),this.#w=JSON.stringify(f);for(const c in f){const d=new Set;for(const n of f[c]){(0,r.MR)(!d.has(n.name),`duplicate variable name ${JSON.stringify(n.name)} in ${JSON.stringify(c)}`,"types",e),d.add(n.name);const f=H(n.type).base;(0,r.MR)(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",e),U(f)||((0,r.MR)(t.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),t.get(f).push(c),a.get(c).add(f))}}const d=Array.from(t.keys()).filter((e=>0===t.get(e).length));(0,r.MR)(0!==d.length,"missing primary type","types",e),(0,r.MR)(1===d.length,`ambiguous primary types or unused types: ${d.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,n.n)(this,{primaryType:d[0]}),function f(d,n){(0,r.MR)(!n.has(d),`circular type reference to ${JSON.stringify(d)}`,"types",e),n.add(d);for(const e of a.get(d))if(t.has(e)){f(e,n);for(const a of n)c.get(a).add(e)}n.delete(d)}(this.primaryType,new Set);for(const[e,a]of c){const t=Array.from(a);t.sort(),this.#_.set(e,j(e,f[e])+t.map((e=>j(e,f[e]))).join(""))}}getEncoder(e){let a=this.#I.get(e);return a||(a=this.#E(e),this.#I.set(e,a)),a}#E(e){{const a=U(e);if(a)return a}const a=H(e).array;if(a){const e=a.prefix,t=this.getEncoder(e);return c=>{(0,r.MR)(-1===a.count||a.count===c.length,`array length mismatch; expected length ${a.count}`,"value",c);let f=c.map(t);return this.#_.has(e)&&(f=f.map(C.S)),(0,C.S)((0,d.xW)(f))}}const t=this.types[e];if(t){const a=(0,B.id)(this.#_.get(e));return e=>{const c=t.map((({name:a,type:t})=>{const c=this.getEncoder(t)(e[a]);return this.#_.has(t)?(0,C.S)(c):c}));return c.unshift(a),(0,d.xW)(c)}}(0,r.MR)(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const a=this.#_.get(e);return(0,r.MR)(a,`unknown type: ${JSON.stringify(e)}`,"name",e),a}encodeData(e,a){return this.getEncoder(e)(a)}hashStruct(e,a){return(0,C.S)(this.encodeData(e,a))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,a,t){if(U(e))return t(e,a);const c=H(e).array;if(c)return(0,r.MR)(-1===c.count||c.count===a.length,`array length mismatch; expected length ${c.count}`,"value",a),a.map((e=>this._visit(c.prefix,e,t)));const f=this.types[e];if(f)return f.reduce(((e,{name:c,type:f})=>(e[c]=this._visit(f,a[c],t),e)),{});(0,r.MR)(!1,`unknown type: ${e}`,"type",e)}visit(e,a){return this._visit(this.primaryType,e,a)}static from(e){return new $(e)}static getPrimaryType(e){return $.from(e).primaryType}static hashStruct(e,a,t){return $.from(a).hashStruct(e,t)}static hashDomain(e){const a=[];for(const t in e){if(null==e[t])continue;const c=D[t];(0,r.MR)(c,`invalid typed-data domain key: ${JSON.stringify(t)}`,"domain",e),a.push({name:t,type:c})}return a.sort(((e,a)=>T.indexOf(e.name)-T.indexOf(a.name))),$.hashStruct("EIP712Domain",{EIP712Domain:a},e)}static encode(e,a,t){return(0,d.xW)(["0x1901",$.hashDomain(e),$.from(a).hash(t)])}static hash(e,a,t){return(0,C.S)($.encode(e,a,t))}static async resolveNames(e,a,t,c){e=Object.assign({},e);for(const a in e)null==e[a]&&delete e[a];const f={};e.verifyingContract&&!(0,d.Lo)(e.verifyingContract,20)&&(f[e.verifyingContract]="0x");const r=$.from(a);r.visit(t,((e,a)=>("address"!==e||(0,d.Lo)(a,20)||(f[a]="0x"),a)));for(const e in f)f[e]=await c(e);return e.verifyingContract&&f[e.verifyingContract]&&(e.verifyingContract=f[e.verifyingContract]),{domain:e,value:t=r.visit(t,((e,a)=>"address"===e&&f[a]?f[a]:a))}}static getPayload(e,a,t){$.hashDomain(e);const c={},f=[];T.forEach((a=>{const t=e[a];null!=t&&(c[a]=Q[a](t),f.push({name:a,type:D[a]}))}));const n=$.from(a);a=n.types;const i=Object.assign({},a);return(0,r.MR)(null==i.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",a),i.EIP712Domain=f,n.encode(t),{types:i,domain:c,primaryType:n.primaryType,message:n.visit(t,((e,a)=>{if(e.match(/^bytes(\d*)/))return(0,d.c$)((0,d.q5)(a));if(e.match(/^u?int/))return(0,M.Ab)(a).toString();switch(e){case"address":return a.toLowerCase();case"bool":return!!a;case"string":return(0,r.MR)("string"==typeof a,"invalid string","value",a),a}(0,r.MR)(!1,"unsupported type","type",e)}))}}}var q=t(8177),G=t(98982),z=t(24391),K=t(64563),V=t(79453),Z=t(99381);const J="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let W=null;function Y(e){if(null==W){W={};for(let e=0;e<58;e++)W[J[e]]=BigInt(e)}const a=W[e];return(0,r.MR)(null!=a,"invalid base58 value","letter",e),a}const X=BigInt(0),ee=BigInt(58);function ae(e){const a=(0,d.q5)(e);let t=(0,M.Dg)(a),c="";for(;t;)c=J[Number(t%ee)]+c,t/=ee;for(let e=0;e{try{return await this.#M.supportsInterface("0x9061b923")}catch(e){if((0,r.bJ)(e,"CALL_EXCEPTION"))return!1;throw this.#C=null,e}})()),await this.#C}async#B(e,a){a=(a||[]).slice();const t=this.#M.interface;a.unshift((0,K.kM)(this.name));let c=null;await this.supportsWildcard()&&(c=t.getFunction(e),(0,r.vA)(c,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),a=[(0,K.Wh)(this.name,255),t.encodeFunctionData(c,a)],e="resolve(bytes,bytes)"),a.push({enableCcipRead:!0});try{const f=await this.#M[e](...a);return c?t.decodeFunctionResult(c,f)[0]:f}catch(e){if(!(0,r.bJ)(e,"CALL_EXCEPTION"))throw e}return null}async getAddress(e){if(null==e&&(e=60),60===e)try{const e=await this.#B("addr(bytes32)");return null==e||e===G.j?null:e}catch(e){if((0,r.bJ)(e,"CALL_EXCEPTION"))return null;throw e}if(e>=0&&e<2147483648){let a=e+2147483648;const t=await this.#B("addr(bytes32,uint)",[a]);if((0,d.Lo)(t,20))return(0,I.b)(t)}let a=null;for(const t of this.provider.plugins)if(t instanceof ce&&t.supportsCoinType(e)){a=t;break}if(null==a)return null;const t=await this.#B("addr(bytes32,uint)",[e]);if(null==t||"0x"===t)return null;const c=await a.decodeAddress(e,t);if(null!=c)return c;(0,r.vA)(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:t}})}async getText(e){const a=await this.#B("text(bytes32,string)",[e]);return null==a||"0x"===a?null:a}async getContentHash(){const e=await this.#B("contenthash(bytes32)");if(null==e||"0x"===e)return null;const a=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(a){const e="e3010170"===a[1]?"ipfs":"ipns",t=parseInt(a[4],16);if(a[5].length===2*t)return`${e}://${ae("0x"+a[2])}`}const t=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(t&&64===t[1].length)return`bzz://${t[1]}`;(0,r.vA)(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const a=await this.getText("avatar");if(null==a)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:a});for(let t=0;t{if(a&&null==t)return null;if(!Array.isArray(t))throw new Error("not an array");return t.map((a=>e(a)))}}function le(e,a){return t=>{const c={};for(const f in e){let d=f;if(a&&f in a&&!(d in t))for(const e of a[f])if(e in t){d=e;break}try{const a=e[f](t[d]);void 0!==a&&(c[f]=a)}catch(e){const a=e instanceof Error?e.message:"not-an-error";(0,r.vA)(!1,`invalid value for value.${f} (${a})`,"BAD_DATA",{value:t})}}return c}}function ue(e){return(0,r.MR)((0,d.Lo)(e,!0),"invalid data","value",e),e}function he(e){return(0,r.MR)((0,d.Lo)(e,32),"invalid hash","value",e),e}const pe=le({address:I.b,blockHash:he,blockNumber:M.WZ,data:ue,index:M.WZ,removed:oe((function(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}(0,r.MR)(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}),!1),topics:se(he),transactionHash:he,transactionIndex:M.WZ},{index:["logIndex"]}),ge=le({hash:oe(he),parentHash:he,parentBeaconBlockRoot:oe(he,null),number:M.WZ,timestamp:M.WZ,nonce:oe(ue),difficulty:M.Ab,gasLimit:M.Ab,gasUsed:M.Ab,stateRoot:oe(he,null),receiptsRoot:oe(he,null),blobGasUsed:oe(M.Ab,null),excessBlobGas:oe(M.Ab,null),miner:oe(I.b),prevRandao:oe(he,null),extraData:ue,baseFeePerGas:oe(M.Ab)},{prevRandao:["mixHash"]}),me=le({transactionIndex:M.WZ,blockNumber:M.WZ,transactionHash:he,address:I.b,topics:se(he),data:ue,index:M.WZ,blockHash:he},{index:["logIndex"]}),xe=le({to:oe(I.b,null),from:oe(I.b,null),contractAddress:oe(I.b,null),index:M.WZ,root:oe(d.c$),gasUsed:M.Ab,blobGasUsed:oe(M.Ab,null),logsBloom:oe(ue),blockHash:he,hash:he,logs:se((function(e){return me(e)})),blockNumber:M.WZ,cumulativeGasUsed:M.Ab,effectiveGasPrice:oe(M.Ab),blobGasPrice:oe(M.Ab,null),status:oe(M.WZ),type:oe(M.WZ,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function ye(e){e.to&&(0,M.Ab)(e.to)===be&&(e.to="0x0000000000000000000000000000000000000000");const a=le({hash:he,index:oe(M.WZ,void 0),type:e=>"0x"===e||null==e?0:(0,M.WZ)(e),accessList:oe(q.$,null),blobVersionedHashes:oe(se(he,!0),null),blockHash:oe(he,null),blockNumber:oe(M.WZ,null),transactionIndex:oe(M.WZ,null),from:I.b,gasPrice:oe(M.Ab),maxPriorityFeePerGas:oe(M.Ab),maxFeePerGas:oe(M.Ab),maxFeePerBlobGas:oe(M.Ab,null),gasLimit:M.Ab,to:oe(I.b,null),value:M.Ab,nonce:M.WZ,data:ue,creates:oe(I.b,null),chainId:oe(M.Ab,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(e);if(null==a.to&&null==a.creates&&(a.creates=function(e){const a=(0,I.b)(e.from);let t=(0,M.Ab)(e.nonce,"tx.nonce").toString(16);return t="0"===t?"0x":t.length%2?"0x0"+t:"0x"+t,(0,I.b)((0,d.ZG)((0,C.S)((0,ne.R)([a,t])),12))}(a)),1!==e.type&&2!==e.type||null!=e.accessList||(a.accessList=[]),e.signature?a.signature=ie.t.from(e.signature):a.signature=ie.t.from(e),null==a.chainId){const e=a.signature.legacyChainId;null!=e&&(a.chainId=e)}return a.blockHash&&(0,M.Ab)(a.blockHash)===be&&(a.blockHash=null),a}class Ae{name;constructor(e){(0,n.n)(this,{name:e})}clone(){return new Ae(this.name)}}class ve extends Ae{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,a){null==e&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);const t={effectiveBlock:e};function c(e,c){let f=(a||{})[e];null==f&&(f=c),(0,r.MR)("number"==typeof f,`invalud value for ${e}`,"costs",a),t[e]=f}c("txBase",21e3),c("txCreate",32e3),c("txDataZero",4),c("txDataNonzero",16),c("txAccessListStorageKey",1900),c("txAccessListAddress",2400),(0,n.n)(this,t)}clone(){return new ve(this.effectiveBlock,this)}}class we extends Ae{address;targetNetwork;constructor(e,a){super("org.ethers.plugins.network.Ens"),(0,n.n)(this,{address:e||"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",targetNetwork:null==a?1:a})}clone(){return new we(this.address,this.targetNetwork)}}class _e extends Ae{#n;#S;get url(){return this.#n}get processFunc(){return this.#S}constructor(e,a){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#n=e,this.#S=a}clone(){return this}}const Ie=new Map;class Ee{#k;#N;#P;constructor(e,a){this.#k=e,this.#N=(0,M.Ab)(a),this.#P=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#k}set name(e){this.#k=e}get chainId(){return this.#N}set chainId(e){this.#N=(0,M.Ab)(e,"chainId")}matches(e){if(null==e)return!1;if("string"==typeof e){try{return this.chainId===(0,M.Ab)(e)}catch(e){}return this.name===e}if("number"==typeof e||"bigint"==typeof e){try{return this.chainId===(0,M.Ab)(e)}catch(e){}return!1}if("object"==typeof e){if(null!=e.chainId){try{return this.chainId===(0,M.Ab)(e.chainId)}catch(e){}return!1}return null!=e.name&&this.name===e.name}return!1}get plugins(){return Array.from(this.#P.values())}attachPlugin(e){if(this.#P.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#P.set(e.name,e.clone()),this}getPlugin(e){return this.#P.get(e)||null}getPlugins(e){return this.plugins.filter((a=>a.name.split("#")[0]===e))}clone(){const e=new Ee(this.name,this.chainId);return this.plugins.forEach((a=>{e.attachPlugin(a.clone())})),e}computeIntrinsicGas(e){const a=this.getPlugin("org.ethers.plugins.network.GasCost")||new ve;let t=a.txBase;if(null==e.to&&(t+=a.txCreate),e.data)for(let c=2;c{c.attachPlugin(e)})),c};Ee.register(e,c),Ee.register(a,c),t.altNames&&t.altNames.forEach((e=>{Ee.register(e,c)}))}Be||(Be=!0,e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",11155111,{ensNetwork:11155111}),e("holesky",17e3,{ensNetwork:17e3}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("arbitrum-sepolia",421614,{}),e("base",8453,{ensNetwork:1}),e("base-goerli",84531,{}),e("base-sepolia",84532,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("linea-sepolia",59141,{}),e("matic",137,{ensNetwork:1,plugins:[Me("https://gasstation.polygon.technology/v2")]}),e("matic-amoy",80002,{}),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[Me("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[]}),e("optimism-goerli",420,{}),e("optimism-sepolia",11155420,{}),e("xdai",100,{ensNetwork:1}))}(),null==e)return Ee.from("mainnet");if("number"==typeof e&&(e=BigInt(e)),"string"==typeof e||"bigint"==typeof e){const a=Ie.get(e);if(a)return a();if("bigint"==typeof e)return new Ee("unknown",e);(0,r.MR)(!1,"unknown network","network",e)}if("function"==typeof e.clone)return e.clone();if("object"==typeof e){(0,r.MR)("string"==typeof e.name&&"number"==typeof e.chainId,"invalid network object name or chainId","network",e);const a=new Ee(e.name,e.chainId);return(e.ensAddress||null!=e.ensNetwork)&&a.attachPlugin(new we(e.ensAddress,e.ensNetwork)),a}(0,r.MR)(!1,"invalid network","network",e)}static register(e,a){"number"==typeof e&&(e=BigInt(e));const t=Ie.get(e);t&&(0,r.MR)(!1,`conflicting network for ${JSON.stringify(t.name)}`,"nameOrChainId",e),Ie.set(e,a)}}function Ce(e,a){const t=String(e);if(!t.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${e}`);const c=t.split(".");if(1===c.length&&c.push(""),2!==c.length)throw new Error(`invalid gwei value: ${e}`);for(;c[1].length9){let e=BigInt(c[1].substring(0,9));c[1].substring(9).match(/^0+$/)||e++,c[1]=e.toString()}return BigInt(c[0]+c[1])}function Me(e){return new _e(e,(async(e,a,t)=>{let c;t.setHeader("User-Agent","ethers");try{const[a,f]=await Promise.all([t.send(),e()]);c=a;const d=c.bodyJson.standard;return{gasPrice:f.gasPrice,maxFeePerGas:Ce(d.maxFee,9),maxPriorityFeePerGas:Ce(d.maxPriorityFee,9)}}catch(e){(0,r.vA)(!1,`error encountered with polygon gas station (${JSON.stringify(t.url)})`,"SERVER_ERROR",{request:t,response:c,error:e})}}))}let Be=!1;var Le=t(43948);function Se(e){return JSON.parse(JSON.stringify(e))}class ke{#R;#O;#D;#T;constructor(e){this.#R=e,this.#O=null,this.#D=4e3,this.#T=-2}get pollingInterval(){return this.#D}set pollingInterval(e){this.#D=e}async#F(){try{const e=await this.#R.getBlockNumber();if(-2===this.#T)return void(this.#T=e);if(e!==this.#T){for(let a=this.#T+1;a<=e;a++){if(null==this.#O)return;await this.#R.emit("block",a)}this.#T=e}}catch(e){}null!=this.#O&&(this.#O=this.#R._setTimeout(this.#F.bind(this),this.#D))}start(){this.#O||(this.#O=this.#R._setTimeout(this.#F.bind(this),this.#D),this.#F())}stop(){this.#O&&(this.#R._clearTimeout(this.#O),this.#O=null)}pause(e){this.stop(),e&&(this.#T=-2)}resume(){this.start()}}class Ne{#R;#F;#Q;constructor(e){this.#R=e,this.#Q=!1,this.#F=e=>{this._poll(e,this.#R)}}async _poll(e,a){throw new Error("sub-classes must override this")}start(){this.#Q||(this.#Q=!0,this.#F(-2),this.#R.on("block",this.#F))}stop(){this.#Q&&(this.#Q=!1,this.#R.off("block",this.#F))}pause(e){this.stop()}resume(){this.start()}}class Pe extends Ne{#U;#j;constructor(e,a){super(e),this.#U=a,this.#j=-2}pause(e){e&&(this.#j=-2),super.pause(e)}async _poll(e,a){const t=await a.getBlock(this.#U);null!=t&&(-2===this.#j?this.#j=t.number:t.number>this.#j&&(a.emit(this.#U,t.number),this.#j=t.number))}}class Re extends Ne{#H;constructor(e,a){super(e),this.#H=Se(a)}async _poll(e,a){throw new Error("@TODO")}}class Oe extends Ne{#$;constructor(e,a){super(e),this.#$=a}async _poll(e,a){const t=await a.getTransactionReceipt(this.#$);t&&a.emit(this.#$,t)}}class De{#R;#H;#O;#Q;#T;constructor(e,a){this.#R=e,this.#H=Se(a),this.#O=this.#F.bind(this),this.#Q=!1,this.#T=-2}async#F(e){if(-2===this.#T)return;const a=Se(this.#H);a.fromBlock=this.#T+1,a.toBlock=e;const t=await this.#R.getLogs(a);if(0!==t.length)for(const e of t)this.#R.emit(this.#H,e),this.#T=e.blockNumber;else this.#T{this.#T=e})),this.#R.on("block",this.#O))}stop(){this.#Q&&(this.#Q=!1,this.#R.off("block",this.#O))}pause(e){this.stop(),e&&(this.#T=-2)}resume(){this.start()}}const Te=BigInt(2);function Fe(e){return e&&"function"==typeof e.then}function Qe(e,a){return e+":"+JSON.stringify(a,((e,a)=>{if(null==a)return"null";if("bigint"==typeof a)return`bigint:${a.toString()}`;if("string"==typeof a)return a.toLowerCase();if("object"==typeof a&&!Array.isArray(a)){const e=Object.keys(a);return e.sort(),e.reduce(((e,t)=>(e[t]=a[t],e)),{})}return a}))}class Ue{name;constructor(e){(0,n.n)(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function je(e){return(e=Array.from(new Set(e).values())).sort(),e}async function He(e,a){if(null==e)throw new Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),"string"==typeof e)switch(e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:e,tag:e}}if((0,d.Lo)(e,32)){const a=e.toLowerCase();return{type:"transaction",tag:Qe("tx",{hash:a}),hash:a}}if(e.orphan){const a=e;return{type:"orphan",tag:Qe("orphan",a),filter:(t=a,JSON.parse(JSON.stringify(t)))}}var t;if(e.address||e.topics){const t=e,c={topics:(t.topics||[]).map((e=>null==e?null:Array.isArray(e)?je(e.map((e=>e.toLowerCase()))):e.toLowerCase()))};if(t.address){const e=[],f=[],r=t=>{(0,d.Lo)(t)?e.push(t):f.push((async()=>{e.push(await(0,E.tG)(t,a))})())};Array.isArray(t.address)?t.address.forEach(r):r(t.address),f.length&&await Promise.all(f),c.address=je(e.map((e=>e.toLowerCase())))}return{filter:c,tag:Qe("event",c),type:"event"}}(0,r.MR)(!1,"unknown ProviderEvent","event",e)}function $e(){return(new Date).getTime()}const qe={cacheTimeout:250,pollingInterval:4e3};class Ge{#q;#P;#G;#z;#K;#V;#Z;#J;#W;#Y;#X;#ee;constructor(e,a){if(this.#ee=Object.assign({},qe,a||{}),"any"===e)this.#V=!0,this.#K=null;else if(e){const a=Ee.from(e);this.#V=!1,this.#K=Promise.resolve(a),setTimeout((()=>{this.emit("network",a,null)}),0)}else this.#V=!1,this.#K=null;this.#J=-1,this.#Z=new Map,this.#q=new Map,this.#P=new Map,this.#G=null,this.#z=!1,this.#W=1,this.#Y=new Map,this.#X=!1}get pollingInterval(){return this.#ee.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#P.values())}attachPlugin(e){if(this.#P.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#P.set(e.name,e.connect(this)),this}getPlugin(e){return this.#P.get(e)||null}get disableCcipRead(){return this.#X}set disableCcipRead(e){this.#X=!!e}async#ae(e){const a=this.#ee.cacheTimeout;if(a<0)return await this._perform(e);const t=Qe(e.method,e);let c=this.#Z.get(t);return c||(c=this._perform(e),this.#Z.set(t,c),setTimeout((()=>{this.#Z.get(t)===c&&this.#Z.delete(t)}),a)),await c}async ccipReadFetch(e,a,t){if(this.disableCcipRead||0===t.length||null==e.to)return null;const c=e.to.toLowerCase(),f=a.toLowerCase(),d=[];for(let a=0;a=500,`response not found during CCIP fetch: ${o}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:n,errorMessage:o}}),d.push(o)}(0,r.vA)(!1,`error encountered during CCIP fetch: ${d.map((e=>JSON.stringify(e))).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:t,errorMessages:d}})}_wrapBlock(e,a){return new Le.eB(function(e){const a=ge(e);return a.transactions=e.transactions.map((e=>"string"==typeof e?e:ye(e))),a}(e),this)}_wrapLog(e,a){return new Le.tG(function(e){return pe(e)}(e),this)}_wrapTransactionReceipt(e,a){return new Le.z5(function(e){return xe(e)}(e),this)}_wrapTransactionResponse(e,a){return new Le.uI(ye(e),this)}_detectNetwork(){(0,r.vA)(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){(0,r.vA)(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=(0,M.WZ)(await this.#ae({method:"getBlockNumber"}),"%response");return this.#J>=0&&(this.#J=e),e}_getAddress(e){return(0,E.tG)(e,this)}_getBlockTag(e){if(null==e)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}return(0,d.Lo)(e)?(0,d.Lo)(e,32)?e:(0,M.nD)(e):("bigint"==typeof e&&(e=(0,M.WZ)(e,"blockTag")),"number"==typeof e?e>=0?(0,M.nD)(e):this.#J>=0?(0,M.nD)(this.#J+e):this.getBlockNumber().then((a=>(0,M.nD)(a+e))):void(0,r.MR)(!1,"invalid blockTag","blockTag",e))}_getFilter(e){const a=(e.topics||[]).map((e=>null==e?null:Array.isArray(e)?je(e.map((e=>e.toLowerCase()))):e.toLowerCase())),t="blockHash"in e?e.blockHash:void 0,c=(e,c,f)=>{let d;switch(e.length){case 0:break;case 1:d=e[0];break;default:e.sort(),d=e}if(t&&(null!=c||null!=f))throw new Error("invalid filter");const r={};return d&&(r.address=d),a.length&&(r.topics=a),c&&(r.fromBlock=c),f&&(r.toBlock=f),t&&(r.blockHash=t),r};let f,d,r=[];if(e.address)if(Array.isArray(e.address))for(const a of e.address)r.push(this._getAddress(a));else r.push(this._getAddress(e.address));return"fromBlock"in e&&(f=this._getBlockTag(e.fromBlock)),"toBlock"in e&&(d=this._getBlockTag(e.toBlock)),r.filter((e=>"string"!=typeof e)).length||null!=f&&"string"!=typeof f||null!=d&&"string"!=typeof d?Promise.all([Promise.all(r),f,d]).then((e=>c(e[0],e[1],e[2]))):c(r,f,d)}_getTransactionRequest(e){const a=(0,Le.VS)(e),t=[];if(["to","from"].forEach((e=>{if(null==a[e])return;const c=(0,E.tG)(a[e],this);Fe(c)?t.push(async function(){a[e]=await c}()):a[e]=c})),null!=a.blockTag){const e=this._getBlockTag(a.blockTag);Fe(e)?t.push(async function(){a.blockTag=await e}()):a.blockTag=e}return t.length?async function(){return await Promise.all(t),a}():a}async getNetwork(){if(null==this.#K){const e=(async()=>{try{const e=await this._detectNetwork();return this.emit("network",e,null),e}catch(a){throw this.#K===e&&(this.#K=null),a}})();return this.#K=e,(await e).clone()}const e=this.#K,[a,t]=await Promise.all([e,this._detectNetwork()]);return a.chainId!==t.chainId&&(this.#V?(this.emit("network",t,a),this.#K===e&&(this.#K=Promise.resolve(t))):(0,r.vA)(!1,`network changed: ${a.chainId} => ${t.chainId} `,"NETWORK_ERROR",{event:"changed"})),a.clone()}async getFeeData(){const e=await this.getNetwork(),a=async()=>{const{_block:a,gasPrice:t,priorityFee:c}=await(0,n.k)({_block:this.#te("latest",!1),gasPrice:(async()=>{try{const e=await this.#ae({method:"getGasPrice"});return(0,M.Ab)(e,"%response")}catch(e){}return null})(),priorityFee:(async()=>{try{const e=await this.#ae({method:"getPriorityFee"});return(0,M.Ab)(e,"%response")}catch(e){}return null})()});let f=null,d=null;const r=this._wrapBlock(a,e);return r&&r.baseFeePerGas&&(d=null!=c?c:BigInt("1000000000"),f=r.baseFeePerGas*Te+d),new Le.J9(t,f,d)},t=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(t){const e=new A(t.url),c=await t.processFunc(a,this,e);return new Le.J9(c.gasPrice,c.maxFeePerGas,c.maxPriorityFeePerGas)}return await a()}async estimateGas(e){let a=this._getTransactionRequest(e);return Fe(a)&&(a=await a),(0,M.Ab)(await this.#ae({method:"estimateGas",transaction:a}),"%response")}async#ce(e,a,t){(0,r.vA)(t<10,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:a,enableCcipRead:!0})});const c=(0,Le.VS)(e);try{return(0,d.c$)(await this._perform({method:"call",transaction:c,blockTag:a}))}catch(e){if(!this.disableCcipRead&&(0,r.E)(e)&&e.data&&t>=0&&"latest"===a&&null!=c.to&&"0x556f1830"===(0,d.ZG)(e.data,0,4)){const f=e.data,n=await(0,E.tG)(c.to,this);let i;try{i=function(e){const a={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};(0,r.vA)((0,d.pO)(e)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const t=(0,d.ZG)(e,0,32);(0,r.vA)((0,d.ZG)(t,0,12)===(0,d.ZG)(Ye,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),a.sender=(0,d.ZG)(t,12);try{const t=[],c=(0,M.WZ)((0,d.ZG)(e,32,64)),f=(0,M.WZ)((0,d.ZG)(e,c,c+32)),r=(0,d.ZG)(e,c+32);for(let e=0;ea[e])),a}((0,d.ZG)(e.data,4))}catch(e){(0,r.vA)(!1,e.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:c,info:{data:f}})}(0,r.vA)(i.sender.toLowerCase()===n.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:f,reason:"OffchainLookup",transaction:c,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:i.errorArgs}});const b=await this.ccipReadFetch(c,i.calldata,i.urls);(0,r.vA)(null!=b,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:c,info:{data:e.data,errorArgs:i.errorArgs}});const o={to:n,data:(0,d.xW)([i.selector,We([b,i.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:o});try{const e=await this.#ce(o,a,t+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},o),result:e}),e}catch(e){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},o),error:e}),e}}throw e}}async#fe(e){const{value:a}=await(0,n.k)({network:this.getNetwork(),value:e});return a}async call(e){const{tx:a,blockTag:t}=await(0,n.k)({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#fe(this.#ce(a,t,e.enableCcipRead?0:-1))}async#de(e,a,t){let c=this._getAddress(a),f=this._getBlockTag(t);return"string"==typeof c&&"string"==typeof f||([c,f]=await Promise.all([c,f])),await this.#fe(this.#ae(Object.assign(e,{address:c,blockTag:f})))}async getBalance(e,a){return(0,M.Ab)(await this.#de({method:"getBalance"},e,a),"%response")}async getTransactionCount(e,a){return(0,M.WZ)(await this.#de({method:"getTransactionCount"},e,a),"%response")}async getCode(e,a){return(0,d.c$)(await this.#de({method:"getCode"},e,a))}async getStorage(e,a,t){const c=(0,M.Ab)(a,"position");return(0,d.c$)(await this.#de({method:"getStorage",position:c},e,t))}async broadcastTransaction(e){const{blockNumber:a,hash:t,network:c}=await(0,n.k)({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),f=V.Z.from(e);if(f.hash!==t)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(f,c).replaceableTransaction(a)}async#te(e,a){if((0,d.Lo)(e,32))return await this.#ae({method:"getBlock",blockHash:e,includeTransactions:a});let t=this._getBlockTag(e);return"string"!=typeof t&&(t=await t),await this.#ae({method:"getBlock",blockTag:t,includeTransactions:a})}async getBlock(e,a){const{network:t,params:c}=await(0,n.k)({network:this.getNetwork(),params:this.#te(e,!!a)});return null==c?null:this._wrapBlock(c,t)}async getTransaction(e){const{network:a,params:t}=await(0,n.k)({network:this.getNetwork(),params:this.#ae({method:"getTransaction",hash:e})});return null==t?null:this._wrapTransactionResponse(t,a)}async getTransactionReceipt(e){const{network:a,params:t}=await(0,n.k)({network:this.getNetwork(),params:this.#ae({method:"getTransactionReceipt",hash:e})});if(null==t)return null;if(null==t.gasPrice&&null==t.effectiveGasPrice){const a=await this.#ae({method:"getTransaction",hash:e});if(null==a)throw new Error("report this; could not find tx or effectiveGasPrice");t.effectiveGasPrice=a.gasPrice}return this._wrapTransactionReceipt(t,a)}async getTransactionResult(e){const{result:a}=await(0,n.k)({network:this.getNetwork(),result:this.#ae({method:"getTransactionResult",hash:e})});return null==a?null:(0,d.c$)(a)}async getLogs(e){let a=this._getFilter(e);Fe(a)&&(a=await a);const{network:t,params:c}=await(0,n.k)({network:this.getNetwork(),params:this.#ae({method:"getLogs",filter:a})});return c.map((e=>this._wrapLog(e,t)))}_getProvider(e){(0,r.vA)(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await re.fromName(this,e)}async getAvatar(e){const a=await this.getResolver(e);return a?await a.getAvatar():null}async resolveName(e){const a=await this.getResolver(e);return a?await a.getAddress():null}async lookupAddress(e){e=(0,I.b)(e);const a=(0,K.kM)(e.substring(2).toLowerCase()+".addr.reverse");try{const t=await re.getEnsAddress(this),c=new z.NZ(t,["function resolver(bytes32) view returns (address)"],this),f=await c.resolver(a);if(null==f||f===G.j)return null;const d=new z.NZ(f,["function name(bytes32) view returns (string)"],this),r=await d.name(a);return await this.resolveName(r)!==e?null:r}catch(e){if((0,r.bJ)(e,"BAD_DATA")&&"0x"===e.value)return null;if((0,r.bJ)(e,"CALL_EXCEPTION"))return null;throw e}return null}async waitForTransaction(e,a,t){const c=null!=a?a:1;return 0===c?this.getTransactionReceipt(e):new Promise((async(a,f)=>{let d=null;const n=async t=>{try{const f=await this.getTransactionReceipt(e);if(null!=f&&t-f.blockNumber+1>=c)return a(f),void(d&&(clearTimeout(d),d=null))}catch(e){console.log("EEE",e)}this.once("block",n)};null!=t&&(d=setTimeout((()=>{null!=d&&(d=null,this.off("block",n),f((0,r.xz)("timeout","TIMEOUT",{reason:"timeout"})))}),t)),n(await this.getBlockNumber())}))}async waitForBlock(e){(0,r.vA)(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const a=this.#Y.get(e);a&&(a.timer&&clearTimeout(a.timer),this.#Y.delete(e))}_setTimeout(e,a){null==a&&(a=0);const t=this.#W++,c=()=>{this.#Y.delete(t),e()};if(this.paused)this.#Y.set(t,{timer:null,func:c,time:a});else{const e=setTimeout(c,a);this.#Y.set(t,{timer:e,func:c,time:$e()})}return t}_forEachSubscriber(e){for(const a of this.#q.values())e(a.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new Ue(e.type);case"block":{const e=new ke(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new Pe(this,e.type);case"event":return new De(this,e.filter);case"transaction":return new Oe(this,e.hash);case"orphan":return new Re(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,a){for(const t of this.#q.values())if(t.subscriber===e){t.started&&t.subscriber.stop(),t.subscriber=a,t.started&&a.start(),null!=this.#G&&a.pause(this.#G);break}}async#re(e,a){let t=await He(e,this);return"event"===t.type&&a&&a.length>0&&!0===a[0].removed&&(t=await He({orphan:"drop-log",log:a[0]},this)),this.#q.get(t.tag)||null}async#ne(e){const a=await He(e,this),t=a.tag;let c=this.#q.get(t);return c||(c={subscriber:this._getSubscriber(a),tag:t,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#q.set(t,c)),c}async on(e,a){const t=await this.#ne(e);return t.listeners.push({listener:a,once:!1}),t.started||(t.subscriber.start(),t.started=!0,null!=this.#G&&t.subscriber.pause(this.#G)),this}async once(e,a){const t=await this.#ne(e);return t.listeners.push({listener:a,once:!0}),t.started||(t.subscriber.start(),t.started=!0,null!=this.#G&&t.subscriber.pause(this.#G)),this}async emit(e,...a){const t=await this.#re(e,a);if(!t||0===t.listeners.length)return!1;const c=t.listeners.length;return t.listeners=t.listeners.filter((({listener:t,once:c})=>{const f=new Z.z(this,c?null:t,e);try{t.call(this,...a,f)}catch(e){}return!c})),0===t.listeners.length&&(t.started&&t.subscriber.stop(),this.#q.delete(t.tag)),c>0}async listenerCount(e){if(e){const a=await this.#re(e);return a?a.listeners.length:0}let a=0;for(const{listeners:e}of this.#q.values())a+=e.length;return a}async listeners(e){if(e){const a=await this.#re(e);return a?a.listeners.map((({listener:e})=>e)):[]}let a=[];for(const{listeners:e}of this.#q.values())a=a.concat(e.map((({listener:e})=>e)));return a}async off(e,a){const t=await this.#re(e);if(!t)return this;if(a){const e=t.listeners.map((({listener:e})=>e)).indexOf(a);e>=0&&t.listeners.splice(e,1)}return a&&0!==t.listeners.length||(t.started&&t.subscriber.stop(),this.#q.delete(t.tag)),this}async removeAllListeners(e){if(e){const{tag:a,started:t,subscriber:c}=await this.#ne(e);t&&c.stop(),this.#q.delete(a)}else for(const[e,{started:a,subscriber:t}]of this.#q)a&&t.stop(),this.#q.delete(e);return this}async addListener(e,a){return await this.on(e,a)}async removeListener(e,a){return this.off(e,a)}get destroyed(){return this.#z}destroy(){this.removeAllListeners();for(const e of this.#Y.keys())this._clearTimeout(e);this.#z=!0}get paused(){return null!=this.#G}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#J=-1,null!=this.#G){if(this.#G==!!e)return;(0,r.vA)(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber((a=>a.pause(e))),this.#G=!!e;for(const e of this.#Y.values())e.timer&&clearTimeout(e.timer),e.time=$e()-e.time}resume(){if(null!=this.#G){this._forEachSubscriber((e=>e.resume())),this.#G=null;for(const e of this.#Y.values()){let a=e.time;a<0&&(a=0),e.time=$e(),setTimeout(e.func,a)}}}}function ze(e,a){try{const t=Ke(e,a);if(t)return(0,i._v)(t)}catch(e){}return null}function Ke(e,a){if("0x"===e)return null;try{const t=(0,M.WZ)((0,d.ZG)(e,a,a+32)),c=(0,M.WZ)((0,d.ZG)(e,t,t+32));return(0,d.ZG)(e,t+32,t+32+c)}catch(e){}return null}function Ve(e){const a=(0,M.c4)(e);if(a.length>32)throw new Error("internal; should not happen");const t=new Uint8Array(32);return t.set(a,32-a.length),t}function Ze(e){if(e.length%32==0)return e;const a=new Uint8Array(32*Math.ceil(e.length/32));return a.set(e),a}const Je=new Uint8Array([]);function We(e){const a=[];let t=0;for(let c=0;c((0,r.MR)(e.toLowerCase()===a.toLowerCase(),"transaction from mismatch","tx.from",a),e)))}else t.from=e.getAddress();return await(0,n.k)(t)}class aa{provider;constructor(e){(0,n.n)(this,{provider:e||null})}async getNonce(e){return Xe(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await ea(this,e)}async populateTransaction(e){const a=Xe(this,"populateTransaction"),t=await ea(this,e);null==t.nonce&&(t.nonce=await this.getNonce("pending")),null==t.gasLimit&&(t.gasLimit=await this.estimateGas(t));const c=await this.provider.getNetwork();if(null!=t.chainId){const a=(0,M.Ab)(t.chainId);(0,r.MR)(a===c.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else t.chainId=c.chainId;const f=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!f?0!==t.type&&1!==t.type||!f||(0,r.MR)(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e):(0,r.MR)(!1,"eip-1559 transaction do not support gasPrice","tx",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type){const e=await a.getFeeData();(0,r.vA)(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice)}else{const e=await a.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?((0,r.vA)(!f,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):(0,r.vA)(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else 2!==t.type&&3!==t.type||(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return await(0,n.k)(t)}async estimateGas(e){return Xe(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Xe(this,"call").call(await this.populateCall(e))}async resolveName(e){const a=Xe(this,"resolveName");return await a.resolveName(e)}async sendTransaction(e){const a=Xe(this,"sendTransaction"),t=await this.populateTransaction(e);delete t.from;const c=V.Z.from(t);return await a.broadcastTransaction(await this.signTransaction(c))}}class ta extends aa{address;constructor(e,a){super(a),(0,n.n)(this,{address:e})}async getAddress(){return this.address}connect(e){return new ta(this.address,e)}#ie(e,a){(0,r.vA)(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:a})}async signTransaction(e){this.#ie("transactions","signTransaction")}async signMessage(e){this.#ie("messages","signMessage")}async signTypedData(e,a,t){this.#ie("typed-data","signTypedData")}}class ca{#R;#be;#O;#Q;#oe;#se;constructor(e){this.#R=e,this.#be=null,this.#O=this.#F.bind(this),this.#Q=!1,this.#oe=null,this.#se=!1}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,a){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}async#F(e){try{null==this.#be&&(this.#be=this._subscribe(this.#R));let e=null;try{e=await this.#be}catch(e){if(!(0,r.bJ)(e,"UNSUPPORTED_OPERATION")||"eth_newFilter"!==e.operation)throw e}if(null==e)return this.#be=null,void this.#R._recoverSubscriber(this,this._recover(this.#R));const a=await this.#R.getNetwork();if(this.#oe||(this.#oe=a),this.#oe.chainId!==a.chainId)throw new Error("chaid changed");if(this.#se)return;const t=await this.#R.send("eth_getFilterChanges",[e]);await this._emitResults(this.#R,t)}catch(e){console.log("@TODO",e)}this.#R.once("block",this.#O)}#le(){const e=this.#be;e&&(this.#be=null,e.then((e=>{this.#R.destroyed||this.#R.send("eth_uninstallFilter",[e])})))}start(){this.#Q||(this.#Q=!0,this.#F(-2))}stop(){this.#Q&&(this.#Q=!1,this.#se=!0,this.#le(),this.#R.off("block",this.#O))}pause(e){e&&this.#le(),this.#R.off("block",this.#O)}resume(){this.start()}}class fa extends ca{#ue;constructor(e,a){var t;super(e),this.#ue=(t=a,JSON.parse(JSON.stringify(t)))}_recover(e){return new De(e,this.#ue)}async _subscribe(e){return await e.send("eth_newFilter",[this.#ue])}async _emitResults(e,a){for(const t of a)e.emit(this.#ue,e._wrapLog(t,e._network))}}class da extends ca{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,a){for(const t of a)e.emit("pending",t)}}const ra="bigint,boolean,function,number,string,symbol".split(/,/g);function na(e){if(null==e||ra.indexOf(typeof e)>=0)return e;if("function"==typeof e.getAddress)return e;if(Array.isArray(e))return e.map(na);if("object"==typeof e)return Object.keys(e).reduce(((a,t)=>(a[t]=e[t],a)),{});throw new Error(`should not happen: ${e} (${typeof e})`)}function ia(e){return new Promise((a=>{setTimeout(a,e)}))}function ba(e){return e?e.toLowerCase():e}function oa(e){return e&&"number"==typeof e.pollingInterval}const sa={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class la extends aa{address;constructor(e,a){super(e),a=(0,I.b)(a),(0,n.n)(this,{address:a})}connect(e){(0,r.vA)(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const a=na(e),t=[];if(a.from){const c=a.from;t.push((async()=>{const t=await(0,E.tG)(c,this.provider);(0,r.MR)(null!=t&&t.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),a.from=t})())}else a.from=this.address;if(null==a.gasLimit&&t.push((async()=>{a.gasLimit=await this.provider.estimateGas({...a,from:this.address})})()),null!=a.to){const e=a.to;t.push((async()=>{a.to=await(0,E.tG)(e,this.provider)})())}t.length&&await Promise.all(t);const c=this.provider.getRpcTransaction(a);return this.provider.send("eth_sendTransaction",[c])}async sendTransaction(e){const a=await this.provider.getBlockNumber(),t=await this.sendUncheckedTransaction(e);return await new Promise(((e,c)=>{const f=[1e3,100];let d=0;const n=async()=>{try{const c=await this.provider.getTransaction(t);if(null!=c)return void e(c.replaceableTransaction(a))}catch(e){if((0,r.bJ)(e,"CANCELLED")||(0,r.bJ)(e,"BAD_DATA")||(0,r.bJ)(e,"NETWORK_ERROR"))return null==e.info&&(e.info={}),e.info.sendTransactionHash=t,void c(e);if((0,r.bJ)(e,"INVALID_ARGUMENT")&&(d++,null==e.info&&(e.info={}),e.info.sendTransactionHash=t,d>10))return void c(e);this.provider.emit("error",(0,r.xz)("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:e}))}this.provider._setTimeout((()=>{n()}),f.pop()||4e3)};n()}))}async signTransaction(e){const a=na(e);if(a.from){const t=await(0,E.tG)(a.from,this.provider);(0,r.MR)(null!=t&&t.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),a.from=t}else a.from=this.address;const t=this.provider.getRpcTransaction(a);return await this.provider.send("eth_signTransaction",[t])}async signMessage(e){const a="string"==typeof e?(0,i.YW)(e):e;return await this.provider.send("personal_sign",[(0,d.c$)(a),this.address.toLowerCase()])}async signTypedData(e,a,t){const c=na(t),f=await $.resolveNames(e,a,c,(async e=>{const a=await(0,E.tG)(e);return(0,r.MR)(null!=a,"TypedData does not support null address","value",e),a}));return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify($.getPayload(f.domain,a,f.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const a="string"==typeof e?(0,i.YW)(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),(0,d.c$)(a)])}}class ua extends Ge{#ee;#he;#pe;#ge;#me;#oe;#xe;#ye(){if(this.#ge)return;const e=1===this._getOption("batchMaxCount")?0:this._getOption("batchStallTime");this.#ge=setTimeout((()=>{this.#ge=null;const e=this.#pe;for(this.#pe=[];e.length;){const a=[e.shift()];for(;e.length&&a.length!==this.#ee.batchMaxCount;)if(a.push(e.shift()),JSON.stringify(a.map((e=>e.payload))).length>this.#ee.batchMaxSize){e.unshift(a.pop());break}(async()=>{const e=1===a.length?a[0].payload:a.map((e=>e.payload));this.emit("debug",{action:"sendRpcPayload",payload:e});try{const t=await this._send(e);this.emit("debug",{action:"receiveRpcResult",result:t});for(const{resolve:e,reject:c,payload:f}of a){if(this.destroyed){c((0,r.xz)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:f.method}));continue}const a=t.filter((e=>e.id===f.id))[0];if(null!=a)"error"in a?c(this.getRpcError(f,a)):e(a.result);else{const e=(0,r.xz)("missing response for request","BAD_DATA",{value:t,info:{payload:f}});this.emit("error",e),c(e)}}}catch(e){this.emit("debug",{action:"receiveRpcError",error:e});for(const{reject:t}of a)t(e)}})()}}),e)}constructor(e,a){super(e,a),this.#he=1,this.#ee=Object.assign({},sa,a||{}),this.#pe=[],this.#ge=null,this.#oe=null,this.#xe=null;{let e=null;const a=new Promise((a=>{e=a}));this.#me={promise:a,resolve:e}}const t=this._getOption("staticNetwork");"boolean"==typeof t?((0,r.MR)(!t||"any"!==e,"staticNetwork cannot be used on special network 'any'","options",a),t&&null!=e&&(this.#oe=Ee.from(e))):t&&((0,r.MR)(null==e||t.matches(e),"staticNetwork MUST match network object","options",a),this.#oe=t)}_getOption(e){return this.#ee[e]}get _network(){return(0,r.vA)(this.#oe,"network is not available yet","NETWORK_ERROR"),this.#oe}async _perform(e){if("call"===e.method||"estimateGas"===e.method){let a=e.transaction;if(a&&null!=a.type&&(0,M.Ab)(a.type)&&null==a.maxFeePerGas&&null==a.maxPriorityFeePerGas){const t=await this.getFeeData();null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas&&(e=Object.assign({},e,{transaction:Object.assign({},a,{type:void 0})}))}}const a=this.getRpcRequest(e);return null!=a?await this.send(a.method,a.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e){if(!0!==e)return e;if(this.#oe)return this.#oe}return this.#xe?await this.#xe:this.ready?(this.#xe=(async()=>{try{const e=Ee.from((0,M.Ab)(await this.send("eth_chainId",[])));return this.#xe=null,e}catch(e){throw this.#xe=null,e}})(),await this.#xe):(this.#xe=(async()=>{const e={id:this.#he++,method:"eth_chainId",params:[],jsonrpc:"2.0"};let a;this.emit("debug",{action:"sendRpcPayload",payload:e});try{a=(await this._send(e))[0],this.#xe=null}catch(e){throw this.#xe=null,this.emit("debug",{action:"receiveRpcError",error:e}),e}if(this.emit("debug",{action:"receiveRpcResult",result:a}),"result"in a)return Ee.from((0,M.Ab)(a.result));throw this.getRpcError(e,a)})(),await this.#xe)}_start(){null!=this.#me&&null!=this.#me.resolve&&(this.#me.resolve(),this.#me=null,(async()=>{for(;null==this.#oe&&!this.destroyed;)try{this.#oe=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",(0,r.xz)("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await ia(1e3)}this.#ye()})())}async _waitUntilReady(){if(null!=this.#me)return await this.#me.promise}_getSubscriber(e){return"pending"===e.type?new da(this):"event"===e.type?this._getOption("polling")?new De(this,e.filter):new fa(this,e.filter):"orphan"===e.type&&"drop-log"===e.filter.orphan?new Ue("orphan"):super._getSubscriber(e)}get ready(){return null==this.#me}getRpcTransaction(e){const a={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((t=>{if(null==e[t])return;let c=t;"gasLimit"===t&&(c="gas"),a[c]=(0,M.nD)((0,M.Ab)(e[t],`tx.${t}`))})),["from","to","data"].forEach((t=>{null!=e[t]&&(a[t]=(0,d.c$)(e[t]))})),e.accessList&&(a.accessList=(0,q.$)(e.accessList)),e.blobVersionedHashes&&(a.blobVersionedHashes=e.blobVersionedHashes.map((e=>e.toLowerCase()))),a}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[ba(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[ba(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[ba(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[ba(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&null!=e.filter.address&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(ba):e.filter.address=ba(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,a){const{method:t}=e,{error:c}=a;if("eth_estimateGas"===t&&c.message){const a=c.message;if(!a.match(/revert/i)&&a.match(/insufficient funds/i))return(0,r.xz)("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:c}})}if("eth_call"===t||"eth_estimateGas"===t){const a=ga(c),f=_.y.getBuiltinCallException("eth_call"===t?"call":"estimateGas",e.params[0],a?a.data:null);return f.info={error:c,payload:e},f}const f=JSON.stringify(function(e){const a=[];return ma(e,a),a}(c));if("string"==typeof c.message&&c.message.match(/user denied|ethers-user-denied/i)){const a={eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"};return(0,r.xz)("user rejected action","ACTION_REJECTED",{action:a[t]||"unknown",reason:"rejected",info:{payload:e,error:c}})}if("eth_sendRawTransaction"===t||"eth_sendTransaction"===t){const a=e.params[0];if(f.match(/insufficient funds|base fee exceeds gas limit/i))return(0,r.xz)("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:a,info:{error:c}});if(f.match(/nonce/i)&&f.match(/too low/i))return(0,r.xz)("nonce has already been used","NONCE_EXPIRED",{transaction:a,info:{error:c}});if(f.match(/replacement transaction/i)&&f.match(/underpriced/i))return(0,r.xz)("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:a,info:{error:c}});if(f.match(/only replay-protected/i))return(0,r.xz)("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:t,info:{transaction:a,info:{error:c}}})}let d=!!f.match(/the method .* does not exist/i);return d||c&&c.details&&c.details.startsWith("Unauthorized method:")&&(d=!0),d?(0,r.xz)("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:c,payload:e}}):(0,r.xz)("could not coalesce error","UNKNOWN_ERROR",{error:c,payload:e})}send(e,a){if(this.destroyed)return Promise.reject((0,r.xz)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const t=this.#he++,c=new Promise(((c,f)=>{this.#pe.push({resolve:c,reject:f,payload:{method:e,params:a,id:t,jsonrpc:"2.0"}})}));return this.#ye(),c}async getSigner(e){null==e&&(e=0);const a=this.send("eth_accounts",[]);if("number"==typeof e){const t=await a;if(e>=t.length)throw new Error("no such account");return new la(this,t[e])}const{accounts:t}=await(0,n.k)({network:this.getNetwork(),accounts:a});e=(0,I.b)(e);for(const a of t)if((0,I.b)(a)===e)return new la(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map((e=>new la(this,e)))}destroy(){this.#ge&&(clearTimeout(this.#ge),this.#ge=null);for(const{payload:e,reject:a}of this.#pe)a((0,r.xz)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#pe=[],super.destroy()}}class ha extends ua{#Ae;constructor(e,a){super(e,a);let t=this._getOption("pollingInterval");null==t&&(t=sa.pollingInterval),this.#Ae=t}_getSubscriber(e){const a=super._getSubscriber(e);return oa(a)&&(a.pollingInterval=this.#Ae),a}get pollingInterval(){return this.#Ae}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");this.#Ae=e,this._forEachSubscriber((e=>{oa(e)&&(e.pollingInterval=this.#Ae)}))}}class pa extends ha{#ve;constructor(e,a,t){null==e&&(e="http://localhost:8545"),super(a,t),this.#ve="string"==typeof e?new A(e):e.clone()}_getConnection(){return this.#ve.clone()}async send(e,a){return await this._start(),await super.send(e,a)}async _send(e){const a=this._getConnection();a.body=JSON.stringify(e),a.setHeader("content-type","application/json");const t=await a.send();t.assertOk();let c=t.bodyJson;return Array.isArray(c)||(c=[c]),c}}function ga(e){if(null==e)return null;if("string"==typeof e.message&&e.message.match(/revert/i)&&(0,d.Lo)(e.data))return{message:e.message,data:e.data};if("object"==typeof e){for(const a in e){const t=ga(e[a]);if(t)return t}return null}if("string"==typeof e)try{return ga(JSON.parse(e))}catch(e){}return null}function ma(e,a){if(null!=e){if("string"==typeof e.message&&a.push(e.message),"object"==typeof e)for(const t in e)ma(e[t],a);if("string"==typeof e)try{return ma(JSON.parse(e),a)}catch(e){}}}var xa=t(15496);var ya=t(20415);class Aa extends aa{address;#we;constructor(e,a){super(a),(0,r.MR)(e&&"function"==typeof e.sign,"invalid private key","privateKey","[ REDACTED ]"),this.#we=e;const t=(0,ya.K)(this.signingKey.publicKey);(0,n.n)(this,{address:t})}get signingKey(){return this.#we}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new Aa(this.#we,e)}async signTransaction(e){e=(0,Le.VS)(e);const{to:a,from:t}=await(0,n.k)({to:e.to?(0,E.tG)(e.to,this.provider):void 0,from:e.from?(0,E.tG)(e.from,this.provider):void 0});null!=a&&(e.to=a),null!=t&&(e.from=t),null!=e.from&&((0,r.MR)((0,I.b)(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const c=V.Z.from(e);return c.signature=this.signingKey.sign(c.unsignedHash),c.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign(function(e){return"string"==typeof e&&(e=(0,i.YW)(e)),(0,C.S)((0,d.xW)([(0,i.YW)("Ethereum Signed Message:\n"),(0,i.YW)(String(e.length)),e]))}(e)).serialized}async signTypedData(e,a,t){const c=await $.resolveNames(e,a,t,(async e=>{(0,r.vA)(null!=this.provider,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:e}});const a=await this.provider.resolveName(e);return(0,r.vA)(null!=a,"unconfigured ENS name","UNCONFIGURED_NAME",{value:e}),a}));return this.signingKey.sign($.hash(c.domain,a,c.value)).serialized}}var va=t(68650),wa=t(8180);let _a=!1;const Ia=function(e,a,t){return(0,wa.Gz)(e,a).update(t).digest()};let Ea=Ia;function Ca(e,a,t){const c=(0,d.q5)(a,"key"),f=(0,d.q5)(t,"data");return(0,d.c$)(Ea(e,c,f))}Ca._=Ia,Ca.lock=function(){_a=!0},Ca.register=function(e){if(_a)throw new Error("computeHmac is locked");Ea=e},Object.freeze(Ca);var Ma=t(37171),Ba=t(10750);const La=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Sa=Uint8Array.from({length:16},((e,a)=>a));let ka=[Sa],Na=[Sa.map((e=>(9*e+5)%16))];for(let e=0;e<4;e++)for(let a of[ka,Na])a.push(a[e].map((e=>La[e])));const Pa=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),Ra=ka.map(((e,a)=>e.map((e=>Pa[a][e])))),Oa=Na.map(((e,a)=>e.map((e=>Pa[a][e])))),Da=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),Ta=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),Fa=(e,a)=>e<>>32-a;function Qa(e,a,t,c){return 0===e?a^t^c:1===e?a&t|~a&c:2===e?(a|~t)^c:3===e?a&c|t&~c:a^(t|~c)}const Ua=new Uint32Array(16);class ja extends Ma.D{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:t,h3:c,h4:f}=this;return[e,a,t,c,f]}set(e,a,t,c,f){this.h0=0|e,this.h1=0|a,this.h2=0|t,this.h3=0|c,this.h4=0|f}process(e,a){for(let t=0;t<16;t++,a+=4)Ua[t]=e.getUint32(a,!0);let t=0|this.h0,c=t,f=0|this.h1,d=f,r=0|this.h2,n=r,i=0|this.h3,b=i,o=0|this.h4,s=o;for(let e=0;e<5;e++){const a=4-e,l=Da[e],u=Ta[e],h=ka[e],p=Na[e],g=Ra[e],m=Oa[e];for(let a=0;a<16;a++){const c=Fa(t+Qa(e,f,r,i)+Ua[h[a]]+l,g[a])+o|0;t=o,o=i,i=0|Fa(r,10),r=f,f=c}for(let e=0;e<16;e++){const t=Fa(c+Qa(a,d,n,b)+Ua[p[e]]+u,m[e])+s|0;c=s,s=b,b=0|Fa(n,10),n=d,d=t}}this.set(this.h1+r+b|0,this.h2+i+s|0,this.h3+o+c|0,this.h4+t+d|0,this.h0+f+n|0)}roundClean(){Ua.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const Ha=(0,Ba.ld)((()=>new ja));let $a=!1;const qa=function(e){return Ha(e)};let Ga=qa;function za(e){const a=(0,d.q5)(e,"data");return(0,d.c$)(Ga(a))}za._=qa,za.lock=function(){$a=!0},za.register=function(e){if($a)throw new TypeError("ripemd160 is locked");Ga=e},Object.freeze(za);let Ka=!1;const Va=function(e){return new Uint8Array((0,wa.po)(e))};let Za=Va;function Ja(e){return Za(e)}Ja._=Va,Ja.lock=function(){Ka=!0},Ja.register=function(e){if(Ka)throw new Error("randomBytes is locked");Za=e},Object.freeze(Ja);const Wa=/^[a-z]*$/i;function Ya(e,a){let t=97;return e.reduce(((e,c)=>(c===a?t++:c.match(Wa)?e.push(String.fromCharCode(t)+c):(t=97,e.push(c)),e)),[])}class Xa{locale;constructor(e){(0,n.n)(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}class et extends Xa{#_e;#Ie;constructor(e,a,t){super(e),this.#_e=a,this.#Ie=t,this.#Ee=null}get _data(){return this.#_e}_decodeWords(){return e=this.#_e,(0,r.MR)("0"===e[0],"unsupported auwl data","data",e),function(e,a){for(let t=28;t>=0;t--)e=e.split(" !#$%&'()*+,-./<=>?@[]^_`{|}~"[t]).join(a.substring(2*t,2*t+2));const t=[],c=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,((e,a,c,f)=>{if(c)for(let e=parseInt(c);e>=0;e--)t.push(";");else t.push(a.toLowerCase());return""}));if(c)throw new Error(`leftovers: ${JSON.stringify(c)}`);return Ya(Ya(t,";"),":")}(e.substring(59),e.substring(1,59));var e}#Ee;#Ce(){if(null==this.#Ee){const e=this._decodeWords();if((0,B.id)(e.join("\n")+"\n")!==this.#Ie)throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#Ee=e}return this.#Ee}getWord(e){const a=this.#Ce();return(0,r.MR)(e>=0&&eurAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO","0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60")}static wordlist(){return null==at&&(at=new tt),at}}let ct=!1;const ft=function(e,a,t,c,f){return(0,wa.T_)(e,a,t,c,f)};let dt=ft;function rt(e,a,t,c,f){const r=(0,d.q5)(e,"password"),n=(0,d.q5)(a,"salt");return(0,d.c$)(dt(r,n,t,c,f))}function nt(e){return(1<=12&&t.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const c=new Uint8Array(Math.ceil(11*t.length/8));let f=0;for(let e=0;e=0,`invalid mnemonic word at index ${e}`,"mnemonic","[ REDACTED ]");for(let e=0;e<11;e++)d&1<<10-e&&(c[f>>3]|=1<<7-f%8),f++}const n=32*t.length/3,i=nt(t.length/3),b=(0,d.q5)((0,va.s)(c.slice(0,n/8)))[0]&i;return(0,r.MR)(b===(c[c.length-1]&i),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),(0,d.c$)(c.slice(0,n/8))}function bt(e,a){(0,r.MR)(e.length%4==0&&e.length>=16&&e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),null==a&&(a=tt.wordlist());const t=[0];let c=11;for(let a=0;a8?(t[t.length-1]<<=8,t[t.length-1]|=e[a],c-=8):(t[t.length-1]<<=c,t[t.length-1]|=e[a]>>8-c,t.push(e[a]&(1<<8-c)-1&255),c+=3);const f=e.length/4,d=parseInt((0,va.s)(e).substring(2,4),16)&nt(f);return t[t.length-1]<<=f,t[t.length-1]|=d>>8-f,a.join(t.map((e=>a.getWord(e))))}rt._=ft,rt.lock=function(){ct=!0},rt.register=function(e){if(ct)throw new Error("pbkdf2 is locked");dt=e},Object.freeze(rt);const ot={};class st{phrase;password;wordlist;entropy;constructor(e,a,t,c,f){null==c&&(c=""),null==f&&(f=tt.wordlist()),(0,r.gk)(e,ot,"Mnemonic"),(0,n.n)(this,{phrase:t,password:c,wordlist:f,entropy:a})}computeSeed(){const e=(0,i.YW)("mnemonic"+this.password,"NFKD");return rt((0,i.YW)(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,a,t){const c=it(e,t);return e=bt((0,d.q5)(c),t),new st(ot,c,e,a,t)}static fromEntropy(e,a,t){const c=(0,d.q5)(e,"entropy"),f=bt(c,t);return new st(ot,(0,d.c$)(c),f,a,t)}static entropyToPhrase(e,a){return bt((0,d.q5)(e,"entropy"),a)}static phraseToEntropy(e,a){return it(e,a)}static isValidMnemonic(e,a){try{return it(e,a),!0}catch(e){}return!1}}var lt,ut,ht,pt=function(e,a,t,c){if("a"===t&&!c)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof a?e!==a||!c:!a.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?c:"a"===t?c.call(e):c?c.value:a.get(e)},gt=function(e,a,t,c,f){if("m"===c)throw new TypeError("Private method is not writable");if("a"===c&&!f)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof a?e!==a||!f:!a.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===c?f.call(e,t):f?f.value=t:a.set(e,t),t};const mt={16:10,24:12,32:14},xt=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],yt=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],At=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],vt=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],wt=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],_t=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],It=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Et=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],Ct=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],Mt=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Bt=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Lt=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],St=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],kt=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Nt=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Pt(e){const a=[];for(let t=0;t>2,pt(this,ht,"f")[d][e%4]=f[e],pt(this,ut,"f")[a-d][e%4]=f[e];let r,n=0,i=c;for(;i>16&255]<<24^yt[r>>8&255]<<16^yt[255&r]<<8^yt[r>>24&255]^xt[n]<<24,n+=1,8!=c)for(let e=1;e>8&255]<<8^yt[r>>16&255]<<16^yt[r>>24&255]<<24;for(let e=c/2+1;e>2,d=i%4,pt(this,ht,"f")[e][d]=f[b],pt(this,ut,"f")[a-e][d]=f[b++],i++}for(let e=1;e>24&255]^St[r>>16&255]^kt[r>>8&255]^Nt[255&r]}encrypt(e){if(16!=e.length)throw new TypeError("invalid plaintext size (must be 16 bytes)");const a=pt(this,ht,"f").length-1,t=[0,0,0,0];let c=Pt(e);for(let e=0;e<4;e++)c[e]^=pt(this,ht,"f")[0][e];for(let e=1;e>24&255]^wt[c[(a+1)%4]>>16&255]^_t[c[(a+2)%4]>>8&255]^It[255&c[(a+3)%4]]^pt(this,ht,"f")[e][a];c=t.slice()}const f=new Uint8Array(16);let d=0;for(let e=0;e<4;e++)d=pt(this,ht,"f")[a][e],f[4*e]=255&(yt[c[e]>>24&255]^d>>24),f[4*e+1]=255&(yt[c[(e+1)%4]>>16&255]^d>>16),f[4*e+2]=255&(yt[c[(e+2)%4]>>8&255]^d>>8),f[4*e+3]=255&(yt[255&c[(e+3)%4]]^d);return f}decrypt(e){if(16!=e.length)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const a=pt(this,ut,"f").length-1,t=[0,0,0,0];let c=Pt(e);for(let e=0;e<4;e++)c[e]^=pt(this,ut,"f")[0][e];for(let e=1;e>24&255]^Ct[c[(a+3)%4]>>16&255]^Mt[c[(a+2)%4]>>8&255]^Bt[255&c[(a+1)%4]]^pt(this,ut,"f")[e][a];c=t.slice()}const f=new Uint8Array(16);let d=0;for(let e=0;e<4;e++)d=pt(this,ut,"f")[a][e],f[4*e]=255&(At[c[e]>>24&255]^d>>24),f[4*e+1]=255&(At[c[(e+3)%4]>>16&255]^d>>16),f[4*e+2]=255&(At[c[(e+2)%4]>>8&255]^d>>8),f[4*e+3]=255&(At[255&c[(e+1)%4]]^d);return f}}lt=new WeakMap,ut=new WeakMap,ht=new WeakMap;class Ot{constructor(e,a,t){if(t&&!(this instanceof t))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new Rt(a)},name:{enumerable:!0,value:e}})}}var Dt,Tt,Ft=function(e,a,t,c,f){if("m"===c)throw new TypeError("Private method is not writable");if("a"===c&&!f)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof a?e!==a||!f:!a.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===c?f.call(e,t):f?f.value=t:a.set(e,t),t},Qt=function(e,a,t,c){if("a"===t&&!c)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof a?e!==a||!c:!a.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?c:"a"===t?c.call(e):c?c.value:a.get(e)};class Ut extends Ot{constructor(e,a){if(super("ECC",e,Ut),Dt.set(this,void 0),Tt.set(this,void 0),a){if(a.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");Ft(this,Dt,new Uint8Array(a),"f")}else Ft(this,Dt,new Uint8Array(16),"f");Ft(this,Tt,this.iv,"f")}get iv(){return new Uint8Array(Qt(this,Dt,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const a=new Uint8Array(e.length);for(let t=0;tNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let a=15;a>=0;--a)Gt(this,$t,"f")[a]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw new TypeError("invalid counter initial Uint8Array value length");Gt(this,$t,"f").set(e)}increment(){for(let e=15;e>=0;e--){if(255!==Gt(this,$t,"f")[e]){Gt(this,$t,"f")[e]++;break}Gt(this,$t,"f")[e]=0}}encrypt(e){var a,t;const c=new Uint8Array(e);for(let e=0;ee<>>32-a;function Wt(e,a,t,c,f,d){let r=e[a++]^t[c++],n=e[a++]^t[c++],i=e[a++]^t[c++],b=e[a++]^t[c++],o=e[a++]^t[c++],s=e[a++]^t[c++],l=e[a++]^t[c++],u=e[a++]^t[c++],h=e[a++]^t[c++],p=e[a++]^t[c++],g=e[a++]^t[c++],m=e[a++]^t[c++],x=e[a++]^t[c++],y=e[a++]^t[c++],A=e[a++]^t[c++],v=e[a++]^t[c++],w=r,_=n,I=i,E=b,C=o,M=s,B=l,L=u,S=h,k=p,N=g,P=m,R=x,O=y,D=A,T=v;for(let e=0;e<8;e+=2)C^=Jt(w+R|0,7),S^=Jt(C+w|0,9),R^=Jt(S+C|0,13),w^=Jt(R+S|0,18),k^=Jt(M+_|0,7),O^=Jt(k+M|0,9),_^=Jt(O+k|0,13),M^=Jt(_+O|0,18),D^=Jt(N+B|0,7),I^=Jt(D+N|0,9),B^=Jt(I+D|0,13),N^=Jt(B+I|0,18),E^=Jt(T+P|0,7),L^=Jt(E+T|0,9),P^=Jt(L+E|0,13),T^=Jt(P+L|0,18),_^=Jt(w+E|0,7),I^=Jt(_+w|0,9),E^=Jt(I+_|0,13),w^=Jt(E+I|0,18),B^=Jt(M+C|0,7),L^=Jt(B+M|0,9),C^=Jt(L+B|0,13),M^=Jt(C+L|0,18),P^=Jt(N+k|0,7),S^=Jt(P+N|0,9),k^=Jt(S+P|0,13),N^=Jt(k+S|0,18),R^=Jt(T+D|0,7),O^=Jt(R+T|0,9),D^=Jt(O+R|0,13),T^=Jt(D+O|0,18);f[d++]=r+w|0,f[d++]=n+_|0,f[d++]=i+I|0,f[d++]=b+E|0,f[d++]=o+C|0,f[d++]=s+M|0,f[d++]=l+B|0,f[d++]=u+L|0,f[d++]=h+S|0,f[d++]=p+k|0,f[d++]=g+N|0,f[d++]=m+P|0,f[d++]=x+R|0,f[d++]=y+O|0,f[d++]=A+D|0,f[d++]=v+T|0}function Yt(e,a,t,c,f){let d=c+0,r=c+16*f;for(let c=0;c<16;c++)t[r+c]=e[a+16*(2*f-1)+c];for(let c=0;c0&&(r+=16),Wt(t,d,e,a+=16,t,r)}function Xt(e,a,t){const c=(0,Ba.tY)({dkLen:32,asyncTick:10,maxmem:1073742848},t),{N:f,r:d,p:r,dkLen:n,asyncTick:i,maxmem:b,onProgress:o}=c;if((0,Kt.ai)(f),(0,Kt.ai)(d),(0,Kt.ai)(r),(0,Kt.ai)(n),(0,Kt.ai)(i),(0,Kt.ai)(b),void 0!==o&&"function"!=typeof o)throw new Error("progressCb should be function");const s=128*d,l=s/4;if(f<=1||f&f-1||f>=2**(s/8)||f>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(r<0||r>137438953440/s)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(n<0||n>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const u=s*(f+r);if(u>b)throw new Error(`Scrypt: parameters too large, ${u} (128 * r * (N + p)) > ${b} (maxmem)`);const h=(0,Zt.A)(Vt.s,e,a,{c:1,dkLen:s*r}),p=(0,Ba.DH)(h),g=(0,Ba.DH)(new Uint8Array(s*f)),m=(0,Ba.DH)(new Uint8Array(s));let x=()=>{};if(o){const e=2*f*r,a=Math.max(Math.floor(e/1e4),1);let t=0;x=()=>{t++,!o||t%a&&t!==e||o(t/e)}}return{N:f,r:d,p:r,dkLen:n,blockSize32:l,V:g,B32:p,B:h,tmp:m,blockMixCb:x,asyncTick:i}}function ec(e,a,t,c,f){const d=(0,Zt.A)(Vt.s,e,t,{c:1,dkLen:a});return t.fill(0),c.fill(0),f.fill(0),d}let ac=!1,tc=!1;const cc=async function(e,a,t,c,f,d,r){return await async function(e,a,t){const{N:c,r:f,p:d,dkLen:r,blockSize32:n,V:i,B32:b,B:o,tmp:s,blockMixCb:l,asyncTick:u}=Xt(e,a,t);for(let e=0;e{Yt(i,t,i,t+=n,f),l()})),Yt(i,(c-1)*n,b,a,f),l(),await(0,Ba.$h)(c,u,(()=>{const e=b[a+n-16]%c;for(let t=0;t0&&!(c&c-1),"invalid kdf.N","kdf.N",c),(0,r.MR)(f>0&&d>0,"invalid kdf","kdf",a);const n=uc(e,"crypto.kdfparams.dklen:int!");return(0,r.MR)(32===n,"invalid kdf.dklen","kdf.dflen",n),{name:"scrypt",salt:t,N:c,r:f,p:d,dkLen:64}}if("pbkdf2"===a.toLowerCase()){const a=uc(e,"crypto.kdfparams.salt:data!"),t=uc(e,"crypto.kdfparams.prf:string!"),c=t.split("-").pop();(0,r.MR)("sha256"===c||"sha512"===c,"invalid kdf.pdf","kdf.pdf",t);const f=uc(e,"crypto.kdfparams.c:int!"),d=uc(e,"crypto.kdfparams.dklen:int!");return(0,r.MR)(32===d,"invalid kdf.dklen","kdf.dklen",d),{name:"pbkdf2",salt:a,count:f,dkLen:d,algorithm:c}}}(0,r.MR)(!1,"unsupported key-derivation function","kdf",a)}function yc(e){return new Promise((a=>{setTimeout((()=>{a()}),e)}))}function Ac(e){const a=null!=e.salt?(0,d.q5)(e.salt,"options.salt"):Ja(32);let t=1<<17,c=8,f=1;return e.scrypt&&(e.scrypt.N&&(t=e.scrypt.N),e.scrypt.r&&(c=e.scrypt.r),e.scrypt.p&&(f=e.scrypt.p)),(0,r.MR)("number"==typeof t&&t>0&&Number.isSafeInteger(t)&&(BigInt(t)&BigInt(t-1))===BigInt(0),"invalid scrypt N parameter","options.N",t),(0,r.MR)("number"==typeof c&&c>0&&Number.isSafeInteger(c),"invalid scrypt r parameter","options.r",c),(0,r.MR)("number"==typeof f&&f>0&&Number.isSafeInteger(f),"invalid scrypt p parameter","options.p",f),{name:"scrypt",dkLen:32,salt:a,N:t,r:c,p:f}}function vc(e,a,t,c){const f=(0,d.q5)(t.privateKey,"privateKey"),n=null!=c.iv?(0,d.q5)(c.iv,"options.iv"):Ja(16);(0,r.MR)(16===n.length,"invalid options.iv length","options.iv",c.iv);const i=null!=c.uuid?(0,d.q5)(c.uuid,"options.uuid"):Ja(16);(0,r.MR)(16===i.length,"invalid options.uuid length","options.uuid",c.iv);const b=e.slice(0,16),o=e.slice(16,32),s=new zt(b,n),l=(0,d.q5)(s.encrypt(f)),u=(0,C.S)((0,d.xW)([o,l])),h={address:t.address.substring(2).toLowerCase(),id:bc(i),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,d.c$)(n).substring(2)},ciphertext:(0,d.c$)(l).substring(2),kdf:"scrypt",kdfparams:{salt:(0,d.c$)(a.salt).substring(2),n:a.N,dklen:32,p:a.p,r:a.r},mac:u.substring(2)}};if(t.mnemonic){const a=null!=c.client?c.client:`ethers/${hc.r}`,f=t.mnemonic.path||pc,r=t.mnemonic.locale||"en",n=e.slice(32,64),i=(0,d.q5)(t.mnemonic.entropy,"account.mnemonic.entropy"),b=Ja(16),o=new zt(n,b),s=(0,d.q5)(o.encrypt(i)),l=new Date,u="UTC--"+l.getUTCFullYear()+"-"+sc(l.getUTCMonth()+1,2)+"-"+sc(l.getUTCDate(),2)+"T"+sc(l.getUTCHours(),2)+"-"+sc(l.getUTCMinutes(),2)+"-"+sc(l.getUTCSeconds(),2)+".0Z--"+h.address;h["x-ethers"]={client:a,gethFilename:u,path:f,locale:r,mnemonicCounter:(0,d.c$)(b).substring(2),mnemonicCiphertext:(0,d.c$)(s).substring(2),version:"0.1"}}return JSON.stringify(h)}function wc(e,a,t){null==t&&(t={});const c=lc(a),f=Ac(t),r=ic(c,f.salt,f.N,f.r,f.p,64);return vc((0,d.q5)(r),f,e,t)}async function _c(e,a,t){null==t&&(t={});const c=lc(a),f=Ac(t),r=await nc(c,f.salt,f.N,f.r,f.p,64,t.progressCallback);return vc((0,d.q5)(r),f,e,t)}const Ic="m/44'/60'/0'/0/0",Ec=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),Cc=2147483648,Mc=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");function Bc(e,a){let t="";for(;e;)t="0123456789abcdef"[e%16]+t,e=Math.trunc(e/16);for(;t.length<2*a;)t="0"+t;return"0x"+t}function Lc(e){const a=(0,d.q5)(e),t=(0,d.ZG)((0,va.s)((0,va.s)(a)),0,4);return ae((0,d.xW)([a,t]))}const Sc={};function kc(e,a,t,c){const f=new Uint8Array(37);e&Cc?((0,r.vA)(null!=c,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),f.set((0,d.q5)(c),1)):f.set((0,d.q5)(t));for(let a=24;a>=0;a-=8)f[33+(a>>3)]=e>>24-a&255;const n=(0,d.q5)(Ca("sha512",a,f));return{IL:n.slice(0,32),IR:n.slice(32)}}function Nc(e,a){const t=a.split("/");(0,r.MR)(t.length>0,"invalid path","path",a),"m"===t[0]&&((0,r.MR)(0===e.depth,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${e.depth}`,"path",a),t.shift());let c=e;for(let e=0;e=16&&t.length<=64,"invalid seed","seed","[REDACTED]");const c=(0,d.q5)(Ca("sha512",Ec,t)),f=new xa.h((0,d.c$)(c.slice(0,32)));return new Pc(Sc,f,"0x00000000",(0,d.c$)(c.slice(32)),"m",0,0,a,null)}static fromExtendedKey(e){const a=(0,M.c4)(function(e){let a=X;for(let t=0;t16)throw new TypeError("PKCS#7 padding byte out of range");const t=e.length-a;for(let c=0;c{setTimeout((()=>{a()}),e)}))}class Fc extends Aa{constructor(e,a){"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),super("string"==typeof e?new xa.h(e):e,a)}connect(e){return new Fc(this.signingKey,e)}async encrypt(e,a){const t={address:this.address,privateKey:this.privateKey};return await _c(t,e,{progressCallback:a})}encryptSync(e){return wc({address:this.address,privateKey:this.privateKey},e)}static#Le(e){if((0,r.MR)(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&"en"===e.mnemonic.locale){const a=st.fromEntropy(e.mnemonic.entropy),t=Pc.fromMnemonic(a,e.mnemonic.path);if(t.address===e.address&&t.privateKey===e.privateKey)return t;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const a=new Fc(e.privateKey);return(0,r.MR)(a.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),a}static async fromEncryptedJson(e,a,t){let c=null;return gc(e)?c=await async function(e,a,t){const c=JSON.parse(e),f=lc(a),d=xc(c);if("pbkdf2"===d.name){t&&(t(0),await yc(0));const{salt:e,count:a,dkLen:r,algorithm:n}=d,i=rt(f,e,a,r,n);return t&&(t(1),await yc(0)),mc(c,i)}(0,r.vA)("scrypt"===d.name,"cannot be reached","UNKNOWN_ERROR",{params:d});const{salt:n,N:i,r:b,p:o,dkLen:s}=d;return mc(c,await nc(f,n,i,b,o,s,t))}(e,a,t):Oc(e)&&(t&&(t(0),await Tc(0)),c=Dc(e,a),t&&(t(1),await Tc(0))),Fc.#Le(c)}static fromEncryptedJsonSync(e,a){let t=null;return gc(e)?t=function(e,a){const t=JSON.parse(e),c=lc(a),f=xc(t);if("pbkdf2"===f.name){const{salt:e,count:a,dkLen:d,algorithm:r}=f;return mc(t,rt(c,e,a,d,r))}(0,r.vA)("scrypt"===f.name,"cannot be reached","UNKNOWN_ERROR",{params:f});const{salt:d,N:n,r:i,p:b,dkLen:o}=f;return mc(t,ic(c,d,n,i,b,o))}(e,a):Oc(e)?t=Dc(e,a):(0,r.MR)(!1,"invalid JSON wallet","json","[ REDACTED ]"),Fc.#Le(t)}static createRandom(e){const a=Pc.createRandom();return e?a.connect(e):a}static fromPhrase(e,a){const t=Pc.fromPhrase(e);return a?t.connect(a):t}}class Qc extends ha{#A;constructor(e,a,t){const c=Object.assign({},null!=t?t:{},{batchMaxCount:1});(0,r.MR)(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(a,c),this.#A=async(a,t)=>{const c={method:a,params:t};this.emit("debug",{action:"sendEip1193Request",payload:c});try{const a=await e.request(c);return this.emit("debug",{action:"receiveEip1193Result",result:a}),a}catch(e){const a=new Error(e.message);throw a.code=e.code,a.data=e.data,a.payload=c,this.emit("debug",{action:"receiveEip1193Error",error:a}),a}}}async send(e,a){return await this._start(),await super.send(e,a)}async _send(e){(0,r.MR)(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const a=await this.#A(e.method,e.params||[]);return[{id:e.id,result:a}]}catch(a){return[{id:e.id,error:{code:a.code,data:a.data,message:a.message}}]}}getRpcError(e,a){switch((a=JSON.parse(JSON.stringify(a))).error.code||-1){case 4001:a.error.message=`ethers-user-denied: ${a.error.message}`;break;case 4200:a.error.message=`ethers-unsupported: ${a.error.message}`}return super.getRpcError(e,a)}async hasSigner(e){null==e&&(e=0);const a=await this.send("eth_accounts",[]);return"number"==typeof e?a.length>e:(e=e.toLowerCase(),0!==a.filter((a=>a.toLowerCase()===e)).length)}async getSigner(e){if(null==e&&(e=0),!await this.hasSigner(e))try{await this.#A("eth_requestAccounts",[])}catch(e){const a=e.payload;throw this.getRpcError(a,{id:a.id,error:e})}return await super.getSigner(e)}}var Uc=t(67418),jc=Object.defineProperty,Hc=Object.defineProperties,$c=Object.getOwnPropertyDescriptors,qc=Object.getOwnPropertySymbols,Gc=Object.getPrototypeOf,zc=Object.prototype.hasOwnProperty,Kc=Object.prototype.propertyIsEnumerable,Vc=Reflect.get,Zc=(e,a,t)=>a in e?jc(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,Jc=(e,a,t)=>Vc(Gc(e),t,a),Wc=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const Yc="Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0",Xc=f();function ef({fetchUrl:e,proxyUrl:a,torPort:c,retry:f}){const{HttpProxyAgent:d}=t(60513),{HttpsProxyAgent:r}=t(2378),{SocksProxyAgent:n}=t(60290);if(c)return new n(`socks5h://tor${f}@127.0.0.1:${c}`);if(!a)return;const i=e.includes("https://");return a.includes("socks://")||a.includes("socks4://")||a.includes("socks5://")?new n(a):a.includes("http://")||a.includes("https://")?i?new r(a):new d(a):void 0}function af(e){return Wc(this,arguments,(function*(e,a={}){var t,c,f;const d=null!=(t=a.maxRetry)?t:3,r=null!=(c=a.retryOn)?c:500,n=null!=(f=a.userAgent)?f:Yc;let i,b=0;for(a.method||(a.body?a.method="POST":a.method="GET"),a.headers||(a.headers={}),Uc.Ll&&!a.headers["User-Agent"]&&(a.headers["User-Agent"]=n);b{e.abort()}),a.timeout)}!a.agent&&Uc.Ll&&(a.proxy||a.torPort)&&(a.agent=ef({fetchUrl:e,proxyUrl:a.proxy,torPort:a.torPort,retry:b})),a.debug&&"function"==typeof a.debug&&a.debug("request",{url:e,retry:b,errorObject:i,options:a});try{const t=yield Xc(e,{method:a.method,headers:a.headers,body:a.body,redirect:a.redirect,signal:a.signal,agent:a.agent});if(a.debug&&"function"==typeof a.debug&&a.debug("response",t),!t.ok){const a=`Request to ${e} failed with error code ${t.status}:\n`+(yield t.text());throw new Error(a)}if(a.returnResponse)return t;const c=t.headers.get("content-type");return(null==c?void 0:c.includes("application/json"))?yield t.json():(null==c?void 0:c.includes("text"))?yield t.text():t}catch(e){t&&clearTimeout(t),i=e,b++,yield(0,Uc.yy)(r)}finally{t&&clearTimeout(t)}}throw a.debug&&"function"==typeof a.debug&&a.debug("error",i),i}))}const tf=(e={})=>(a,t)=>Wc(void 0,null,(function*(){let c;if(t){const e=new AbortController;c=e.signal,t.addListener((()=>{e.abort()}))}const f=(d=((e,a)=>{for(var t in a||(a={}))zc.call(a,t)&&Zc(e,t,a[t]);if(qc)for(var t of qc(a))Kc.call(a,t)&&Zc(e,t,a[t]);return e})({},e),r={method:a.method||"POST",headers:a.headers,body:a.body||void 0,signal:c,returnResponse:!0},Hc(d,$c(r)));var d,r;const n=yield af(a.url,f),i={};n.headers.forEach(((e,a)=>{i[a.toLowerCase()]=e}));const b=yield n.arrayBuffer(),o=null==b?null:new Uint8Array(b);return{statusCode:n.status,statusMessage:n.statusText,headers:i,body:o}}));function cf(e,a){return Wc(this,null,(function*(){const t=new A(e);t.getUrlFunc=tf(a);const c=yield new pa(t).getNetwork(),f=Number(c.chainId);if((null==a?void 0:a.netId)&&a.netId!==f){const t=`Wrong network for ${e}, wants ${a.netId} got ${f}`;throw new Error(t)}return new pa(t,c,{staticNetwork:c,pollingInterval:(null==a?void 0:a.pollingInterval)||1e3})}))}function ff(e,a,t,c){const{networkName:f,reverseRecordsContract:d,pollInterval:r}=t,n=Boolean(d),i=new A(a);i.getUrlFunc=tf(c);const b=new Ee(f,e);return n&&b.attachPlugin(new we(null,Number(e))),b.attachPlugin(new ve),new pa(i,b,{staticNetwork:b,pollingInterval:(null==c?void 0:c.pollingInterval)||1e3*r})}const df=(e,a)=>Wc(void 0,null,(function*(){const t=e.provider;if(a.from){if(a.from!==e.address){const t=`populateTransaction: signer mismatch for tx, wants ${a.from} have ${e.address}`;throw new Error(t)}}else a.from=e.address;const[c,f]=yield Promise.all([a.maxFeePerGas||a.gasPrice?void 0:t.getFeeData(),a.nonce?void 0:t.getTransactionCount(e.address,"pending")]);if(c&&(c.maxFeePerGas?(a.type||(a.type=2),a.maxFeePerGas=c.maxFeePerGas*(BigInt(1e4)+BigInt(e.gasPriceBump))/BigInt(1e4),a.maxPriorityFeePerGas=c.maxPriorityFeePerGas,delete a.gasPrice):c.gasPrice&&(a.type||(a.type=0),a.gasPrice=c.gasPrice,delete a.maxFeePerGas,delete a.maxPriorityFeePerGas)),f&&(a.nonce=f),!a.gasLimit)try{const c=yield t.estimateGas(a);a.gasLimit=c===BigInt(21e3)?c:c*(BigInt(1e4)+BigInt(e.gasLimitBump))/BigInt(1e4)}catch(t){if(!e.gasFailover)throw t;console.log("populateTransaction: warning gas estimation failed falling back to 3M gas"),a.gasLimit=BigInt("3000000")}return a}));class rf extends Fc{constructor(e,a,{gasPriceBump:t,gasLimitBump:c,gasFailover:f,bumpNonce:d}={}){super(e,a),this.gasPriceBump=null!=t?t:0,this.gasLimitBump=null!=c?c:3e3,this.gasFailover=null!=f&&f,this.bumpNonce=null!=d&&d}static fromMnemonic(e,a,t=0,c){const f=`m/44'/60'/0'/0/${t}`,{privateKey:d}=Pc.fromPhrase(e,void 0,f);return new rf(d,a,c)}populateTransaction(e){return Wc(this,null,(function*(){const a=yield df(this,e);return this.nonce=Number(a.nonce),Jc(rf.prototype,this,"populateTransaction").call(this,a)}))}}class nf extends ta{constructor(e,a,{gasPriceBump:t,gasLimitBump:c,gasFailover:f,bumpNonce:d}={}){super(e,a),this.gasPriceBump=null!=t?t:0,this.gasLimitBump=null!=c?c:3e3,this.gasFailover=null!=f&&f,this.bumpNonce=null!=d&&d}populateTransaction(e){return Wc(this,null,(function*(){const a=yield df(this,e);return this.nonce=Number(a.nonce),Jc(nf.prototype,this,"populateTransaction").call(this,a)}))}}class bf extends la{constructor(e,a,{gasPriceBump:t,gasLimitBump:c,gasFailover:f,bumpNonce:d}={}){super(e,a),this.gasPriceBump=null!=t?t:0,this.gasLimitBump=null!=c?c:3e3,this.gasFailover=null!=f&&f,this.bumpNonce=null!=d&&d}sendUncheckedTransaction(e){return Wc(this,null,(function*(){return Jc(bf.prototype,this,"sendUncheckedTransaction").call(this,yield df(this,e))}))}}class of extends Qc{constructor(e,a,t){super(e,a),this.options=t}getSigner(e){return Wc(this,null,(function*(){var a,t,c,f,d,r,n,i,b,o;const s=(yield Jc(of.prototype,this,"getSigner").call(this,e)).address;return(null==(a=this.options)?void 0:a.netId)&&(null==(t=this.options)?void 0:t.connectWallet)&&Number(yield Jc(of.prototype,this,"send").call(this,"net_version",[]))!==(null==(c=this.options)?void 0:c.netId)&&(yield this.options.connectWallet(null==(f=this.options)?void 0:f.netId)),(null==(d=this.options)?void 0:d.handleNetworkChanges)&&(null==(r=null==window?void 0:window.ethereum)||r.on("chainChanged",this.options.handleNetworkChanges)),(null==(n=this.options)?void 0:n.handleAccountChanges)&&(null==(i=null==window?void 0:window.ethereum)||i.on("accountsChanged",this.options.handleAccountChanges)),(null==(b=this.options)?void 0:b.handleAccountDisconnect)&&(null==(o=null==window?void 0:window.ethereum)||o.on("disconnect",this.options.handleAccountDisconnect)),new bf(this,s,this.options)}))}}},57194:(e,a,t)=>{"use strict";t.d(a,{KN:()=>A,OR:()=>C,Ss:()=>y,XF:()=>I,c$:()=>_,pO:()=>v,sN:()=>E,zy:()=>w});var c=t(99770),f=t(30031),d=t(67418),r=t(59499),n=t(68434),i=t(59511),b=Object.defineProperty,o=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,p=(e,a,t)=>a in e?b(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,g=(e,a)=>{for(var t in a||(a={}))u.call(a,t)&&p(e,t,a[t]);if(l)for(var t of l(a))h.call(a,t)&&p(e,t,a[t]);return e},m=(e,a)=>o(e,s(a)),x=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const y=.1,A=.9,v=(0,c.g5)("500");function w({stakeBalance:e,tornadoServiceFee:a}){if(a=A)return BigInt(0);const t=1-1/(A-y)**2*(a-y)**2;return BigInt(Math.floor(Number(e||"0")*t))}function _(e,a){for(let t=0;tObject.values(e))).flat().map((e=>(0,f.b)(e)))}function E(e){const a=e.map((e=>w(e))),t=a.reduce(((e,a)=>e+a),BigInt("0"));return e[_(a,BigInt(Math.floor(Number(t)*Math.random())))]}class C{constructor({netId:e,config:a,fetchDataOptions:t}){this.netId=e,this.config=a,this.fetchDataOptions=t,this.tovarish=!1}askRelayerStatus(e){return x(this,arguments,(function*({hostname:e,url:a,relayerAddress:t}){var c;!a&&e?a=`https://${e.endsWith("/")?e:e+"/"}`:a&&!a.endsWith("/")?a+="/":a="";const f=yield(0,n.Fd)(`${a}status`,m(g({},this.fetchDataOptions),{headers:{"Content-Type":"application/json, application/x-www-form-urlencoded"},timeout:6e4,maxRetry:(null==(c=this.fetchDataOptions)?void 0:c.torPort)?2:0}));if(!i.SS.compile((0,i.c_)(this.netId,this.config,this.tovarish))(f))throw new Error("Invalid status schema");const d=m(g({},f),{url:a});if(d.currentQueue>5)throw new Error("Withdrawal queue is overloaded");if(d.netId!==this.netId)throw new Error("This relayer serves a different network");if(t&&this.netId===r.zr.MAINNET&&d.rewardAccount!==t)throw new Error("The Relayer reward address must match registered address");return d}))}filterRelayer(e){return x(this,null,(function*(){var a;const t=e.hostnames[this.netId],{ensName:c,relayerAddress:d}=e;if(t)try{const r=yield this.askRelayerStatus({hostname:t,relayerAddress:d});return{netId:r.netId,url:r.url,hostname:t,ensName:c,relayerAddress:d,rewardAccount:(0,f.b)(r.rewardAccount),instances:I(r.instances),stakeBalance:e.stakeBalance,gasPrice:null==(a=r.gasPrices)?void 0:a.fast,ethPrices:r.ethPrices,currentQueue:r.currentQueue,tornadoServiceFee:r.tornadoServiceFee}}catch(e){return{hostname:t,relayerAddress:d,errorMessage:e.message,hasError:!0}}}))}getValidRelayers(e){return x(this,null,(function*(){const a=[];return{validRelayers:(yield Promise.all(e.map((e=>this.filterRelayer(e))))).filter((e=>!(!e||e.hasError&&(a.push(e),1)))),invalidRelayers:a}}))}pickWeightedRandomRelayer(e){return E(e)}tornadoWithdraw(e,a){return x(this,arguments,(function*({contract:e,proof:a,args:t},c){const{url:f}=this.selectedRelayer,r=yield(0,n.Fd)(`${f}v1/tornadoWithdraw`,m(g({},this.fetchDataOptions),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contract:e,proof:a,args:t})})),{id:b,error:o}=r;if(o)throw new Error(o);let s;const l=`${f}v1/jobs/${b}`;for(console.log(`Job submitted: ${l}\n`);!s||!["FAILED","CONFIRMED"].includes(s);){const e=yield(0,n.Fd)(l,m(g({},this.fetchDataOptions),{method:"GET",headers:{"Content-Type":"application/json"}}));if(e.error)throw new Error(o);if(!i.SS.compile(i.Us)(e))throw new Error(`${l} has an invalid job response`);const{status:a,txHash:t,confirmations:f,failedReason:r}=e;if(s!==a){if("FAILED"===a)throw new Error(`Job ${a}: ${l} failed reason: ${r}`);"SENT"===a?console.log(`Job ${a}: ${l}, txhash: ${t}\n`):"MINED"===a||"CONFIRMED"===a?console.log(`Job ${a}: ${l}, txhash: ${t}, confirmations: ${f}\n`):console.log(`Job ${a}: ${l}\n`),s=a,"function"==typeof c&&c(e)}yield(0,d.yy)(3e3)}}))}}},59511:(e,a,t)=>{"use strict";t.d(a,{SC:()=>p,SS:()=>r,iL:()=>g,i1:()=>y,yF:()=>x,CI:()=>P,ME:()=>O,XW:()=>D,ZC:()=>T,c_:()=>U,FR:()=>k,Us:()=>j,Y6:()=>m,dX:()=>N,$j:()=>R});var c=t(63282),f=t.n(c),d=t(41442);const r=new(f())({allErrors:!0});r.addKeyword({keyword:"BN",validate:(e,a)=>{try{return BigInt(a),!0}catch(e){return!1}},errors:!0}),r.addKeyword({keyword:"isAddress",validate:(e,a)=>{try{return(0,d.PW)(a)}catch(e){return!1}},errors:!0});var n=t(94513),i=Object.defineProperty,b=Object.defineProperties,o=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,h=(e,a,t)=>a in e?i(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t;const p={type:"string",pattern:"^0x[a-fA-F0-9]{40}$",isAddress:!0},g={type:"string",BN:!0},m={type:"string",pattern:"^0x[a-fA-F0-9]{512}$"},x={type:"string",pattern:"^0x[a-fA-F0-9]{64}$"},y=b(((e,a)=>{for(var t in a||(a={}))l.call(a,t)&&h(e,t,a[t]);if(s)for(var t of s(a))u.call(a,t)&&h(e,t,a[t]);return e})({},x),o({BN:!0}));var A=Object.defineProperty,v=Object.defineProperties,w=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,C=(e,a,t)=>a in e?A(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,M=(e,a)=>{for(var t in a||(a={}))I.call(a,t)&&C(e,t,a[t]);if(_)for(var t of _(a))E.call(a,t)&&C(e,t,a[t]);return e},B=(e,a)=>v(e,w(a));const L={blockNumber:{type:"number"},logIndex:{type:"number"},transactionHash:x},S=Object.keys(L),k={type:"array",items:{anyOf:[{type:"object",properties:B(M({},L),{event:{type:"string"},id:{type:"number"},proposer:p,target:p,startTime:{type:"number"},endTime:{type:"number"},description:{type:"string"}}),required:[...S,"event","id","proposer","target","startTime","endTime","description"],additionalProperties:!1},{type:"object",properties:B(M({},L),{event:{type:"string"},proposalId:{type:"number"},voter:p,support:{type:"boolean"},votes:{type:"string"},from:p,input:{type:"string"}}),required:[...S,"event","proposalId","voter","support","votes","from","input"],additionalProperties:!1},{type:"object",properties:B(M({},L),{event:{type:"string"},account:p,delegateTo:p}),required:[...S,"account","delegateTo"],additionalProperties:!1},{type:"object",properties:B(M({},L),{event:{type:"string"},account:p,delegateFrom:p}),required:[...S,"account","delegateFrom"],additionalProperties:!1}]}},N={type:"array",items:{type:"object",properties:B(M({},L),{ensName:{type:"string"},relayerAddress:p}),required:[...S,"ensName","relayerAddress"],additionalProperties:!1}},P={type:"array",items:{type:"object",properties:B(M({},L),{commitment:x,leafIndex:{type:"number"},timestamp:{type:"number"},from:p}),required:[...S,"commitment","leafIndex","timestamp","from"],additionalProperties:!1}},R={type:"array",items:{type:"object",properties:B(M({},L),{nullifierHash:x,to:p,fee:g,timestamp:{type:"number"}}),required:[...S,"nullifierHash","to","fee","timestamp"],additionalProperties:!1}},O={type:"array",items:{type:"object",properties:B(M({},L),{address:p,encryptedAccount:{type:"string"}}),required:[...S,"address","encryptedAccount"],additionalProperties:!1}},D={type:"array",items:{type:"object",properties:B(M({},L),{encryptedNote:{type:"string"}}),required:[...S,"encryptedNote"],additionalProperties:!1}};function T(e){if(e===n.DEPOSIT)return r.compile(P);if(e===n.WITHDRAWAL)return r.compile(R);if("governance"===e)return r.compile(k);if("registered"===e)return r.compile(N);if("echo"===e)return r.compile(O);if("encrypted_notes"===e)return r.compile(D);throw new Error("Unsupported event type for schema validation")}var F=t(59499);const Q={type:"object",properties:{rewardAccount:p,gasPrices:{type:"object",properties:{fast:{type:"number"},additionalProperties:{type:"number"}},required:["fast"]},netId:{type:"integer"},tornadoServiceFee:{type:"number",maximum:20,minimum:0},latestBlock:{type:"number"},latestBalance:g,version:{type:"string"},health:{type:"object",properties:{status:{const:"true"},error:{type:"string"}},required:["status"]},syncStatus:{type:"object",properties:{events:{type:"boolean"},tokenPrice:{type:"boolean"},gasPrice:{type:"boolean"}},required:["events","tokenPrice","gasPrice"]},onSyncEvents:{type:"boolean"},currentQueue:{type:"number"}},required:["rewardAccount","instances","netId","tornadoServiceFee","version","health","currentQueue"]};function U(e,a,t){const{tokens:c,optionalTokens:f,disabledTokens:d,nativeCurrency:r}=a,n=JSON.parse(JSON.stringify(Q)),i=Object.keys(c).reduce(((e,a)=>{const{instanceAddress:t,tokenAddress:r,symbol:n,decimals:i,optionalInstances:b=[]}=c[a],o=Object.keys(t),s={type:"object",properties:{instanceAddress:{type:"object",properties:o.reduce(((e,a)=>(e[a]=p,e)),{}),required:o.filter((e=>!b.includes(e)))},decimals:{enum:[i]}},required:["instanceAddress","decimals"].concat(r?["tokenAddress"]:[],n?["symbol"]:[])};return r&&(s.properties.tokenAddress=p),n&&(s.properties.symbol={enum:[n]}),e.properties[a]=s,(null==f?void 0:f.includes(a))||(null==d?void 0:d.includes(a))||e.required.push(a),e}),{type:"object",properties:{},required:[]});n.properties.instances=i;const b=Object.keys(c).filter((e=>{var t,c;return e!==r&&!(null==(t=a.optionalTokens)?void 0:t.includes(e))&&!(null==(c=a.disabledTokens)?void 0:c.includes(e))}));if(e===F.zr.MAINNET&&b.push("torn"),b.length){const e={type:"object",properties:b.reduce(((e,a)=>(e[a]=g,e)),{}),required:b};n.properties.ethPrices=e,n.required.push("ethPrices")}return t&&n.required.push("gasPrices","latestBlock","latestBalance","syncStatus","onSyncEvents"),n}const j={type:"object",properties:{error:{type:"string"},id:{type:"string"},type:{type:"string"},status:{type:"string"},contract:{type:"string"},proof:{type:"string"},args:{type:"array",items:{type:"string"}},txHash:{type:"string"},confirmations:{type:"number"},failedReason:{type:"string"}},required:["id","status"]}},7393:(e,a,t)=>{"use strict";t.d(a,{H:()=>i});var c=t(98982),f=t(21278),d=t(67418),r=t(48486),n=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));function i(e){return n(this,arguments,(function*({provider:e,Multicall:a,currencyName:t,userAddress:n,tokenAddresses:i=[]}){const b=i.map((a=>{const t=f.Xc.connect(a,e);return[{contract:t,name:"balanceOf",params:[n]},{contract:t,name:"name"},{contract:t,name:"symbol"},{contract:t,name:"decimals"}]})).flat(),o=yield(0,r.C)(a,[{contract:a,name:"getEthBalance",params:[n]},...b.length?b:[]]),s=o[0],l=(o.slice(1).length?(0,d.iv)(o.slice(1),b.length/i.length):[]).map(((e,a)=>{const[t,c,f,d]=e;return{address:i[a],name:c,symbol:f,decimals:Number(d),balance:t}}));return[{address:c.j,name:t,symbol:t,decimals:18,balance:s},...l]}))}},96838:(e,a,t)=>{"use strict";t.d(a,{E:()=>y,o:()=>x});var c=t(30031),f=t(57194),d=t(68434),r=t(59511),n=Object.defineProperty,i=Object.defineProperties,b=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,h=Reflect.get,p=(e,a,t)=>a in e?n(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,g=(e,a)=>{for(var t in a||(a={}))l.call(a,t)&&p(e,t,a[t]);if(o)for(var t of o(a))u.call(a,t)&&p(e,t,a[t]);return e},m=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const x=5e3;class y extends f.OR{constructor({netId:e,config:a,fetchDataOptions:t}){super({netId:e,config:a,fetchDataOptions:t}),this.tovarish=!0}askRelayerStatus(e){return m(this,arguments,(function*({hostname:e,url:a,relayerAddress:t}){const c=yield(f=y.prototype,h(s(f),"askRelayerStatus",this)).call(this,{hostname:e,url:a,relayerAddress:t});var f;if(!c.version.includes("tovarish"))throw new Error("Not a tovarish relayer!");return c}))}filterRelayer(e){return m(this,null,(function*(){var a;const{ensName:t,relayerAddress:d,tovarishHost:r,tovarishNetworks:n}=e;if(!r||!(null==n?void 0:n.includes(this.netId)))return;const i=`${r}/${this.netId}`;try{const r=yield this.askRelayerStatus({hostname:i,relayerAddress:d});return{netId:r.netId,url:r.url,hostname:i,ensName:t,relayerAddress:d,rewardAccount:(0,c.b)(r.rewardAccount),instances:(0,f.XF)(r.instances),stakeBalance:e.stakeBalance,gasPrice:null==(a=r.gasPrices)?void 0:a.fast,ethPrices:r.ethPrices,currentQueue:r.currentQueue,tornadoServiceFee:r.tornadoServiceFee,latestBlock:Number(r.latestBlock),latestBalance:r.latestBalance,version:r.version,events:r.events,syncStatus:r.syncStatus}}catch(e){return{hostname:i,relayerAddress:d,errorMessage:e.message,hasError:!0}}}))}getValidRelayers(e){return m(this,null,(function*(){const a=[];return{validRelayers:(yield Promise.all(e.map((e=>this.filterRelayer(e))))).filter((e=>!(!e||e.hasError&&(a.push(e),1)))),invalidRelayers:a}}))}getEvents(e){return m(this,arguments,(function*({type:e,currency:a,amount:t,fromBlock:c,recent:f}){var n;const o=`${null==(n=this.selectedRelayer)?void 0:n.url}events`,s=(0,r.ZC)(e);try{const r=[];let n=c;for(;;){let{events:h,lastSyncBlock:p}=yield(0,d.Fd)(o,(l=g({},this.fetchDataOptions),u={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:e,currency:a,amount:t,fromBlock:c,recent:f})},i(l,b(u))));if(!s(h)){const a=`Schema validation failed for ${e} events`;throw new Error(a)}if(n=p,!Array.isArray(h)||!h.length)break;h=h.sort(((e,a)=>e.blockNumber===a.blockNumber?e.logIndex-a.logIndex:e.blockNumber-a.blockNumber));const[m]=h.slice(-1);if(h.lengthe.blockNumber!==m.blockNumber)),c=Number(m.blockNumber),r.push(...h)}return{events:r,lastSyncBlock:n}}catch(e){return console.log("Error from TovarishClient events endpoint"),console.log(e),{events:[],lastSyncBlock:c}}var l,u}))}}},21278:(e,a,t)=>{"use strict";t.d(a,{p2:()=>n,Xc:()=>b,Q2:()=>s,Hk:()=>u,Ld:()=>p,Rp:()=>m,XB:()=>c});var c={};t.r(c),t.d(c,{ENS__factory:()=>n,ERC20__factory:()=>b,Multicall__factory:()=>s,OffchainOracle__factory:()=>u,OvmGasPriceOracle__factory:()=>p,ReverseRecords__factory:()=>m});var f=t(73622),d=t(24391);const r=[{constant:!0,inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"},{internalType:"string",name:"value",type:"string"}],name:"setText",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"interfaceImplementer",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"x",type:"bytes32"},{internalType:"bytes32",name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes",name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"isAuthorised",type:"bool"}],name:"setAuthorisation",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"}],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"contentType",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"coinType",type:"uint256"},{internalType:"bytes",name:"a",type:"bytes"}],name:"setAddr",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"contenthash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"pubkey",outputs:[{internalType:"bytes32",name:"x",type:"bytes32"},{internalType:"bytes32",name:"y",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"a",type:"address"}],name:"setAddr",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes4",name:"interfaceID",type:"bytes4"},{internalType:"address",name:"implementer",type:"address"}],name:"setInterface",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"coinType",type:"uint256"}],name:"addr",outputs:[{internalType:"bytes",name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"authorisations",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ENS",name:"_ens",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bool",name:"isAuthorised",type:"bool"}],name:"AuthorisationChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"string",name:"indexedKey",type:"string"},{indexed:!1,internalType:"string",name:"key",type:"string"}],name:"TextChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"x",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"string",name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes4",name:"interfaceID",type:"bytes4"},{indexed:!1,internalType:"address",name:"implementer",type:"address"}],name:"InterfaceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"coinType",type:"uint256"},{indexed:!1,internalType:"bytes",name:"newAddress",type:"bytes"}],name:"AddressChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"uint256",name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"}];class n{static createInterface(){return new f.KA(r)}static connect(e,a){return new d.NZ(e,r,a)}}n.abi=r;const i=[{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"_totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"who",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"}];class b{static createInterface(){return new f.KA(i)}static connect(e,a){return new d.NZ(e,i,a)}}b.abi=i;const o=[{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes[]",name:"returnData",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3[]",name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3Value[]",name:"calls",type:"tuple[]"}],name:"aggregate3Value",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"blockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getBasefee",outputs:[{internalType:"uint256",name:"basefee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBlockNumber",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"chainid",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockCoinbase",outputs:[{internalType:"address",name:"coinbase",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockDifficulty",outputs:[{internalType:"uint256",name:"difficulty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockGasLimit",outputs:[{internalType:"uint256",name:"gaslimit",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"}],name:"getEthBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryAggregate",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryBlockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"}];class s{static createInterface(){return new f.KA(o)}static connect(e,a){return new d.NZ(e,o,a)}}s.abi=o;const l=[{inputs:[{internalType:"contract MultiWrapper",name:"_multiWrapper",type:"address"},{internalType:"contract IOracle[]",name:"existingOracles",type:"address[]"},{internalType:"enum OffchainOracle.OracleType[]",name:"oracleTypes",type:"uint8[]"},{internalType:"contract IERC20[]",name:"existingConnectors",type:"address[]"},{internalType:"contract IERC20",name:"wBase",type:"address"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ArraysLengthMismatch",type:"error"},{inputs:[],name:"ConnectorAlreadyAdded",type:"error"},{inputs:[],name:"InvalidOracleTokenKind",type:"error"},{inputs:[],name:"OracleAlreadyAdded",type:"error"},{inputs:[],name:"SameTokens",type:"error"},{inputs:[],name:"TooBigThreshold",type:"error"},{inputs:[],name:"UnknownConnector",type:"error"},{inputs:[],name:"UnknownOracle",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IERC20",name:"connector",type:"address"}],name:"ConnectorAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IERC20",name:"connector",type:"address"}],name:"ConnectorRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract MultiWrapper",name:"multiWrapper",type:"address"}],name:"MultiWrapperUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IOracle",name:"oracle",type:"address"},{indexed:!1,internalType:"enum OffchainOracle.OracleType",name:"oracleType",type:"uint8"}],name:"OracleAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IOracle",name:"oracle",type:"address"},{indexed:!1,internalType:"enum OffchainOracle.OracleType",name:"oracleType",type:"uint8"}],name:"OracleRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[{internalType:"contract IERC20",name:"connector",type:"address"}],name:"addConnector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IOracle",name:"oracle",type:"address"},{internalType:"enum OffchainOracle.OracleType",name:"oracleKind",type:"uint8"}],name:"addOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"connectors",outputs:[{internalType:"contract IERC20[]",name:"allConnectors",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"}],name:"getRate",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"}],name:"getRateToEth",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"},{internalType:"contract IERC20[]",name:"customConnectors",type:"address[]"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateToEthWithCustomConnectors",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateToEthWithThreshold",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"},{internalType:"contract IERC20[]",name:"customConnectors",type:"address[]"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateWithCustomConnectors",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateWithThreshold",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"multiWrapper",outputs:[{internalType:"contract MultiWrapper",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"oracles",outputs:[{internalType:"contract IOracle[]",name:"allOracles",type:"address[]"},{internalType:"enum OffchainOracle.OracleType[]",name:"oracleTypes",type:"uint8[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"connector",type:"address"}],name:"removeConnector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IOracle",name:"oracle",type:"address"},{internalType:"enum OffchainOracle.OracleType",name:"oracleKind",type:"uint8"}],name:"removeOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract MultiWrapper",name:"_multiWrapper",type:"address"}],name:"setMultiWrapper",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class u{static createInterface(){return new f.KA(l)}static connect(e,a){return new d.NZ(e,l,a)}}u.abi=l;const h=[{inputs:[{internalType:"address",name:"_owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"DecimalsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"GasPriceUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"L1BaseFeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"OverheadUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"ScalarUpdated",type:"event"},{inputs:[],name:"decimals",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"gasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_data",type:"bytes"}],name:"getL1Fee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_data",type:"bytes"}],name:"getL1GasUsed",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"l1BaseFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"overhead",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"scalar",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_decimals",type:"uint256"}],name:"setDecimals",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_gasPrice",type:"uint256"}],name:"setGasPrice",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_baseFee",type:"uint256"}],name:"setL1BaseFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_overhead",type:"uint256"}],name:"setOverhead",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_scalar",type:"uint256"}],name:"setScalar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class p{static createInterface(){return new f.KA(h)}static connect(e,a){return new d.NZ(e,h,a)}}p.abi=h;const g=[{inputs:[{internalType:"contract ENS",name:"_ens",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address[]",name:"addresses",type:"address[]"}],name:"getNames",outputs:[{internalType:"string[]",name:"r",type:"string[]"}],stateMutability:"view",type:"function"}];class m{static createInterface(){return new f.KA(g)}static connect(e,a){return new d.NZ(e,g,a)}}m.abi=g},67418:(e,a,t)=>{"use strict";t.d(a,{$W:()=>w,EI:()=>v,Et:()=>i,Id:()=>l,Ju:()=>x,Kp:()=>p,Ll:()=>n,My:()=>g,aT:()=>m,ae:()=>A,br:()=>M,gn:()=>E,ib:()=>I,if:()=>h,iv:()=>b,jm:()=>y,lY:()=>u,sY:()=>_,uU:()=>C,wv:()=>s,yy:()=>o});var c=t(91565),f=t(39404),d=t.n(f),r=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));BigInt.prototype.toJSON=function(){return this.toString()};const n=!process.browser&&void 0===globalThis.window,i=n?c.webcrypto:globalThis.crypto,b=(e,a)=>[...Array(Math.ceil(e.length/a))].map(((t,c)=>e.slice(a*c,a+a*c)));function o(e){return new Promise((a=>setTimeout(a,e)))}function s(e,a){try{const t=new URL(e);return!a||!a.length||a.map((e=>e.toLowerCase())).includes(t.protocol)}catch(e){return!1}}function l(...e){const a=e.reduce(((e,a)=>e+a.length),0),t=new Uint8Array(a);return e.forEach(((e,a,c)=>{const f=c.slice(0,a).reduce(((e,a)=>e+a.length),0);t.set(e,f)})),t}function u(e){return new Uint8Array(e.buffer)}function h(e){return btoa(e.reduce(((e,a)=>e+String.fromCharCode(a)),""))}function p(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}function g(e){return"0x"+Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join("")}function m(e){return"0x"===e.slice(0,2)&&(e=e.replace("0x","")),e.length%2!=0&&(e="0"+e),Uint8Array.from(e.match(/.{1,2}/g).map((e=>parseInt(e,16))))}function x(e){return BigInt(g(e))}function y(e){let a="bigint"==typeof e?e.toString(16):e;return a.startsWith("0x")&&(a=a.replace("0x","")),a.length%2!=0&&(a="0"+a),Uint8Array.from(a.match(/.{1,2}/g).map((e=>parseInt(e,16))))}function A(e){return new(d())(e,16,"le")}function v(e){return Uint8Array.from(new(d())(e).toArray("le",31))}function w(e,a=32){return"0x"+BigInt(e).toString(16).padStart(2*a,"0")}function _(e,a=32){return"0x"+(e=e.replace("0x","")).padStart(2*a,"0")}function I(e=31){return x(i.getRandomValues(new Uint8Array(e)))}function E(e,a){return"bigint"==typeof a?a.toString():a}function C(e,a=10){return e.length<2*a?e:`${e.substring(0,a)}...${e.substring(e.length-a)}`}function M(e,a="SHA-384"){return r(this,null,(function*(){return new Uint8Array(yield i.subtle.digest(a,e))}))}},26746:(e,a,t)=>{"use strict";t.d(a,{O:()=>b,i:()=>o});var c=t(84276),f=t(36336),d=t.n(f),r=t(67418),n=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));let i;function b(){return n(this,null,(function*(){i||(i=yield d()({wasmInitialMemory:2e3}))}))}function o(e,a,t){return n(this,null,(function*(){i||(yield b());const f={root:e.root,nullifierHash:BigInt(e.nullifierHex).toString(),recipient:BigInt(e.recipient),relayer:BigInt(e.relayer),fee:e.fee,refund:e.refund,nullifier:e.nullifier,secret:e.secret,pathElements:e.pathElements,pathIndices:e.pathIndices};console.log("Start generating SNARK proof",f),console.time("SNARK proof time");const d=yield c.genWitnessAndProve(yield i,f,a,t),n=c.toSolidityInput(d).proof;return console.timeEnd("SNARK proof time"),{proof:n,args:[(0,r.$W)(e.root,32),(0,r.$W)(e.nullifierHex,32),e.recipient,e.relayer,(0,r.$W)(e.fee,32),(0,r.$W)(e.refund,32)]}}))}},18995:(e,a,t)=>{"use strict";t.d(a,{_6:()=>Ce,fY:()=>Ee,a8:()=>Ie});var c={},f=Uint8Array,d=Uint16Array,r=Int32Array,n=new f([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new f([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),b=new f([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=function(e,a){for(var t=new d(31),c=0;c<31;++c)t[c]=a+=1<>1|(21845&x)<<1;y=(61680&(y=(52428&y)>>2|(13107&y)<<2))>>4|(3855&y)<<4,m[x]=((65280&y)>>8|(255&y)<<8)>>1}var A=function(e,a,t){for(var c=e.length,f=0,r=new d(a);f>b]=o}else for(n=new d(c),f=0;f>15-e[f]);return n},v=new f(288);for(x=0;x<144;++x)v[x]=8;for(x=144;x<256;++x)v[x]=9;for(x=256;x<280;++x)v[x]=7;for(x=280;x<288;++x)v[x]=8;var w=new f(32);for(x=0;x<32;++x)w[x]=5;var _=A(v,9,0),I=A(v,9,1),E=A(w,5,0),C=A(w,5,1),M=function(e){for(var a=e[0],t=1;ta&&(a=e[t]);return a},B=function(e,a,t){var c=a/8|0;return(e[c]|e[c+1]<<8)>>(7&a)&t},L=function(e,a){var t=a/8|0;return(e[t]|e[t+1]<<8|e[t+2]<<16)>>(7&a)},S=function(e){return(e+7)/8|0},k=function(e,a,t){return(null==a||a<0)&&(a=0),(null==t||t>e.length)&&(t=e.length),new f(e.subarray(a,t))},N=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],P=function(e,a,t){var c=new Error(a||N[e]);if(c.code=e,Error.captureStackTrace&&Error.captureStackTrace(c,P),!t)throw c;return c},R=function(e,a,t,c){var d=e.length,r=c?c.length:0;if(!d||a.f&&!a.l)return t||new f(0);var o=!t,s=o||2!=a.i,u=a.i;o&&(t=new f(3*d));var h=function(e){var a=t.length;if(e>a){var c=new f(Math.max(2*a,e));c.set(t),t=c}},g=a.f||0,m=a.p||0,x=a.b||0,y=a.l,v=a.d,w=a.m,_=a.n,E=8*d;do{if(!y){g=B(e,m,1);var N=B(e,m+1,3);if(m+=3,!N){var R=e[(G=S(m)+4)-4]|e[G-3]<<8,O=G+R;if(O>d){u&&P(0);break}s&&h(x+R),t.set(e.subarray(G,O),x),a.b=x+=R,a.p=m=8*O,a.f=g;continue}if(1==N)y=I,v=C,w=9,_=5;else if(2==N){var D=B(e,m,31)+257,T=B(e,m+10,15)+4,F=D+B(e,m+5,31)+1;m+=14;for(var Q=new f(F),U=new f(19),j=0;j>4)<16)Q[j++]=G;else{var K=0,V=0;for(16==G?(V=3+B(e,m,3),m+=2,K=Q[j-1]):17==G?(V=3+B(e,m,7),m+=3):18==G&&(V=11+B(e,m,127),m+=7);V--;)Q[j++]=K}}var Z=Q.subarray(0,D),J=Q.subarray(D);w=M(Z),_=M(J),y=A(Z,w,1),v=A(J,_,1)}else P(1);if(m>E){u&&P(0);break}}s&&h(x+131072);for(var W=(1<>4;if((m+=15&K)>E){u&&P(0);break}if(K||P(2),ee<256)t[x++]=ee;else{if(256==ee){X=m,y=null;break}var ae=ee-254;if(ee>264){var te=n[j=ee-257];ae=B(e,m,(1<>4;if(ce||P(3),m+=15&ce,J=p[fe],fe>3&&(te=i[fe],J+=L(e,m)&(1<E){u&&P(0);break}s&&h(x+131072);var de=x+ae;if(x>8},D=function(e,a,t){t<<=7&a;var c=a/8|0;e[c]|=t,e[c+1]|=t>>8,e[c+2]|=t>>16},T=function(e,a){for(var t=[],c=0;ch&&(h=n[c].s);var p=new d(h+1),g=F(t[l-1],p,0);if(g>a){c=0;var m=0,x=g-a,y=1<a))break;m+=y-(1<>=x;m>0;){var v=n[c].s;p[v]=0&&m;--c){var w=n[c].s;p[w]==a&&(--p[w],++m)}g=a}return{t:new f(p),l:g}},F=function(e,a,t){return-1==e.s?Math.max(F(e.l,a,t+1),F(e.r,a,t+1)):a[e.s]=t},Q=function(e){for(var a=e.length;a&&!e[--a];);for(var t=new d(++a),c=0,f=e[0],r=1,n=function(e){t[c++]=e},i=1;i<=a;++i)if(e[i]==f&&i!=a)++r;else{if(!f&&r>2){for(;r>138;r-=138)n(32754);r>2&&(n(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(n(f),--r;r>6;r-=6)n(8304);r>2&&(n(r-3<<5|8208),r=0)}for(;r--;)n(f);r=1,f=e[i]}return{c:t.subarray(0,c),n:a}},U=function(e,a){for(var t=0,c=0;c>8,e[f+2]=255^e[f],e[f+3]=255^e[f+1];for(var d=0;d4&&!F[b[$-1]];--$);var q,G,z,K,V=u+5<<3,Z=U(f,v)+U(r,w)+o,J=U(f,g)+U(r,y)+o+14+3*$+U(N,F)+2*N[16]+3*N[17]+7*N[18];if(l>=0&&V<=Z&&V<=J)return j(a,h,e.subarray(l,l+u));if(O(a,h,1+(J15&&(O(a,h,ee[P]>>5&127),h+=ee[P]>>12)}}}else q=_,G=v,z=E,K=w;for(P=0;P255){D(a,h,q[257+(ae=te>>18&31)]),h+=G[ae+257],ae>7&&(O(a,h,te>>23&31),h+=n[ae]);var ce=31&te;D(a,h,z[ce]),h+=K[ce],ce>3&&(D(a,h,te>>5&8191),h+=i[ce])}else D(a,h,q[te]),h+=G[te]}return D(a,h,q[256]),h+G[256]},$=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),q=new f(0),G=function(e,a,t,c,b,o){var s=o.z||e.length,l=new f(c+s+5*(1+Math.ceil(s/7e3))+b),h=l.subarray(c,l.length-b),p=o.l,m=7&(o.r||0);if(a){m&&(h[0]=o.r>>3);for(var x=$[a-1],y=x>>13,A=8191&x,v=(1<7e3||O>24576)&&(q>423||!p)){m=H(e,h,0,M,B,L,P,O,T,R-T,m),O=N=P=0,T=R;for(var G=0;G<286;++G)B[G]=0;for(G=0;G<30;++G)L[G]=0}var z=2,K=0,V=A,Z=Q-U&32767;if(q>2&&F==C(R-Z))for(var J=Math.min(y,q)-1,W=Math.min(32767,R),Y=Math.min(258,q);Z<=W&&--V&&Q!=U;){if(e[R+z]==e[R+z-Z]){for(var X=0;Xz){if(z=X,K=Z,X>J)break;var ee=Math.min(Z,X-2),ae=0;for(G=0;Gae&&(ae=ce,U=te)}}}Z+=(Q=U)-(U=w[Q])&32767}if(K){M[O++]=268435456|u[z]<<18|g[K];var fe=31&u[z],de=31&g[K];P+=n[fe]+i[de],++B[257+fe],++L[de],D=R+z,++N}else M[O++]=e[R],++B[e[R]]}}for(R=Math.max(R,D);R=s&&(h[m/8|0]=p,re=s),m=j(h,m+1,e.subarray(R,re))}o.i=s}return k(l,0,c+S(m)+b)},z=function(){for(var e=new Int32Array(256),a=0;a<256;++a){for(var t=a,c=9;--c;)t=(1&t&&-306674912)^t>>>1;e[a]=t}return e}(),K=function(){var e=-1;return{p:function(a){for(var t=e,c=0;c>>8;e=t},d:function(){return~e}}},V=function(e,a,t,c,d){if(!d&&(d={l:1},a.dictionary)){var r=a.dictionary.subarray(-32768),n=new f(r.length+e.length);n.set(r),n.set(e,r.length),e=n,d.w=r.length}return G(e,null==a.level?6:a.level,null==a.mem?d.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+a.mem,t,c,d)},Z=function(e,a){var t={};for(var c in e)t[c]=e[c];for(var c in a)t[c]=a[c];return t},J=function(e,a,t){for(var c=e(),f=e.toString(),d=f.slice(f.indexOf("[")+1,f.lastIndexOf("]")).replace(/\s+/g,"").split(","),r=0;r>>0},de=function(e,a){return fe(e,a)+4294967296*fe(e,a+4)},re=function(e,a,t){for(;t;++a)e[a]=t,t>>>=8};function ne(e,a){return V(e,a||{},0,0)}function ie(e,a){return R(e,{i:2},a&&a.out,a&&a.dictionary)}var be=function(e,a,t,c){for(var d in e){var r=e[d],n=a+d,i=c;Array.isArray(r)&&(i=Z(c,r[1]),r=r[0]),r instanceof f?t[n]=[r,i]:(t[n+="/"]=[new f(0),i],be(r,n,t,c))}},oe="undefined"!=typeof TextEncoder&&new TextEncoder,se="undefined"!=typeof TextDecoder&&new TextDecoder;try{se.decode(q,{stream:!0})}catch(e){}function le(e,a){if(a){for(var t=new f(e.length),c=0;c>1)),n=0,i=function(e){r[n++]=e};for(c=0;cr.length){var b=new f(n+8+(d-c<<1));b.set(r),r=b}var o=e.charCodeAt(c);o<128||a?i(o):o<2048?(i(192|o>>6),i(128|63&o)):o>55295&&o<57344?(i(240|(o=65536+(1047552&o)|1023&e.charCodeAt(++c))>>18),i(128|o>>12&63),i(128|o>>6&63),i(128|63&o)):(i(224|o>>12),i(128|o>>6&63),i(128|63&o))}return k(r,0,n)}function ue(e,a){if(a){for(var t="",c=0;c127)+(c>223)+(c>239);if(t+f>e.length)return{s:a,r:k(e,t-1)};f?3==f?(c=((15&c)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,a+=String.fromCharCode(55296|c>>10,56320|1023&c)):a+=1&f?String.fromCharCode((31&c)<<6|63&e[t++]):String.fromCharCode((15&c)<<12|(63&e[t++])<<6|63&e[t++]):a+=String.fromCharCode(c)}}(e),d=f.s;return(t=f.r).length&&P(8),d}var he=function(e,a){return a+30+ce(e,a+26)+ce(e,a+28)},pe=function(e,a,t){var c=ce(e,a+28),f=ue(e.subarray(a+46,a+46+c),!(2048&ce(e,a+8))),d=a+46+c,r=fe(e,a+20),n=t&&4294967295==r?ge(e,d):[r,fe(e,a+24),fe(e,a+42)],i=n[0],b=n[1],o=n[2];return[ce(e,a+10),i,b,f,d+ce(e,a+30)+ce(e,a+32),o]},ge=function(e,a){for(;1!=ce(e,a);a+=4+ce(e,a+2));return[de(e,a+12),de(e,a+4),de(e,a+20)]},me=function(e){var a=0;if(e)for(var t in e){var c=e[t].length;c>65535&&P(9),a+=c+4}return a},xe=function(e,a,t,c,f,d,r,n){var i=c.length,b=t.extra,o=n&&n.length,s=me(b);re(e,a,null!=r?33639248:67324752),a+=4,null!=r&&(e[a++]=20,e[a++]=t.os),e[a]=20,a+=2,e[a++]=t.flag<<1|(d<0&&8),e[a++]=f&&8,e[a++]=255&t.compression,e[a++]=t.compression>>8;var l=new Date(null==t.mtime?Date.now():t.mtime),u=l.getFullYear()-1980;if((u<0||u>119)&&P(10),re(e,a,u<<25|l.getMonth()+1<<21|l.getDate()<<16|l.getHours()<<11|l.getMinutes()<<5|l.getSeconds()>>1),a+=4,-1!=d&&(re(e,a,t.crc),re(e,a+4,d<0?-d-2:d),re(e,a+8,t.size)),re(e,a+12,i),re(e,a+14,s),a+=16,null!=r&&(re(e,a,o),re(e,a+6,t.attrs),re(e,a+10,r),a+=14),e.set(c,a),a+=i,s)for(var h in b){var p=b[h],g=p.length;re(e,a,+h),re(e,a+2,g),e.set(p,a+4),a+=4+g}return o&&(e.set(n,a),a+=o),a},ye=function(e,a,t,c,f){re(e,a,101010256),re(e,a+8,t),re(e,a+10,t),re(e,a+12,c),re(e,a+16,f)};var Ae="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()},ve=t(68434),we=t(67418),_e=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));function Ie(e){return new Promise(((a,t)=>{!function(e,a,t){t||(t=a,a={}),"function"!=typeof t&&P(7);var c={};be(e,"",c,a);var d=Object.keys(c),r=d.length,n=0,i=0,b=r,o=new Array(r),s=[],l=function(){for(var e=0;e65535&&I(P(11,0,1),null),_)if(g<16e4)try{I(null,ne(f,b))}catch(e){I(e,null)}else s.push(function(e,a,t){return t||(t=a,a={}),"function"!=typeof t&&P(7),te(e,a,[X],(function(e){return ee(ne(e.data[0],e.data[1]))}),0,t)}(f,b,I));else I(null,f)},g=0;g{e?t(e):a(c)}))}))}function Ee(e){return new Promise(((a,t)=>{!function(e,a,t){t||(t=a,a={}),"function"!=typeof t&&P(7);var c=[],d=function(){for(var e=0;e65558)return n(P(13,0,1),null),d;var b=ce(e,i+8);if(b){var o=b,s=fe(e,i+16),l=4294967295==s||65535==o;if(l){var u=fe(e,i-12);(l=101075792==fe(e,u))&&(o=b=fe(e,u+32),s=fe(e,u+48))}for(var h=a&&a.filter,p=function(a){var t=pe(e,s,l),i=t[0],o=t[1],u=t[2],p=t[3],g=t[4],m=t[5],x=he(e,m);s=g;var y=function(e,a){e?(d(),n(e,null)):(a&&(r[p]=a),--b||n(null,r))};if(!h||h({name:p,size:o,originalSize:u,compression:i}))if(i)if(8==i){var A=e.subarray(x,x+o);if(u<524288||o>.8*u)try{y(null,ie(A,{out:new f(u)}))}catch(e){y(e,null)}else c.push(function(e,a,t){return t||(t=a,a={}),"function"!=typeof t&&P(7),te(e,a,[Y],(function(e){return ee(ie(e.data[0],ae(e.data[1])))}),1,t)}(A,{size:u},y))}else y(P(14,"unknown compression type "+i,1),null);else y(null,k(e,x,x+o));else y(null,null)},g=0;g{e?t(e):a(c)}))}))}function Ce(e){return _e(this,arguments,(function*({staticUrl:e="",zipName:a,zipDigest:t,parseJson:c=!0}){const f=`${e}/${a}.zip`,d=yield(0,ve.Fd)(f,{method:"GET",returnResponse:!0}),r=new Uint8Array(yield d.arrayBuffer());if(t){const e="sha384-"+(0,we.if)(yield(0,we.br)(r));if(t!==e)throw new Error(`Invalid digest hash for file ${f}, wants ${t} has ${e}`)}const{[a]:n}=yield Ee(r);return console.log(`Downloaded ${f}${t?` ( Digest: ${t} )`:""}`),c?JSON.parse((new TextDecoder).decode(n)):n}))}},32019:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.keccak512=a.keccak384=a.keccak256=a.keccak224=void 0;const c=t(32955),f=t(82672);a.keccak224=(0,f.wrapHash)(c.keccak_224),a.keccak256=(()=>{const e=(0,f.wrapHash)(c.keccak_256);return e.create=c.keccak_256.create,e})(),a.keccak384=(0,f.wrapHash)(c.keccak_384),a.keccak512=(0,f.wrapHash)(c.keccak_512)},26513:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.secp256k1=void 0;var c=t(8510);Object.defineProperty(a,"secp256k1",{enumerable:!0,get:function(){return c.secp256k1}})},82672:function(e,a,t){"use strict";e=t.nmd(e);var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.crypto=a.utf8ToBytes=a.createView=a.concatBytes=a.toHex=a.bytesToHex=a.assertBytes=a.assertBool=void 0,a.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},a.hexToBytes=function(e){const a=e.startsWith("0x")?e.substring(2):e;return(0,d.hexToBytes)(a)},a.equalsBytes=function(e,a){if(e.length!==a.length)return!1;for(let t=0;t(f.default.bytes(a),e(a))};const f=c(t(67557)),d=t(99175),r=f.default.bool;a.assertBool=r;const n=f.default.bytes;a.assertBytes=n;var i=t(99175);Object.defineProperty(a,"bytesToHex",{enumerable:!0,get:function(){return i.bytesToHex}}),Object.defineProperty(a,"toHex",{enumerable:!0,get:function(){return i.bytesToHex}}),Object.defineProperty(a,"concatBytes",{enumerable:!0,get:function(){return i.concatBytes}}),Object.defineProperty(a,"createView",{enumerable:!0,get:function(){return i.createView}}),Object.defineProperty(a,"utf8ToBytes",{enumerable:!0,get:function(){return i.utf8ToBytes}}),a.crypto=(()=>{const a="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,t="function"==typeof e.require&&e.require.bind(e);return{node:t&&!a?t("crypto"):void 0,web:a}})()},37007:e=>{"use strict";var a,t="object"==typeof Reflect?Reflect:null,c=t&&"function"==typeof t.apply?t.apply:function(e,a,t){return Function.prototype.apply.call(e,a,t)};a=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var f=Number.isNaN||function(e){return e!=e};function d(){d.init.call(this)}e.exports=d,e.exports.once=function(e,a){return new Promise((function(t,c){function f(t){e.removeListener(a,d),c(t)}function d(){"function"==typeof e.removeListener&&e.removeListener("error",f),t([].slice.call(arguments))}p(e,a,d,{once:!0}),"error"!==a&&function(e,a){"function"==typeof e.on&&p(e,"error",a,{once:!0})}(e,f)}))},d.EventEmitter=d,d.prototype._events=void 0,d.prototype._eventsCount=0,d.prototype._maxListeners=void 0;var r=10;function n(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function i(e){return void 0===e._maxListeners?d.defaultMaxListeners:e._maxListeners}function b(e,a,t,c){var f,d,r,b;if(n(t),void 0===(d=e._events)?(d=e._events=Object.create(null),e._eventsCount=0):(void 0!==d.newListener&&(e.emit("newListener",a,t.listener?t.listener:t),d=e._events),r=d[a]),void 0===r)r=d[a]=t,++e._eventsCount;else if("function"==typeof r?r=d[a]=c?[t,r]:[r,t]:c?r.unshift(t):r.push(t),(f=i(e))>0&&r.length>f&&!r.warned){r.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(a)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=a,o.count=r.length,b=o,console&&console.warn&&console.warn(b)}return e}function o(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(e,a,t){var c={fired:!1,wrapFn:void 0,target:e,type:a,listener:t},f=o.bind(c);return f.listener=t,c.wrapFn=f,f}function l(e,a,t){var c=e._events;if(void 0===c)return[];var f=c[a];return void 0===f?[]:"function"==typeof f?t?[f.listener||f]:[f]:t?function(e){for(var a=new Array(e.length),t=0;t0&&(r=a[0]),r instanceof Error)throw r;var n=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw n.context=r,n}var i=d[e];if(void 0===i)return!1;if("function"==typeof i)c(i,this,a);else{var b=i.length,o=h(i,b);for(t=0;t=0;d--)if(t[d]===a||t[d].listener===a){r=t[d].listener,f=d;break}if(f<0)return this;0===f?t.shift():function(e,a){for(;a+1=0;c--)this.removeListener(e,a[c]);return this},d.prototype.listeners=function(e){return l(this,e,!0)},d.prototype.rawListeners=function(e){return l(this,e,!1)},d.listenerCount=function(e,a){return"function"==typeof e.listenerCount?e.listenerCount(a):u.call(e,a)},d.prototype.listenerCount=u,d.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]}},68078:(e,a,t)=>{var c=t(92861).Buffer,f=t(88276);e.exports=function(e,a,t,d){if(c.isBuffer(e)||(e=c.from(e,"binary")),a&&(c.isBuffer(a)||(a=c.from(a,"binary")),8!==a.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var r=t/8,n=c.alloc(r),i=c.alloc(d||0),b=c.alloc(0);r>0||d>0;){var o=new f;o.update(b),o.update(e),a&&o.update(a),b=o.digest();var s=0;if(r>0){var l=n.length-r;s=Math.min(r,b.length),b.copy(n,l,0,s),r-=s}if(s0){var u=i.length-d,h=Math.min(d,b.length-s);b.copy(i,u,s,s+h),d-=h}}return b.fill(0),{key:n,iv:i}}},32017:e=>{"use strict";e.exports=function e(a,t){if(a===t)return!0;if(a&&t&&"object"==typeof a&&"object"==typeof t){if(a.constructor!==t.constructor)return!1;var c,f,d;if(Array.isArray(a)){if((c=a.length)!=t.length)return!1;for(f=c;0!=f--;)if(!e(a[f],t[f]))return!1;return!0}if(a.constructor===RegExp)return a.source===t.source&&a.flags===t.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===t.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===t.toString();if((c=(d=Object.keys(a)).length)!==Object.keys(t).length)return!1;for(f=c;0!=f--;)if(!Object.prototype.hasOwnProperty.call(t,d[f]))return!1;for(f=c;0!=f--;){var r=d[f];if(!e(a[r],t[r]))return!1}return!0}return a!=a&&t!=t}},82682:(e,a,t)=>{"use strict";var c=t(69600),f=Object.prototype.toString,d=Object.prototype.hasOwnProperty;e.exports=function(e,a,t){if(!c(a))throw new TypeError("iterator must be a function");var r;arguments.length>=3&&(r=t),"[object Array]"===f.call(e)?function(e,a,t){for(var c=0,f=e.length;c{"use strict";var a=Object.prototype.toString,t=Math.max,c=function(e,a){for(var t=[],c=0;c{"use strict";var c=t(89353);e.exports=Function.prototype.bind||c},70453:(e,a,t)=>{"use strict";var c,f=t(69383),d=t(41237),r=t(79290),n=t(79538),i=t(58068),b=t(69675),o=t(35345),s=Function,l=function(e){try{return s('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var h=function(){throw new b},p=u?function(){try{return h}catch(e){try{return u(arguments,"callee").get}catch(e){return h}}}():h,g=t(64039)(),m=t(80024)(),x=Object.getPrototypeOf||(m?function(e){return e.__proto__}:null),y={},A="undefined"!=typeof Uint8Array&&x?x(Uint8Array):c,v={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?c:ArrayBuffer,"%ArrayIteratorPrototype%":g&&x?x([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?c:Atomics,"%BigInt%":"undefined"==typeof BigInt?c:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?c:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?c:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":f,"%eval%":eval,"%EvalError%":d,"%Float32Array%":"undefined"==typeof Float32Array?c:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?c:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?c:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?c:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?c:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&x?x(x([][Symbol.iterator]())):c,"%JSON%":"object"==typeof JSON?JSON:c,"%Map%":"undefined"==typeof Map?c:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&x?x((new Map)[Symbol.iterator]()):c,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?c:Promise,"%Proxy%":"undefined"==typeof Proxy?c:Proxy,"%RangeError%":r,"%ReferenceError%":n,"%Reflect%":"undefined"==typeof Reflect?c:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?c:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&x?x((new Set)[Symbol.iterator]()):c,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&x?x(""[Symbol.iterator]()):c,"%Symbol%":g?Symbol:c,"%SyntaxError%":i,"%ThrowTypeError%":p,"%TypedArray%":A,"%TypeError%":b,"%Uint8Array%":"undefined"==typeof Uint8Array?c:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?c:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?c:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?c:Uint32Array,"%URIError%":o,"%WeakMap%":"undefined"==typeof WeakMap?c:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?c:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?c:WeakSet};if(x)try{null.error}catch(e){var w=x(x(e));v["%Error.prototype%"]=w}var _=function e(a){var t;if("%AsyncFunction%"===a)t=l("async function () {}");else if("%GeneratorFunction%"===a)t=l("function* () {}");else if("%AsyncGeneratorFunction%"===a)t=l("async function* () {}");else if("%AsyncGenerator%"===a){var c=e("%AsyncGeneratorFunction%");c&&(t=c.prototype)}else if("%AsyncIteratorPrototype%"===a){var f=e("%AsyncGenerator%");f&&x&&(t=x(f.prototype))}return v[a]=t,t},I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=t(66743),C=t(9957),M=E.call(Function.call,Array.prototype.concat),B=E.call(Function.apply,Array.prototype.splice),L=E.call(Function.call,String.prototype.replace),S=E.call(Function.call,String.prototype.slice),k=E.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g,R=function(e,a){var t,c=e;if(C(I,c)&&(c="%"+(t=I[c])[0]+"%"),C(v,c)){var f=v[c];if(f===y&&(f=_(c)),void 0===f&&!a)throw new b("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:t,name:c,value:f}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,a){if("string"!=typeof e||0===e.length)throw new b("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof a)throw new b('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=function(e){var a=S(e,0,1),t=S(e,-1);if("%"===a&&"%"!==t)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===t&&"%"!==a)throw new i("invalid intrinsic syntax, expected opening `%`");var c=[];return L(e,N,(function(e,a,t,f){c[c.length]=t?L(f,P,"$1"):a||e})),c}(e),c=t.length>0?t[0]:"",f=R("%"+c+"%",a),d=f.name,r=f.value,n=!1,o=f.alias;o&&(c=o[0],B(t,M([0,1],o)));for(var s=1,l=!0;s=t.length){var m=u(r,h);r=(l=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:r[h]}else l=C(r,h),r=r[h];l&&!n&&(v[d]=r)}}return r}},75795:(e,a,t)=>{"use strict";var c=t(70453)("%Object.getOwnPropertyDescriptor%",!0);if(c)try{c([],"length")}catch(e){c=null}e.exports=c},30592:(e,a,t)=>{"use strict";var c=t(30655),f=function(){return!!c};f.hasArrayLengthDefineBug=function(){if(!c)return null;try{return 1!==c([],"length",{value:1}).length}catch(e){return!0}},e.exports=f},80024:e=>{"use strict";var a={__proto__:null,foo:{}},t=Object;e.exports=function(){return{__proto__:a}.foo===a.foo&&!(a instanceof t)}},64039:(e,a,t)=>{"use strict";var c="undefined"!=typeof Symbol&&Symbol,f=t(41333);e.exports=function(){return"function"==typeof c&&"function"==typeof Symbol&&"symbol"==typeof c("foo")&&"symbol"==typeof Symbol("bar")&&f()}},41333:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},a=Symbol("test"),t=Object(a);if("string"==typeof a)return!1;if("[object Symbol]"!==Object.prototype.toString.call(a))return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;for(a in e[a]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var c=Object.getOwnPropertySymbols(e);if(1!==c.length||c[0]!==a)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var f=Object.getOwnPropertyDescriptor(e,a);if(42!==f.value||!0!==f.enumerable)return!1}return!0}},49092:(e,a,t)=>{"use strict";var c=t(41333);e.exports=function(){return c()&&!!Symbol.toStringTag}},77952:(e,a,t)=>{var c=a;c.utils=t(67426),c.common=t(66166),c.sha=t(46229),c.ripemd=t(46784),c.hmac=t(28948),c.sha1=c.sha.sha1,c.sha256=c.sha.sha256,c.sha224=c.sha.sha224,c.sha384=c.sha.sha384,c.sha512=c.sha.sha512,c.ripemd160=c.ripemd.ripemd160},66166:(e,a,t)=>{"use strict";var c=t(67426),f=t(43349);function d(){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}a.BlockHash=d,d.prototype.update=function(e,a){if(e=c.toArray(e,a),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var t=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-t,e.length),0===this.pending.length&&(this.pending=null),e=c.join32(e,0,e.length-t,this.endian);for(var f=0;f>>24&255,c[f++]=e>>>16&255,c[f++]=e>>>8&255,c[f++]=255&e}else for(c[f++]=255&e,c[f++]=e>>>8&255,c[f++]=e>>>16&255,c[f++]=e>>>24&255,c[f++]=0,c[f++]=0,c[f++]=0,c[f++]=0,d=8;d{"use strict";var c=t(67426),f=t(43349);function d(e,a,t){if(!(this instanceof d))return new d(e,a,t);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(c.toArray(a,t))}e.exports=d,d.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),f(e.length<=this.blockSize);for(var a=e.length;a{"use strict";var c=t(67426),f=t(66166),d=c.rotl32,r=c.sum32,n=c.sum32_3,i=c.sum32_4,b=f.BlockHash;function o(){if(!(this instanceof o))return new o;b.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function s(e,a,t,c){return e<=15?a^t^c:e<=31?a&t|~a&c:e<=47?(a|~t)^c:e<=63?a&c|t&~c:a^(t|~c)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function u(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}c.inherits(o,b),a.ripemd160=o,o.blockSize=512,o.outSize=160,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(e,a){for(var t=this.h[0],c=this.h[1],f=this.h[2],b=this.h[3],o=this.h[4],x=t,y=c,A=f,v=b,w=o,_=0;_<80;_++){var I=r(d(i(t,s(_,c,f,b),e[h[_]+a],l(_)),g[_]),o);t=o,o=b,b=d(f,10),f=c,c=I,I=r(d(i(x,s(79-_,y,A,v),e[p[_]+a],u(_)),m[_]),w),x=w,w=v,v=d(A,10),A=y,y=I}I=n(this.h[1],f,v),this.h[1]=n(this.h[2],b,w),this.h[2]=n(this.h[3],o,x),this.h[3]=n(this.h[4],t,y),this.h[4]=n(this.h[0],c,A),this.h[0]=I},o.prototype._digest=function(e){return"hex"===e?c.toHex32(this.h,"little"):c.split32(this.h,"little")};var h=[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],p=[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],g=[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],m=[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]},46229:(e,a,t)=>{"use strict";a.sha1=t(43917),a.sha224=t(47714),a.sha256=t(2287),a.sha384=t(21911),a.sha512=t(57766)},43917:(e,a,t)=>{"use strict";var c=t(67426),f=t(66166),d=t(66225),r=c.rotl32,n=c.sum32,i=c.sum32_5,b=d.ft_1,o=f.BlockHash,s=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}c.inherits(l,o),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,a){for(var t=this.W,c=0;c<16;c++)t[c]=e[a+c];for(;c{"use strict";var c=t(67426),f=t(2287);function d(){if(!(this instanceof d))return new d;f.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}c.inherits(d,f),e.exports=d,d.blockSize=512,d.outSize=224,d.hmacStrength=192,d.padLength=64,d.prototype._digest=function(e){return"hex"===e?c.toHex32(this.h.slice(0,7),"big"):c.split32(this.h.slice(0,7),"big")}},2287:(e,a,t)=>{"use strict";var c=t(67426),f=t(66166),d=t(66225),r=t(43349),n=c.sum32,i=c.sum32_4,b=c.sum32_5,o=d.ch32,s=d.maj32,l=d.s0_256,u=d.s1_256,h=d.g0_256,p=d.g1_256,g=f.BlockHash,m=[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 x(){if(!(this instanceof x))return new x;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}c.inherits(x,g),e.exports=x,x.blockSize=512,x.outSize=256,x.hmacStrength=192,x.padLength=64,x.prototype._update=function(e,a){for(var t=this.W,c=0;c<16;c++)t[c]=e[a+c];for(;c{"use strict";var c=t(67426),f=t(57766);function d(){if(!(this instanceof d))return new d;f.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}c.inherits(d,f),e.exports=d,d.blockSize=1024,d.outSize=384,d.hmacStrength=192,d.padLength=128,d.prototype._digest=function(e){return"hex"===e?c.toHex32(this.h.slice(0,12),"big"):c.split32(this.h.slice(0,12),"big")}},57766:(e,a,t)=>{"use strict";var c=t(67426),f=t(66166),d=t(43349),r=c.rotr64_hi,n=c.rotr64_lo,i=c.shr64_hi,b=c.shr64_lo,o=c.sum64,s=c.sum64_hi,l=c.sum64_lo,u=c.sum64_4_hi,h=c.sum64_4_lo,p=c.sum64_5_hi,g=c.sum64_5_lo,m=f.BlockHash,x=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=x,this.W=new Array(160)}function A(e,a,t,c,f){var d=e&t^~e&f;return d<0&&(d+=4294967296),d}function v(e,a,t,c,f,d){var r=a&c^~a&d;return r<0&&(r+=4294967296),r}function w(e,a,t,c,f){var d=e&t^e&f^t&f;return d<0&&(d+=4294967296),d}function _(e,a,t,c,f,d){var r=a&c^a&d^c&d;return r<0&&(r+=4294967296),r}function I(e,a){var t=r(e,a,28)^r(a,e,2)^r(a,e,7);return t<0&&(t+=4294967296),t}function E(e,a){var t=n(e,a,28)^n(a,e,2)^n(a,e,7);return t<0&&(t+=4294967296),t}function C(e,a){var t=n(e,a,14)^n(e,a,18)^n(a,e,9);return t<0&&(t+=4294967296),t}function M(e,a){var t=r(e,a,1)^r(e,a,8)^i(e,a,7);return t<0&&(t+=4294967296),t}function B(e,a){var t=n(e,a,1)^n(e,a,8)^b(e,a,7);return t<0&&(t+=4294967296),t}function L(e,a){var t=n(e,a,19)^n(a,e,29)^b(e,a,6);return t<0&&(t+=4294967296),t}c.inherits(y,m),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,a){for(var t=this.W,c=0;c<32;c++)t[c]=e[a+c];for(;c{"use strict";var c=t(67426).rotr32;function f(e,a,t){return e&a^~e&t}function d(e,a,t){return e&a^e&t^a&t}function r(e,a,t){return e^a^t}a.ft_1=function(e,a,t,c){return 0===e?f(a,t,c):1===e||3===e?r(a,t,c):2===e?d(a,t,c):void 0},a.ch32=f,a.maj32=d,a.p32=r,a.s0_256=function(e){return c(e,2)^c(e,13)^c(e,22)},a.s1_256=function(e){return c(e,6)^c(e,11)^c(e,25)},a.g0_256=function(e){return c(e,7)^c(e,18)^e>>>3},a.g1_256=function(e){return c(e,17)^c(e,19)^e>>>10}},67426:(e,a,t)=>{"use strict";var c=t(43349),f=t(56698);function d(e,a){return 55296==(64512&e.charCodeAt(a))&&!(a<0||a+1>=e.length)&&56320==(64512&e.charCodeAt(a+1))}function r(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function n(e){return 1===e.length?"0"+e:e}function i(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}a.inherits=f,a.toArray=function(e,a){if(Array.isArray(e))return e.slice();if(!e)return[];var t=[];if("string"==typeof e)if(a){if("hex"===a)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),f=0;f>6|192,t[c++]=63&r|128):d(e,f)?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++f)),t[c++]=r>>18|240,t[c++]=r>>12&63|128,t[c++]=r>>6&63|128,t[c++]=63&r|128):(t[c++]=r>>12|224,t[c++]=r>>6&63|128,t[c++]=63&r|128)}else for(f=0;f>>0}return r},a.split32=function(e,a){for(var t=new Array(4*e.length),c=0,f=0;c>>24,t[f+1]=d>>>16&255,t[f+2]=d>>>8&255,t[f+3]=255&d):(t[f+3]=d>>>24,t[f+2]=d>>>16&255,t[f+1]=d>>>8&255,t[f]=255&d)}return t},a.rotr32=function(e,a){return e>>>a|e<<32-a},a.rotl32=function(e,a){return e<>>32-a},a.sum32=function(e,a){return e+a>>>0},a.sum32_3=function(e,a,t){return e+a+t>>>0},a.sum32_4=function(e,a,t,c){return e+a+t+c>>>0},a.sum32_5=function(e,a,t,c,f){return e+a+t+c+f>>>0},a.sum64=function(e,a,t,c){var f=e[a],d=c+e[a+1]>>>0,r=(d>>0,e[a+1]=d},a.sum64_hi=function(e,a,t,c){return(a+c>>>0>>0},a.sum64_lo=function(e,a,t,c){return a+c>>>0},a.sum64_4_hi=function(e,a,t,c,f,d,r,n){var i=0,b=a;return i+=(b=b+c>>>0)>>0)>>0)>>0},a.sum64_4_lo=function(e,a,t,c,f,d,r,n){return a+c+d+n>>>0},a.sum64_5_hi=function(e,a,t,c,f,d,r,n,i,b){var o=0,s=a;return o+=(s=s+c>>>0)>>0)>>0)>>0)>>0},a.sum64_5_lo=function(e,a,t,c,f,d,r,n,i,b){return a+c+d+n+b>>>0},a.rotr64_hi=function(e,a,t){return(a<<32-t|e>>>t)>>>0},a.rotr64_lo=function(e,a,t){return(e<<32-t|a>>>t)>>>0},a.shr64_hi=function(e,a,t){return e>>>t},a.shr64_lo=function(e,a,t){return(e<<32-t|a>>>t)>>>0}},9957:(e,a,t)=>{"use strict";var c=Function.prototype.call,f=Object.prototype.hasOwnProperty,d=t(66743);e.exports=d.call(c,f)},32723:(e,a,t)=>{"use strict";var c=t(77952),f=t(64367),d=t(43349);function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var a=f.toArray(e.entropy,e.entropyEnc||"hex"),t=f.toArray(e.nonce,e.nonceEnc||"hex"),c=f.toArray(e.pers,e.persEnc||"hex");d(a.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(a,t,c)}e.exports=r,r.prototype._init=function(e,a,t){var c=e.concat(a).concat(t);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var f=0;f=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(t||[])),this._reseed=1},r.prototype.generate=function(e,a,t,c){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof a&&(c=t,t=a,a=null),t&&(t=f.toArray(t,c||"hex"),this._update(t));for(var d=[];d.length{var c=t(11568),f=t(23276),d=e.exports;for(var r in c)c.hasOwnProperty(r)&&(d[r]=c[r]);function n(e){if("string"==typeof e&&(e=f.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}d.request=function(e,a){return e=n(e),c.request.call(this,e,a)},d.get=function(e,a){return e=n(e),c.get.call(this,e,a)}},251:(e,a)=>{a.read=function(e,a,t,c,f){var d,r,n=8*f-c-1,i=(1<>1,o=-7,s=t?f-1:0,l=t?-1:1,u=e[a+s];for(s+=l,d=u&(1<<-o)-1,u>>=-o,o+=n;o>0;d=256*d+e[a+s],s+=l,o-=8);for(r=d&(1<<-o)-1,d>>=-o,o+=c;o>0;r=256*r+e[a+s],s+=l,o-=8);if(0===d)d=1-b;else{if(d===i)return r?NaN:1/0*(u?-1:1);r+=Math.pow(2,c),d-=b}return(u?-1:1)*r*Math.pow(2,d-c)},a.write=function(e,a,t,c,f,d){var r,n,i,b=8*d-f-1,o=(1<>1,l=23===f?Math.pow(2,-24)-Math.pow(2,-77):0,u=c?0:d-1,h=c?1:-1,p=a<0||0===a&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(n=isNaN(a)?1:0,r=o):(r=Math.floor(Math.log(a)/Math.LN2),a*(i=Math.pow(2,-r))<1&&(r--,i*=2),(a+=r+s>=1?l/i:l*Math.pow(2,1-s))*i>=2&&(r++,i/=2),r+s>=o?(n=0,r=o):r+s>=1?(n=(a*i-1)*Math.pow(2,f),r+=s):(n=a*Math.pow(2,s-1)*Math.pow(2,f),r=0));f>=8;e[t+u]=255&n,u+=h,n/=256,f-=8);for(r=r<0;e[t+u]=255&r,u+=h,r/=256,b-=8);e[t+u-h]|=128*p}},56698:e=>{"function"==typeof Object.create?e.exports=function(e,a){a&&(e.super_=a,e.prototype=Object.create(a.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,a){if(a){e.super_=a;var t=function(){};t.prototype=a.prototype,e.prototype=new t,e.prototype.constructor=e}}},47244:(e,a,t)=>{"use strict";var c=t(49092)(),f=t(38075)("Object.prototype.toString"),d=function(e){return!(c&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===f(e)},r=function(e){return!!d(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==f(e)&&"[object Function]"===f(e.callee)},n=function(){return d(arguments)}();d.isLegacyArguments=r,e.exports=n?d:r},69600:e=>{"use strict";var a,t,c=Function.prototype.toString,f="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof f&&"function"==typeof Object.defineProperty)try{a=Object.defineProperty({},"length",{get:function(){throw t}}),t={},f((function(){throw 42}),null,a)}catch(e){e!==t&&(f=null)}else f=null;var d=/^\s*class\b/,r=function(e){try{var a=c.call(e);return d.test(a)}catch(e){return!1}},n=function(e){try{return!r(e)&&(c.call(e),!0)}catch(e){return!1}},i=Object.prototype.toString,b="function"==typeof Symbol&&!!Symbol.toStringTag,o=!(0 in[,]),s=function(){return!1};if("object"==typeof document){var l=document.all;i.call(l)===i.call(document.all)&&(s=function(e){if((o||!e)&&(void 0===e||"object"==typeof e))try{var a=i.call(e);return("[object HTMLAllCollection]"===a||"[object HTML document.all class]"===a||"[object HTMLCollection]"===a||"[object Object]"===a)&&null==e("")}catch(e){}return!1})}e.exports=f?function(e){if(s(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{f(e,null,a)}catch(e){if(e!==t)return!1}return!r(e)&&n(e)}:function(e){if(s(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(b)return n(e);if(r(e))return!1;var a=i.call(e);return!("[object Function]"!==a&&"[object GeneratorFunction]"!==a&&!/^\[object HTML/.test(a))&&n(e)}},48184:(e,a,t)=>{"use strict";var c,f=Object.prototype.toString,d=Function.prototype.toString,r=/^\s*(?:function)?\*/,n=t(49092)(),i=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(r.test(d.call(e)))return!0;if(!n)return"[object GeneratorFunction]"===f.call(e);if(!i)return!1;if(void 0===c){var a=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch(e){}}();c=!!a&&i(a)}return i(e)===c}},13003:e=>{"use strict";e.exports=function(e){return e!=e}},24133:(e,a,t)=>{"use strict";var c=t(10487),f=t(38452),d=t(13003),r=t(76642),n=t(92464),i=c(r(),Number);f(i,{getPolyfill:r,implementation:d,shim:n}),e.exports=i},76642:(e,a,t)=>{"use strict";var c=t(13003);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:c}},92464:(e,a,t)=>{"use strict";var c=t(38452),f=t(76642);e.exports=function(){var e=f();return c(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},35680:(e,a,t)=>{"use strict";var c=t(25767);e.exports=function(e){return!!c(e)}},31176:(e,a,t)=>{var c;!function(){"use strict";var f="input is invalid type",d="object"==typeof window,r=d?window:{};r.JS_SHA3_NO_WINDOW&&(d=!1);var n=!d&&"object"==typeof self;!r.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?r=t.g:n&&(r=self);var i=!r.JS_SHA3_NO_COMMON_JS&&e.exports,b=t.amdO,o=!r.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,s="0123456789abcdef".split(""),l=[4,1024,262144,67108864],u=[0,8,16,24],h=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],p=[224,256,384,512],g=[128,256],m=["hex","buffer","arrayBuffer","array","digest"],x={128:168,256:136};!r.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!o||!r.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var y=function(e,a,t){return function(c){return new R(e,a,e).update(c)[t]()}},A=function(e,a,t){return function(c,f){return new R(e,a,f).update(c)[t]()}},v=function(e,a,t){return function(a,c,f,d){return C["cshake"+e].update(a,c,f,d)[t]()}},w=function(e,a,t){return function(a,c,f,d){return C["kmac"+e].update(a,c,f,d)[t]()}},_=function(e,a,t,c){for(var f=0;f>5,this.byteCount=this.blockCount<<2,this.outputBlocks=t>>5,this.extraBytes=(31&t)>>3;for(var c=0;c<50;++c)this.s[c]=0}function O(e,a,t){R.call(this,e,a,t)}R.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var a,t=typeof e;if("string"!==t){if("object"!==t)throw new Error(f);if(null===e)throw new Error(f);if(o&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||o&&ArrayBuffer.isView(e)))throw new Error(f);a=!0}for(var c,d,r=this.blocks,n=this.byteCount,i=e.length,b=this.blockCount,s=0,l=this.s;s>2]|=e[s]<>2]|=d<>2]|=(192|d>>6)<>2]|=(128|63&d)<=57344?(r[c>>2]|=(224|d>>12)<>2]|=(128|d>>6&63)<>2]|=(128|63&d)<>2]|=(240|d>>18)<>2]|=(128|d>>12&63)<>2]|=(128|d>>6&63)<>2]|=(128|63&d)<=n){for(this.start=c-n,this.block=r[b],c=0;c>=8);t>0;)f.unshift(t),t=255&(e>>=8),++c;return a?f.push(c):f.unshift(c),this.update(f),f.length},R.prototype.encodeString=function(e){var a,t=typeof e;if("string"!==t){if("object"!==t)throw new Error(f);if(null===e)throw new Error(f);if(o&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||o&&ArrayBuffer.isView(e)))throw new Error(f);a=!0}var c=0,d=e.length;if(a)c=d;else for(var r=0;r=57344?c+=3:(n=65536+((1023&n)<<10|1023&e.charCodeAt(++r)),c+=4)}return c+=this.encode(8*c),this.update(e),c},R.prototype.bytepad=function(e,a){for(var t=this.encode(a),c=0;c>2]|=this.padding[3&a],this.lastByteIndex===this.byteCount)for(e[0]=e[t],a=1;a>4&15]+s[15&e]+s[e>>12&15]+s[e>>8&15]+s[e>>20&15]+s[e>>16&15]+s[e>>28&15]+s[e>>24&15];r%a==0&&(D(t),d=0)}return f&&(e=t[d],n+=s[e>>4&15]+s[15&e],f>1&&(n+=s[e>>12&15]+s[e>>8&15]),f>2&&(n+=s[e>>20&15]+s[e>>16&15])),n},R.prototype.arrayBuffer=function(){this.finalize();var e,a=this.blockCount,t=this.s,c=this.outputBlocks,f=this.extraBytes,d=0,r=0,n=this.outputBits>>3;e=f?new ArrayBuffer(c+1<<2):new ArrayBuffer(n);for(var i=new Uint32Array(e);r>8&255,i[e+2]=a>>16&255,i[e+3]=a>>24&255;n%t==0&&D(c)}return d&&(e=n<<2,a=c[r],i[e]=255&a,d>1&&(i[e+1]=a>>8&255),d>2&&(i[e+2]=a>>16&255)),i},O.prototype=new R,O.prototype.finalize=function(){return this.encode(this.outputBits,!0),R.prototype.finalize.call(this)};var D=function(e){var a,t,c,f,d,r,n,i,b,o,s,l,u,p,g,m,x,y,A,v,w,_,I,E,C,M,B,L,S,k,N,P,R,O,D,T,F,Q,U,j,H,$,q,G,z,K,V,Z,J,W,Y,X,ee,ae,te,ce,fe,de,re,ne,ie,be,oe;for(c=0;c<48;c+=2)f=e[0]^e[10]^e[20]^e[30]^e[40],d=e[1]^e[11]^e[21]^e[31]^e[41],r=e[2]^e[12]^e[22]^e[32]^e[42],n=e[3]^e[13]^e[23]^e[33]^e[43],i=e[4]^e[14]^e[24]^e[34]^e[44],b=e[5]^e[15]^e[25]^e[35]^e[45],o=e[6]^e[16]^e[26]^e[36]^e[46],s=e[7]^e[17]^e[27]^e[37]^e[47],a=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(r<<1|n>>>31),t=(u=e[9]^e[19]^e[29]^e[39]^e[49])^(n<<1|r>>>31),e[0]^=a,e[1]^=t,e[10]^=a,e[11]^=t,e[20]^=a,e[21]^=t,e[30]^=a,e[31]^=t,e[40]^=a,e[41]^=t,a=f^(i<<1|b>>>31),t=d^(b<<1|i>>>31),e[2]^=a,e[3]^=t,e[12]^=a,e[13]^=t,e[22]^=a,e[23]^=t,e[32]^=a,e[33]^=t,e[42]^=a,e[43]^=t,a=r^(o<<1|s>>>31),t=n^(s<<1|o>>>31),e[4]^=a,e[5]^=t,e[14]^=a,e[15]^=t,e[24]^=a,e[25]^=t,e[34]^=a,e[35]^=t,e[44]^=a,e[45]^=t,a=i^(l<<1|u>>>31),t=b^(u<<1|l>>>31),e[6]^=a,e[7]^=t,e[16]^=a,e[17]^=t,e[26]^=a,e[27]^=t,e[36]^=a,e[37]^=t,e[46]^=a,e[47]^=t,a=o^(f<<1|d>>>31),t=s^(d<<1|f>>>31),e[8]^=a,e[9]^=t,e[18]^=a,e[19]^=t,e[28]^=a,e[29]^=t,e[38]^=a,e[39]^=t,e[48]^=a,e[49]^=t,p=e[0],g=e[1],K=e[11]<<4|e[10]>>>28,V=e[10]<<4|e[11]>>>28,L=e[20]<<3|e[21]>>>29,S=e[21]<<3|e[20]>>>29,ne=e[31]<<9|e[30]>>>23,ie=e[30]<<9|e[31]>>>23,$=e[40]<<18|e[41]>>>14,q=e[41]<<18|e[40]>>>14,O=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,x=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,k=e[33]<<13|e[32]>>>19,N=e[32]<<13|e[33]>>>19,be=e[42]<<2|e[43]>>>30,oe=e[43]<<2|e[42]>>>30,ae=e[5]<<30|e[4]>>>2,te=e[4]<<30|e[5]>>>2,T=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,W=e[34]<<15|e[35]>>>17,Y=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,ce=e[17]<<23|e[16]>>>9,fe=e[16]<<23|e[17]>>>9,Q=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,v=e[36]<<21|e[37]>>>11,w=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,z=e[9]<<27|e[8]>>>5,M=e[18]<<20|e[19]>>>12,B=e[19]<<20|e[18]>>>12,de=e[29]<<7|e[28]>>>25,re=e[28]<<7|e[29]>>>25,j=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,I=e[49]<<14|e[48]>>>18,e[0]=p^~m&y,e[1]=g^~x&A,e[10]=E^~M&L,e[11]=C^~B&S,e[20]=O^~T&Q,e[21]=D^~F&U,e[30]=G^~K&Z,e[31]=z^~V&J,e[40]=ae^~ce&de,e[41]=te^~fe&re,e[2]=m^~y&v,e[3]=x^~A&w,e[12]=M^~L&k,e[13]=B^~S&N,e[22]=T^~Q&j,e[23]=F^~U&H,e[32]=K^~Z&W,e[33]=V^~J&Y,e[42]=ce^~de&ne,e[43]=fe^~re&ie,e[4]=y^~v&_,e[5]=A^~w&I,e[14]=L^~k&P,e[15]=S^~N&R,e[24]=Q^~j&$,e[25]=U^~H&q,e[34]=Z^~W&X,e[35]=J^~Y&ee,e[44]=de^~ne&be,e[45]=re^~ie&oe,e[6]=v^~_&p,e[7]=w^~I&g,e[16]=k^~P&E,e[17]=N^~R&C,e[26]=j^~$&O,e[27]=H^~q&D,e[36]=W^~X&G,e[37]=Y^~ee&z,e[46]=ne^~be&ae,e[47]=ie^~oe&te,e[8]=_^~p&m,e[9]=I^~g&x,e[18]=P^~E&M,e[19]=R^~C&B,e[28]=$^~O&T,e[29]=q^~D&F,e[38]=X^~G&K,e[39]=ee^~z&V,e[48]=be^~ae&ce,e[49]=oe^~te&fe,e[0]^=h[c],e[1]^=h[c+1]};if(i)e.exports=C;else{for(B=0;B{"use strict";var a=e.exports=function(e,a,c){"function"==typeof a&&(c=a,a={}),t(a,"function"==typeof(c=a.cb||c)?c:c.pre||function(){},c.post||function(){},e,"",e)};function t(e,c,f,d,r,n,i,b,o,s){if(d&&"object"==typeof d&&!Array.isArray(d)){for(var l in c(d,r,n,i,b,o,s),d){var u=d[l];if(Array.isArray(u)){if(l in a.arrayKeywords)for(var h=0;h{"use strict";var c=t(56698),f=t(73726),d=t(92861).Buffer,r=new Array(16);function n(){f.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function i(e,a){return e<>>32-a}function b(e,a,t,c,f,d,r){return i(e+(a&t|~a&c)+f+d|0,r)+a|0}function o(e,a,t,c,f,d,r){return i(e+(a&c|t&~c)+f+d|0,r)+a|0}function s(e,a,t,c,f,d,r){return i(e+(a^t^c)+f+d|0,r)+a|0}function l(e,a,t,c,f,d,r){return i(e+(t^(a|~c))+f+d|0,r)+a|0}c(n,f),n.prototype._update=function(){for(var e=r,a=0;a<16;++a)e[a]=this._block.readInt32LE(4*a);var t=this._a,c=this._b,f=this._c,d=this._d;t=b(t,c,f,d,e[0],3614090360,7),d=b(d,t,c,f,e[1],3905402710,12),f=b(f,d,t,c,e[2],606105819,17),c=b(c,f,d,t,e[3],3250441966,22),t=b(t,c,f,d,e[4],4118548399,7),d=b(d,t,c,f,e[5],1200080426,12),f=b(f,d,t,c,e[6],2821735955,17),c=b(c,f,d,t,e[7],4249261313,22),t=b(t,c,f,d,e[8],1770035416,7),d=b(d,t,c,f,e[9],2336552879,12),f=b(f,d,t,c,e[10],4294925233,17),c=b(c,f,d,t,e[11],2304563134,22),t=b(t,c,f,d,e[12],1804603682,7),d=b(d,t,c,f,e[13],4254626195,12),f=b(f,d,t,c,e[14],2792965006,17),t=o(t,c=b(c,f,d,t,e[15],1236535329,22),f,d,e[1],4129170786,5),d=o(d,t,c,f,e[6],3225465664,9),f=o(f,d,t,c,e[11],643717713,14),c=o(c,f,d,t,e[0],3921069994,20),t=o(t,c,f,d,e[5],3593408605,5),d=o(d,t,c,f,e[10],38016083,9),f=o(f,d,t,c,e[15],3634488961,14),c=o(c,f,d,t,e[4],3889429448,20),t=o(t,c,f,d,e[9],568446438,5),d=o(d,t,c,f,e[14],3275163606,9),f=o(f,d,t,c,e[3],4107603335,14),c=o(c,f,d,t,e[8],1163531501,20),t=o(t,c,f,d,e[13],2850285829,5),d=o(d,t,c,f,e[2],4243563512,9),f=o(f,d,t,c,e[7],1735328473,14),t=s(t,c=o(c,f,d,t,e[12],2368359562,20),f,d,e[5],4294588738,4),d=s(d,t,c,f,e[8],2272392833,11),f=s(f,d,t,c,e[11],1839030562,16),c=s(c,f,d,t,e[14],4259657740,23),t=s(t,c,f,d,e[1],2763975236,4),d=s(d,t,c,f,e[4],1272893353,11),f=s(f,d,t,c,e[7],4139469664,16),c=s(c,f,d,t,e[10],3200236656,23),t=s(t,c,f,d,e[13],681279174,4),d=s(d,t,c,f,e[0],3936430074,11),f=s(f,d,t,c,e[3],3572445317,16),c=s(c,f,d,t,e[6],76029189,23),t=s(t,c,f,d,e[9],3654602809,4),d=s(d,t,c,f,e[12],3873151461,11),f=s(f,d,t,c,e[15],530742520,16),t=l(t,c=s(c,f,d,t,e[2],3299628645,23),f,d,e[0],4096336452,6),d=l(d,t,c,f,e[7],1126891415,10),f=l(f,d,t,c,e[14],2878612391,15),c=l(c,f,d,t,e[5],4237533241,21),t=l(t,c,f,d,e[12],1700485571,6),d=l(d,t,c,f,e[3],2399980690,10),f=l(f,d,t,c,e[10],4293915773,15),c=l(c,f,d,t,e[1],2240044497,21),t=l(t,c,f,d,e[8],1873313359,6),d=l(d,t,c,f,e[15],4264355552,10),f=l(f,d,t,c,e[6],2734768916,15),c=l(c,f,d,t,e[13],1309151649,21),t=l(t,c,f,d,e[4],4149444226,6),d=l(d,t,c,f,e[11],3174756917,10),f=l(f,d,t,c,e[2],718787259,15),c=l(c,f,d,t,e[9],3951481745,21),this._a=this._a+t|0,this._b=this._b+c|0,this._c=this._c+f|0,this._d=this._d+d|0},n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=d.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=n},73726:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=t(28399).Transform;function d(e){f.call(this),this._block=c.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}t(56698)(d,f),d.prototype._transform=function(e,a,t){var c=null;try{this.update(e,a)}catch(e){c=e}t(c)},d.prototype._flush=function(e){var a=null;try{this.push(this.digest())}catch(e){a=e}e(a)},d.prototype.update=function(e,a){if(function(e){if(!c.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");c.isBuffer(e)||(e=c.from(e,a));for(var t=this._block,f=0;this._blockOffset+e.length-f>=this._blockSize;){for(var d=this._blockOffset;d0;++r)this._length[r]+=n,(n=this._length[r]/4294967296|0)>0&&(this._length[r]-=4294967296*n);return this},d.prototype._update=function(){throw new Error("_update is not implemented")},d.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var a=this._digest();void 0!==e&&(a=a.toString(e)),this._block.fill(0),this._blockOffset=0;for(var t=0;t<4;++t)this._length[t]=0;return a},d.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=d},6215:(e,a,t)=>{"use strict";var c=t(48287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.InvalidStatusCodeError=a.InvalidCertError=void 0;const f=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class d extends Error{constructor(e,a){super(e),this.fingerprint256=a}}a.InvalidCertError=d;class r extends Error{constructor(e){super(`Request Failed. Status Code: ${e}`),this.statusCode=e}}function n(e,a){if(!a||"text"===a||"json"===a)try{let t=new TextDecoder("utf8",{fatal:!0}).decode(e);if("text"===a)return t;try{return JSON.parse(t)}catch(e){if("json"===a)throw e;return t}}catch(e){if("text"===a||"json"===a)throw e}return e}a.InvalidStatusCodeError=r;let i={};function b(e,a){let o={...f,...a};const s=t(11568),l=t(11083),u=t(78559),{promisify:h}=t(40537),{resolve:p}=t(59676),g=!!/^https/.test(e);let m={method:o.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const x=e=>e.replace(/:| /g,"").toLowerCase();if(o.keepAlive){const e={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},a=[g,g&&o.sslPinnedCertificates?.map((e=>x(e))).sort()].join();m.agent=i[a]||(i[a]=new(g?l:s).Agent(e))}return"json"===o.type&&(m.headers["Content-Type"]="application/json"),o.data&&(o.method||(m.method="POST"),m.body="json"===o.type?JSON.stringify(o.data):o.data),m.headers={...m.headers,...o.headers},o.sslAllowSelfSigned&&(m.rejectUnauthorized=!1),new Promise(((a,t)=>{const f=async a=>{if(a&&"DEPTH_ZERO_SELF_SIGNED_CERT"===a.code)try{await b(e,{...o,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(e){e&&e.fingerprint256&&(a=new d(`Self-signed SSL certificate: ${e.fingerprint256}`,e.fingerprint256))}t(a)},i=(g?l:s).request(e,m,(d=>{d.on("error",f),(async()=>{try{a(await(async a=>{const t=a.statusCode;if(o.redirect&&300<=t&&t<400&&a.headers.location){if(10==o._redirectCount)throw new Error("Request failed. Too much redirects.");return o._redirectCount+=1,await b(p(e,a.headers.location),o)}if(o.expectStatusCode&&t!==o.expectStatusCode)throw a.resume(),new r(t);let f=[];for await(const e of a)f.push(e);let d=c.concat(f);const i=a.headers["content-encoding"];"br"===i&&(d=await h(u.brotliDecompress)(d)),"gzip"!==i&&"deflate"!==i||(d=await h(u.unzip)(d));const s=n(d,o.type);return o.full?{headers:a.headers,status:t,body:s}:s})(d))}catch(e){t(e)}})()}));i.on("error",f);const y=o.sslPinnedCertificates?.map((e=>x(e))),A=e=>{const a=x(e.getPeerCertificate()?.fingerprint256||"");if((a||!e.isSessionReused())&&!y.includes(a))return i.emit("error",new d(`Invalid SSL certificate: ${a} Expected: ${y}`,a)),i.abort()};o.sslPinnedCertificates&&i.on("socket",(e=>{e.listeners("secureConnect").map((e=>(e.name||"").replace("bound ",""))).includes("mfetchSecureConnect")||e.on("secureConnect",A.bind(null,e))})),o.keepAlive&&i.setNoDelay(!0),m.body&&i.write(m.body),i.end()}))}const o=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map((e=>e.toLowerCase()))),s=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map((e=>e.toLowerCase())));async function l(e,a){let t={...f,...a};const c=new Headers;"json"===t.type&&c.set("Content-Type","application/json");let d=new URL(e);if(d.username){const e=btoa(`${d.username}:${d.password}`);c.set("Authorization",`Basic ${e}`),d.username="",d.password=""}e=""+d;for(let e in t.headers){const a=e.toLowerCase();(o.has(a)||t.cors&&!s.has(a))&&c.set(e,t.headers[e])}let i={headers:c,redirect:t.redirect?"follow":"manual"};t.referrer||(i.referrerPolicy="no-referrer"),t.cors&&(i.mode="cors"),t.data&&(t.method||(i.method="POST"),i.body="json"===t.type?JSON.stringify(t.data):t.data);const b=await fetch(e,i);if(t.expectStatusCode&&b.status!==t.expectStatusCode)throw new r(b.status);const l=n(new Uint8Array(await b.arrayBuffer()),t.type);return t.full?{headers:Object.fromEntries(b.headers.entries()),status:b.status,body:l}:l}const u=!!("object"==typeof process&&process.versions&&process.versions.node&&process.versions.v8);a.default=function(e,a){return(u?b:l)(e,a)}},52244:(e,a,t)=>{var c=t(61158),f=t(15037);function d(e){this.rand=e||new f.Rand}e.exports=d,d.create=function(e){return new d(e)},d.prototype._randbelow=function(e){var a=e.bitLength(),t=Math.ceil(a/8);do{var f=new c(this.rand.generate(t))}while(f.cmp(e)>=0);return f},d.prototype._randrange=function(e,a){var t=a.sub(e);return e.add(this._randbelow(t))},d.prototype.test=function(e,a,t){var f=e.bitLength(),d=c.mont(e),r=new c(1).toRed(d);a||(a=Math.max(1,f/48|0));for(var n=e.subn(1),i=0;!n.testn(i);i++);for(var b=e.shrn(i),o=n.toRed(d);a>0;a--){var s=this._randrange(new c(2),n);t&&t(s);var l=s.toRed(d).redPow(b);if(0!==l.cmp(r)&&0!==l.cmp(o)){for(var u=1;u0;a--){var o=this._randrange(new c(2),r),s=e.gcd(o);if(0!==s.cmpn(1))return s;var l=o.toRed(f).redPow(i);if(0!==l.cmp(d)&&0!==l.cmp(b)){for(var u=1;u=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},43349:e=>{function a(e,a){if(!e)throw new Error(a||"Assertion failed")}e.exports=a,a.equal=function(e,a,t){if(e!=a)throw new Error(t||"Assertion failed: "+e+" != "+a)}},64367:(e,a)=>{"use strict";var t=a;function c(e){return 1===e.length?"0"+e:e}function f(e){for(var a="",t=0;t>8,r=255&f;d?t.push(d,r):t.push(r)}return t},t.zero2=c,t.toHex=f,t.encode=function(e,a){return"hex"===a?f(e):e}},6585:e=>{var a=1e3,t=60*a,c=60*t,f=24*c,d=7*f;function r(e,a,t,c){var f=a>=1.5*t;return Math.round(e/t)+" "+c+(f?"s":"")}e.exports=function(e,n){n=n||{};var i,b,o=typeof e;if("string"===o&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var n=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return n*d;case"days":case"day":case"d":return n*f;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*t;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===o&&isFinite(e))return n.long?(i=e,(b=Math.abs(i))>=f?r(i,b,f,"day"):b>=c?r(i,b,c,"hour"):b>=t?r(i,b,t,"minute"):b>=a?r(i,b,a,"second"):i+" ms"):function(e){var d=Math.abs(e);return d>=f?Math.round(e/f)+"d":d>=c?Math.round(e/c)+"h":d>=t?Math.round(e/t)+"m":d>=a?Math.round(e/a)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},86889:e=>{e.exports=function e(t,c){if(!t){var f=new a(c);throw Error.captureStackTrace&&Error.captureStackTrace(f,e),f}};class a extends Error{}a.prototype.name="AssertionError"},89211:e=>{"use strict";var a=function(e){return e!=e};e.exports=function(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!a(e)||!a(t))}},37653:(e,a,t)=>{"use strict";var c=t(38452),f=t(10487),d=t(89211),r=t(9394),n=t(36576),i=f(r(),Object);c(i,{getPolyfill:r,implementation:d,shim:n}),e.exports=i},9394:(e,a,t)=>{"use strict";var c=t(89211);e.exports=function(){return"function"==typeof Object.is?Object.is:c}},36576:(e,a,t)=>{"use strict";var c=t(9394),f=t(38452);e.exports=function(){var e=c();return f(Object,{is:e},{is:function(){return Object.is!==e}}),e}},28875:(e,a,t)=>{"use strict";var c;if(!Object.keys){var f=Object.prototype.hasOwnProperty,d=Object.prototype.toString,r=t(1093),n=Object.prototype.propertyIsEnumerable,i=!n.call({toString:null},"toString"),b=n.call((function(){}),"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],s=function(e){var a=e.constructor;return a&&a.prototype===e},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!l["$"+e]&&f.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{s(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();c=function(e){var a=null!==e&&"object"==typeof e,t="[object Function]"===d.call(e),c=r(e),n=a&&"[object String]"===d.call(e),l=[];if(!a&&!t&&!c)throw new TypeError("Object.keys called on a non-object");var h=b&&t;if(n&&e.length>0&&!f.call(e,0))for(var p=0;p0)for(var g=0;g{"use strict";var c=Array.prototype.slice,f=t(1093),d=Object.keys,r=d?function(e){return d(e)}:t(28875),n=Object.keys;r.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return f(e)?n(c.call(e)):n(e)})}else Object.keys=r;return Object.keys||r},e.exports=r},1093:e=>{"use strict";var a=Object.prototype.toString;e.exports=function(e){var t=a.call(e),c="[object Arguments]"===t;return c||(c="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===a.call(e.callee)),c}},38403:(e,a,t)=>{"use strict";var c=t(1189),f=t(41333)(),d=t(38075),r=Object,n=d("Array.prototype.push"),i=d("Object.prototype.propertyIsEnumerable"),b=f?Object.getOwnPropertySymbols:null;e.exports=function(e,a){if(null==e)throw new TypeError("target must be an object");var t=r(e);if(1===arguments.length)return t;for(var d=1;d{"use strict";var c=t(38403);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",a=e.split(""),t={},c=0;c{"use strict";var t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function c(e,a){return Object.prototype.hasOwnProperty.call(e,a)}a.assign=function(e){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var t=a.shift();if(t){if("object"!=typeof t)throw new TypeError(t+"must be non-object");for(var f in t)c(t,f)&&(e[f]=t[f])}}return e},a.shrinkBuf=function(e,a){return e.length===a?e:e.subarray?e.subarray(0,a):(e.length=a,e)};var f={arraySet:function(e,a,t,c,f){if(a.subarray&&e.subarray)e.set(a.subarray(t,t+c),f);else for(var d=0;d{"use strict";e.exports=function(e,a,t,c){for(var f=65535&e,d=e>>>16&65535,r=0;0!==t;){t-=r=t>2e3?2e3:t;do{d=d+(f=f+a[c++]|0)|0}while(--r);f%=65521,d%=65521}return f|d<<16}},19681:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},14823:e=>{"use strict";var a=function(){for(var e,a=[],t=0;t<256;t++){e=t;for(var c=0;c<8;c++)e=1&e?3988292384^e>>>1:e>>>1;a[t]=e}return a}();e.exports=function(e,t,c,f){var d=a,r=f+c;e^=-1;for(var n=f;n>>8^d[255&(e^t[n])];return~e}},58411:(e,a,t)=>{"use strict";var c,f=t(9805),d=t(23665),r=t(53269),n=t(14823),i=t(54674),b=-2,o=258,s=262,l=103,u=113,h=666;function p(e,a){return e.msg=i[a],a}function g(e){return(e<<1)-(e>4?9:0)}function m(e){for(var a=e.length;--a>=0;)e[a]=0}function x(e){var a=e.state,t=a.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(f.arraySet(e.output,a.pending_buf,a.pending_out,t,e.next_out),e.next_out+=t,a.pending_out+=t,e.total_out+=t,e.avail_out-=t,a.pending-=t,0===a.pending&&(a.pending_out=0))}function y(e,a){d._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,a),e.block_start=e.strstart,x(e.strm)}function A(e,a){e.pending_buf[e.pending++]=a}function v(e,a){e.pending_buf[e.pending++]=a>>>8&255,e.pending_buf[e.pending++]=255&a}function w(e,a){var t,c,f=e.max_chain_length,d=e.strstart,r=e.prev_length,n=e.nice_match,i=e.strstart>e.w_size-s?e.strstart-(e.w_size-s):0,b=e.window,l=e.w_mask,u=e.prev,h=e.strstart+o,p=b[d+r-1],g=b[d+r];e.prev_length>=e.good_match&&(f>>=2),n>e.lookahead&&(n=e.lookahead);do{if(b[(t=a)+r]===g&&b[t+r-1]===p&&b[t]===b[d]&&b[++t]===b[d+1]){d+=2,t++;do{}while(b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&dr){if(e.match_start=a,r=c,c>=n)break;p=b[d+r-1],g=b[d+r]}}}while((a=u[a&l])>i&&0!=--f);return r<=e.lookahead?r:e.lookahead}function _(e){var a,t,c,d,i,b,o,l,u,h,p=e.w_size;do{if(d=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-s)){f.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,a=t=e.hash_size;do{c=e.head[--a],e.head[a]=c>=p?c-p:0}while(--t);a=t=p;do{c=e.prev[--a],e.prev[a]=c>=p?c-p:0}while(--t);d+=p}if(0===e.strm.avail_in)break;if(b=e.strm,o=e.window,l=e.strstart+e.lookahead,u=d,h=void 0,(h=b.avail_in)>u&&(h=u),t=0===h?0:(b.avail_in-=h,f.arraySet(o,b.input,b.next_in,h,l),1===b.state.wrap?b.adler=r(b.adler,o,h,l):2===b.state.wrap&&(b.adler=n(b.adler,o,h,l)),b.next_in+=h,b.total_in+=h,h),e.lookahead+=t,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(c=d._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){f=e.strstart+e.lookahead-3,c=d._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=f&&(e.ins_h=(e.ins_h<15&&(n=2,c-=16),d<1||d>9||8!==t||c<8||c>15||a<0||a>9||r<0||r>4)return p(e,b);8===c&&(c=9);var i=new M;return e.state=i,i.strm=e,i.wrap=n,i.gzhead=null,i.w_bits=c,i.w_size=1<e.pending_buf_size-5&&(t=e.pending_buf_size-5);;){if(e.lookahead<=1){if(_(e),0===e.lookahead&&0===a)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var c=e.block_start+t;if((0===e.strstart||e.strstart>=c)&&(e.lookahead=e.strstart-c,e.strstart=c,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-s&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===a?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)})),new C(4,4,8,4,I),new C(4,5,16,8,I),new C(4,6,32,32,I),new C(4,4,16,16,E),new C(8,16,32,32,E),new C(8,16,128,128,E),new C(8,32,128,256,E),new C(32,128,258,1024,E),new C(32,258,258,4096,E)],a.deflateInit=function(e,a){return S(e,a,8,15,8,0)},a.deflateInit2=S,a.deflateReset=L,a.deflateResetKeep=B,a.deflateSetHeader=function(e,a){return e&&e.state?2!==e.state.wrap?b:(e.state.gzhead=a,0):b},a.deflate=function(e,a){var t,f,r,i;if(!e||!e.state||a>5||a<0)return e?p(e,b):b;if(f=e.state,!e.output||!e.input&&0!==e.avail_in||f.status===h&&4!==a)return p(e,0===e.avail_out?-5:b);if(f.strm=e,t=f.last_flush,f.last_flush=a,42===f.status)if(2===f.wrap)e.adler=0,A(f,31),A(f,139),A(f,8),f.gzhead?(A(f,(f.gzhead.text?1:0)+(f.gzhead.hcrc?2:0)+(f.gzhead.extra?4:0)+(f.gzhead.name?8:0)+(f.gzhead.comment?16:0)),A(f,255&f.gzhead.time),A(f,f.gzhead.time>>8&255),A(f,f.gzhead.time>>16&255),A(f,f.gzhead.time>>24&255),A(f,9===f.level?2:f.strategy>=2||f.level<2?4:0),A(f,255&f.gzhead.os),f.gzhead.extra&&f.gzhead.extra.length&&(A(f,255&f.gzhead.extra.length),A(f,f.gzhead.extra.length>>8&255)),f.gzhead.hcrc&&(e.adler=n(e.adler,f.pending_buf,f.pending,0)),f.gzindex=0,f.status=69):(A(f,0),A(f,0),A(f,0),A(f,0),A(f,0),A(f,9===f.level?2:f.strategy>=2||f.level<2?4:0),A(f,3),f.status=u);else{var s=8+(f.w_bits-8<<4)<<8;s|=(f.strategy>=2||f.level<2?0:f.level<6?1:6===f.level?2:3)<<6,0!==f.strstart&&(s|=32),s+=31-s%31,f.status=u,v(f,s),0!==f.strstart&&(v(f,e.adler>>>16),v(f,65535&e.adler)),e.adler=1}if(69===f.status)if(f.gzhead.extra){for(r=f.pending;f.gzindex<(65535&f.gzhead.extra.length)&&(f.pending!==f.pending_buf_size||(f.gzhead.hcrc&&f.pending>r&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),x(e),r=f.pending,f.pending!==f.pending_buf_size));)A(f,255&f.gzhead.extra[f.gzindex]),f.gzindex++;f.gzhead.hcrc&&f.pending>r&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),f.gzindex===f.gzhead.extra.length&&(f.gzindex=0,f.status=73)}else f.status=73;if(73===f.status)if(f.gzhead.name){r=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>r&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),x(e),r=f.pending,f.pending===f.pending_buf_size)){i=1;break}i=f.gzindexr&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),0===i&&(f.gzindex=0,f.status=91)}else f.status=91;if(91===f.status)if(f.gzhead.comment){r=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>r&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),x(e),r=f.pending,f.pending===f.pending_buf_size)){i=1;break}i=f.gzindexr&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),0===i&&(f.status=l)}else f.status=l;if(f.status===l&&(f.gzhead.hcrc?(f.pending+2>f.pending_buf_size&&x(e),f.pending+2<=f.pending_buf_size&&(A(f,255&e.adler),A(f,e.adler>>8&255),e.adler=0,f.status=u)):f.status=u),0!==f.pending){if(x(e),0===e.avail_out)return f.last_flush=-1,0}else if(0===e.avail_in&&g(a)<=g(t)&&4!==a)return p(e,-5);if(f.status===h&&0!==e.avail_in)return p(e,-5);if(0!==e.avail_in||0!==f.lookahead||0!==a&&f.status!==h){var w=2===f.strategy?function(e,a){for(var t;;){if(0===e.lookahead&&(_(e),0===e.lookahead)){if(0===a)return 1;break}if(e.match_length=0,t=d._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===a?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(f,a):3===f.strategy?function(e,a){for(var t,c,f,r,n=e.window;;){if(e.lookahead<=o){if(_(e),e.lookahead<=o&&0===a)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(c=n[f=e.strstart-1])===n[++f]&&c===n[++f]&&c===n[++f]){r=e.strstart+o;do{}while(c===n[++f]&&c===n[++f]&&c===n[++f]&&c===n[++f]&&c===n[++f]&&c===n[++f]&&c===n[++f]&&c===n[++f]&&fe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(t=d._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=d._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===a?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(f,a):c[f.level].func(f,a);if(3!==w&&4!==w||(f.status=h),1===w||3===w)return 0===e.avail_out&&(f.last_flush=-1),0;if(2===w&&(1===a?d._tr_align(f):5!==a&&(d._tr_stored_block(f,0,0,!1),3===a&&(m(f.head),0===f.lookahead&&(f.strstart=0,f.block_start=0,f.insert=0))),x(e),0===e.avail_out))return f.last_flush=-1,0}return 4!==a?0:f.wrap<=0?1:(2===f.wrap?(A(f,255&e.adler),A(f,e.adler>>8&255),A(f,e.adler>>16&255),A(f,e.adler>>24&255),A(f,255&e.total_in),A(f,e.total_in>>8&255),A(f,e.total_in>>16&255),A(f,e.total_in>>24&255)):(v(f,e.adler>>>16),v(f,65535&e.adler)),x(e),f.wrap>0&&(f.wrap=-f.wrap),0!==f.pending?0:1)},a.deflateEnd=function(e){var a;return e&&e.state?42!==(a=e.state.status)&&69!==a&&73!==a&&91!==a&&a!==l&&a!==u&&a!==h?p(e,b):(e.state=null,a===u?p(e,-3):0):b},a.deflateSetDictionary=function(e,a){var t,c,d,n,i,o,s,l,u=a.length;if(!e||!e.state)return b;if(2===(n=(t=e.state).wrap)||1===n&&42!==t.status||t.lookahead)return b;for(1===n&&(e.adler=r(e.adler,a,u,0)),t.wrap=0,u>=t.w_size&&(0===n&&(m(t.head),t.strstart=0,t.block_start=0,t.insert=0),l=new f.Buf8(t.w_size),f.arraySet(l,a,u-t.w_size,t.w_size,0),a=l,u=t.w_size),i=e.avail_in,o=e.next_in,s=e.input,e.avail_in=u,e.next_in=0,e.input=a,_(t);t.lookahead>=3;){c=t.strstart,d=t.lookahead-2;do{t.ins_h=(t.ins_h<{"use strict";e.exports=function(e,a){var t,c,f,d,r,n,i,b,o,s,l,u,h,p,g,m,x,y,A,v,w,_,I,E,C;t=e.state,c=e.next_in,E=e.input,f=c+(e.avail_in-5),d=e.next_out,C=e.output,r=d-(a-e.avail_out),n=d+(e.avail_out-257),i=t.dmax,b=t.wsize,o=t.whave,s=t.wnext,l=t.window,u=t.hold,h=t.bits,p=t.lencode,g=t.distcode,m=(1<>>=A=y>>>24,h-=A,0==(A=y>>>16&255))C[d++]=65535&y;else{if(!(16&A)){if(64&A){if(32&A){t.mode=12;break e}e.msg="invalid literal/length code",t.mode=30;break e}y=p[(65535&y)+(u&(1<>>=A,h-=A),h<15&&(u+=E[c++]<>>=A=y>>>24,h-=A,16&(A=y>>>16&255)){if(w=65535&y,h<(A&=15)&&(u+=E[c++]<i){e.msg="invalid distance too far back",t.mode=30;break e}if(u>>>=A,h-=A,w>(A=d-r)){if((A=w-A)>o&&t.sane){e.msg="invalid distance too far back",t.mode=30;break e}if(_=0,I=l,0===s){if(_+=b-A,A2;)C[d++]=I[_++],C[d++]=I[_++],C[d++]=I[_++],v-=3;v&&(C[d++]=I[_++],v>1&&(C[d++]=I[_++]))}else{_=d-w;do{C[d++]=C[_++],C[d++]=C[_++],C[d++]=C[_++],v-=3}while(v>2);v&&(C[d++]=C[_++],v>1&&(C[d++]=C[_++]))}break}if(64&A){e.msg="invalid distance code",t.mode=30;break e}y=g[(65535&y)+(u&(1<>3,u&=(1<<(h-=v<<3))-1,e.next_in=c,e.next_out=d,e.avail_in=c{"use strict";var c=t(9805),f=t(53269),d=t(14823),r=t(47293),n=t(21998),i=-2,b=12,o=30;function s(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function l(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new c.Buf16(320),this.work=new c.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var a;return e&&e.state?(a=e.state,e.total_in=e.total_out=a.total=0,e.msg="",a.wrap&&(e.adler=1&a.wrap),a.mode=1,a.last=0,a.havedict=0,a.dmax=32768,a.head=null,a.hold=0,a.bits=0,a.lencode=a.lendyn=new c.Buf32(852),a.distcode=a.distdyn=new c.Buf32(592),a.sane=1,a.back=-1,0):i}function h(e){var a;return e&&e.state?((a=e.state).wsize=0,a.whave=0,a.wnext=0,u(e)):i}function p(e,a){var t,c;return e&&e.state?(c=e.state,a<0?(t=0,a=-a):(t=1+(a>>4),a<48&&(a&=15)),a&&(a<8||a>15)?i:(null!==c.window&&c.wbits!==a&&(c.window=null),c.wrap=t,c.wbits=a,h(e))):i}function g(e,a){var t,c;return e?(c=new l,e.state=c,c.window=null,0!==(t=p(e,a))&&(e.state=null),t):i}var m,x,y=!0;function A(e){if(y){var a;for(m=new c.Buf32(512),x=new c.Buf32(32),a=0;a<144;)e.lens[a++]=8;for(;a<256;)e.lens[a++]=9;for(;a<280;)e.lens[a++]=7;for(;a<288;)e.lens[a++]=8;for(n(1,e.lens,0,288,m,0,e.work,{bits:9}),a=0;a<32;)e.lens[a++]=5;n(2,e.lens,0,32,x,0,e.work,{bits:5}),y=!1}e.lencode=m,e.lenbits=9,e.distcode=x,e.distbits=5}function v(e,a,t,f){var d,r=e.state;return null===r.window&&(r.wsize=1<=r.wsize?(c.arraySet(r.window,a,t-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):((d=r.wsize-r.wnext)>f&&(d=f),c.arraySet(r.window,a,t-f,d,r.wnext),(f-=d)?(c.arraySet(r.window,a,t-f,f,0),r.wnext=f,r.whave=r.wsize):(r.wnext+=d,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,t.check=d(t.check,F,2,0),x=0,y=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&x)<<8)+(x>>8))%31){e.msg="incorrect header check",t.mode=o;break}if(8!=(15&x)){e.msg="unknown compression method",t.mode=o;break}if(y-=4,P=8+(15&(x>>>=4)),0===t.wbits)t.wbits=P;else if(P>t.wbits){e.msg="invalid window size",t.mode=o;break}t.dmax=1<>8&1),512&t.flags&&(F[0]=255&x,F[1]=x>>>8&255,t.check=d(t.check,F,2,0)),x=0,y=0,t.mode=3;case 3:for(;y<32;){if(0===g)break e;g--,x+=l[h++]<>>8&255,F[2]=x>>>16&255,F[3]=x>>>24&255,t.check=d(t.check,F,4,0)),x=0,y=0,t.mode=4;case 4:for(;y<16;){if(0===g)break e;g--,x+=l[h++]<>8),512&t.flags&&(F[0]=255&x,F[1]=x>>>8&255,t.check=d(t.check,F,2,0)),x=0,y=0,t.mode=5;case 5:if(1024&t.flags){for(;y<16;){if(0===g)break e;g--,x+=l[h++]<>>8&255,t.check=d(t.check,F,2,0)),x=0,y=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&((I=t.length)>g&&(I=g),I&&(t.head&&(P=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),c.arraySet(t.head.extra,l,h,I,P)),512&t.flags&&(t.check=d(t.check,l,I,h)),g-=I,h+=I,t.length-=I),t.length))break e;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(0===g)break e;I=0;do{P=l[h+I++],t.head&&P&&t.length<65536&&(t.head.name+=String.fromCharCode(P))}while(P&&I>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=b;break;case 10:for(;y<32;){if(0===g)break e;g--,x+=l[h++]<>>=7&y,y-=7&y,t.mode=27;break}for(;y<3;){if(0===g)break e;g--,x+=l[h++]<>>=1)){case 0:t.mode=14;break;case 1:if(A(t),t.mode=20,6===a){x>>>=2,y-=2;break e}break;case 2:t.mode=17;break;case 3:e.msg="invalid block type",t.mode=o}x>>>=2,y-=2;break;case 14:for(x>>>=7&y,y-=7&y;y<32;){if(0===g)break e;g--,x+=l[h++]<>>16^65535)){e.msg="invalid stored block lengths",t.mode=o;break}if(t.length=65535&x,x=0,y=0,t.mode=15,6===a)break e;case 15:t.mode=16;case 16:if(I=t.length){if(I>g&&(I=g),I>m&&(I=m),0===I)break e;c.arraySet(u,l,h,I,p),g-=I,h+=I,m-=I,p+=I,t.length-=I;break}t.mode=b;break;case 17:for(;y<14;){if(0===g)break e;g--,x+=l[h++]<>>=5,y-=5,t.ndist=1+(31&x),x>>>=5,y-=5,t.ncode=4+(15&x),x>>>=4,y-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=o;break}t.have=0,t.mode=18;case 18:for(;t.have>>=3,y-=3}for(;t.have<19;)t.lens[Q[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,O={bits:t.lenbits},R=n(0,t.lens,0,19,t.lencode,0,t.work,O),t.lenbits=O.bits,R){e.msg="invalid code lengths set",t.mode=o;break}t.have=0,t.mode=19;case 19:for(;t.have>>16&255,L=65535&T,!((M=T>>>24)<=y);){if(0===g)break e;g--,x+=l[h++]<>>=M,y-=M,t.lens[t.have++]=L;else{if(16===L){for(D=M+2;y>>=M,y-=M,0===t.have){e.msg="invalid bit length repeat",t.mode=o;break}P=t.lens[t.have-1],I=3+(3&x),x>>>=2,y-=2}else if(17===L){for(D=M+3;y>>=M)),x>>>=3,y-=3}else{for(D=M+7;y>>=M)),x>>>=7,y-=7}if(t.have+I>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=o;break}for(;I--;)t.lens[t.have++]=P}}if(t.mode===o)break;if(0===t.lens[256]){e.msg="invalid code -- missing end-of-block",t.mode=o;break}if(t.lenbits=9,O={bits:t.lenbits},R=n(1,t.lens,0,t.nlen,t.lencode,0,t.work,O),t.lenbits=O.bits,R){e.msg="invalid literal/lengths set",t.mode=o;break}if(t.distbits=6,t.distcode=t.distdyn,O={bits:t.distbits},R=n(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,O),t.distbits=O.bits,R){e.msg="invalid distances set",t.mode=o;break}if(t.mode=20,6===a)break e;case 20:t.mode=21;case 21:if(g>=6&&m>=258){e.next_out=p,e.avail_out=m,e.next_in=h,e.avail_in=g,t.hold=x,t.bits=y,r(e,_),p=e.next_out,u=e.output,m=e.avail_out,h=e.next_in,l=e.input,g=e.avail_in,x=t.hold,y=t.bits,t.mode===b&&(t.back=-1);break}for(t.back=0;B=(T=t.lencode[x&(1<>>16&255,L=65535&T,!((M=T>>>24)<=y);){if(0===g)break e;g--,x+=l[h++]<>S)])>>>16&255,L=65535&T,!(S+(M=T>>>24)<=y);){if(0===g)break e;g--,x+=l[h++]<>>=S,y-=S,t.back+=S}if(x>>>=M,y-=M,t.back+=M,t.length=L,0===B){t.mode=26;break}if(32&B){t.back=-1,t.mode=b;break}if(64&B){e.msg="invalid literal/length code",t.mode=o;break}t.extra=15&B,t.mode=22;case 22:if(t.extra){for(D=t.extra;y>>=t.extra,y-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;B=(T=t.distcode[x&(1<>>16&255,L=65535&T,!((M=T>>>24)<=y);){if(0===g)break e;g--,x+=l[h++]<>S)])>>>16&255,L=65535&T,!(S+(M=T>>>24)<=y);){if(0===g)break e;g--,x+=l[h++]<>>=S,y-=S,t.back+=S}if(x>>>=M,y-=M,t.back+=M,64&B){e.msg="invalid distance code",t.mode=o;break}t.offset=L,t.extra=15&B,t.mode=24;case 24:if(t.extra){for(D=t.extra;y>>=t.extra,y-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=o;break}t.mode=25;case 25:if(0===m)break e;if(I=_-m,t.offset>I){if((I=t.offset-I)>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=o;break}I>t.wnext?(I-=t.wnext,E=t.wsize-I):E=t.wnext-I,I>t.length&&(I=t.length),C=t.window}else C=u,E=p-t.offset,I=t.length;I>m&&(I=m),m-=I,t.length-=I;do{u[p++]=C[E++]}while(--I);0===t.length&&(t.mode=21);break;case 26:if(0===m)break e;u[p++]=t.length,m--,t.mode=21;break;case 27:if(t.wrap){for(;y<32;){if(0===g)break e;g--,x|=l[h++]<{"use strict";var c=t(9805),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,a,t,i,b,o,s,l){var u,h,p,g,m,x,y,A,v,w=l.bits,_=0,I=0,E=0,C=0,M=0,B=0,L=0,S=0,k=0,N=0,P=null,R=0,O=new c.Buf16(16),D=new c.Buf16(16),T=null,F=0;for(_=0;_<=15;_++)O[_]=0;for(I=0;I=1&&0===O[C];C--);if(M>C&&(M=C),0===C)return b[o++]=20971520,b[o++]=20971520,l.bits=1,0;for(E=1;E0&&(0===e||1!==C))return-1;for(D[1]=0,_=1;_<15;_++)D[_+1]=D[_]+O[_];for(I=0;I852||2===e&&k>592)return 1;for(;;){y=_-L,s[I]x?(A=T[F+s[I]],v=P[R+s[I]]):(A=96,v=0),u=1<<_-L,E=h=1<>L)+(h-=u)]=y<<24|A<<16|v}while(0!==h);for(u=1<<_-1;N&u;)u>>=1;if(0!==u?(N&=u-1,N+=u):N=0,I++,0==--O[_]){if(_===C)break;_=a[t+s[I]]}if(_>M&&(N&g)!==p){for(0===L&&(L=M),m+=E,S=1<<(B=_-L);B+L852||2===e&&k>592)return 1;b[p=N&g]=M<<24|B<<16|m-o}}return 0!==N&&(b[m+N]=_-L<<24|64<<16),l.bits=M,0}},54674:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},23665:(e,a,t)=>{"use strict";var c=t(9805);function f(e){for(var a=e.length;--a>=0;)e[a]=0}var d=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],r=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],i=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],b=new Array(576);f(b);var o=new Array(60);f(o);var s=new Array(512);f(s);var l=new Array(256);f(l);var u=new Array(29);f(u);var h,p,g,m=new Array(30);function x(e,a,t,c,f){this.static_tree=e,this.extra_bits=a,this.extra_base=t,this.elems=c,this.max_length=f,this.has_stree=e&&e.length}function y(e,a){this.dyn_tree=e,this.max_code=0,this.stat_desc=a}function A(e){return e<256?s[e]:s[256+(e>>>7)]}function v(e,a){e.pending_buf[e.pending++]=255&a,e.pending_buf[e.pending++]=a>>>8&255}function w(e,a,t){e.bi_valid>16-t?(e.bi_buf|=a<>16-e.bi_valid,e.bi_valid+=t-16):(e.bi_buf|=a<>>=1,t<<=1}while(--a>0);return t>>>1}function E(e,a,t){var c,f,d=new Array(16),r=0;for(c=1;c<=15;c++)d[c]=r=r+t[c-1]<<1;for(f=0;f<=a;f++){var n=e[2*f+1];0!==n&&(e[2*f]=I(d[n]++,n))}}function C(e){var a;for(a=0;a<286;a++)e.dyn_ltree[2*a]=0;for(a=0;a<30;a++)e.dyn_dtree[2*a]=0;for(a=0;a<19;a++)e.bl_tree[2*a]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function M(e){e.bi_valid>8?v(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function B(e,a,t,c){var f=2*a,d=2*t;return e[f]>1;t>=1;t--)L(e,d,t);f=i;do{t=e.heap[1],e.heap[1]=e.heap[e.heap_len--],L(e,d,1),c=e.heap[1],e.heap[--e.heap_max]=t,e.heap[--e.heap_max]=c,d[2*f]=d[2*t]+d[2*c],e.depth[f]=(e.depth[t]>=e.depth[c]?e.depth[t]:e.depth[c])+1,d[2*t+1]=d[2*c+1]=f,e.heap[1]=f++,L(e,d,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,a){var t,c,f,d,r,n,i=a.dyn_tree,b=a.max_code,o=a.stat_desc.static_tree,s=a.stat_desc.has_stree,l=a.stat_desc.extra_bits,u=a.stat_desc.extra_base,h=a.stat_desc.max_length,p=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(i[2*e.heap[e.heap_max]+1]=0,t=e.heap_max+1;t<573;t++)(d=i[2*i[2*(c=e.heap[t])+1]+1]+1)>h&&(d=h,p++),i[2*c+1]=d,c>b||(e.bl_count[d]++,r=0,c>=u&&(r=l[c-u]),n=i[2*c],e.opt_len+=n*(d+r),s&&(e.static_len+=n*(o[2*c+1]+r)));if(0!==p){do{for(d=h-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[h]--,p-=2}while(p>0);for(d=h;0!==d;d--)for(c=e.bl_count[d];0!==c;)(f=e.heap[--t])>b||(i[2*f+1]!==d&&(e.opt_len+=(d-i[2*f+1])*i[2*f],i[2*f+1]=d),c--)}}(e,a),E(d,b,e.bl_count)}function N(e,a,t){var c,f,d=-1,r=a[1],n=0,i=7,b=4;for(0===r&&(i=138,b=3),a[2*(t+1)+1]=65535,c=0;c<=t;c++)f=r,r=a[2*(c+1)+1],++n>=7;c<30;c++)for(m[c]=f<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var a,t=4093624447;for(a=0;a<=31;a++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*a])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(a=32;a<256;a++)if(0!==e.dyn_ltree[2*a])return 1;return 0}(e)),k(e,e.l_desc),k(e,e.d_desc),r=function(e){var a;for(N(e,e.dyn_ltree,e.l_desc.max_code),N(e,e.dyn_dtree,e.d_desc.max_code),k(e,e.bl_desc),a=18;a>=3&&0===e.bl_tree[2*i[a]+1];a--);return e.opt_len+=3*(a+1)+5+5+4,a}(e),f=e.opt_len+3+7>>>3,(d=e.static_len+3+7>>>3)<=f&&(f=d)):f=d=t+5,t+4<=f&&-1!==a?O(e,a,t,c):4===e.strategy||d===f?(w(e,2+(c?1:0),3),S(e,b,o)):(w(e,4+(c?1:0),3),function(e,a,t,c){var f;for(w(e,a-257,5),w(e,t-1,5),w(e,c-4,4),f=0;f>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&a,e.pending_buf[e.l_buf+e.last_lit]=255&t,e.last_lit++,0===a?e.dyn_ltree[2*t]++:(e.matches++,a--,e.dyn_ltree[2*(l[t]+256+1)]++,e.dyn_dtree[2*A(a)]++),e.last_lit===e.lit_bufsize-1},a._tr_align=function(e){w(e,2,3),_(e,256,b),function(e){16===e.bi_valid?(v(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},44442:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},21137:(e,a,t)=>{"use strict";var c=t(87568);a.certificate=t(36413);var f=c.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));a.RSAPrivateKey=f;var d=c.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));a.RSAPublicKey=d;var r=c.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),n=c.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(r),this.key("subjectPublicKey").bitstr())}));a.PublicKey=n;var i=c.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(r),this.key("subjectPrivateKey").octstr())}));a.PrivateKey=i;var b=c.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));a.EncryptedPrivateKey=b;var o=c.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));a.DSAPrivateKey=o,a.DSAparam=c.define("DSAparam",(function(){this.int()}));var s=c.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),l=c.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(s),this.key("publicKey").optional().explicit(1).bitstr())}));a.ECPrivateKey=l,a.signature=c.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},36413:(e,a,t)=>{"use strict";var c=t(87568),f=c.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),d=c.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),r=c.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),n=c.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(r),this.key("subjectPublicKey").bitstr())})),i=c.define("RelativeDistinguishedName",(function(){this.setof(d)})),b=c.define("RDNSequence",(function(){this.seqof(i)})),o=c.define("Name",(function(){this.choice({rdnSequence:this.use(b)})})),s=c.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(f),this.key("notAfter").use(f))})),l=c.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),u=c.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(r),this.key("issuer").use(o),this.key("validity").use(s),this.key("subject").use(o),this.key("subjectPublicKeyInfo").use(n),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),h=c.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(u),this.key("signatureAlgorithm").use(r),this.key("signatureValue").bitstr())}));e.exports=h},24101:(e,a,t)=>{"use strict";var c=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,f=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,d=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,r=t(68078),n=t(1241),i=t(92861).Buffer;e.exports=function(e,a){var t,b=e.toString(),o=b.match(c);if(o){var s="aes"+o[1],l=i.from(o[2],"hex"),u=i.from(o[3].replace(/[\r\n]/g,""),"base64"),h=r(a,l.slice(0,8),parseInt(o[1],10)).key,p=[],g=n.createDecipheriv(s,h,l);p.push(g.update(u)),p.push(g.final()),t=i.concat(p)}else{var m=b.match(d);t=i.from(m[2].replace(/[\r\n]/g,""),"base64")}return{tag:b.match(f)[1],data:t}}},78170:(e,a,t)=>{"use strict";var c=t(21137),f=t(15579),d=t(24101),r=t(1241),n=t(78396),i=t(92861).Buffer;function b(e){var a;"object"!=typeof e||i.isBuffer(e)||(a=e.passphrase,e=e.key),"string"==typeof e&&(e=i.from(e));var t,b,o=d(e,a),s=o.tag,l=o.data;switch(s){case"CERTIFICATE":b=c.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(b||(b=c.PublicKey.decode(l,"der")),t=b.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return c.RSAPublicKey.decode(b.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return b.subjectPrivateKey=b.subjectPublicKey,{type:"ec",data:b};case"1.2.840.10040.4.1":return b.algorithm.params.pub_key=c.DSAparam.decode(b.subjectPublicKey.data,"der"),{type:"dsa",data:b.algorithm.params};default:throw new Error("unknown key id "+t)}case"ENCRYPTED PRIVATE KEY":l=function(e,a){var t=e.algorithm.decrypt.kde.kdeparams.salt,c=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),d=f[e.algorithm.decrypt.cipher.algo.join(".")],b=e.algorithm.decrypt.cipher.iv,o=e.subjectPrivateKey,s=parseInt(d.split("-")[1],10)/8,l=n.pbkdf2Sync(a,t,c,s,"sha1"),u=r.createDecipheriv(d,l,b),h=[];return h.push(u.update(o)),h.push(u.final()),i.concat(h)}(l=c.EncryptedPrivateKey.decode(l,"der"),a);case"PRIVATE KEY":switch(t=(b=c.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return c.RSAPrivateKey.decode(b.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:b.algorithm.curve,privateKey:c.ECPrivateKey.decode(b.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return b.algorithm.params.priv_key=c.DSAparam.decode(b.subjectPrivateKey,"der"),{type:"dsa",params:b.algorithm.params};default:throw new Error("unknown key id "+t)}case"RSA PUBLIC KEY":return c.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return c.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:c.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=c.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+s)}}b.signature=c.signature,e.exports=b},78396:(e,a,t)=>{a.pbkdf2=t(43832),a.pbkdf2Sync=t(21352)},43832:(e,a,t)=>{var c,f,d=t(92861).Buffer,r=t(64196),n=t(2455),i=t(21352),b=t(93382),o=t.g.crypto&&t.g.crypto.subtle,s={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];function u(){return f||(f=t.g.process&&t.g.process.nextTick?t.g.process.nextTick:t.g.queueMicrotask?t.g.queueMicrotask:t.g.setImmediate?t.g.setImmediate:t.g.setTimeout)}function h(e,a,t,c,f){return o.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return o.deriveBits({name:"PBKDF2",salt:a,iterations:t,hash:{name:f}},e,c<<3)})).then((function(e){return d.from(e)}))}e.exports=function(e,a,f,p,g,m){"function"==typeof g&&(m=g,g=void 0);var x=s[(g=g||"sha1").toLowerCase()];if(x&&"function"==typeof t.g.Promise){if(r(f,p),e=b(e,n,"Password"),a=b(a,n,"Salt"),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");!function(e,a){e.then((function(e){u()((function(){a(null,e)}))}),(function(e){u()((function(){a(e)}))}))}(function(e){if(t.g.process&&!t.g.process.browser)return Promise.resolve(!1);if(!o||!o.importKey||!o.deriveBits)return Promise.resolve(!1);if(void 0!==l[e])return l[e];var a=h(c=c||d.alloc(8),c,10,128,e).then((function(){return!0})).catch((function(){return!1}));return l[e]=a,a}(x).then((function(t){return t?h(e,a,f,p,x):i(e,a,f,p,g)})),m)}else u()((function(){var t;try{t=i(e,a,f,p,g)}catch(e){return m(e)}m(null,t)}))}},2455:(e,a,t)=>{var c;c=t.g.process&&t.g.process.browser?"utf-8":t.g.process&&t.g.process.version?parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=c},64196:e=>{var a=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>a||t!=t)throw new TypeError("Bad key length")}},21352:(e,a,t)=>{var c=t(20320),f=t(66011),d=t(62802),r=t(92861).Buffer,n=t(64196),i=t(2455),b=t(93382),o=r.alloc(128),s={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,a,t){var n=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new f).update(e).digest()}:"md5"===e?c:function(a){return d(e).update(a).digest()}}(e),i="sha512"===e||"sha384"===e?128:64;a.length>i?a=n(a):a.length{var c=t(92861).Buffer;e.exports=function(e,a,t){if(c.isBuffer(e))return e;if("string"==typeof e)return c.from(e,a);if(ArrayBuffer.isView(e))return c.from(e.buffer);throw new TypeError(t+" must be a string, a Buffer, a typed array or a DataView")}},71843:(e,a,t)=>{"use strict";const{ErrorWithCause:c}=t(75832),{findCauseByReference:f,getErrorCause:d,messageWithCauses:r,stackWithCauses:n}=t(94306);e.exports={ErrorWithCause:c,findCauseByReference:f,getErrorCause:d,stackWithCauses:n,messageWithCauses:r}},75832:e=>{"use strict";class a extends Error{constructor(e,{cause:t}={}){super(e),this.name=a.name,t&&(this.cause=t),this.message=e}}e.exports={ErrorWithCause:a}},94306:e=>{"use strict";const a=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"==typeof e.cause){const a=e.cause();return a instanceof Error?a:void 0}return e.cause instanceof Error?e.cause:void 0}},t=(e,c)=>{if(!(e instanceof Error))return"";const f=e.stack||"";if(c.has(e))return f+"\ncauses have become circular...";const d=a(e);return d?(c.add(e),f+"\ncaused by: "+t(d,c)):f},c=(e,t,f)=>{if(!(e instanceof Error))return"";const d=f?"":e.message||"";if(t.has(e))return d+": ...";const r=a(e);if(r){t.add(e);const a="cause"in e&&"function"==typeof e.cause;return d+(a?"":": ")+c(r,t,a)}return d};e.exports={findCauseByReference:(e,t)=>{if(!e||!t)return;if(!(e instanceof Error))return;if(!(t.prototype instanceof Error)&&t!==Error)return;const c=new Set;let f=e;for(;f&&!c.has(f);){if(c.add(f),f instanceof t)return f;f=a(f)}},getErrorCause:a,stackWithCauses:e=>t(e,new Set),messageWithCauses:e=>c(e,new Set)}},76578:e=>{"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},33225:e=>{"use strict";"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?e.exports={nextTick:function(e,a,t,c){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var f,d,r=arguments.length;switch(r){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,a)}));case 3:return process.nextTick((function(){e.call(null,a,t)}));case 4:return process.nextTick((function(){e.call(null,a,t,c)}));default:for(f=new Array(r-1),d=0;d{a.publicEncrypt=t(28902),a.privateDecrypt=t(77362),a.privateEncrypt=function(e,t){return a.publicEncrypt(e,t,!0)},a.publicDecrypt=function(e,t){return a.privateDecrypt(e,t,!0)}},48206:(e,a,t)=>{var c=t(47108),f=t(92861).Buffer;function d(e){var a=f.allocUnsafe(4);return a.writeUInt32BE(e,0),a}e.exports=function(e,a){for(var t,r=f.alloc(0),n=0;r.length=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},77362:(e,a,t)=>{var c=t(78170),f=t(48206),d=t(52061),r=t(82509),n=t(67332),i=t(47108),b=t(99247),o=t(92861).Buffer;e.exports=function(e,a,t){var s;s=e.padding?e.padding:t?1:4;var l,u=c(e),h=u.modulus.byteLength();if(a.length>h||new r(a).cmp(u.modulus)>=0)throw new Error("decryption error");l=t?b(new r(a),u):n(a,u);var p=o.alloc(h-l.length);if(l=o.concat([p,l],h),4===s)return function(e,a){var t=e.modulus.byteLength(),c=i("sha1").update(o.alloc(0)).digest(),r=c.length;if(0!==a[0])throw new Error("decryption error");var n=a.slice(1,r+1),b=a.slice(r+1),s=d(n,f(b,r)),l=d(b,f(s,t-r-1));if(function(e,a){e=o.from(e),a=o.from(a);var t=0,c=e.length;e.length!==a.length&&(t++,c=Math.min(e.length,a.length));for(var f=-1;++f=a.length){d++;break}var r=a.slice(2,f-1);if(("0002"!==c.toString("hex")&&!t||"0001"!==c.toString("hex")&&t)&&d++,r.length<8&&d++,d)throw new Error("decryption error");return a.slice(f)}(0,l,t);if(3===s)return l;throw new Error("unknown padding")}},28902:(e,a,t)=>{var c=t(78170),f=t(53209),d=t(47108),r=t(48206),n=t(52061),i=t(82509),b=t(99247),o=t(67332),s=t(92861).Buffer;e.exports=function(e,a,t){var l;l=e.padding?e.padding:t?1:4;var u,h=c(e);if(4===l)u=function(e,a){var t=e.modulus.byteLength(),c=a.length,b=d("sha1").update(s.alloc(0)).digest(),o=b.length,l=2*o;if(c>t-l-2)throw new Error("message too long");var u=s.alloc(t-c-l-2),h=t-o-1,p=f(o),g=n(s.concat([b,u,s.alloc(1,1),a],h),r(p,h)),m=n(p,r(g,o));return new i(s.concat([s.alloc(1),m,g],t))}(h,a);else if(1===l)u=function(e,a,t){var c,d=a.length,r=e.modulus.byteLength();if(d>r-11)throw new Error("message too long");return c=t?s.alloc(r-d-3,255):function(e){for(var a,t=s.allocUnsafe(e),c=0,d=f(2*e),r=0;c=0)throw new Error("data too long for modulus")}return t?o(u,h):b(u,h)}},99247:(e,a,t)=>{var c=t(82509),f=t(92861).Buffer;e.exports=function(e,a){return f.from(e.toRed(c.mont(a.modulus)).redPow(new c(a.publicExponent)).fromRed().toArray())}},52061:e=>{e.exports=function(e,a){for(var t=e.length,c=-1;++c{"use strict";var c=65536,f=t(92861).Buffer,d=t.g.crypto||t.g.msCrypto;d&&d.getRandomValues?e.exports=function(e,a){if(e>4294967295)throw new RangeError("requested too many random bytes");var t=f.allocUnsafe(e);if(e>0)if(e>c)for(var r=0;r{"use strict";function c(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var f=t(92861),d=t(53209),r=f.Buffer,n=f.kMaxLength,i=t.g.crypto||t.g.msCrypto,b=Math.pow(2,32)-1;function o(e,a){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>b||e<0)throw new TypeError("offset must be a uint32");if(e>n||e>a)throw new RangeError("offset out of range")}function s(e,a,t){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>b||e<0)throw new TypeError("size must be a uint32");if(e+a>t||e>n)throw new RangeError("buffer too small")}function l(e,a,t,c){if(process.browser){var f=e.buffer,r=new Uint8Array(f,a,t);return i.getRandomValues(r),c?void process.nextTick((function(){c(null,e)})):e}if(!c)return d(t).copy(e,a),e;d(t,(function(t,f){if(t)return c(t);f.copy(e,a),c(null,e)}))}i&&i.getRandomValues||!process.browser?(a.randomFill=function(e,a,c,f){if(!(r.isBuffer(e)||e instanceof t.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof a)f=a,a=0,c=e.length;else if("function"==typeof c)f=c,c=e.length-a;else if("function"!=typeof f)throw new TypeError('"cb" argument must be a function');return o(a,e.length),s(c,a,e.length),l(e,a,c,f)},a.randomFillSync=function(e,a,c){if(void 0===a&&(a=0),!(r.isBuffer(e)||e instanceof t.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return o(a,e.length),void 0===c&&(c=e.length-a),s(c,a,e.length),l(e,a,c)}):(a.randomFill=c,a.randomFillSync=c)},86048:e=>{"use strict";var a={};function t(e,t,c){c||(c=Error);var f=function(e){var a,c;function f(a,c,f){return e.call(this,function(e,a,c){return"string"==typeof t?t:t(e,a,c)}(a,c,f))||this}return c=e,(a=f).prototype=Object.create(c.prototype),a.prototype.constructor=a,a.__proto__=c,f}(c);f.prototype.name=c.name,f.prototype.code=e,a[e]=f}function c(e,a){if(Array.isArray(e)){var t=e.length;return e=e.map((function(e){return String(e)})),t>2?"one of ".concat(a," ").concat(e.slice(0,t-1).join(", "),", or ")+e[t-1]:2===t?"one of ".concat(a," ").concat(e[0]," or ").concat(e[1]):"of ".concat(a," ").concat(e[0])}return"of ".concat(a," ").concat(String(e))}t("ERR_INVALID_OPT_VALUE",(function(e,a){return'The value "'+a+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,a,t){var f,d,r,n,i;if("string"==typeof a&&(d="not ",a.substr(0,4)===d)?(f="must not be",a=a.replace(/^not /,"")):f="must be",function(e,a,t){return(void 0===t||t>e.length)&&(t=e.length),e.substring(t-9,t)===a}(e," argument"))r="The ".concat(e," ").concat(f," ").concat(c(a,"type"));else{var b=("number"!=typeof i&&(i=0),i+1>(n=e).length||-1===n.indexOf(".",i)?"argument":"property");r='The "'.concat(e,'" ').concat(b," ").concat(f," ").concat(c(a,"type"))}return r+". Received type ".concat(typeof t)}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=a},25382:(e,a,t)=>{"use strict";var c=Object.keys||function(e){var a=[];for(var t in e)a.push(t);return a};e.exports=b;var f=t(45412),d=t(16708);t(56698)(b,f);for(var r=c(d.prototype),n=0;n{"use strict";e.exports=f;var c=t(74610);function f(e){if(!(this instanceof f))return new f(e);c.call(this,e)}t(56698)(f,c),f.prototype._transform=function(e,a,t){t(null,e)}},45412:(e,a,t)=>{"use strict";var c;e.exports=I,I.ReadableState=_,t(37007).EventEmitter;var f,d=function(e,a){return e.listeners(a).length},r=t(40345),n=t(48287).Buffer,i=(void 0!==t.g?t.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},b=t(79838);f=b&&b.debuglog?b.debuglog("stream"):function(){};var o,s,l,u=t(80345),h=t(75896),p=t(65291).getHighWaterMark,g=t(86048).F,m=g.ERR_INVALID_ARG_TYPE,x=g.ERR_STREAM_PUSH_AFTER_EOF,y=g.ERR_METHOD_NOT_IMPLEMENTED,A=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;t(56698)(I,r);var v=h.errorOrDestroy,w=["error","close","destroy","pause","resume"];function _(e,a,f){c=c||t(25382),e=e||{},"boolean"!=typeof f&&(f=a instanceof c),this.objectMode=!!e.objectMode,f&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,"readableHighWaterMark",f),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o||(o=t(83141).I),this.decoder=new o(e.encoding),this.encoding=e.encoding)}function I(e){if(c=c||t(25382),!(this instanceof I))return new I(e);var a=this instanceof c;this._readableState=new _(e,this,a),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),r.call(this)}function E(e,a,t,c,d){f("readableAddChunk",a);var r,b=e._readableState;if(null===a)b.reading=!1,function(e,a){if(f("onEofChunk"),!a.ended){if(a.decoder){var t=a.decoder.end();t&&t.length&&(a.buffer.push(t),a.length+=a.objectMode?1:t.length)}a.ended=!0,a.sync?L(e):(a.needReadable=!1,a.emittedReadable||(a.emittedReadable=!0,S(e)))}}(e,b);else if(d||(r=function(e,a){var t,c;return c=a,n.isBuffer(c)||c instanceof i||"string"==typeof a||void 0===a||e.objectMode||(t=new m("chunk",["string","Buffer","Uint8Array"],a)),t}(b,a)),r)v(e,r);else if(b.objectMode||a&&a.length>0)if("string"==typeof a||b.objectMode||Object.getPrototypeOf(a)===n.prototype||(a=function(e){return n.from(e)}(a)),c)b.endEmitted?v(e,new A):C(e,b,a,!0);else if(b.ended)v(e,new x);else{if(b.destroyed)return!1;b.reading=!1,b.decoder&&!t?(a=b.decoder.write(a),b.objectMode||0!==a.length?C(e,b,a,!1):k(e,b)):C(e,b,a,!1)}else c||(b.reading=!1,k(e,b));return!b.ended&&(b.lengtha.highWaterMark&&(a.highWaterMark=function(e){return e>=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=a.length?e:a.ended?a.length:(a.needReadable=!0,0))}function L(e){var a=e._readableState;f("emitReadable",a.needReadable,a.emittedReadable),a.needReadable=!1,a.emittedReadable||(f("emitReadable",a.flowing),a.emittedReadable=!0,process.nextTick(S,e))}function S(e){var a=e._readableState;f("emitReadable_",a.destroyed,a.length,a.ended),a.destroyed||!a.length&&!a.ended||(e.emit("readable"),a.emittedReadable=!1),a.needReadable=!a.flowing&&!a.ended&&a.length<=a.highWaterMark,D(e)}function k(e,a){a.readingMore||(a.readingMore=!0,process.nextTick(N,e,a))}function N(e,a){for(;!a.reading&&!a.ended&&(a.length0,a.resumeScheduled&&!a.paused?a.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){f("readable nexttick read 0"),e.read(0)}function O(e,a){f("resume",a.reading),a.reading||e.read(0),a.resumeScheduled=!1,e.emit("resume"),D(e),a.flowing&&!a.reading&&e.read(0)}function D(e){var a=e._readableState;for(f("flow",a.flowing);a.flowing&&null!==e.read(););}function T(e,a){return 0===a.length?null:(a.objectMode?t=a.buffer.shift():!e||e>=a.length?(t=a.decoder?a.buffer.join(""):1===a.buffer.length?a.buffer.first():a.buffer.concat(a.length),a.buffer.clear()):t=a.buffer.consume(e,a.decoder),t);var t}function F(e){var a=e._readableState;f("endReadable",a.endEmitted),a.endEmitted||(a.ended=!0,process.nextTick(Q,a,e))}function Q(e,a){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,a.readable=!1,a.emit("end"),e.autoDestroy)){var t=a._writableState;(!t||t.autoDestroy&&t.finished)&&a.destroy()}}function U(e,a){for(var t=0,c=e.length;t=a.highWaterMark:a.length>0)||a.ended))return f("read: emitReadable",a.length,a.ended),0===a.length&&a.ended?F(this):L(this),null;if(0===(e=B(e,a))&&a.ended)return 0===a.length&&F(this),null;var c,d=a.needReadable;return f("need readable",d),(0===a.length||a.length-e0?T(e,a):null)?(a.needReadable=a.length<=a.highWaterMark,e=0):(a.length-=e,a.awaitDrain=0),0===a.length&&(a.ended||(a.needReadable=!0),t!==e&&a.ended&&F(this)),null!==c&&this.emit("data",c),c},I.prototype._read=function(e){v(this,new y("_read()"))},I.prototype.pipe=function(e,a){var t=this,c=this._readableState;switch(c.pipesCount){case 0:c.pipes=e;break;case 1:c.pipes=[c.pipes,e];break;default:c.pipes.push(e)}c.pipesCount+=1,f("pipe count=%d opts=%j",c.pipesCount,a);var r=a&&!1===a.end||e===process.stdout||e===process.stderr?h:n;function n(){f("onend"),e.end()}c.endEmitted?process.nextTick(r):t.once("end",r),e.on("unpipe",(function a(d,r){f("onunpipe"),d===t&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,f("cleanup"),e.removeListener("close",l),e.removeListener("finish",u),e.removeListener("drain",i),e.removeListener("error",s),e.removeListener("unpipe",a),t.removeListener("end",n),t.removeListener("end",h),t.removeListener("data",o),b=!0,!c.awaitDrain||e._writableState&&!e._writableState.needDrain||i())}));var i=function(e){return function(){var a=e._readableState;f("pipeOnDrain",a.awaitDrain),a.awaitDrain&&a.awaitDrain--,0===a.awaitDrain&&d(e,"data")&&(a.flowing=!0,D(e))}}(t);e.on("drain",i);var b=!1;function o(a){f("ondata");var d=e.write(a);f("dest.write",d),!1===d&&((1===c.pipesCount&&c.pipes===e||c.pipesCount>1&&-1!==U(c.pipes,e))&&!b&&(f("false write response, pause",c.awaitDrain),c.awaitDrain++),t.pause())}function s(a){f("onerror",a),h(),e.removeListener("error",s),0===d(e,"error")&&v(e,a)}function l(){e.removeListener("finish",u),h()}function u(){f("onfinish"),e.removeListener("close",l),h()}function h(){f("unpipe"),t.unpipe(e)}return t.on("data",o),function(e,a,t){if("function"==typeof e.prependListener)return e.prependListener(a,t);e._events&&e._events[a]?Array.isArray(e._events[a])?e._events[a].unshift(t):e._events[a]=[t,e._events[a]]:e.on(a,t)}(e,"error",s),e.once("close",l),e.once("finish",u),e.emit("pipe",t),c.flowing||(f("pipe resume"),t.resume()),e},I.prototype.unpipe=function(e){var a=this._readableState,t={hasUnpiped:!1};if(0===a.pipesCount)return this;if(1===a.pipesCount)return e&&e!==a.pipes||(e||(e=a.pipes),a.pipes=null,a.pipesCount=0,a.flowing=!1,e&&e.emit("unpipe",this,t)),this;if(!e){var c=a.pipes,f=a.pipesCount;a.pipes=null,a.pipesCount=0,a.flowing=!1;for(var d=0;d0,!1!==c.flowing&&this.resume()):"readable"===e&&(c.endEmitted||c.readableListening||(c.readableListening=c.needReadable=!0,c.flowing=!1,c.emittedReadable=!1,f("on readable",c.length,c.reading),c.length?L(this):c.reading||process.nextTick(R,this))),t},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,a){var t=r.prototype.removeListener.call(this,e,a);return"readable"===e&&process.nextTick(P,this),t},I.prototype.removeAllListeners=function(e){var a=r.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(P,this),a},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,a){a.resumeScheduled||(a.resumeScheduled=!0,process.nextTick(O,e,a))}(this,e)),e.paused=!1,this},I.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var a=this,t=this._readableState,c=!1;for(var d in e.on("end",(function(){if(f("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&a.push(e)}a.push(null)})),e.on("data",(function(d){f("wrapped data"),t.decoder&&(d=t.decoder.write(d)),t.objectMode&&null==d||(t.objectMode||d&&d.length)&&(a.push(d)||(c=!0,e.pause()))})),e)void 0===this[d]&&"function"==typeof e[d]&&(this[d]=function(a){return function(){return e[a].apply(e,arguments)}}(d));for(var r=0;r{"use strict";e.exports=o;var c=t(86048).F,f=c.ERR_METHOD_NOT_IMPLEMENTED,d=c.ERR_MULTIPLE_CALLBACK,r=c.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=c.ERR_TRANSFORM_WITH_LENGTH_0,i=t(25382);function b(e,a){var t=this._transformState;t.transforming=!1;var c=t.writecb;if(null===c)return this.emit("error",new d);t.writechunk=null,t.writecb=null,null!=a&&this.push(a),c(e);var f=this._readableState;f.reading=!1,(f.needReadable||f.length{"use strict";function c(e){var a=this;this.next=null,this.entry=null,this.finish=function(){!function(e,a){var t=e.entry;for(e.entry=null;t;){var c=t.callback;a.pendingcb--,c(undefined),t=t.next}a.corkedRequestsFree.next=e}(a,e)}}var f;e.exports=I,I.WritableState=_;var d,r={deprecate:t(94643)},n=t(40345),i=t(48287).Buffer,b=(void 0!==t.g?t.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},o=t(75896),s=t(65291).getHighWaterMark,l=t(86048).F,u=l.ERR_INVALID_ARG_TYPE,h=l.ERR_METHOD_NOT_IMPLEMENTED,p=l.ERR_MULTIPLE_CALLBACK,g=l.ERR_STREAM_CANNOT_PIPE,m=l.ERR_STREAM_DESTROYED,x=l.ERR_STREAM_NULL_VALUES,y=l.ERR_STREAM_WRITE_AFTER_END,A=l.ERR_UNKNOWN_ENCODING,v=o.errorOrDestroy;function w(){}function _(e,a,d){f=f||t(25382),e=e||{},"boolean"!=typeof d&&(d=a instanceof f),this.objectMode=!!e.objectMode,d&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=s(this,e,"writableHighWaterMark",d),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var r=!1===e.decodeStrings;this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,a){var t=e._writableState,c=t.sync,f=t.writecb;if("function"!=typeof f)throw new p;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(t),a)!function(e,a,t,c,f){--a.pendingcb,t?(process.nextTick(f,c),process.nextTick(S,e,a),e._writableState.errorEmitted=!0,v(e,c)):(f(c),e._writableState.errorEmitted=!0,v(e,c),S(e,a))}(e,t,c,a,f);else{var d=B(t)||e.destroyed;d||t.corked||t.bufferProcessing||!t.bufferedRequest||M(e,t),c?process.nextTick(C,e,t,d,f):C(e,t,d,f)}}(a,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}function I(e){var a=this instanceof(f=f||t(25382));if(!a&&!d.call(I,this))return new I(e);this._writableState=new _(e,this,a),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),n.call(this)}function E(e,a,t,c,f,d,r){a.writelen=c,a.writecb=r,a.writing=!0,a.sync=!0,a.destroyed?a.onwrite(new m("write")):t?e._writev(f,a.onwrite):e._write(f,d,a.onwrite),a.sync=!1}function C(e,a,t,c){t||function(e,a){0===a.length&&a.needDrain&&(a.needDrain=!1,e.emit("drain"))}(e,a),a.pendingcb--,c(),S(e,a)}function M(e,a){a.bufferProcessing=!0;var t=a.bufferedRequest;if(e._writev&&t&&t.next){var f=a.bufferedRequestCount,d=new Array(f),r=a.corkedRequestsFree;r.entry=t;for(var n=0,i=!0;t;)d[n]=t,t.isBuf||(i=!1),t=t.next,n+=1;d.allBuffers=i,E(e,a,!0,a.length,d,"",r.finish),a.pendingcb++,a.lastBufferedRequest=null,r.next?(a.corkedRequestsFree=r.next,r.next=null):a.corkedRequestsFree=new c(a),a.bufferedRequestCount=0}else{for(;t;){var b=t.chunk,o=t.encoding,s=t.callback;if(E(e,a,!1,a.objectMode?1:b.length,b,o,s),t=t.next,a.bufferedRequestCount--,a.writing)break}null===t&&(a.lastBufferedRequest=null)}a.bufferedRequest=t,a.bufferProcessing=!1}function B(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function L(e,a){e._final((function(t){a.pendingcb--,t&&v(e,t),a.prefinished=!0,e.emit("prefinish"),S(e,a)}))}function S(e,a){var t=B(a);if(t&&(function(e,a){a.prefinished||a.finalCalled||("function"!=typeof e._final||a.destroyed?(a.prefinished=!0,e.emit("prefinish")):(a.pendingcb++,a.finalCalled=!0,process.nextTick(L,e,a)))}(e,a),0===a.pendingcb&&(a.finished=!0,e.emit("finish"),a.autoDestroy))){var c=e._readableState;(!c||c.autoDestroy&&c.endEmitted)&&e.destroy()}return t}t(56698)(I,n),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,a=[];e;)a.push(e),e=e.next;return a},function(){try{Object.defineProperty(_.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===I&&e&&e._writableState instanceof _}})):d=function(e){return e instanceof this},I.prototype.pipe=function(){v(this,new g)},I.prototype.write=function(e,a,t){var c,f=this._writableState,d=!1,r=!f.objectMode&&(c=e,i.isBuffer(c)||c instanceof b);return r&&!i.isBuffer(e)&&(e=function(e){return i.from(e)}(e)),"function"==typeof a&&(t=a,a=null),r?a="buffer":a||(a=f.defaultEncoding),"function"!=typeof t&&(t=w),f.ending?function(e,a){var t=new y;v(e,t),process.nextTick(a,t)}(this,t):(r||function(e,a,t,c){var f;return null===t?f=new x:"string"==typeof t||a.objectMode||(f=new u("chunk",["string","Buffer"],t)),!f||(v(e,f),process.nextTick(c,f),!1)}(this,f,e,t))&&(f.pendingcb++,d=function(e,a,t,c,f,d){if(!t){var r=function(e,a,t){return e.objectMode||!1===e.decodeStrings||"string"!=typeof a||(a=i.from(a,t)),a}(a,c,f);c!==r&&(t=!0,f="buffer",c=r)}var n=a.objectMode?1:c.length;a.length+=n;var b=a.length-1))throw new A(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(e,a,t){t(new h("_write()"))},I.prototype._writev=null,I.prototype.end=function(e,a,t){var c=this._writableState;return"function"==typeof e?(t=e,e=null,a=null):"function"==typeof a&&(t=a,a=null),null!=e&&this.write(e,a),c.corked&&(c.corked=1,this.uncork()),c.ending||function(e,a,t){a.ending=!0,S(e,a),t&&(a.finished?process.nextTick(t):e.once("finish",t)),a.ended=!0,e.writable=!1}(this,c,t),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),I.prototype.destroy=o.destroy,I.prototype._undestroy=o.undestroy,I.prototype._destroy=function(e,a){a(e)}},2955:(e,a,t)=>{"use strict";var c;function f(e,a,t){return(a=function(e){var a=function(e){if("object"!=typeof e||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var t=a.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof a?a:String(a)}(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}var d=t(86238),r=Symbol("lastResolve"),n=Symbol("lastReject"),i=Symbol("error"),b=Symbol("ended"),o=Symbol("lastPromise"),s=Symbol("handlePromise"),l=Symbol("stream");function u(e,a){return{value:e,done:a}}function h(e){var a=e[r];if(null!==a){var t=e[l].read();null!==t&&(e[o]=null,e[r]=null,e[n]=null,a(u(t,!1)))}}function p(e){process.nextTick(h,e)}var g=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((f(c={get stream(){return this[l]},next:function(){var e=this,a=this[i];if(null!==a)return Promise.reject(a);if(this[b])return Promise.resolve(u(void 0,!0));if(this[l].destroyed)return new Promise((function(a,t){process.nextTick((function(){e[i]?t(e[i]):a(u(void 0,!0))}))}));var t,c=this[o];if(c)t=new Promise(function(e,a){return function(t,c){e.then((function(){a[b]?t(u(void 0,!0)):a[s](t,c)}),c)}}(c,this));else{var f=this[l].read();if(null!==f)return Promise.resolve(u(f,!1));t=new Promise(this[s])}return this[o]=t,t}},Symbol.asyncIterator,(function(){return this})),f(c,"return",(function(){var e=this;return new Promise((function(a,t){e[l].destroy(null,(function(e){e?t(e):a(u(void 0,!0))}))}))})),c),g);e.exports=function(e){var a,t=Object.create(m,(f(a={},l,{value:e,writable:!0}),f(a,r,{value:null,writable:!0}),f(a,n,{value:null,writable:!0}),f(a,i,{value:null,writable:!0}),f(a,b,{value:e._readableState.endEmitted,writable:!0}),f(a,s,{value:function(e,a){var c=t[l].read();c?(t[o]=null,t[r]=null,t[n]=null,e(u(c,!1))):(t[r]=e,t[n]=a)},writable:!0}),a));return t[o]=null,d(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var a=t[n];return null!==a&&(t[o]=null,t[r]=null,t[n]=null,a(e)),void(t[i]=e)}var c=t[r];null!==c&&(t[o]=null,t[r]=null,t[n]=null,c(u(void 0,!0))),t[b]=!0})),e.on("readable",p.bind(null,t)),t}},80345:(e,a,t)=>{"use strict";function c(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);a&&(c=c.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var a=1;a0?this.tail.next=a:this.head=a,this.tail=a,++this.length}},{key:"unshift",value:function(e){var a={data:e,next:this.head};0===this.length&&(this.tail=a),this.head=a,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var a=this.head,t=""+a.data;a=a.next;)t+=e+a.data;return t}},{key:"concat",value:function(e){if(0===this.length)return i.alloc(0);for(var a,t,c,f=i.allocUnsafe(e>>>0),d=this.head,r=0;d;)a=d.data,t=f,c=r,i.prototype.copy.call(a,t,c),r+=d.data.length,d=d.next;return f}},{key:"consume",value:function(e,a){var t;return ef.length?f.length:e;if(d===f.length?c+=f:c+=f.slice(0,e),0==(e-=d)){d===f.length?(++t,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=f.slice(d));break}++t}return this.length-=t,c}},{key:"_getBuffer",value:function(e){var a=i.allocUnsafe(e),t=this.head,c=1;for(t.data.copy(a),e-=t.data.length;t=t.next;){var f=t.data,d=e>f.length?f.length:e;if(f.copy(a,a.length-e,0,d),0==(e-=d)){d===f.length?(++c,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=f.slice(d));break}++c}return this.length-=c,a}},{key:o,value:function(e,a){return b(this,f(f({},a),{},{depth:0,customInspect:!1}))}}])&&r(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),e}()},75896:e=>{"use strict";function a(e,a){c(e,a),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function c(e,a){e.emit("error",a)}e.exports={destroy:function(e,f){var d=this,r=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return r||n?(f?f(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(c,this,e)):process.nextTick(c,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!f&&e?d._writableState?d._writableState.errorEmitted?process.nextTick(t,d):(d._writableState.errorEmitted=!0,process.nextTick(a,d,e)):process.nextTick(a,d,e):f?(process.nextTick(t,d),f(e)):process.nextTick(t,d)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,a){var t=e._readableState,c=e._writableState;t&&t.autoDestroy||c&&c.autoDestroy?e.destroy(a):e.emit("error",a)}}},86238:(e,a,t)=>{"use strict";var c=t(86048).F.ERR_STREAM_PREMATURE_CLOSE;function f(){}e.exports=function e(a,t,d){if("function"==typeof t)return e(a,null,t);t||(t={}),d=function(e){var a=!1;return function(){if(!a){a=!0;for(var t=arguments.length,c=new Array(t),f=0;f{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},57758:(e,a,t)=>{"use strict";var c,f=t(86048).F,d=f.ERR_MISSING_ARGS,r=f.ERR_STREAM_DESTROYED;function n(e){if(e)throw e}function i(e){e()}function b(e,a){return e.pipe(a)}e.exports=function(){for(var e=arguments.length,a=new Array(e),f=0;f0,(function(e){o||(o=e),e&&l.forEach(i),d||(l.forEach(i),s(o))}))}));return a.reduce(b)}},65291:(e,a,t)=>{"use strict";var c=t(86048).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,a,t,f){var d=function(e,a,t){return null!=e.highWaterMark?e.highWaterMark:a?e[t]:null}(a,f,t);if(null!=d){if(!isFinite(d)||Math.floor(d)!==d||d<0)throw new c(f?t:"highWaterMark",d);return Math.floor(d)}return e.objectMode?16:16384}}},40345:(e,a,t)=>{e.exports=t(37007).EventEmitter},28399:(e,a,t)=>{(a=e.exports=t(45412)).Stream=a,a.Readable=a,a.Writable=t(16708),a.Duplex=t(25382),a.Transform=t(74610),a.PassThrough=t(63600),a.finished=t(86238),a.pipeline=t(57758)},66011:(e,a,t)=>{"use strict";var c=t(48287).Buffer,f=t(56698),d=t(51147),r=new Array(16),n=[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],i=[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],b=[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],o=[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],s=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function u(){d.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function h(e,a){return e<>>32-a}function p(e,a,t,c,f,d,r,n){return h(e+(a^t^c)+d+r|0,n)+f|0}function g(e,a,t,c,f,d,r,n){return h(e+(a&t|~a&c)+d+r|0,n)+f|0}function m(e,a,t,c,f,d,r,n){return h(e+((a|~t)^c)+d+r|0,n)+f|0}function x(e,a,t,c,f,d,r,n){return h(e+(a&c|t&~c)+d+r|0,n)+f|0}function y(e,a,t,c,f,d,r,n){return h(e+(a^(t|~c))+d+r|0,n)+f|0}f(u,d),u.prototype._update=function(){for(var e=r,a=0;a<16;++a)e[a]=this._block.readInt32LE(4*a);for(var t=0|this._a,c=0|this._b,f=0|this._c,d=0|this._d,u=0|this._e,A=0|this._a,v=0|this._b,w=0|this._c,_=0|this._d,I=0|this._e,E=0;E<80;E+=1){var C,M;E<16?(C=p(t,c,f,d,u,e[n[E]],s[0],b[E]),M=y(A,v,w,_,I,e[i[E]],l[0],o[E])):E<32?(C=g(t,c,f,d,u,e[n[E]],s[1],b[E]),M=x(A,v,w,_,I,e[i[E]],l[1],o[E])):E<48?(C=m(t,c,f,d,u,e[n[E]],s[2],b[E]),M=m(A,v,w,_,I,e[i[E]],l[2],o[E])):E<64?(C=x(t,c,f,d,u,e[n[E]],s[3],b[E]),M=g(A,v,w,_,I,e[i[E]],l[3],o[E])):(C=y(t,c,f,d,u,e[n[E]],s[4],b[E]),M=p(A,v,w,_,I,e[i[E]],l[4],o[E])),t=u,u=d,d=h(f,10),f=c,c=C,A=I,I=_,_=h(w,10),w=v,v=M}var B=this._b+f+_|0;this._b=this._c+d+I|0,this._c=this._d+u+A|0,this._d=this._e+t+v|0,this._e=this._a+c+w|0,this._a=B},u.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=c.alloc?c.alloc(20):new c(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=u},51147:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=t(28399).Transform;function d(e){f.call(this),this._block=c.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}t(56698)(d,f),d.prototype._transform=function(e,a,t){var c=null;try{this.update(e,a)}catch(e){c=e}t(c)},d.prototype._flush=function(e){var a=null;try{this.push(this.digest())}catch(e){a=e}e(a)},d.prototype.update=function(e,a){if(function(e){if(!c.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");c.isBuffer(e)||(e=c.from(e,a));for(var t=this._block,f=0;this._blockOffset+e.length-f>=this._blockSize;){for(var d=this._blockOffset;d0;++r)this._length[r]+=n,(n=this._length[r]/4294967296|0)>0&&(this._length[r]-=4294967296*n);return this},d.prototype._update=function(){throw new Error("_update is not implemented")},d.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var a=this._digest();void 0!==e&&(a=a.toString(e)),this._block.fill(0),this._blockOffset=0;for(var t=0;t<4;++t)this._length[t]=0;return a},d.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=d},92861:(e,a,t)=>{var c=t(48287),f=c.Buffer;function d(e,a){for(var t in e)a[t]=e[t]}function r(e,a,t){return f(e,a,t)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?e.exports=c:(d(c,a),a.Buffer=r),r.prototype=Object.create(f.prototype),d(f,r),r.from=function(e,a,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return f(e,a,t)},r.alloc=function(e,a,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var c=f(e);return void 0!==a?"string"==typeof t?c.fill(a,t):c.fill(a):c.fill(0),c},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return f(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return c.SlowBuffer(e)}},93904:(e,a,t)=>{const c=Symbol("SemVer ANY");class f{static get ANY(){return c}constructor(e,a){if(a=d(a),e instanceof f){if(e.loose===!!a.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),b("comparator",e,a),this.options=a,this.loose=!!a.loose,this.parse(e),this.semver===c?this.value="":this.value=this.operator+this.semver.version,b("comp",this)}parse(e){const a=this.options.loose?r[n.COMPARATORLOOSE]:r[n.COMPARATOR],t=e.match(a);if(!t)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==t[1]?t[1]:"","="===this.operator&&(this.operator=""),t[2]?this.semver=new o(t[2],this.options.loose):this.semver=c}toString(){return this.value}test(e){if(b("Comparator.test",e,this.options.loose),this.semver===c||e===c)return!0;if("string"==typeof e)try{e=new o(e,this.options)}catch(e){return!1}return i(e,this.operator,this.semver,this.options)}intersects(e,a){if(!(e instanceof f))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new s(e.value,a).test(this.value):""===e.operator?""===e.value||new s(this.value,a).test(e.semver):!((a=d(a)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!a.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(i(this.semver,"<",e.semver,a)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,a)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=f;const d=t(98587),{safeRe:r,t:n}=t(99718),i=t(72111),b=t(57272),o=t(53908),s=t(78311)},78311:(e,a,t)=>{const c=/\s+/g;class f{constructor(e,a){if(a=r(a),e instanceof f)return e.loose===!!a.loose&&e.includePrerelease===!!a.includePrerelease?e:new f(e.raw,a);if(e instanceof n)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease,this.raw=e.trim().replace(c," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!m(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&x(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e0&&(this.formatted+="||");const a=this.set[e];for(let e=0;e0&&(this.formatted+=" "),this.formatted+=a[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const a=((this.options.includePrerelease&&p)|(this.options.loose&&g))+":"+e,t=d.get(a);if(t)return t;const c=this.options.loose,f=c?o[s.HYPHENRANGELOOSE]:o[s.HYPHENRANGE];e=e.replace(f,S(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(o[s.COMPARATORTRIM],l),i("comparator trim",e),e=e.replace(o[s.TILDETRIM],u),i("tilde trim",e),e=e.replace(o[s.CARETTRIM],h),i("caret trim",e);let r=e.split(" ").map((e=>A(e,this.options))).join(" ").split(/\s+/).map((e=>L(e,this.options)));c&&(r=r.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(o[s.COMPARATORLOOSE]))))),i("range list",r);const b=new Map,x=r.map((e=>new n(e,this.options)));for(const e of x){if(m(e))return[e];b.set(e.value,e)}b.size>1&&b.has("")&&b.delete("");const y=[...b.values()];return d.set(a,y),y}intersects(e,a){if(!(e instanceof f))throw new TypeError("a Range is required");return this.set.some((t=>y(t,a)&&e.set.some((e=>y(e,a)&&t.every((t=>e.every((e=>t.intersects(e,a)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new b(e,this.options)}catch(e){return!1}for(let a=0;a"<0.0.0-0"===e.value,x=e=>""===e.value,y=(e,a)=>{let t=!0;const c=e.slice();let f=c.pop();for(;t&&c.length;)t=c.every((e=>f.intersects(e,a))),f=c.pop();return t},A=(e,a)=>(i("comp",e,a),e=I(e,a),i("caret",e),e=w(e,a),i("tildes",e),e=C(e,a),i("xrange",e),e=B(e,a),i("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,a)=>e.trim().split(/\s+/).map((e=>_(e,a))).join(" "),_=(e,a)=>{const t=a.loose?o[s.TILDELOOSE]:o[s.TILDE];return e.replace(t,((a,t,c,f,d)=>{let r;return i("tilde",e,a,t,c,f,d),v(t)?r="":v(c)?r=`>=${t}.0.0 <${+t+1}.0.0-0`:v(f)?r=`>=${t}.${c}.0 <${t}.${+c+1}.0-0`:d?(i("replaceTilde pr",d),r=`>=${t}.${c}.${f}-${d} <${t}.${+c+1}.0-0`):r=`>=${t}.${c}.${f} <${t}.${+c+1}.0-0`,i("tilde return",r),r}))},I=(e,a)=>e.trim().split(/\s+/).map((e=>E(e,a))).join(" "),E=(e,a)=>{i("caret",e,a);const t=a.loose?o[s.CARETLOOSE]:o[s.CARET],c=a.includePrerelease?"-0":"";return e.replace(t,((a,t,f,d,r)=>{let n;return i("caret",e,a,t,f,d,r),v(t)?n="":v(f)?n=`>=${t}.0.0${c} <${+t+1}.0.0-0`:v(d)?n="0"===t?`>=${t}.${f}.0${c} <${t}.${+f+1}.0-0`:`>=${t}.${f}.0${c} <${+t+1}.0.0-0`:r?(i("replaceCaret pr",r),n="0"===t?"0"===f?`>=${t}.${f}.${d}-${r} <${t}.${f}.${+d+1}-0`:`>=${t}.${f}.${d}-${r} <${t}.${+f+1}.0-0`:`>=${t}.${f}.${d}-${r} <${+t+1}.0.0-0`):(i("no pr"),n="0"===t?"0"===f?`>=${t}.${f}.${d}${c} <${t}.${f}.${+d+1}-0`:`>=${t}.${f}.${d}${c} <${t}.${+f+1}.0-0`:`>=${t}.${f}.${d} <${+t+1}.0.0-0`),i("caret return",n),n}))},C=(e,a)=>(i("replaceXRanges",e,a),e.split(/\s+/).map((e=>M(e,a))).join(" ")),M=(e,a)=>{e=e.trim();const t=a.loose?o[s.XRANGELOOSE]:o[s.XRANGE];return e.replace(t,((t,c,f,d,r,n)=>{i("xRange",e,t,c,f,d,r,n);const b=v(f),o=b||v(d),s=o||v(r),l=s;return"="===c&&l&&(c=""),n=a.includePrerelease?"-0":"",b?t=">"===c||"<"===c?"<0.0.0-0":"*":c&&l?(o&&(d=0),r=0,">"===c?(c=">=",o?(f=+f+1,d=0,r=0):(d=+d+1,r=0)):"<="===c&&(c="<",o?f=+f+1:d=+d+1),"<"===c&&(n="-0"),t=`${c+f}.${d}.${r}${n}`):o?t=`>=${f}.0.0${n} <${+f+1}.0.0-0`:s&&(t=`>=${f}.${d}.0${n} <${f}.${+d+1}.0-0`),i("xRange return",t),t}))},B=(e,a)=>(i("replaceStars",e,a),e.trim().replace(o[s.STAR],"")),L=(e,a)=>(i("replaceGTE0",e,a),e.trim().replace(o[a.includePrerelease?s.GTE0PRE:s.GTE0],"")),S=e=>(a,t,c,f,d,r,n,i,b,o,s,l)=>`${t=v(c)?"":v(f)?`>=${c}.0.0${e?"-0":""}`:v(d)?`>=${c}.${f}.0${e?"-0":""}`:r?`>=${t}`:`>=${t}${e?"-0":""}`} ${i=v(b)?"":v(o)?`<${+b+1}.0.0-0`:v(s)?`<${b}.${+o+1}.0-0`:l?`<=${b}.${o}.${s}-${l}`:e?`<${b}.${o}.${+s+1}-0`:`<=${i}`}`.trim(),k=(e,a,t)=>{for(let t=0;t0){const c=e[t].semver;if(c.major===a.major&&c.minor===a.minor&&c.patch===a.patch)return!0}return!1}return!0}},53908:(e,a,t)=>{const c=t(57272),{MAX_LENGTH:f,MAX_SAFE_INTEGER:d}=t(16874),{safeRe:r,t:n}=t(99718),i=t(98587),{compareIdentifiers:b}=t(61123);class o{constructor(e,a){if(a=i(a),e instanceof o){if(e.loose===!!a.loose&&e.includePrerelease===!!a.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>f)throw new TypeError(`version is longer than ${f} characters`);c("SemVer",e,a),this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease;const t=e.trim().match(a.loose?r[n.LOOSE]:r[n.FULL]);if(!t)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+t[1],this.minor=+t[2],this.patch=+t[3],this.major>d||this.major<0)throw new TypeError("Invalid major version");if(this.minor>d||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>d||this.patch<0)throw new TypeError("Invalid patch version");t[4]?this.prerelease=t[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const a=+e;if(a>=0&&a=0;)"number"==typeof this.prerelease[c]&&(this.prerelease[c]++,c=-2);if(-1===c){if(a===this.prerelease.join(".")&&!1===t)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(a){let c=[a,e];!1===t&&(c=[a]),0===b(this.prerelease[0],a)?isNaN(this.prerelease[1])&&(this.prerelease=c):this.prerelease=c}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=o},57414:(e,a,t)=>{const c=t(30144);e.exports=(e,a)=>{const t=c(e.trim().replace(/^[=v]+/,""),a);return t?t.version:null}},72111:(e,a,t)=>{const c=t(94641),f=t(13999),d=t(35580),r=t(54089),n=t(7059),i=t(25200);e.exports=(e,a,t,b)=>{switch(a){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e===t;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e!==t;case"":case"=":case"==":return c(e,t,b);case"!=":return f(e,t,b);case">":return d(e,t,b);case">=":return r(e,t,b);case"<":return n(e,t,b);case"<=":return i(e,t,b);default:throw new TypeError(`Invalid operator: ${a}`)}}},46170:(e,a,t)=>{const c=t(53908),f=t(30144),{safeRe:d,t:r}=t(99718);e.exports=(e,a)=>{if(e instanceof c)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let t=null;if((a=a||{}).rtl){const c=a.includePrerelease?d[r.COERCERTLFULL]:d[r.COERCERTL];let f;for(;(f=c.exec(e))&&(!t||t.index+t[0].length!==e.length);)t&&f.index+f[0].length===t.index+t[0].length||(t=f),c.lastIndex=f.index+f[1].length+f[2].length;c.lastIndex=-1}else t=e.match(a.includePrerelease?d[r.COERCEFULL]:d[r.COERCE]);if(null===t)return null;const n=t[2],i=t[3]||"0",b=t[4]||"0",o=a.includePrerelease&&t[5]?`-${t[5]}`:"",s=a.includePrerelease&&t[6]?`+${t[6]}`:"";return f(`${n}.${i}.${b}${o}${s}`,a)}},40909:(e,a,t)=>{const c=t(53908);e.exports=(e,a,t)=>{const f=new c(e,t),d=new c(a,t);return f.compare(d)||f.compareBuild(d)}},11763:(e,a,t)=>{const c=t(50560);e.exports=(e,a)=>c(e,a,!0)},50560:(e,a,t)=>{const c=t(53908);e.exports=(e,a,t)=>new c(e,t).compare(new c(a,t))},51832:(e,a,t)=>{const c=t(30144);e.exports=(e,a)=>{const t=c(e,null,!0),f=c(a,null,!0),d=t.compare(f);if(0===d)return null;const r=d>0,n=r?t:f,i=r?f:t,b=!!n.prerelease.length;if(i.prerelease.length&&!b)return i.patch||i.minor?n.patch?"patch":n.minor?"minor":"major":"major";const o=b?"pre":"";return t.major!==f.major?o+"major":t.minor!==f.minor?o+"minor":t.patch!==f.patch?o+"patch":"prerelease"}},94641:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>0===c(e,a,t)},35580:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>c(e,a,t)>0},54089:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>c(e,a,t)>=0},93007:(e,a,t)=>{const c=t(53908);e.exports=(e,a,t,f,d)=>{"string"==typeof t&&(d=f,f=t,t=void 0);try{return new c(e instanceof c?e.version:e,t).inc(a,f,d).version}catch(e){return null}}},7059:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>c(e,a,t)<0},25200:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>c(e,a,t)<=0},32938:(e,a,t)=>{const c=t(53908);e.exports=(e,a)=>new c(e,a).major},46254:(e,a,t)=>{const c=t(53908);e.exports=(e,a)=>new c(e,a).minor},13999:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>0!==c(e,a,t)},30144:(e,a,t)=>{const c=t(53908);e.exports=(e,a,t=!1)=>{if(e instanceof c)return e;try{return new c(e,a)}catch(e){if(!t)return null;throw e}}},24493:(e,a,t)=>{const c=t(53908);e.exports=(e,a)=>new c(e,a).patch},31729:(e,a,t)=>{const c=t(30144);e.exports=(e,a)=>{const t=c(e,a);return t&&t.prerelease.length?t.prerelease:null}},9970:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>c(a,e,t)},74277:(e,a,t)=>{const c=t(40909);e.exports=(e,a)=>e.sort(((e,t)=>c(t,e,a)))},97638:(e,a,t)=>{const c=t(78311);e.exports=(e,a,t)=>{try{a=new c(a,t)}catch(e){return!1}return a.test(e)}},43927:(e,a,t)=>{const c=t(40909);e.exports=(e,a)=>e.sort(((e,t)=>c(e,t,a)))},56953:(e,a,t)=>{const c=t(30144);e.exports=(e,a)=>{const t=c(e,a);return t?t.version:null}},99589:(e,a,t)=>{const c=t(99718),f=t(16874),d=t(53908),r=t(61123),n=t(30144),i=t(56953),b=t(57414),o=t(93007),s=t(51832),l=t(32938),u=t(46254),h=t(24493),p=t(31729),g=t(50560),m=t(9970),x=t(11763),y=t(40909),A=t(43927),v=t(74277),w=t(35580),_=t(7059),I=t(94641),E=t(13999),C=t(54089),M=t(25200),B=t(72111),L=t(46170),S=t(93904),k=t(78311),N=t(97638),P=t(77631),R=t(19628),O=t(270),D=t(41261),T=t(13874),F=t(97075),Q=t(75571),U=t(5342),j=t(76780),H=t(72525),$=t(75032);e.exports={parse:n,valid:i,clean:b,inc:o,diff:s,major:l,minor:u,patch:h,prerelease:p,compare:g,rcompare:m,compareLoose:x,compareBuild:y,sort:A,rsort:v,gt:w,lt:_,eq:I,neq:E,gte:C,lte:M,cmp:B,coerce:L,Comparator:S,Range:k,satisfies:N,toComparators:P,maxSatisfying:R,minSatisfying:O,minVersion:D,validRange:T,outside:F,gtr:Q,ltr:U,intersects:j,simplifyRange:H,subset:$,SemVer:d,re:c.re,src:c.src,tokens:c.t,SEMVER_SPEC_VERSION:f.SEMVER_SPEC_VERSION,RELEASE_TYPES:f.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers}},16874:e=>{const a=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:a,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},57272:e=>{const a="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=a},61123:e=>{const a=/^[0-9]+$/,t=(e,t)=>{const c=a.test(e),f=a.test(t);return c&&f&&(e=+e,t=+t),e===t?0:c&&!f?-1:f&&!c?1:et(a,e)}},68794:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const a=this.map.get(e);return void 0===a?void 0:(this.map.delete(e),this.map.set(e,a),a)}delete(e){return this.map.delete(e)}set(e,a){if(!this.delete(e)&&void 0!==a){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,a)}return this}}},98587:e=>{const a=Object.freeze({loose:!0}),t=Object.freeze({});e.exports=e=>e?"object"!=typeof e?a:e:t},99718:(e,a,t)=>{const{MAX_SAFE_COMPONENT_LENGTH:c,MAX_SAFE_BUILD_LENGTH:f,MAX_LENGTH:d}=t(16874),r=t(57272),n=(a=e.exports={}).re=[],i=a.safeRe=[],b=a.src=[],o=a.t={};let s=0;const l="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",d],[l,f]],h=(e,a,t)=>{const c=(e=>{for(const[a,t]of u)e=e.split(`${a}*`).join(`${a}{0,${t}}`).split(`${a}+`).join(`${a}{1,${t}}`);return e})(a),f=s++;r(e,f,a),o[e]=f,b[f]=a,n[f]=new RegExp(a,t?"g":void 0),i[f]=new RegExp(c,t?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${l}*`),h("MAINVERSION",`(${b[o.NUMERICIDENTIFIER]})\\.(${b[o.NUMERICIDENTIFIER]})\\.(${b[o.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${b[o.NUMERICIDENTIFIERLOOSE]})\\.(${b[o.NUMERICIDENTIFIERLOOSE]})\\.(${b[o.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${b[o.NUMERICIDENTIFIER]}|${b[o.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${b[o.NUMERICIDENTIFIERLOOSE]}|${b[o.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${b[o.PRERELEASEIDENTIFIER]}(?:\\.${b[o.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${b[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[o.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${l}+`),h("BUILD",`(?:\\+(${b[o.BUILDIDENTIFIER]}(?:\\.${b[o.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${b[o.MAINVERSION]}${b[o.PRERELEASE]}?${b[o.BUILD]}?`),h("FULL",`^${b[o.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${b[o.MAINVERSIONLOOSE]}${b[o.PRERELEASELOOSE]}?${b[o.BUILD]}?`),h("LOOSE",`^${b[o.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${b[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${b[o.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${b[o.XRANGEIDENTIFIER]})(?:\\.(${b[o.XRANGEIDENTIFIER]})(?:\\.(${b[o.XRANGEIDENTIFIER]})(?:${b[o.PRERELEASE]})?${b[o.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${b[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[o.XRANGEIDENTIFIERLOOSE]})(?:${b[o.PRERELEASELOOSE]})?${b[o.BUILD]}?)?)?`),h("XRANGE",`^${b[o.GTLT]}\\s*${b[o.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${b[o.GTLT]}\\s*${b[o.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${c}})(?:\\.(\\d{1,${c}}))?(?:\\.(\\d{1,${c}}))?`),h("COERCE",`${b[o.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",b[o.COERCEPLAIN]+`(?:${b[o.PRERELEASE]})?`+`(?:${b[o.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",b[o.COERCE],!0),h("COERCERTLFULL",b[o.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${b[o.LONETILDE]}\\s+`,!0),a.tildeTrimReplace="$1~",h("TILDE",`^${b[o.LONETILDE]}${b[o.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${b[o.LONETILDE]}${b[o.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${b[o.LONECARET]}\\s+`,!0),a.caretTrimReplace="$1^",h("CARET",`^${b[o.LONECARET]}${b[o.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${b[o.LONECARET]}${b[o.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${b[o.GTLT]}\\s*(${b[o.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${b[o.GTLT]}\\s*(${b[o.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${b[o.GTLT]}\\s*(${b[o.LOOSEPLAIN]}|${b[o.XRANGEPLAIN]})`,!0),a.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${b[o.XRANGEPLAIN]})\\s+-\\s+(${b[o.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${b[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[o.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},75571:(e,a,t)=>{const c=t(97075);e.exports=(e,a,t)=>c(e,a,">",t)},76780:(e,a,t)=>{const c=t(78311);e.exports=(e,a,t)=>(e=new c(e,t),a=new c(a,t),e.intersects(a,t))},5342:(e,a,t)=>{const c=t(97075);e.exports=(e,a,t)=>c(e,a,"<",t)},19628:(e,a,t)=>{const c=t(53908),f=t(78311);e.exports=(e,a,t)=>{let d=null,r=null,n=null;try{n=new f(a,t)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(d&&-1!==r.compare(e)||(d=e,r=new c(d,t)))})),d}},270:(e,a,t)=>{const c=t(53908),f=t(78311);e.exports=(e,a,t)=>{let d=null,r=null,n=null;try{n=new f(a,t)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(d&&1!==r.compare(e)||(d=e,r=new c(d,t)))})),d}},41261:(e,a,t)=>{const c=t(53908),f=t(78311),d=t(35580);e.exports=(e,a)=>{e=new f(e,a);let t=new c("0.0.0");if(e.test(t))return t;if(t=new c("0.0.0-0"),e.test(t))return t;t=null;for(let a=0;a{const a=new c(e.semver.version);switch(e.operator){case">":0===a.prerelease.length?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":r&&!d(a,r)||(r=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!r||t&&!d(t,r)||(t=r)}return t&&e.test(t)?t:null}},97075:(e,a,t)=>{const c=t(53908),f=t(93904),{ANY:d}=f,r=t(78311),n=t(97638),i=t(35580),b=t(7059),o=t(25200),s=t(54089);e.exports=(e,a,t,l)=>{let u,h,p,g,m;switch(e=new c(e,l),a=new r(a,l),t){case">":u=i,h=o,p=b,g=">",m=">=";break;case"<":u=b,h=s,p=i,g="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(n(e,a,l))return!1;for(let t=0;t{e.semver===d&&(e=new f(">=0.0.0")),r=r||e,n=n||e,u(e.semver,r.semver,l)?r=e:p(e.semver,n.semver,l)&&(n=e)})),r.operator===g||r.operator===m)return!1;if((!n.operator||n.operator===g)&&h(e,n.semver))return!1;if(n.operator===m&&p(e,n.semver))return!1}return!0}},72525:(e,a,t)=>{const c=t(97638),f=t(50560);e.exports=(e,a,t)=>{const d=[];let r=null,n=null;const i=e.sort(((e,a)=>f(e,a,t)));for(const e of i)c(e,a,t)?(n=e,r||(r=e)):(n&&d.push([r,n]),n=null,r=null);r&&d.push([r,null]);const b=[];for(const[e,a]of d)e===a?b.push(e):a||e!==i[0]?a?e===i[0]?b.push(`<=${a}`):b.push(`${e} - ${a}`):b.push(`>=${e}`):b.push("*");const o=b.join(" || "),s="string"==typeof a.raw?a.raw:String(a);return o.length{const c=t(78311),f=t(93904),{ANY:d}=f,r=t(97638),n=t(50560),i=[new f(">=0.0.0-0")],b=[new f(">=0.0.0")],o=(e,a,t)=>{if(e===a)return!0;if(1===e.length&&e[0].semver===d){if(1===a.length&&a[0].semver===d)return!0;e=t.includePrerelease?i:b}if(1===a.length&&a[0].semver===d){if(t.includePrerelease)return!0;a=b}const c=new Set;let f,o,u,h,p,g,m;for(const a of e)">"===a.operator||">="===a.operator?f=s(f,a,t):"<"===a.operator||"<="===a.operator?o=l(o,a,t):c.add(a.semver);if(c.size>1)return null;if(f&&o){if(u=n(f.semver,o.semver,t),u>0)return null;if(0===u&&(">="!==f.operator||"<="!==o.operator))return null}for(const e of c){if(f&&!r(e,String(f),t))return null;if(o&&!r(e,String(o),t))return null;for(const c of a)if(!r(e,String(c),t))return!1;return!0}let x=!(!o||t.includePrerelease||!o.semver.prerelease.length)&&o.semver,y=!(!f||t.includePrerelease||!f.semver.prerelease.length)&&f.semver;x&&1===x.prerelease.length&&"<"===o.operator&&0===x.prerelease[0]&&(x=!1);for(const e of a){if(m=m||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,f)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),">"===e.operator||">="===e.operator){if(h=s(f,e,t),h===e&&h!==f)return!1}else if(">="===f.operator&&!r(f.semver,String(e),t))return!1;if(o)if(x&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===x.major&&e.semver.minor===x.minor&&e.semver.patch===x.patch&&(x=!1),"<"===e.operator||"<="===e.operator){if(p=l(o,e,t),p===e&&p!==o)return!1}else if("<="===o.operator&&!r(o.semver,String(e),t))return!1;if(!e.operator&&(o||f)&&0!==u)return!1}return!(f&&g&&!o&&0!==u||o&&m&&!f&&0!==u||y||x)},s=(e,a,t)=>{if(!e)return a;const c=n(e.semver,a.semver,t);return c>0?e:c<0||">"===a.operator&&">="===e.operator?a:e},l=(e,a,t)=>{if(!e)return a;const c=n(e.semver,a.semver,t);return c<0?e:c>0||"<"===a.operator&&"<="===e.operator?a:e};e.exports=(e,a,t={})=>{if(e===a)return!0;e=new c(e,t),a=new c(a,t);let f=!1;e:for(const c of e.set){for(const e of a.set){const a=o(c,e,t);if(f=f||null!==a,a)continue e}if(f)return!1}return!0}},77631:(e,a,t)=>{const c=t(78311);e.exports=(e,a)=>new c(e,a).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},13874:(e,a,t)=>{const c=t(78311);e.exports=(e,a)=>{try{return new c(e,a).range||"*"}catch(e){return null}}},96897:(e,a,t)=>{"use strict";var c=t(70453),f=t(30041),d=t(30592)(),r=t(75795),n=t(69675),i=c("%Math.floor%");e.exports=function(e,a){if("function"!=typeof e)throw new n("`fn` is not a function");if("number"!=typeof a||a<0||a>4294967295||i(a)!==a)throw new n("`length` must be a positive 32-bit integer");var t=arguments.length>2&&!!arguments[2],c=!0,b=!0;if("length"in e&&r){var o=r(e,"length");o&&!o.configurable&&(c=!1),o&&!o.writable&&(b=!1)}return(c||b||!t)&&(d?f(e,"length",a,!0,!0):f(e,"length",a)),e}},90392:(e,a,t)=>{var c=t(92861).Buffer;function f(e,a){this._block=c.alloc(e),this._finalSize=a,this._blockSize=e,this._len=0}f.prototype.update=function(e,a){"string"==typeof e&&(a=a||"utf8",e=c.from(e,a));for(var t=this._block,f=this._blockSize,d=e.length,r=this._len,n=0;n=this._finalSize&&(this._update(this._block),this._block.fill(0));var t=8*this._len;if(t<=4294967295)this._block.writeUInt32BE(t,this._blockSize-4);else{var c=(4294967295&t)>>>0,f=(t-c)/4294967296;this._block.writeUInt32BE(f,this._blockSize-8),this._block.writeUInt32BE(c,this._blockSize-4)}this._update(this._block);var d=this._hash();return e?d.toString(e):d},f.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=f},62802:(e,a,t)=>{var c=e.exports=function(e){e=e.toLowerCase();var a=c[e];if(!a)throw new Error(e+" is not supported (we accept pull requests)");return new a};c.sha=t(27816),c.sha1=t(63737),c.sha224=t(26710),c.sha256=t(24107),c.sha384=t(32827),c.sha512=t(82890)},27816:(e,a,t)=>{var c=t(56698),f=t(90392),d=t(92861).Buffer,r=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function i(){this.init(),this._w=n,f.call(this,64,56)}function b(e){return e<<30|e>>>2}function o(e,a,t,c){return 0===e?a&t|~a&c:2===e?a&t|a&c|t&c:a^t^c}c(i,f),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var a,t=this._w,c=0|this._a,f=0|this._b,d=0|this._c,n=0|this._d,i=0|this._e,s=0;s<16;++s)t[s]=e.readInt32BE(4*s);for(;s<80;++s)t[s]=t[s-3]^t[s-8]^t[s-14]^t[s-16];for(var l=0;l<80;++l){var u=~~(l/20),h=0|((a=c)<<5|a>>>27)+o(u,f,d,n)+i+t[l]+r[u];i=n,n=d,d=b(f),f=c,c=h}this._a=c+this._a|0,this._b=f+this._b|0,this._c=d+this._c|0,this._d=n+this._d|0,this._e=i+this._e|0},i.prototype._hash=function(){var e=d.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=i},63737:(e,a,t)=>{var c=t(56698),f=t(90392),d=t(92861).Buffer,r=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function i(){this.init(),this._w=n,f.call(this,64,56)}function b(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function s(e,a,t,c){return 0===e?a&t|~a&c:2===e?a&t|a&c|t&c:a^t^c}c(i,f),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var a,t=this._w,c=0|this._a,f=0|this._b,d=0|this._c,n=0|this._d,i=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=(a=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|a>>>31;for(var u=0;u<80;++u){var h=~~(u/20),p=b(c)+s(h,f,d,n)+i+t[u]+r[h]|0;i=n,n=d,d=o(f),f=c,c=p}this._a=c+this._a|0,this._b=f+this._b|0,this._c=d+this._c|0,this._d=n+this._d|0,this._e=i+this._e|0},i.prototype._hash=function(){var e=d.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=i},26710:(e,a,t)=>{var c=t(56698),f=t(24107),d=t(90392),r=t(92861).Buffer,n=new Array(64);function i(){this.init(),this._w=n,d.call(this,64,56)}c(i,f),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var e=r.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=i},24107:(e,a,t)=>{var c=t(56698),f=t(90392),d=t(92861).Buffer,r=[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],n=new Array(64);function i(){this.init(),this._w=n,f.call(this,64,56)}function b(e,a,t){return t^e&(a^t)}function o(e,a,t){return e&a|t&(e|a)}function s(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function u(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}c(i,f),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},i.prototype._update=function(e){for(var a,t=this._w,c=0|this._a,f=0|this._b,d=0|this._c,n=0|this._d,i=0|this._e,h=0|this._f,p=0|this._g,g=0|this._h,m=0;m<16;++m)t[m]=e.readInt32BE(4*m);for(;m<64;++m)t[m]=0|(((a=t[m-2])>>>17|a<<15)^(a>>>19|a<<13)^a>>>10)+t[m-7]+u(t[m-15])+t[m-16];for(var x=0;x<64;++x){var y=g+l(i)+b(i,h,p)+r[x]+t[x]|0,A=s(c)+o(c,f,d)|0;g=p,p=h,h=i,i=n+y|0,n=d,d=f,f=c,c=y+A|0}this._a=c+this._a|0,this._b=f+this._b|0,this._c=d+this._c|0,this._d=n+this._d|0,this._e=i+this._e|0,this._f=h+this._f|0,this._g=p+this._g|0,this._h=g+this._h|0},i.prototype._hash=function(){var e=d.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=i},32827:(e,a,t)=>{var c=t(56698),f=t(82890),d=t(90392),r=t(92861).Buffer,n=new Array(160);function i(){this.init(),this._w=n,d.call(this,128,112)}c(i,f),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){var e=r.allocUnsafe(48);function a(a,t,c){e.writeInt32BE(a,c),e.writeInt32BE(t,c+4)}return a(this._ah,this._al,0),a(this._bh,this._bl,8),a(this._ch,this._cl,16),a(this._dh,this._dl,24),a(this._eh,this._el,32),a(this._fh,this._fl,40),e},e.exports=i},82890:(e,a,t)=>{var c=t(56698),f=t(90392),d=t(92861).Buffer,r=[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],n=new Array(160);function i(){this.init(),this._w=n,f.call(this,128,112)}function b(e,a,t){return t^e&(a^t)}function o(e,a,t){return e&a|t&(e|a)}function s(e,a){return(e>>>28|a<<4)^(a>>>2|e<<30)^(a>>>7|e<<25)}function l(e,a){return(e>>>14|a<<18)^(e>>>18|a<<14)^(a>>>9|e<<23)}function u(e,a){return(e>>>1|a<<31)^(e>>>8|a<<24)^e>>>7}function h(e,a){return(e>>>1|a<<31)^(e>>>8|a<<24)^(e>>>7|a<<25)}function p(e,a){return(e>>>19|a<<13)^(a>>>29|e<<3)^e>>>6}function g(e,a){return(e>>>19|a<<13)^(a>>>29|e<<3)^(e>>>6|a<<26)}function m(e,a){return e>>>0>>0?1:0}c(i,f),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},i.prototype._update=function(e){for(var a=this._w,t=0|this._ah,c=0|this._bh,f=0|this._ch,d=0|this._dh,n=0|this._eh,i=0|this._fh,x=0|this._gh,y=0|this._hh,A=0|this._al,v=0|this._bl,w=0|this._cl,_=0|this._dl,I=0|this._el,E=0|this._fl,C=0|this._gl,M=0|this._hl,B=0;B<32;B+=2)a[B]=e.readInt32BE(4*B),a[B+1]=e.readInt32BE(4*B+4);for(;B<160;B+=2){var L=a[B-30],S=a[B-30+1],k=u(L,S),N=h(S,L),P=p(L=a[B-4],S=a[B-4+1]),R=g(S,L),O=a[B-14],D=a[B-14+1],T=a[B-32],F=a[B-32+1],Q=N+D|0,U=k+O+m(Q,N)|0;U=(U=U+P+m(Q=Q+R|0,R)|0)+T+m(Q=Q+F|0,F)|0,a[B]=U,a[B+1]=Q}for(var j=0;j<160;j+=2){U=a[j],Q=a[j+1];var H=o(t,c,f),$=o(A,v,w),q=s(t,A),G=s(A,t),z=l(n,I),K=l(I,n),V=r[j],Z=r[j+1],J=b(n,i,x),W=b(I,E,C),Y=M+K|0,X=y+z+m(Y,M)|0;X=(X=(X=X+J+m(Y=Y+W|0,W)|0)+V+m(Y=Y+Z|0,Z)|0)+U+m(Y=Y+Q|0,Q)|0;var ee=G+$|0,ae=q+H+m(ee,G)|0;y=x,M=C,x=i,C=E,i=n,E=I,n=d+X+m(I=_+Y|0,_)|0,d=f,_=w,f=c,w=v,c=t,v=A,t=X+ae+m(A=Y+ee|0,Y)|0}this._al=this._al+A|0,this._bl=this._bl+v|0,this._cl=this._cl+w|0,this._dl=this._dl+_|0,this._el=this._el+I|0,this._fl=this._fl+E|0,this._gl=this._gl+C|0,this._hl=this._hl+M|0,this._ah=this._ah+t+m(this._al,A)|0,this._bh=this._bh+c+m(this._bl,v)|0,this._ch=this._ch+f+m(this._cl,w)|0,this._dh=this._dh+d+m(this._dl,_)|0,this._eh=this._eh+n+m(this._el,I)|0,this._fh=this._fh+i+m(this._fl,E)|0,this._gh=this._gh+x+m(this._gl,C)|0,this._hh=this._hh+y+m(this._hl,M)|0},i.prototype._hash=function(){var e=d.allocUnsafe(64);function a(a,t,c){e.writeInt32BE(a,c),e.writeInt32BE(t,c+4)}return a(this._ah,this._al,0),a(this._bh,this._bl,8),a(this._ch,this._cl,16),a(this._dh,this._dl,24),a(this._eh,this._el,32),a(this._fh,this._fl,40),a(this._gh,this._gl,48),a(this._hh,this._hl,56),e},e.exports=i},88310:(e,a,t)=>{e.exports=f;var c=t(37007).EventEmitter;function f(){c.call(this)}t(56698)(f,c),f.Readable=t(45412),f.Writable=t(16708),f.Duplex=t(25382),f.Transform=t(74610),f.PassThrough=t(63600),f.finished=t(86238),f.pipeline=t(57758),f.Stream=f,f.prototype.pipe=function(e,a){var t=this;function f(a){e.writable&&!1===e.write(a)&&t.pause&&t.pause()}function d(){t.readable&&t.resume&&t.resume()}t.on("data",f),e.on("drain",d),e._isStdio||a&&!1===a.end||(t.on("end",n),t.on("close",i));var r=!1;function n(){r||(r=!0,e.end())}function i(){r||(r=!0,"function"==typeof e.destroy&&e.destroy())}function b(e){if(o(),0===c.listenerCount(this,"error"))throw e}function o(){t.removeListener("data",f),e.removeListener("drain",d),t.removeListener("end",n),t.removeListener("close",i),t.removeListener("error",b),e.removeListener("error",b),t.removeListener("end",o),t.removeListener("close",o),e.removeListener("close",o)}return t.on("error",b),e.on("error",b),t.on("end",o),t.on("close",o),e.on("close",o),e.emit("pipe",t),e}},11568:(e,a,t)=>{var c=t(55537),f=t(6917),d=t(57510),r=t(86866),n=t(59817),i=a;i.request=function(e,a){e="string"==typeof e?n.parse(e):d(e);var f=-1===t.g.location.protocol.search(/^https?:$/)?"http:":"",r=e.protocol||f,i=e.hostname||e.host,b=e.port,o=e.path||"/";i&&-1!==i.indexOf(":")&&(i="["+i+"]"),e.url=(i?r+"//"+i:"")+(b?":"+b:"")+o,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var s=new c(e);return a&&s.on("response",a),s},i.get=function(e,a){var t=i.request(e,a);return t.end(),t},i.ClientRequest=c,i.IncomingMessage=f.IncomingMessage,i.Agent=function(){},i.Agent.defaultMaxSockets=4,i.globalAgent=new i.Agent,i.STATUS_CODES=r,i.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},6688:(e,a,t)=>{var c;function f(){if(void 0!==c)return c;if(t.g.XMLHttpRequest){c=new t.g.XMLHttpRequest;try{c.open("GET",t.g.XDomainRequest?"/":"https://example.com")}catch(e){c=null}}else c=null;return c}function d(e){var a=f();if(!a)return!1;try{return a.responseType=e,a.responseType===e}catch(e){}return!1}function r(e){return"function"==typeof e}a.fetch=r(t.g.fetch)&&r(t.g.ReadableStream),a.writableStream=r(t.g.WritableStream),a.abortController=r(t.g.AbortController),a.arraybuffer=a.fetch||d("arraybuffer"),a.msstream=!a.fetch&&d("ms-stream"),a.mozchunkedarraybuffer=!a.fetch&&d("moz-chunked-arraybuffer"),a.overrideMimeType=a.fetch||!!f()&&r(f().overrideMimeType),c=null},55537:(e,a,t)=>{var c=t(48287).Buffer,f=t(6688),d=t(56698),r=t(6917),n=t(28399),i=r.IncomingMessage,b=r.readyStates,o=e.exports=function(e){var a,t=this;n.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+c.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(a){t.setHeader(a,e.headers[a])}));var d=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!f.abortController)d=!1,a=!0;else if("prefer-streaming"===e.mode)a=!1;else if("allow-wrong-content-type"===e.mode)a=!f.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");a=!0}t._mode=function(e,a){return f.fetch&&a?"fetch":f.mozchunkedarraybuffer?"moz-chunked-arraybuffer":f.msstream?"ms-stream":f.arraybuffer&&e?"arraybuffer":"text"}(a,d),t._fetchTimer=null,t._socketTimeout=null,t._socketTimer=null,t.on("finish",(function(){t._onFinish()}))};d(o,n.Writable),o.prototype.setHeader=function(e,a){var t=e.toLowerCase();-1===s.indexOf(t)&&(this._headers[t]={name:e,value:a})},o.prototype.getHeader=function(e){var a=this._headers[e.toLowerCase()];return a?a.value:null},o.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},o.prototype._onFinish=function(){var e=this;if(!e._destroyed){var a=e._opts;"timeout"in a&&0!==a.timeout&&e.setTimeout(a.timeout);var c=e._headers,d=null;"GET"!==a.method&&"HEAD"!==a.method&&(d=new Blob(e._body,{type:(c["content-type"]||{}).value||""}));var r=[];if(Object.keys(c).forEach((function(e){var a=c[e].name,t=c[e].value;Array.isArray(t)?t.forEach((function(e){r.push([a,e])})):r.push([a,t])})),"fetch"===e._mode){var n=null;if(f.abortController){var i=new AbortController;n=i.signal,e._fetchAbortController=i,"requestTimeout"in a&&0!==a.requestTimeout&&(e._fetchTimer=t.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),a.requestTimeout))}t.g.fetch(e._opts.url,{method:e._opts.method,headers:r,body:d||void 0,mode:"cors",credentials:a.withCredentials?"include":"same-origin",signal:n}).then((function(a){e._fetchResponse=a,e._resetTimers(!1),e._connect()}),(function(a){e._resetTimers(!0),e._destroyed||e.emit("error",a)}))}else{var o=e._xhr=new t.g.XMLHttpRequest;try{o.open(e._opts.method,e._opts.url,!0)}catch(a){return void process.nextTick((function(){e.emit("error",a)}))}"responseType"in o&&(o.responseType=e._mode),"withCredentials"in o&&(o.withCredentials=!!a.withCredentials),"text"===e._mode&&"overrideMimeType"in o&&o.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in a&&(o.timeout=a.requestTimeout,o.ontimeout=function(){e.emit("requestTimeout")}),r.forEach((function(e){o.setRequestHeader(e[0],e[1])})),e._response=null,o.onreadystatechange=function(){switch(o.readyState){case b.LOADING:case b.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(o.onprogress=function(){e._onXHRProgress()}),o.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{o.send(d)}catch(a){return void process.nextTick((function(){e.emit("error",a)}))}}}},o.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var a=e.status;return null!==a&&0!==a}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},o.prototype._connect=function(){var e=this;e._destroyed||(e._response=new i(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(a){e.emit("error",a)})),e.emit("response",e._response))},o.prototype._write=function(e,a,t){this._body.push(e),t()},o.prototype._resetTimers=function(e){var a=this;t.g.clearTimeout(a._socketTimer),a._socketTimer=null,e?(t.g.clearTimeout(a._fetchTimer),a._fetchTimer=null):a._socketTimeout&&(a._socketTimer=t.g.setTimeout((function(){a.emit("timeout")}),a._socketTimeout))},o.prototype.abort=o.prototype.destroy=function(e){var a=this;a._destroyed=!0,a._resetTimers(!0),a._response&&(a._response._destroyed=!0),a._xhr?a._xhr.abort():a._fetchAbortController&&a._fetchAbortController.abort(),e&&a.emit("error",e)},o.prototype.end=function(e,a,t){"function"==typeof e&&(t=e,e=void 0),n.Writable.prototype.end.call(this,e,a,t)},o.prototype.setTimeout=function(e,a){var t=this;a&&t.once("timeout",a),t._socketTimeout=e,t._resetTimers(!1)},o.prototype.flushHeaders=function(){},o.prototype.setNoDelay=function(){},o.prototype.setSocketKeepAlive=function(){};var s=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},6917:(e,a,t)=>{var c=t(48287).Buffer,f=t(6688),d=t(56698),r=t(28399),n=a.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},i=a.IncomingMessage=function(e,a,t,d){var n=this;if(r.Readable.call(n),n._mode=t,n.headers={},n.rawHeaders=[],n.trailers={},n.rawTrailers=[],n.on("end",(function(){process.nextTick((function(){n.emit("close")}))})),"fetch"===t){if(n._fetchResponse=a,n.url=a.url,n.statusCode=a.status,n.statusMessage=a.statusText,a.headers.forEach((function(e,a){n.headers[a.toLowerCase()]=e,n.rawHeaders.push(a,e)})),f.writableStream){var i=new WritableStream({write:function(e){return d(!1),new Promise((function(a,t){n._destroyed?t():n.push(c.from(e))?a():n._resumeFetch=a}))},close:function(){d(!0),n._destroyed||n.push(null)},abort:function(e){d(!0),n._destroyed||n.emit("error",e)}});try{return void a.body.pipeTo(i).catch((function(e){d(!0),n._destroyed||n.emit("error",e)}))}catch(e){}}var b=a.body.getReader();!function e(){b.read().then((function(a){n._destroyed||(d(a.done),a.done?n.push(null):(n.push(c.from(a.value)),e()))})).catch((function(e){d(!0),n._destroyed||n.emit("error",e)}))}()}else if(n._xhr=e,n._pos=0,n.url=e.responseURL,n.statusCode=e.status,n.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var a=e.match(/^([^:]+):\s*(.*)/);if(a){var t=a[1].toLowerCase();"set-cookie"===t?(void 0===n.headers[t]&&(n.headers[t]=[]),n.headers[t].push(a[2])):void 0!==n.headers[t]?n.headers[t]+=", "+a[2]:n.headers[t]=a[2],n.rawHeaders.push(a[1],a[2])}})),n._charset="x-user-defined",!f.overrideMimeType){var o=n.rawHeaders["mime-type"];if(o){var s=o.match(/;\s*charset=([^;])(;|$)/);s&&(n._charset=s[1].toLowerCase())}n._charset||(n._charset="utf-8")}};d(i,r.Readable),i.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},i.prototype._onXHRProgress=function(e){var a=this,f=a._xhr,d=null;switch(a._mode){case"text":if((d=f.responseText).length>a._pos){var r=d.substr(a._pos);if("x-user-defined"===a._charset){for(var i=c.alloc(r.length),b=0;ba._pos&&(a.push(c.from(new Uint8Array(o.result.slice(a._pos)))),a._pos=o.result.byteLength)},o.onload=function(){e(!0),a.push(null)},o.readAsArrayBuffer(d)}a._xhr.readyState===n.DONE&&"ms-stream"!==a._mode&&(e(!0),a.push(null))}},83141:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=c.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function d(e){var a;switch(this.encoding=function(e){var a=function(e){if(!e)return"utf8";for(var a;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(a)return;e=(""+e).toLowerCase(),a=!0}}(e);if("string"!=typeof a&&(c.isEncoding===f||!f(e)))throw new Error("Unknown encoding: "+e);return a||e}(e),this.encoding){case"utf16le":this.text=i,this.end=b,a=4;break;case"utf8":this.fillLast=n,a=4;break;case"base64":this.text=o,this.end=s,a=3;break;default:return this.write=l,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=c.allocUnsafe(a)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function n(e){var a=this.lastTotal-this.lastNeed,t=function(e,a){if(128!=(192&a[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&a.length>1){if(128!=(192&a[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&a.length>2&&128!=(192&a[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==t?t:this.lastNeed<=e.length?(e.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,a,0,e.length),void(this.lastNeed-=e.length))}function i(e,a){if((e.length-a)%2==0){var t=e.toString("utf16le",a);if(t){var c=t.charCodeAt(t.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",a,e.length-1)}function b(e){var a=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,t)}return a}function o(e,a){var t=(e.length-a)%3;return 0===t?e.toString("base64",a):(this.lastNeed=3-t,this.lastTotal=3,1===t?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",a,e.length-t))}function s(e){var a=e&&e.length?this.write(e):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function l(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}a.I=d,d.prototype.write=function(e){if(0===e.length)return"";var a,t;if(this.lastNeed){if(void 0===(a=this.fillLast(e)))return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t=0?(f>0&&(e.lastNeed=f-1),f):--c=0?(f>0&&(e.lastNeed=f-2),f):--c=0?(f>0&&(2===f?f=0:e.lastNeed=f-3),f):0}(this,e,a);if(!this.lastNeed)return e.toString("utf8",a);this.lastTotal=t;var c=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,c),e.toString("utf8",a,c)},d.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},88947:(e,a,t)=>{!function(e){"use strict";var a=function(e){var a,t=new Float64Array(16);if(e)for(a=0;a>24&255,e[a+1]=t>>16&255,e[a+2]=t>>8&255,e[a+3]=255&t,e[a+4]=c>>24&255,e[a+5]=c>>16&255,e[a+6]=c>>8&255,e[a+7]=255&c}function p(e,a,t,c,f){var d,r=0;for(d=0;d>>8)-1}function g(e,a,t,c){return p(e,a,t,c,16)}function m(e,a,t,c){return p(e,a,t,c,32)}function x(e,a,t,c){!function(e,a,t,c){for(var f,d=255&c[0]|(255&c[1])<<8|(255&c[2])<<16|(255&c[3])<<24,r=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,n=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,i=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,b=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,o=255&c[4]|(255&c[5])<<8|(255&c[6])<<16|(255&c[7])<<24,s=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,l=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,u=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,h=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,p=255&c[8]|(255&c[9])<<8|(255&c[10])<<16|(255&c[11])<<24,g=255&t[16]|(255&t[17])<<8|(255&t[18])<<16|(255&t[19])<<24,m=255&t[20]|(255&t[21])<<8|(255&t[22])<<16|(255&t[23])<<24,x=255&t[24]|(255&t[25])<<8|(255&t[26])<<16|(255&t[27])<<24,y=255&t[28]|(255&t[29])<<8|(255&t[30])<<16|(255&t[31])<<24,A=255&c[12]|(255&c[13])<<8|(255&c[14])<<16|(255&c[15])<<24,v=d,w=r,_=n,I=i,E=b,C=o,M=s,B=l,L=u,S=h,k=p,N=g,P=m,R=x,O=y,D=A,T=0;T<20;T+=2)v^=(f=(P^=(f=(L^=(f=(E^=(f=v+P|0)<<7|f>>>25)+v|0)<<9|f>>>23)+E|0)<<13|f>>>19)+L|0)<<18|f>>>14,C^=(f=(w^=(f=(R^=(f=(S^=(f=C+w|0)<<7|f>>>25)+C|0)<<9|f>>>23)+S|0)<<13|f>>>19)+R|0)<<18|f>>>14,k^=(f=(M^=(f=(_^=(f=(O^=(f=k+M|0)<<7|f>>>25)+k|0)<<9|f>>>23)+O|0)<<13|f>>>19)+_|0)<<18|f>>>14,D^=(f=(N^=(f=(B^=(f=(I^=(f=D+N|0)<<7|f>>>25)+D|0)<<9|f>>>23)+I|0)<<13|f>>>19)+B|0)<<18|f>>>14,v^=(f=(I^=(f=(_^=(f=(w^=(f=v+I|0)<<7|f>>>25)+v|0)<<9|f>>>23)+w|0)<<13|f>>>19)+_|0)<<18|f>>>14,C^=(f=(E^=(f=(B^=(f=(M^=(f=C+E|0)<<7|f>>>25)+C|0)<<9|f>>>23)+M|0)<<13|f>>>19)+B|0)<<18|f>>>14,k^=(f=(S^=(f=(L^=(f=(N^=(f=k+S|0)<<7|f>>>25)+k|0)<<9|f>>>23)+N|0)<<13|f>>>19)+L|0)<<18|f>>>14,D^=(f=(O^=(f=(R^=(f=(P^=(f=D+O|0)<<7|f>>>25)+D|0)<<9|f>>>23)+P|0)<<13|f>>>19)+R|0)<<18|f>>>14;v=v+d|0,w=w+r|0,_=_+n|0,I=I+i|0,E=E+b|0,C=C+o|0,M=M+s|0,B=B+l|0,L=L+u|0,S=S+h|0,k=k+p|0,N=N+g|0,P=P+m|0,R=R+x|0,O=O+y|0,D=D+A|0,e[0]=v>>>0&255,e[1]=v>>>8&255,e[2]=v>>>16&255,e[3]=v>>>24&255,e[4]=w>>>0&255,e[5]=w>>>8&255,e[6]=w>>>16&255,e[7]=w>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=I>>>0&255,e[13]=I>>>8&255,e[14]=I>>>16&255,e[15]=I>>>24&255,e[16]=E>>>0&255,e[17]=E>>>8&255,e[18]=E>>>16&255,e[19]=E>>>24&255,e[20]=C>>>0&255,e[21]=C>>>8&255,e[22]=C>>>16&255,e[23]=C>>>24&255,e[24]=M>>>0&255,e[25]=M>>>8&255,e[26]=M>>>16&255,e[27]=M>>>24&255,e[28]=B>>>0&255,e[29]=B>>>8&255,e[30]=B>>>16&255,e[31]=B>>>24&255,e[32]=L>>>0&255,e[33]=L>>>8&255,e[34]=L>>>16&255,e[35]=L>>>24&255,e[36]=S>>>0&255,e[37]=S>>>8&255,e[38]=S>>>16&255,e[39]=S>>>24&255,e[40]=k>>>0&255,e[41]=k>>>8&255,e[42]=k>>>16&255,e[43]=k>>>24&255,e[44]=N>>>0&255,e[45]=N>>>8&255,e[46]=N>>>16&255,e[47]=N>>>24&255,e[48]=P>>>0&255,e[49]=P>>>8&255,e[50]=P>>>16&255,e[51]=P>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=O>>>0&255,e[57]=O>>>8&255,e[58]=O>>>16&255,e[59]=O>>>24&255,e[60]=D>>>0&255,e[61]=D>>>8&255,e[62]=D>>>16&255,e[63]=D>>>24&255}(e,a,t,c)}function y(e,a,t,c){!function(e,a,t,c){for(var f,d=255&c[0]|(255&c[1])<<8|(255&c[2])<<16|(255&c[3])<<24,r=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,n=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,i=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,b=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,o=255&c[4]|(255&c[5])<<8|(255&c[6])<<16|(255&c[7])<<24,s=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,l=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,u=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,h=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,p=255&c[8]|(255&c[9])<<8|(255&c[10])<<16|(255&c[11])<<24,g=255&t[16]|(255&t[17])<<8|(255&t[18])<<16|(255&t[19])<<24,m=255&t[20]|(255&t[21])<<8|(255&t[22])<<16|(255&t[23])<<24,x=255&t[24]|(255&t[25])<<8|(255&t[26])<<16|(255&t[27])<<24,y=255&t[28]|(255&t[29])<<8|(255&t[30])<<16|(255&t[31])<<24,A=255&c[12]|(255&c[13])<<8|(255&c[14])<<16|(255&c[15])<<24,v=0;v<20;v+=2)d^=(f=(m^=(f=(u^=(f=(b^=(f=d+m|0)<<7|f>>>25)+d|0)<<9|f>>>23)+b|0)<<13|f>>>19)+u|0)<<18|f>>>14,o^=(f=(r^=(f=(x^=(f=(h^=(f=o+r|0)<<7|f>>>25)+o|0)<<9|f>>>23)+h|0)<<13|f>>>19)+x|0)<<18|f>>>14,p^=(f=(s^=(f=(n^=(f=(y^=(f=p+s|0)<<7|f>>>25)+p|0)<<9|f>>>23)+y|0)<<13|f>>>19)+n|0)<<18|f>>>14,A^=(f=(g^=(f=(l^=(f=(i^=(f=A+g|0)<<7|f>>>25)+A|0)<<9|f>>>23)+i|0)<<13|f>>>19)+l|0)<<18|f>>>14,d^=(f=(i^=(f=(n^=(f=(r^=(f=d+i|0)<<7|f>>>25)+d|0)<<9|f>>>23)+r|0)<<13|f>>>19)+n|0)<<18|f>>>14,o^=(f=(b^=(f=(l^=(f=(s^=(f=o+b|0)<<7|f>>>25)+o|0)<<9|f>>>23)+s|0)<<13|f>>>19)+l|0)<<18|f>>>14,p^=(f=(h^=(f=(u^=(f=(g^=(f=p+h|0)<<7|f>>>25)+p|0)<<9|f>>>23)+g|0)<<13|f>>>19)+u|0)<<18|f>>>14,A^=(f=(y^=(f=(x^=(f=(m^=(f=A+y|0)<<7|f>>>25)+A|0)<<9|f>>>23)+m|0)<<13|f>>>19)+x|0)<<18|f>>>14;e[0]=d>>>0&255,e[1]=d>>>8&255,e[2]=d>>>16&255,e[3]=d>>>24&255,e[4]=o>>>0&255,e[5]=o>>>8&255,e[6]=o>>>16&255,e[7]=o>>>24&255,e[8]=p>>>0&255,e[9]=p>>>8&255,e[10]=p>>>16&255,e[11]=p>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=s>>>0&255,e[17]=s>>>8&255,e[18]=s>>>16&255,e[19]=s>>>24&255,e[20]=l>>>0&255,e[21]=l>>>8&255,e[22]=l>>>16&255,e[23]=l>>>24&255,e[24]=u>>>0&255,e[25]=u>>>8&255,e[26]=u>>>16&255,e[27]=u>>>24&255,e[28]=h>>>0&255,e[29]=h>>>8&255,e[30]=h>>>16&255,e[31]=h>>>24&255}(e,a,t,c)}var A=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function v(e,a,t,c,f,d,r){var n,i,b=new Uint8Array(16),o=new Uint8Array(64);for(i=0;i<16;i++)b[i]=0;for(i=0;i<8;i++)b[i]=d[i];for(;f>=64;){for(x(o,b,r,A),i=0;i<64;i++)e[a+i]=t[c+i]^o[i];for(n=1,i=8;i<16;i++)n=n+(255&b[i])|0,b[i]=255&n,n>>>=8;f-=64,a+=64,c+=64}if(f>0)for(x(o,b,r,A),i=0;i=64;){for(x(i,n,f,A),r=0;r<64;r++)e[a+r]=i[r];for(d=1,r=8;r<16;r++)d=d+(255&n[r])|0,n[r]=255&d,d>>>=8;t-=64,a+=64}if(t>0)for(x(i,n,f,A),r=0;r>>13|t<<3),c=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(t>>>10|c<<6),f=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(c>>>7|f<<9),d=255&e[8]|(255&e[9])<<8,this.r[4]=255&(f>>>4|d<<12),this.r[5]=d>>>1&8190,r=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(d>>>14|r<<2),n=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(r>>>11|n<<5),i=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(n>>>8|i<<8),this.r[9]=i>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function C(e,a,t,c,f,d){var r=new E(d);return r.update(t,c,f),r.finish(e,a),0}function M(e,a,t,c,f,d){var r=new Uint8Array(16);return C(r,0,t,c,f,d),g(e,a,r,0)}function B(e,a,t,c,f){var d;if(t<32)return-1;for(I(e,0,a,0,t,c,f),C(e,16,e,32,t-32,e),d=0;d<16;d++)e[d]=0;return 0}function L(e,a,t,c,f){var d,r=new Uint8Array(32);if(t<32)return-1;if(_(r,0,32,c,f),0!==M(a,16,a,32,t-32,r))return-1;for(I(e,0,a,0,t,c,f),d=0;d<32;d++)e[d]=0;return 0}function S(e,a){var t;for(t=0;t<16;t++)e[t]=0|a[t]}function k(e){var a,t,c=1;for(a=0;a<16;a++)t=e[a]+c+65535,c=Math.floor(t/65536),e[a]=t-65536*c;e[0]+=c-1+37*(c-1)}function N(e,a,t){for(var c,f=~(t-1),d=0;d<16;d++)c=f&(e[d]^a[d]),e[d]^=c,a[d]^=c}function P(e,t){var c,f,d,r=a(),n=a();for(c=0;c<16;c++)n[c]=t[c];for(k(n),k(n),k(n),f=0;f<2;f++){for(r[0]=n[0]-65517,c=1;c<15;c++)r[c]=n[c]-65535-(r[c-1]>>16&1),r[c-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1),d=r[15]>>16&1,r[14]&=65535,N(n,r,1-d)}for(c=0;c<16;c++)e[2*c]=255&n[c],e[2*c+1]=n[c]>>8}function R(e,a){var t=new Uint8Array(32),c=new Uint8Array(32);return P(t,e),P(c,a),m(t,0,c,0)}function O(e){var a=new Uint8Array(32);return P(a,e),1&a[0]}function D(e,a){var t;for(t=0;t<16;t++)e[t]=a[2*t]+(a[2*t+1]<<8);e[15]&=32767}function T(e,a,t){for(var c=0;c<16;c++)e[c]=a[c]+t[c]}function F(e,a,t){for(var c=0;c<16;c++)e[c]=a[c]-t[c]}function Q(e,a,t){var c,f,d=0,r=0,n=0,i=0,b=0,o=0,s=0,l=0,u=0,h=0,p=0,g=0,m=0,x=0,y=0,A=0,v=0,w=0,_=0,I=0,E=0,C=0,M=0,B=0,L=0,S=0,k=0,N=0,P=0,R=0,O=0,D=t[0],T=t[1],F=t[2],Q=t[3],U=t[4],j=t[5],H=t[6],$=t[7],q=t[8],G=t[9],z=t[10],K=t[11],V=t[12],Z=t[13],J=t[14],W=t[15];d+=(c=a[0])*D,r+=c*T,n+=c*F,i+=c*Q,b+=c*U,o+=c*j,s+=c*H,l+=c*$,u+=c*q,h+=c*G,p+=c*z,g+=c*K,m+=c*V,x+=c*Z,y+=c*J,A+=c*W,r+=(c=a[1])*D,n+=c*T,i+=c*F,b+=c*Q,o+=c*U,s+=c*j,l+=c*H,u+=c*$,h+=c*q,p+=c*G,g+=c*z,m+=c*K,x+=c*V,y+=c*Z,A+=c*J,v+=c*W,n+=(c=a[2])*D,i+=c*T,b+=c*F,o+=c*Q,s+=c*U,l+=c*j,u+=c*H,h+=c*$,p+=c*q,g+=c*G,m+=c*z,x+=c*K,y+=c*V,A+=c*Z,v+=c*J,w+=c*W,i+=(c=a[3])*D,b+=c*T,o+=c*F,s+=c*Q,l+=c*U,u+=c*j,h+=c*H,p+=c*$,g+=c*q,m+=c*G,x+=c*z,y+=c*K,A+=c*V,v+=c*Z,w+=c*J,_+=c*W,b+=(c=a[4])*D,o+=c*T,s+=c*F,l+=c*Q,u+=c*U,h+=c*j,p+=c*H,g+=c*$,m+=c*q,x+=c*G,y+=c*z,A+=c*K,v+=c*V,w+=c*Z,_+=c*J,I+=c*W,o+=(c=a[5])*D,s+=c*T,l+=c*F,u+=c*Q,h+=c*U,p+=c*j,g+=c*H,m+=c*$,x+=c*q,y+=c*G,A+=c*z,v+=c*K,w+=c*V,_+=c*Z,I+=c*J,E+=c*W,s+=(c=a[6])*D,l+=c*T,u+=c*F,h+=c*Q,p+=c*U,g+=c*j,m+=c*H,x+=c*$,y+=c*q,A+=c*G,v+=c*z,w+=c*K,_+=c*V,I+=c*Z,E+=c*J,C+=c*W,l+=(c=a[7])*D,u+=c*T,h+=c*F,p+=c*Q,g+=c*U,m+=c*j,x+=c*H,y+=c*$,A+=c*q,v+=c*G,w+=c*z,_+=c*K,I+=c*V,E+=c*Z,C+=c*J,M+=c*W,u+=(c=a[8])*D,h+=c*T,p+=c*F,g+=c*Q,m+=c*U,x+=c*j,y+=c*H,A+=c*$,v+=c*q,w+=c*G,_+=c*z,I+=c*K,E+=c*V,C+=c*Z,M+=c*J,B+=c*W,h+=(c=a[9])*D,p+=c*T,g+=c*F,m+=c*Q,x+=c*U,y+=c*j,A+=c*H,v+=c*$,w+=c*q,_+=c*G,I+=c*z,E+=c*K,C+=c*V,M+=c*Z,B+=c*J,L+=c*W,p+=(c=a[10])*D,g+=c*T,m+=c*F,x+=c*Q,y+=c*U,A+=c*j,v+=c*H,w+=c*$,_+=c*q,I+=c*G,E+=c*z,C+=c*K,M+=c*V,B+=c*Z,L+=c*J,S+=c*W,g+=(c=a[11])*D,m+=c*T,x+=c*F,y+=c*Q,A+=c*U,v+=c*j,w+=c*H,_+=c*$,I+=c*q,E+=c*G,C+=c*z,M+=c*K,B+=c*V,L+=c*Z,S+=c*J,k+=c*W,m+=(c=a[12])*D,x+=c*T,y+=c*F,A+=c*Q,v+=c*U,w+=c*j,_+=c*H,I+=c*$,E+=c*q,C+=c*G,M+=c*z,B+=c*K,L+=c*V,S+=c*Z,k+=c*J,N+=c*W,x+=(c=a[13])*D,y+=c*T,A+=c*F,v+=c*Q,w+=c*U,_+=c*j,I+=c*H,E+=c*$,C+=c*q,M+=c*G,B+=c*z,L+=c*K,S+=c*V,k+=c*Z,N+=c*J,P+=c*W,y+=(c=a[14])*D,A+=c*T,v+=c*F,w+=c*Q,_+=c*U,I+=c*j,E+=c*H,C+=c*$,M+=c*q,B+=c*G,L+=c*z,S+=c*K,k+=c*V,N+=c*Z,P+=c*J,R+=c*W,A+=(c=a[15])*D,r+=38*(w+=c*F),n+=38*(_+=c*Q),i+=38*(I+=c*U),b+=38*(E+=c*j),o+=38*(C+=c*H),s+=38*(M+=c*$),l+=38*(B+=c*q),u+=38*(L+=c*G),h+=38*(S+=c*z),p+=38*(k+=c*K),g+=38*(N+=c*V),m+=38*(P+=c*Z),x+=38*(R+=c*J),y+=38*(O+=c*W),d=(c=(d+=38*(v+=c*T))+(f=1)+65535)-65536*(f=Math.floor(c/65536)),r=(c=r+f+65535)-65536*(f=Math.floor(c/65536)),n=(c=n+f+65535)-65536*(f=Math.floor(c/65536)),i=(c=i+f+65535)-65536*(f=Math.floor(c/65536)),b=(c=b+f+65535)-65536*(f=Math.floor(c/65536)),o=(c=o+f+65535)-65536*(f=Math.floor(c/65536)),s=(c=s+f+65535)-65536*(f=Math.floor(c/65536)),l=(c=l+f+65535)-65536*(f=Math.floor(c/65536)),u=(c=u+f+65535)-65536*(f=Math.floor(c/65536)),h=(c=h+f+65535)-65536*(f=Math.floor(c/65536)),p=(c=p+f+65535)-65536*(f=Math.floor(c/65536)),g=(c=g+f+65535)-65536*(f=Math.floor(c/65536)),m=(c=m+f+65535)-65536*(f=Math.floor(c/65536)),x=(c=x+f+65535)-65536*(f=Math.floor(c/65536)),y=(c=y+f+65535)-65536*(f=Math.floor(c/65536)),A=(c=A+f+65535)-65536*(f=Math.floor(c/65536)),d=(c=(d+=f-1+37*(f-1))+(f=1)+65535)-65536*(f=Math.floor(c/65536)),r=(c=r+f+65535)-65536*(f=Math.floor(c/65536)),n=(c=n+f+65535)-65536*(f=Math.floor(c/65536)),i=(c=i+f+65535)-65536*(f=Math.floor(c/65536)),b=(c=b+f+65535)-65536*(f=Math.floor(c/65536)),o=(c=o+f+65535)-65536*(f=Math.floor(c/65536)),s=(c=s+f+65535)-65536*(f=Math.floor(c/65536)),l=(c=l+f+65535)-65536*(f=Math.floor(c/65536)),u=(c=u+f+65535)-65536*(f=Math.floor(c/65536)),h=(c=h+f+65535)-65536*(f=Math.floor(c/65536)),p=(c=p+f+65535)-65536*(f=Math.floor(c/65536)),g=(c=g+f+65535)-65536*(f=Math.floor(c/65536)),m=(c=m+f+65535)-65536*(f=Math.floor(c/65536)),x=(c=x+f+65535)-65536*(f=Math.floor(c/65536)),y=(c=y+f+65535)-65536*(f=Math.floor(c/65536)),A=(c=A+f+65535)-65536*(f=Math.floor(c/65536)),d+=f-1+37*(f-1),e[0]=d,e[1]=r,e[2]=n,e[3]=i,e[4]=b,e[5]=o,e[6]=s,e[7]=l,e[8]=u,e[9]=h,e[10]=p,e[11]=g,e[12]=m,e[13]=x,e[14]=y,e[15]=A}function U(e,a){Q(e,a,a)}function j(e,t){var c,f=a();for(c=0;c<16;c++)f[c]=t[c];for(c=253;c>=0;c--)U(f,f),2!==c&&4!==c&&Q(f,f,t);for(c=0;c<16;c++)e[c]=f[c]}function H(e,t){var c,f=a();for(c=0;c<16;c++)f[c]=t[c];for(c=250;c>=0;c--)U(f,f),1!==c&&Q(f,f,t);for(c=0;c<16;c++)e[c]=f[c]}function $(e,t,c){var f,d,r=new Uint8Array(32),n=new Float64Array(80),b=a(),o=a(),s=a(),l=a(),u=a(),h=a();for(d=0;d<31;d++)r[d]=t[d];for(r[31]=127&t[31]|64,r[0]&=248,D(n,c),d=0;d<16;d++)o[d]=n[d],l[d]=b[d]=s[d]=0;for(b[0]=l[0]=1,d=254;d>=0;--d)N(b,o,f=r[d>>>3]>>>(7&d)&1),N(s,l,f),T(u,b,s),F(b,b,s),T(s,o,l),F(o,o,l),U(l,u),U(h,b),Q(b,s,b),Q(s,o,u),T(u,b,s),F(b,b,s),U(o,b),F(s,l,h),Q(b,s,i),T(b,b,l),Q(s,s,b),Q(b,l,h),Q(l,o,n),U(o,u),N(b,o,f),N(s,l,f);for(d=0;d<16;d++)n[d+16]=b[d],n[d+32]=s[d],n[d+48]=o[d],n[d+64]=l[d];var p=n.subarray(32),g=n.subarray(16);return j(p,p),Q(g,g,p),P(e,g),0}function q(e,a){return $(e,a,d)}function G(e,a){return c(a,32),q(e,a)}function z(e,a,t){var c=new Uint8Array(32);return $(c,t,a),y(e,f,c,A)}E.prototype.blocks=function(e,a,t){for(var c,f,d,r,n,i,b,o,s,l,u,h,p,g,m,x,y,A,v,w=this.fin?0:2048,_=this.h[0],I=this.h[1],E=this.h[2],C=this.h[3],M=this.h[4],B=this.h[5],L=this.h[6],S=this.h[7],k=this.h[8],N=this.h[9],P=this.r[0],R=this.r[1],O=this.r[2],D=this.r[3],T=this.r[4],F=this.r[5],Q=this.r[6],U=this.r[7],j=this.r[8],H=this.r[9];t>=16;)l=s=0,l+=(_+=8191&(c=255&e[a+0]|(255&e[a+1])<<8))*P,l+=(I+=8191&(c>>>13|(f=255&e[a+2]|(255&e[a+3])<<8)<<3))*(5*H),l+=(E+=8191&(f>>>10|(d=255&e[a+4]|(255&e[a+5])<<8)<<6))*(5*j),l+=(C+=8191&(d>>>7|(r=255&e[a+6]|(255&e[a+7])<<8)<<9))*(5*U),s=(l+=(M+=8191&(r>>>4|(n=255&e[a+8]|(255&e[a+9])<<8)<<12))*(5*Q))>>>13,l&=8191,l+=(B+=n>>>1&8191)*(5*F),l+=(L+=8191&(n>>>14|(i=255&e[a+10]|(255&e[a+11])<<8)<<2))*(5*T),l+=(S+=8191&(i>>>11|(b=255&e[a+12]|(255&e[a+13])<<8)<<5))*(5*D),l+=(k+=8191&(b>>>8|(o=255&e[a+14]|(255&e[a+15])<<8)<<8))*(5*O),u=s+=(l+=(N+=o>>>5|w)*(5*R))>>>13,u+=_*R,u+=I*P,u+=E*(5*H),u+=C*(5*j),s=(u+=M*(5*U))>>>13,u&=8191,u+=B*(5*Q),u+=L*(5*F),u+=S*(5*T),u+=k*(5*D),s+=(u+=N*(5*O))>>>13,u&=8191,h=s,h+=_*O,h+=I*R,h+=E*P,h+=C*(5*H),s=(h+=M*(5*j))>>>13,h&=8191,h+=B*(5*U),h+=L*(5*Q),h+=S*(5*F),h+=k*(5*T),p=s+=(h+=N*(5*D))>>>13,p+=_*D,p+=I*O,p+=E*R,p+=C*P,s=(p+=M*(5*H))>>>13,p&=8191,p+=B*(5*j),p+=L*(5*U),p+=S*(5*Q),p+=k*(5*F),g=s+=(p+=N*(5*T))>>>13,g+=_*T,g+=I*D,g+=E*O,g+=C*R,s=(g+=M*P)>>>13,g&=8191,g+=B*(5*H),g+=L*(5*j),g+=S*(5*U),g+=k*(5*Q),m=s+=(g+=N*(5*F))>>>13,m+=_*F,m+=I*T,m+=E*D,m+=C*O,s=(m+=M*R)>>>13,m&=8191,m+=B*P,m+=L*(5*H),m+=S*(5*j),m+=k*(5*U),x=s+=(m+=N*(5*Q))>>>13,x+=_*Q,x+=I*F,x+=E*T,x+=C*D,s=(x+=M*O)>>>13,x&=8191,x+=B*R,x+=L*P,x+=S*(5*H),x+=k*(5*j),y=s+=(x+=N*(5*U))>>>13,y+=_*U,y+=I*Q,y+=E*F,y+=C*T,s=(y+=M*D)>>>13,y&=8191,y+=B*O,y+=L*R,y+=S*P,y+=k*(5*H),A=s+=(y+=N*(5*j))>>>13,A+=_*j,A+=I*U,A+=E*Q,A+=C*F,s=(A+=M*T)>>>13,A&=8191,A+=B*D,A+=L*O,A+=S*R,A+=k*P,v=s+=(A+=N*(5*H))>>>13,v+=_*H,v+=I*j,v+=E*U,v+=C*Q,s=(v+=M*F)>>>13,v&=8191,v+=B*T,v+=L*D,v+=S*O,v+=k*R,_=l=8191&(s=(s=((s+=(v+=N*P)>>>13)<<2)+s|0)+(l&=8191)|0),I=u+=s>>>=13,E=h&=8191,C=p&=8191,M=g&=8191,B=m&=8191,L=x&=8191,S=y&=8191,k=A&=8191,N=v&=8191,a+=16,t-=16;this.h[0]=_,this.h[1]=I,this.h[2]=E,this.h[3]=C,this.h[4]=M,this.h[5]=B,this.h[6]=L,this.h[7]=S,this.h[8]=k,this.h[9]=N},E.prototype.finish=function(e,a){var t,c,f,d,r=new Uint16Array(10);if(this.leftover){for(d=this.leftover,this.buffer[d++]=1;d<16;d++)this.buffer[d]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(t=this.h[1]>>>13,this.h[1]&=8191,d=2;d<10;d++)this.h[d]+=t,t=this.h[d]>>>13,this.h[d]&=8191;for(this.h[0]+=5*t,t=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=t,t=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=t,r[0]=this.h[0]+5,t=r[0]>>>13,r[0]&=8191,d=1;d<10;d++)r[d]=this.h[d]+t,t=r[d]>>>13,r[d]&=8191;for(r[9]-=8192,c=(1^t)-1,d=0;d<10;d++)r[d]&=c;for(c=~c,d=0;d<10;d++)this.h[d]=this.h[d]&c|r[d];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),f=this.h[0]+this.pad[0],this.h[0]=65535&f,d=1;d<8;d++)f=(this.h[d]+this.pad[d]|0)+(f>>>16)|0,this.h[d]=65535&f;e[a+0]=this.h[0]>>>0&255,e[a+1]=this.h[0]>>>8&255,e[a+2]=this.h[1]>>>0&255,e[a+3]=this.h[1]>>>8&255,e[a+4]=this.h[2]>>>0&255,e[a+5]=this.h[2]>>>8&255,e[a+6]=this.h[3]>>>0&255,e[a+7]=this.h[3]>>>8&255,e[a+8]=this.h[4]>>>0&255,e[a+9]=this.h[4]>>>8&255,e[a+10]=this.h[5]>>>0&255,e[a+11]=this.h[5]>>>8&255,e[a+12]=this.h[6]>>>0&255,e[a+13]=this.h[6]>>>8&255,e[a+14]=this.h[7]>>>0&255,e[a+15]=this.h[7]>>>8&255},E.prototype.update=function(e,a,t){var c,f;if(this.leftover){for((f=16-this.leftover)>t&&(f=t),c=0;c=16&&(f=t-t%16,this.blocks(e,a,f),a+=f,t-=f),t){for(c=0;c=128;){for(w=0;w<16;w++)_=8*w+V,S[w]=t[_+0]<<24|t[_+1]<<16|t[_+2]<<8|t[_+3],k[w]=t[_+4]<<24|t[_+5]<<16|t[_+6]<<8|t[_+7];for(w=0;w<80;w++)if(f=N,d=P,r=R,n=O,i=D,b=T,o=F,l=U,u=j,h=H,p=$,g=q,m=G,x=z,C=65535&(E=K),M=E>>>16,B=65535&(I=Q),L=I>>>16,C+=65535&(E=(q>>>14|D<<18)^(q>>>18|D<<14)^(D>>>9|q<<23)),M+=E>>>16,B+=65535&(I=(D>>>14|q<<18)^(D>>>18|q<<14)^(q>>>9|D<<23)),L+=I>>>16,C+=65535&(E=q&G^~q&z),M+=E>>>16,B+=65535&(I=D&T^~D&F),L+=I>>>16,C+=65535&(E=Z[2*w+1]),M+=E>>>16,B+=65535&(I=Z[2*w]),L+=I>>>16,I=S[w%16],M+=(E=k[w%16])>>>16,B+=65535&I,L+=I>>>16,B+=(M+=(C+=65535&E)>>>16)>>>16,C=65535&(E=v=65535&C|M<<16),M=E>>>16,B=65535&(I=A=65535&B|(L+=B>>>16)<<16),L=I>>>16,C+=65535&(E=(U>>>28|N<<4)^(N>>>2|U<<30)^(N>>>7|U<<25)),M+=E>>>16,B+=65535&(I=(N>>>28|U<<4)^(U>>>2|N<<30)^(U>>>7|N<<25)),L+=I>>>16,M+=(E=U&j^U&H^j&H)>>>16,B+=65535&(I=N&P^N&R^P&R),L+=I>>>16,s=65535&(B+=(M+=(C+=65535&E)>>>16)>>>16)|(L+=B>>>16)<<16,y=65535&C|M<<16,C=65535&(E=p),M=E>>>16,B=65535&(I=n),L=I>>>16,M+=(E=v)>>>16,B+=65535&(I=A),L+=I>>>16,P=f,R=d,O=r,D=n=65535&(B+=(M+=(C+=65535&E)>>>16)>>>16)|(L+=B>>>16)<<16,T=i,F=b,Q=o,N=s,j=l,H=u,$=h,q=p=65535&C|M<<16,G=g,z=m,K=x,U=y,w%16==15)for(_=0;_<16;_++)I=S[_],C=65535&(E=k[_]),M=E>>>16,B=65535&I,L=I>>>16,I=S[(_+9)%16],C+=65535&(E=k[(_+9)%16]),M+=E>>>16,B+=65535&I,L+=I>>>16,A=S[(_+1)%16],C+=65535&(E=((v=k[(_+1)%16])>>>1|A<<31)^(v>>>8|A<<24)^(v>>>7|A<<25)),M+=E>>>16,B+=65535&(I=(A>>>1|v<<31)^(A>>>8|v<<24)^A>>>7),L+=I>>>16,A=S[(_+14)%16],M+=(E=((v=k[(_+14)%16])>>>19|A<<13)^(A>>>29|v<<3)^(v>>>6|A<<26))>>>16,B+=65535&(I=(A>>>19|v<<13)^(v>>>29|A<<3)^A>>>6),L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,S[_]=65535&B|L<<16,k[_]=65535&C|M<<16;C=65535&(E=U),M=E>>>16,B=65535&(I=N),L=I>>>16,I=e[0],M+=(E=a[0])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[0]=N=65535&B|L<<16,a[0]=U=65535&C|M<<16,C=65535&(E=j),M=E>>>16,B=65535&(I=P),L=I>>>16,I=e[1],M+=(E=a[1])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[1]=P=65535&B|L<<16,a[1]=j=65535&C|M<<16,C=65535&(E=H),M=E>>>16,B=65535&(I=R),L=I>>>16,I=e[2],M+=(E=a[2])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[2]=R=65535&B|L<<16,a[2]=H=65535&C|M<<16,C=65535&(E=$),M=E>>>16,B=65535&(I=O),L=I>>>16,I=e[3],M+=(E=a[3])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[3]=O=65535&B|L<<16,a[3]=$=65535&C|M<<16,C=65535&(E=q),M=E>>>16,B=65535&(I=D),L=I>>>16,I=e[4],M+=(E=a[4])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[4]=D=65535&B|L<<16,a[4]=q=65535&C|M<<16,C=65535&(E=G),M=E>>>16,B=65535&(I=T),L=I>>>16,I=e[5],M+=(E=a[5])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[5]=T=65535&B|L<<16,a[5]=G=65535&C|M<<16,C=65535&(E=z),M=E>>>16,B=65535&(I=F),L=I>>>16,I=e[6],M+=(E=a[6])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[6]=F=65535&B|L<<16,a[6]=z=65535&C|M<<16,C=65535&(E=K),M=E>>>16,B=65535&(I=Q),L=I>>>16,I=e[7],M+=(E=a[7])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[7]=Q=65535&B|L<<16,a[7]=K=65535&C|M<<16,V+=128,c-=128}return c}function W(e,a,t){var c,f=new Int32Array(8),d=new Int32Array(8),r=new Uint8Array(256),n=t;for(f[0]=1779033703,f[1]=3144134277,f[2]=1013904242,f[3]=2773480762,f[4]=1359893119,f[5]=2600822924,f[6]=528734635,f[7]=1541459225,d[0]=4089235720,d[1]=2227873595,d[2]=4271175723,d[3]=1595750129,d[4]=2917565137,d[5]=725511199,d[6]=4215389547,d[7]=327033209,J(f,d,a,t),t%=128,c=0;c=0;--f)X(e,a,c=t[f/8|0]>>(7&f)&1),Y(a,e),Y(e,e),X(e,a,c)}function te(e,t){var c=[a(),a(),a(),a()];S(c[0],s),S(c[1],l),S(c[2],n),Q(c[3],s,l),ae(e,c,t)}function ce(e,t,f){var d,r=new Uint8Array(64),n=[a(),a(),a(),a()];for(f||c(t,32),W(r,t,32),r[0]&=248,r[31]&=127,r[31]|=64,te(n,r),ee(e,n),d=0;d<32;d++)t[d+32]=e[d];return 0}var fe=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 de(e,a){var t,c,f,d;for(c=63;c>=32;--c){for(t=0,f=c-32,d=c-12;f>4)*fe[f],t=a[f]>>8,a[f]&=255;for(f=0;f<32;f++)a[f]-=t*fe[f];for(c=0;c<32;c++)a[c+1]+=a[c]>>8,e[c]=255&a[c]}function re(e){var a,t=new Float64Array(64);for(a=0;a<64;a++)t[a]=e[a];for(a=0;a<64;a++)e[a]=0;de(e,t)}function ne(e,t,c,f){var d,r,n=new Uint8Array(64),i=new Uint8Array(64),b=new Uint8Array(64),o=new Float64Array(64),s=[a(),a(),a(),a()];W(n,f,32),n[0]&=248,n[31]&=127,n[31]|=64;var l=c+64;for(d=0;d>7&&F(e[0],r,e[0]),Q(e[3],e[0],e[1]),0)}(l,f))return-1;for(d=0;d=0},e.sign.keyPair=function(){var e=new Uint8Array(se),a=new Uint8Array(le);return ce(e,a),{publicKey:e,secretKey:a}},e.sign.keyPair.fromSecretKey=function(e){if(he(e),e.length!==le)throw new Error("bad secret key size");for(var a=new Uint8Array(se),t=0;t{function c(e){try{if(!t.g.localStorage)return!1}catch(e){return!1}var a=t.g.localStorage[e];return null!=a&&"true"===String(a).toLowerCase()}e.exports=function(e,a){if(c("noDeprecation"))return e;var t=!1;return function(){if(!t){if(c("throwDeprecation"))throw new Error(a);c("traceDeprecation")?console.trace(a):console.warn(a),t=!0}return e.apply(this,arguments)}}},81135:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},49032:(e,a,t)=>{"use strict";var c=t(47244),f=t(48184),d=t(25767),r=t(35680);function n(e){return e.call.bind(e)}var i="undefined"!=typeof BigInt,b="undefined"!=typeof Symbol,o=n(Object.prototype.toString),s=n(Number.prototype.valueOf),l=n(String.prototype.valueOf),u=n(Boolean.prototype.valueOf);if(i)var h=n(BigInt.prototype.valueOf);if(b)var p=n(Symbol.prototype.valueOf);function g(e,a){if("object"!=typeof e)return!1;try{return a(e),!0}catch(e){return!1}}function m(e){return"[object Map]"===o(e)}function x(e){return"[object Set]"===o(e)}function y(e){return"[object WeakMap]"===o(e)}function A(e){return"[object WeakSet]"===o(e)}function v(e){return"[object ArrayBuffer]"===o(e)}function w(e){return"undefined"!=typeof ArrayBuffer&&(v.working?v(e):e instanceof ArrayBuffer)}function _(e){return"[object DataView]"===o(e)}function I(e){return"undefined"!=typeof DataView&&(_.working?_(e):e instanceof DataView)}a.isArgumentsObject=c,a.isGeneratorFunction=f,a.isTypedArray=r,a.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},a.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):r(e)||I(e)},a.isUint8Array=function(e){return"Uint8Array"===d(e)},a.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===d(e)},a.isUint16Array=function(e){return"Uint16Array"===d(e)},a.isUint32Array=function(e){return"Uint32Array"===d(e)},a.isInt8Array=function(e){return"Int8Array"===d(e)},a.isInt16Array=function(e){return"Int16Array"===d(e)},a.isInt32Array=function(e){return"Int32Array"===d(e)},a.isFloat32Array=function(e){return"Float32Array"===d(e)},a.isFloat64Array=function(e){return"Float64Array"===d(e)},a.isBigInt64Array=function(e){return"BigInt64Array"===d(e)},a.isBigUint64Array=function(e){return"BigUint64Array"===d(e)},m.working="undefined"!=typeof Map&&m(new Map),a.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},x.working="undefined"!=typeof Set&&x(new Set),a.isSet=function(e){return"undefined"!=typeof Set&&(x.working?x(e):e instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),a.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(y.working?y(e):e instanceof WeakMap)},A.working="undefined"!=typeof WeakSet&&A(new WeakSet),a.isWeakSet=function(e){return A(e)},v.working="undefined"!=typeof ArrayBuffer&&v(new ArrayBuffer),a.isArrayBuffer=w,_.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&_(new DataView(new ArrayBuffer(1),0,1)),a.isDataView=I;var E="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function C(e){return"[object SharedArrayBuffer]"===o(e)}function M(e){return void 0!==E&&(void 0===C.working&&(C.working=C(new E)),C.working?C(e):e instanceof E)}function B(e){return g(e,s)}function L(e){return g(e,l)}function S(e){return g(e,u)}function k(e){return i&&g(e,h)}function N(e){return b&&g(e,p)}a.isSharedArrayBuffer=M,a.isAsyncFunction=function(e){return"[object AsyncFunction]"===o(e)},a.isMapIterator=function(e){return"[object Map Iterator]"===o(e)},a.isSetIterator=function(e){return"[object Set Iterator]"===o(e)},a.isGeneratorObject=function(e){return"[object Generator]"===o(e)},a.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===o(e)},a.isNumberObject=B,a.isStringObject=L,a.isBooleanObject=S,a.isBigIntObject=k,a.isSymbolObject=N,a.isBoxedPrimitive=function(e){return B(e)||L(e)||S(e)||k(e)||N(e)},a.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(w(e)||M(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(a,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},40537:(e,a,t)=>{var c=Object.getOwnPropertyDescriptors||function(e){for(var a=Object.keys(e),t={},c=0;c=d)return e;switch(e){case"%s":return String(c[t++]);case"%d":return Number(c[t++]);case"%j":try{return JSON.stringify(c[t++])}catch(e){return"[Circular]"}default:return e}})),n=c[t];t=3&&(c.depth=arguments[2]),arguments.length>=4&&(c.colors=arguments[3]),p(t)?c.showHidden=t:t&&a._extend(c,t),y(c.showHidden)&&(c.showHidden=!1),y(c.depth)&&(c.depth=2),y(c.colors)&&(c.colors=!1),y(c.customInspect)&&(c.customInspect=!0),c.colors&&(c.stylize=b),s(c,e,c.depth)}function b(e,a){var t=i.styles[a];return t?"["+i.colors[t][0]+"m"+e+"["+i.colors[t][1]+"m":e}function o(e,a){return e}function s(e,t,c){if(e.customInspect&&t&&I(t.inspect)&&t.inspect!==a.inspect&&(!t.constructor||t.constructor.prototype!==t)){var f=t.inspect(c,e);return x(f)||(f=s(e,f,c)),f}var d=function(e,a){if(y(a))return e.stylize("undefined","undefined");if(x(a)){var t="'"+JSON.stringify(a).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return m(a)?e.stylize(""+a,"number"):p(a)?e.stylize(""+a,"boolean"):g(a)?e.stylize("null","null"):void 0}(e,t);if(d)return d;var r=Object.keys(t),n=function(e){var a={};return e.forEach((function(e,t){a[e]=!0})),a}(r);if(e.showHidden&&(r=Object.getOwnPropertyNames(t)),_(t)&&(r.indexOf("message")>=0||r.indexOf("description")>=0))return l(t);if(0===r.length){if(I(t)){var i=t.name?": "+t.name:"";return e.stylize("[Function"+i+"]","special")}if(A(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(w(t))return e.stylize(Date.prototype.toString.call(t),"date");if(_(t))return l(t)}var b,o="",v=!1,E=["{","}"];return h(t)&&(v=!0,E=["[","]"]),I(t)&&(o=" [Function"+(t.name?": "+t.name:"")+"]"),A(t)&&(o=" "+RegExp.prototype.toString.call(t)),w(t)&&(o=" "+Date.prototype.toUTCString.call(t)),_(t)&&(o=" "+l(t)),0!==r.length||v&&0!=t.length?c<0?A(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),b=v?function(e,a,t,c,f){for(var d=[],r=0,n=a.length;r60?t[0]+(""===a?"":a+"\n ")+" "+e.join(",\n ")+" "+t[1]:t[0]+a+" "+e.join(", ")+" "+t[1]}(b,o,E)):E[0]+o+E[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,a,t,c,f,d){var r,n,i;if((i=Object.getOwnPropertyDescriptor(a,f)||{value:a[f]}).get?n=i.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):i.set&&(n=e.stylize("[Setter]","special")),B(c,f)||(r="["+f+"]"),n||(e.seen.indexOf(i.value)<0?(n=g(t)?s(e,i.value,null):s(e,i.value,t-1)).indexOf("\n")>-1&&(n=d?n.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+n.split("\n").map((function(e){return" "+e})).join("\n")):n=e.stylize("[Circular]","special")),y(r)){if(d&&f.match(/^\d+$/))return n;(r=JSON.stringify(""+f)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.slice(1,-1),r=e.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=e.stylize(r,"string"))}return r+": "+n}function h(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function g(e){return null===e}function m(e){return"number"==typeof e}function x(e){return"string"==typeof e}function y(e){return void 0===e}function A(e){return v(e)&&"[object RegExp]"===E(e)}function v(e){return"object"==typeof e&&null!==e}function w(e){return v(e)&&"[object Date]"===E(e)}function _(e){return v(e)&&("[object Error]"===E(e)||e instanceof Error)}function I(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}a.debuglog=function(e){if(e=e.toUpperCase(),!d[e])if(r.test(e)){var t=process.pid;d[e]=function(){var c=a.format.apply(a,arguments);console.error("%s %d: %s",e,t,c)}}else d[e]=function(){};return d[e]},a.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},a.types=t(49032),a.isArray=h,a.isBoolean=p,a.isNull=g,a.isNullOrUndefined=function(e){return null==e},a.isNumber=m,a.isString=x,a.isSymbol=function(e){return"symbol"==typeof e},a.isUndefined=y,a.isRegExp=A,a.types.isRegExp=A,a.isObject=v,a.isDate=w,a.types.isDate=w,a.isError=_,a.types.isNativeError=_,a.isFunction=I,a.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},a.isBuffer=t(81135);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(e,a){return Object.prototype.hasOwnProperty.call(e,a)}a.log=function(){var e,t;console.log("%s - %s",(t=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),M[e.getMonth()],t].join(" ")),a.format.apply(a,arguments))},a.inherits=t(56698),a._extend=function(e,a){if(!a||!v(a))return e;for(var t=Object.keys(a),c=t.length;c--;)e[t[c]]=a[t[c]];return e};var L="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function S(e,a){if(!e){var t=new Error("Promise was rejected with a falsy value");t.reason=e,e=t}return a(e)}a.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(L&&e[L]){var a;if("function"!=typeof(a=e[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(a,L,{value:a,enumerable:!1,writable:!1,configurable:!0}),a}function a(){for(var a,t,c=new Promise((function(e,c){a=e,t=c})),f=[],d=0;d{var indexOf=function(e,a){if(e.indexOf)return e.indexOf(a);for(var t=0;t{"use strict";var c=t(82682),f=t(39209),d=t(10487),r=t(38075),n=t(75795),i=r("Object.prototype.toString"),b=t(49092)(),o="undefined"==typeof globalThis?t.g:globalThis,s=f(),l=r("String.prototype.slice"),u=Object.getPrototypeOf,h=r("Array.prototype.indexOf",!0)||function(e,a){for(var t=0;t-1?a:"Object"===a&&function(e){var a=!1;return c(p,(function(t,c){if(!a)try{t(e),a=l(c,1)}catch(e){}})),a}(e)}return n?function(e){var a=!1;return c(p,(function(t,c){if(!a)try{"$"+t(e)===c&&(a=l(c,1))}catch(e){}})),a}(e):null}},57510:e=>{e.exports=function(){for(var e={},t=0;t{},78982:()=>{},47790:()=>{},73776:()=>{},21638:()=>{},92668:()=>{},77965:()=>{},66089:()=>{},79368:()=>{},23276:()=>{},59676:()=>{},64688:()=>{},51069:()=>{},15340:()=>{},79838:()=>{},59817:()=>{},71281:()=>{},60513:()=>{},2378:()=>{},60290:()=>{},47882:()=>{},27754:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.StructError=void 0;class t extends TypeError{constructor(e,a){let t;const{message:c,explanation:f,...d}=e,{path:r}=e,n=0===r.length?c:`At path: ${r.join(".")} -- ${c}`;super(f??n),null!=f&&(this.cause=n),Object.assign(this,d),this.name=this.constructor.name,this.failures=()=>t??(t=[e,...a()])}}a.StructError=t},35620:function(e,a,t){"use strict";var c=this&&this.__createBinding||(Object.create?function(e,a,t,c){void 0===c&&(c=t);var f=Object.getOwnPropertyDescriptor(a,t);f&&!("get"in f?!a.__esModule:f.writable||f.configurable)||(f={enumerable:!0,get:function(){return a[t]}}),Object.defineProperty(e,c,f)}:function(e,a,t,c){void 0===c&&(c=t),e[c]=a[t]}),f=this&&this.__exportStar||function(e,a){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(a,t)||c(a,e,t)};Object.defineProperty(a,"__esModule",{value:!0}),f(t(27754),a),f(t(99067),a),f(t(91704),a),f(t(50401),a),f(t(67792),a),f(t(65991),a)},99067:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validate=a.is=a.mask=a.create=a.assert=a.Struct=void 0;const c=t(27754),f=t(70639);function d(e,a,t){const c=b(e,a,{message:t});if(c[0])throw c[0]}function r(e,a,t){const c=b(e,a,{coerce:!0,message:t});if(c[0])throw c[0];return c[1]}function n(e,a,t){const c=b(e,a,{coerce:!0,mask:!0,message:t});if(c[0])throw c[0];return c[1]}function i(e,a){return!b(e,a)[0]}function b(e,a,t={}){const d=(0,f.run)(e,a,t),r=(0,f.shiftIterator)(d);return r[0]?[new c.StructError(r[0],(function*(){for(const e of d)e[0]&&(yield e[0])})),void 0]:[void 0,r[1]]}a.Struct=class{constructor(e){const{type:a,schema:t,validator:c,refiner:d,coercer:r=e=>e,entries:n=function*(){}}=e;this.type=a,this.schema=t,this.entries=n,this.coercer=r,this.validator=c?(e,a)=>{const t=c(e,a);return(0,f.toFailures)(t,a,this,e)}:()=>[],this.refiner=d?(e,a)=>{const t=d(e,a);return(0,f.toFailures)(t,a,this,e)}:()=>[]}assert(e,a){return d(e,this,a)}create(e,a){return r(e,this,a)}is(e){return i(e,this)}mask(e,a){return n(e,this,a)}validate(e,a={}){return b(e,this,a)}},a.assert=d,a.create=r,a.mask=n,a.is=i,a.validate=b},91704:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.trimmed=a.defaulted=a.coerce=void 0;const c=t(99067),f=t(70639),d=t(67792);function r(e,a,t){return new c.Struct({...e,coercer:(f,d)=>(0,c.is)(f,a)?e.coercer(t(f,d),d):e.coercer(f,d)})}a.coerce=r,a.defaulted=function(e,a,t={}){return r(e,(0,d.unknown)(),(e=>{const c="function"==typeof a?a():a;if(void 0===e)return c;if(!t.strict&&(0,f.isPlainObject)(e)&&(0,f.isPlainObject)(c)){const a={...e};let t=!1;for(const e in c)void 0===a[e]&&(a[e]=c[e],t=!0);if(t)return a}return e}))},a.trimmed=function(e){return r(e,(0,d.string)(),(e=>e.trim()))}},50401:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.refine=a.size=a.pattern=a.nonempty=a.min=a.max=a.empty=void 0;const c=t(99067),f=t(70639);function d(e){return e instanceof Map||e instanceof Set?e.size:e.length}function r(e,a,t){return new c.Struct({...e,*refiner(c,d){yield*e.refiner(c,d);const r=t(c,d),n=(0,f.toFailures)(r,d,e,c);for(const e of n)yield{...e,refinement:a}}})}a.empty=function(e){return r(e,"empty",(a=>{const t=d(a);return 0===t||`Expected an empty ${e.type} but received one with a size of \`${t}\``}))},a.max=function(e,a,t={}){const{exclusive:c}=t;return r(e,"max",(t=>c?tc?t>a:t>=a||`Expected a ${e.type} greater than ${c?"":"or equal to "}${a} but received \`${t}\``))},a.nonempty=function(e){return r(e,"nonempty",(a=>d(a)>0||`Expected a nonempty ${e.type} but received an empty one`))},a.pattern=function(e,a){return r(e,"pattern",(t=>a.test(t)||`Expected a ${e.type} matching \`/${a.source}/\` but received "${t}"`))},a.size=function(e,a,t=a){const c=`Expected a ${e.type}`,f=a===t?`of \`${a}\``:`between \`${a}\` and \`${t}\``;return r(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return a<=e&&e<=t||`${c} ${f} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:d}=e;return a<=d&&d<=t||`${c} with a size ${f} but received one with a size of \`${d}\``}const{length:d}=e;return a<=d&&d<=t||`${c} with a length ${f} but received one with a length of \`${d}\``}))},a.refine=r},67792:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.unknown=a.union=a.type=a.tuple=a.string=a.set=a.regexp=a.record=a.optional=a.object=a.number=a.nullable=a.never=a.map=a.literal=a.intersection=a.integer=a.instance=a.func=a.enums=a.date=a.boolean=a.bigint=a.array=a.any=void 0;const c=t(99067),f=t(70639),d=t(65991);function r(){return(0,d.define)("never",(()=>!1))}a.any=function(){return(0,d.define)("any",(()=>!0))},a.array=function(e){return new c.Struct({type:"array",schema:e,*entries(a){if(e&&Array.isArray(a))for(const[t,c]of a.entries())yield[t,c,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${(0,f.print)(e)}`})},a.bigint=function(){return(0,d.define)("bigint",(e=>"bigint"==typeof e))},a.boolean=function(){return(0,d.define)("boolean",(e=>"boolean"==typeof e))},a.date=function(){return(0,d.define)("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${(0,f.print)(e)}`))},a.enums=function(e){const a={},t=e.map((e=>(0,f.print)(e))).join();for(const t of e)a[t]=t;return new c.Struct({type:"enums",schema:a,validator:a=>e.includes(a)||`Expected one of \`${t}\`, but received: ${(0,f.print)(a)}`})},a.func=function(){return(0,d.define)("func",(e=>"function"==typeof e||`Expected a function, but received: ${(0,f.print)(e)}`))},a.instance=function(e){return(0,d.define)("instance",(a=>a instanceof e||`Expected a \`${e.name}\` instance, but received: ${(0,f.print)(a)}`))},a.integer=function(){return(0,d.define)("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${(0,f.print)(e)}`))},a.intersection=function(e){return new c.Struct({type:"intersection",schema:null,*entries(a,t){for(const{entries:c}of e)yield*c(a,t)},*validator(a,t){for(const{validator:c}of e)yield*c(a,t)},*refiner(a,t){for(const{refiner:c}of e)yield*c(a,t)}})},a.literal=function(e){const a=(0,f.print)(e),t=typeof e;return new c.Struct({type:"literal",schema:"string"===t||"number"===t||"boolean"===t?e:null,validator:t=>t===e||`Expected the literal \`${a}\`, but received: ${(0,f.print)(t)}`})},a.map=function(e,a){return new c.Struct({type:"map",schema:null,*entries(t){if(e&&a&&t instanceof Map)for(const[c,f]of t.entries())yield[c,c,e],yield[c,f,a]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${(0,f.print)(e)}`})},a.never=r,a.nullable=function(e){return new c.Struct({...e,validator:(a,t)=>null===a||e.validator(a,t),refiner:(a,t)=>null===a||e.refiner(a,t)})},a.number=function(){return(0,d.define)("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${(0,f.print)(e)}`))},a.object=function(e){const a=e?Object.keys(e):[],t=r();return new c.Struct({type:"object",schema:e??null,*entries(c){if(e&&(0,f.isObject)(c)){const f=new Set(Object.keys(c));for(const t of a)f.delete(t),yield[t,c[t],e[t]];for(const e of f)yield[e,c[e],t]}},validator:e=>(0,f.isObject)(e)||`Expected an object, but received: ${(0,f.print)(e)}`,coercer:e=>(0,f.isObject)(e)?{...e}:e})},a.optional=function(e){return new c.Struct({...e,validator:(a,t)=>void 0===a||e.validator(a,t),refiner:(a,t)=>void 0===a||e.refiner(a,t)})},a.record=function(e,a){return new c.Struct({type:"record",schema:null,*entries(t){if((0,f.isObject)(t))for(const c in t){const f=t[c];yield[c,c,e],yield[c,f,a]}},validator:e=>(0,f.isObject)(e)||`Expected an object, but received: ${(0,f.print)(e)}`})},a.regexp=function(){return(0,d.define)("regexp",(e=>e instanceof RegExp))},a.set=function(e){return new c.Struct({type:"set",schema:null,*entries(a){if(e&&a instanceof Set)for(const t of a)yield[t,t,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${(0,f.print)(e)}`})},a.string=function(){return(0,d.define)("string",(e=>"string"==typeof e||`Expected a string, but received: ${(0,f.print)(e)}`))},a.tuple=function(e){const a=r();return new c.Struct({type:"tuple",schema:null,*entries(t){if(Array.isArray(t)){const c=Math.max(e.length,t.length);for(let f=0;fArray.isArray(e)||`Expected an array, but received: ${(0,f.print)(e)}`})},a.type=function(e){const a=Object.keys(e);return new c.Struct({type:"type",schema:e,*entries(t){if((0,f.isObject)(t))for(const c of a)yield[c,t[c],e[c]]},validator:e=>(0,f.isObject)(e)||`Expected an object, but received: ${(0,f.print)(e)}`,coercer:e=>(0,f.isObject)(e)?{...e}:e})},a.union=function(e){const a=e.map((e=>e.type)).join(" | ");return new c.Struct({type:"union",schema:null,coercer(a){for(const t of e){const[e,c]=t.validate(a,{coerce:!0});if(!e)return c}return a},validator(t,c){const d=[];for(const a of e){const[...e]=(0,f.run)(t,a,c),[r]=e;if(!r?.[0])return[];for(const[a]of e)a&&d.push(a)}return[`Expected the value to satisfy a union of \`${a}\`, but received: ${(0,f.print)(t)}`,...d]}})},a.unknown=function(){return(0,d.define)("unknown",(()=>!0))}},65991:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.pick=a.partial=a.omit=a.lazy=a.dynamic=a.deprecated=a.define=a.assign=void 0;const c=t(99067),f=t(67792);a.assign=function(...e){const a="type"===e[0]?.type,t=e.map((({schema:e})=>e)),c=Object.assign({},...t);return a?(0,f.type)(c):(0,f.object)(c)},a.define=function(e,a){return new c.Struct({type:e,schema:null,validator:a})},a.deprecated=function(e,a){return new c.Struct({...e,refiner:(a,t)=>void 0===a||e.refiner(a,t),validator:(t,c)=>void 0===t||(a(t,c),e.validator(t,c))})},a.dynamic=function(e){return new c.Struct({type:"dynamic",schema:null,*entries(a,t){const c=e(a,t);yield*c.entries(a,t)},validator:(a,t)=>e(a,t).validator(a,t),coercer:(a,t)=>e(a,t).coercer(a,t),refiner:(a,t)=>e(a,t).refiner(a,t)})},a.lazy=function(e){let a;return new c.Struct({type:"lazy",schema:null,*entries(t,c){a??(a=e()),yield*a.entries(t,c)},validator:(t,c)=>(a??(a=e()),a.validator(t,c)),coercer:(t,c)=>(a??(a=e()),a.coercer(t,c)),refiner:(t,c)=>(a??(a=e()),a.refiner(t,c))})},a.omit=function(e,a){const{schema:t}=e,c={...t};for(const e of a)delete c[e];return"type"===e.type?(0,f.type)(c):(0,f.object)(c)},a.partial=function(e){const a=e instanceof c.Struct,t=a?{...e.schema}:{...e};for(const e in t)t[e]=(0,f.optional)(t[e]);return a&&"type"===e.type?(0,f.type)(t):(0,f.object)(t)},a.pick=function(e,a){const{schema:t}=e,c={};for(const e of a)c[e]=t[e];return"type"===e.type?(0,f.type)(c):(0,f.object)(c)}},70639:(e,a)=>{"use strict";function t(e){return"object"==typeof e&&null!==e}function c(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function f(e,a,t,f){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:d,branch:r}=a,{type:n}=t,{refinement:i,message:b=`Expected a value of type \`${n}\`${i?` with refinement \`${i}\``:""}, but received: \`${c(f)}\``}=e;return{value:f,type:n,refinement:i,key:d[d.length-1],path:d,branch:r,...e,message:b}}Object.defineProperty(a,"__esModule",{value:!0}),a.run=a.toFailures=a.toFailure=a.shiftIterator=a.print=a.isPlainObject=a.isObject=void 0,a.isObject=t,a.isPlainObject=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const a=Object.getPrototypeOf(e);return null===a||a===Object.prototype},a.print=c,a.shiftIterator=function(e){const{done:a,value:t}=e.next();return a?void 0:t},a.toFailure=f,a.toFailures=function*(e,a,c,d){(function(e){return t(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const t of e){const e=f(t,a,c,d);e&&(yield e)}},a.run=function*e(a,c,f={}){const{path:d=[],branch:r=[a],coerce:n=!1,mask:i=!1}=f,b={path:d,branch:r};if(n&&(a=c.coercer(a,b),i&&"type"!==c.type&&t(c.schema)&&t(a)&&!Array.isArray(a)))for(const e in a)void 0===c.schema[e]&&delete a[e];let o="valid";for(const e of c.validator(a,b))e.explanation=f.message,o="not_valid",yield[e,void 0];for(let[s,l,u]of c.entries(a,b)){const c=e(l,u,{path:void 0===s?d:[...d,s],branch:void 0===s?r:[...r,l],coerce:n,mask:i,message:f.message});for(const e of c)e[0]?(o=null===e[0].refinement||void 0===e[0].refinement?"not_valid":"not_refined",yield[e[0],void 0]):n&&(l=e[1],void 0===s?a=l:a instanceof Map?a.set(s,l):a instanceof Set?a.add(l):t(a)&&(void 0!==l||s in a)&&(a[s]=l))}if("not_valid"!==o)for(const e of c.refiner(a,b))e.explanation=f.message,o="not_refined",yield[e,void 0];"valid"===o&&(yield[void 0,a])}},22011:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.assertExhaustive=a.assertStruct=a.assert=a.AssertionError=void 0;const c=t(35620),f=t(75940);function d(e,a){return t=e,Boolean("string"==typeof t?.prototype?.constructor?.name)?new e({message:a}):e({message:a});var t}class r extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}a.AssertionError=r,a.assert=function(e,a="Assertion failed.",t=r){if(!e){if(a instanceof Error)throw a;throw d(t,a)}},a.assertStruct=function(e,a,t="Assertion failed",n=r){try{(0,c.assert)(e,a)}catch(e){throw d(n,`${t}: ${function(e){return(0,f.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},a.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},20472:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.base64=void 0;const c=t(35620),f=t(22011);a.base64=(e,a={})=>{const t=a.paddingRequired??!1,d=a.characterSet??"base64";let r,n;return"base64"===d?r=String.raw`[A-Za-z0-9+\/]`:((0,f.assert)("base64url"===d),r=String.raw`[-_A-Za-z0-9]`),n=t?new RegExp(`^(?:${r}{4})*(?:${r}{3}=|${r}{2}==)?$`,"u"):new RegExp(`^(?:${r}{4})*(?:${r}{2,3}|${r}{3}=|${r}{2}==)?$`,"u"),(0,c.pattern)(e,n)}},77862:(e,a,t)=>{"use strict";var c=t(48287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.createDataView=a.concatBytes=a.valueToBytes=a.base64ToBytes=a.stringToBytes=a.numberToBytes=a.signedBigIntToBytes=a.bigIntToBytes=a.hexToBytes=a.bytesToBase64=a.bytesToString=a.bytesToNumber=a.bytesToSignedBigInt=a.bytesToBigInt=a.bytesToHex=a.assertIsBytes=a.isBytes=void 0;const f=t(63203),d=t(22011),r=t(93976),n=function(){const e=[];return()=>{if(0===e.length)for(let a=0;a<256;a++)e.push(a.toString(16).padStart(2,"0"));return e}}();function i(e){return e instanceof Uint8Array}function b(e){(0,d.assert)(i(e),"Value must be a Uint8Array.")}function o(e){if(b(e),0===e.length)return"0x";const a=n(),t=new Array(e.length);for(let c=0;c=BigInt(0),"Value must be a non-negative bigint."),l(e.toString(16))}function h(e){return(0,d.assert)("number"==typeof e,"Value must be a number."),(0,d.assert)(e>=0,"Value must be a non-negative number."),(0,d.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),l(e.toString(16))}function p(e){return(0,d.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function g(e){if("bigint"==typeof e)return u(e);if("number"==typeof e)return h(e);if("string"==typeof e)return e.startsWith("0x")?l(e):p(e);if(i(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}a.isBytes=i,a.assertIsBytes=b,a.bytesToHex=o,a.bytesToBigInt=s,a.bytesToSignedBigInt=function(e){b(e);let a=BigInt(0);for(const t of e)a=(a<0,"Byte length must be greater than 0."),(0,d.assert)(function(e,a){(0,d.assert)(a>0);const t=e>>BigInt(31);return!((~e&t)+(e&~t)>>BigInt(8*a-1))}(e,a),"Byte length is too small to represent the given value.");let t=e;const c=new Uint8Array(a);for(let e=0;e>=BigInt(8);return c.reverse()},a.numberToBytes=h,a.stringToBytes=p,a.base64ToBytes=function(e){return(0,d.assert)("string"==typeof e,"Value must be a string."),f.base64.decode(e)},a.valueToBytes=g,a.concatBytes=function(e){const a=new Array(e.length);let t=0;for(let c=0;c{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.toCaipChainId=a.parseCaipAccountId=a.parseCaipChainId=a.isCaipAccountAddress=a.isCaipAccountId=a.isCaipReference=a.isCaipNamespace=a.isCaipChainId=a.KnownCaipNamespace=a.CaipAccountAddressStruct=a.CaipAccountIdStruct=a.CaipReferenceStruct=a.CaipNamespaceStruct=a.CaipChainIdStruct=a.CAIP_ACCOUNT_ADDRESS_REGEX=a.CAIP_ACCOUNT_ID_REGEX=a.CAIP_REFERENCE_REGEX=a.CAIP_NAMESPACE_REGEX=a.CAIP_CHAIN_ID_REGEX=void 0;const c=t(35620);function f(e){return(0,c.is)(e,a.CaipNamespaceStruct)}function d(e){return(0,c.is)(e,a.CaipReferenceStruct)}var r;a.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,a.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,a.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,a.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,a.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,a.CaipChainIdStruct=(0,c.pattern)((0,c.string)(),a.CAIP_CHAIN_ID_REGEX),a.CaipNamespaceStruct=(0,c.pattern)((0,c.string)(),a.CAIP_NAMESPACE_REGEX),a.CaipReferenceStruct=(0,c.pattern)((0,c.string)(),a.CAIP_REFERENCE_REGEX),a.CaipAccountIdStruct=(0,c.pattern)((0,c.string)(),a.CAIP_ACCOUNT_ID_REGEX),a.CaipAccountAddressStruct=(0,c.pattern)((0,c.string)(),a.CAIP_ACCOUNT_ADDRESS_REGEX),(r=a.KnownCaipNamespace||(a.KnownCaipNamespace={})).Eip155="eip155",r.Wallet="wallet",a.isCaipChainId=function(e){return(0,c.is)(e,a.CaipChainIdStruct)},a.isCaipNamespace=f,a.isCaipReference=d,a.isCaipAccountId=function(e){return(0,c.is)(e,a.CaipAccountIdStruct)},a.isCaipAccountAddress=function(e){return(0,c.is)(e,a.CaipAccountAddressStruct)},a.parseCaipChainId=function(e){const t=a.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},a.parseCaipAccountId=function(e){const t=a.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},a.toCaipChainId=function(e,t){if(!f(e))throw new Error(`Invalid "namespace", must match: ${a.CAIP_NAMESPACE_REGEX.toString()}`);if(!d(t))throw new Error(`Invalid "reference", must match: ${a.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}},98860:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ChecksumStruct=void 0;const c=t(35620),f=t(20472);a.ChecksumStruct=(0,c.size)((0,f.base64)((0,c.string)(),{paddingRequired:!0}),44,44)},65211:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createHex=a.createBytes=a.createBigInt=a.createNumber=void 0;const c=t(35620),f=t(22011),d=t(77862),r=t(93976),n=(0,c.union)([(0,c.number)(),(0,c.bigint)(),(0,c.string)(),r.StrictHexStruct]),i=(0,c.coerce)((0,c.number)(),n,Number),b=(0,c.coerce)((0,c.bigint)(),n,BigInt),o=((0,c.union)([r.StrictHexStruct,(0,c.instance)(Uint8Array)]),(0,c.coerce)((0,c.instance)(Uint8Array),(0,c.union)([r.StrictHexStruct]),d.hexToBytes)),s=(0,c.coerce)(r.StrictHexStruct,(0,c.instance)(Uint8Array),d.bytesToHex);a.createNumber=function(e){try{const a=(0,c.create)(e,i);return(0,f.assert)(Number.isFinite(a),`Expected a number-like value, got "${e}".`),a}catch(a){if(a instanceof c.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw a}},a.createBigInt=function(e){try{return(0,c.create)(e,b)}catch(e){if(e instanceof c.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},a.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,c.create)(e,o)}catch(e){if(e instanceof c.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},a.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,c.create)(e,s)}catch(e){if(e instanceof c.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},44180:function(e,a){"use strict";var t,c,f=this&&this.__classPrivateFieldGet||function(e,a,t,c){if("a"===t&&!c)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof a?e!==a||!c:!a.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?c:"a"===t?c.call(e):c?c.value:a.get(e)},d=this&&this.__classPrivateFieldSet||function(e,a,t,c,f){if("m"===c)throw new TypeError("Private method is not writable");if("a"===c&&!f)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof a?e!==a||!f:!a.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===c?f.call(e,t):f?f.value=t:a.set(e,t),t};Object.defineProperty(a,"__esModule",{value:!0}),a.FrozenSet=a.FrozenMap=void 0;class r{get size(){return f(this,t,"f").size}[(t=new WeakMap,Symbol.iterator)](){return f(this,t,"f")[Symbol.iterator]()}constructor(e){t.set(this,void 0),d(this,t,new Map(e),"f"),Object.freeze(this)}entries(){return f(this,t,"f").entries()}forEach(e,a){return f(this,t,"f").forEach(((t,c,f)=>e.call(a,t,c,this)))}get(e){return f(this,t,"f").get(e)}has(e){return f(this,t,"f").has(e)}keys(){return f(this,t,"f").keys()}values(){return f(this,t,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,a])=>`${String(e)} => ${String(a)}`)).join(", ")} `:""}}`}}a.FrozenMap=r;class n{get size(){return f(this,c,"f").size}[(c=new WeakMap,Symbol.iterator)](){return f(this,c,"f")[Symbol.iterator]()}constructor(e){c.set(this,void 0),d(this,c,new Set(e),"f"),Object.freeze(this)}entries(){return f(this,c,"f").entries()}forEach(e,a){return f(this,c,"f").forEach(((t,c,f)=>e.call(a,t,c,this)))}has(e){return f(this,c,"f").has(e)}keys(){return f(this,c,"f").keys()}values(){return f(this,c,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}a.FrozenSet=n,Object.freeze(r),Object.freeze(r.prototype),Object.freeze(n),Object.freeze(n.prototype)},91630:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0})},75940:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.wrapError=a.getErrorMessage=a.isErrorWithStack=a.isErrorWithMessage=a.isErrorWithCode=void 0;const c=t(71843),f=t(33745);function d(e){return"object"==typeof e&&null!==e&&"code"in e}function r(e){return"object"==typeof e&&null!==e&&"message"in e}a.isErrorWithCode=d,a.isErrorWithMessage=r,a.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},a.getErrorMessage=function(e){return r(e)&&"string"==typeof e.message?e.message:(0,f.isNullOrUndefined)(e)?"":String(e)},a.wrapError=function(e,a){if((t=e)instanceof Error||(0,f.isObject)(t)&&"Error"===t.constructor.name){let t;return t=2===Error.length?new Error(a,{cause:e}):new c.ErrorWithCause(a,{cause:e}),d(e)&&(t.code=e.code),t}var t;return a.length>0?new Error(`${String(e)}: ${a}`):new Error(String(e))}},93976:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.remove0x=a.add0x=a.isValidChecksumAddress=a.getChecksumAddress=a.isValidHexAddress=a.assertIsStrictHexString=a.assertIsHexString=a.isStrictHexString=a.isHexString=a.HexChecksumAddressStruct=a.HexAddressStruct=a.StrictHexStruct=a.HexStruct=void 0;const c=t(35620),f=t(2214),d=t(22011),r=t(77862);function n(e){return(0,c.is)(e,a.HexStruct)}function i(e){return(0,c.is)(e,a.StrictHexStruct)}function b(e){(0,d.assert)((0,c.is)(e,a.HexChecksumAddressStruct),"Invalid hex address.");const t=s(e.toLowerCase()),n=s((0,r.bytesToHex)((0,f.keccak_256)(t)));return`0x${t.split("").map(((e,a)=>{const t=n[a];return(0,d.assert)((0,c.is)(t,(0,c.string)()),"Hash shorter than address."),parseInt(t,16)>7?e.toUpperCase():e})).join("")}`}function o(e){return!!(0,c.is)(e,a.HexChecksumAddressStruct)&&b(e)===e}function s(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}a.HexStruct=(0,c.pattern)((0,c.string)(),/^(?:0x)?[0-9a-f]+$/iu),a.StrictHexStruct=(0,c.pattern)((0,c.string)(),/^0x[0-9a-f]+$/iu),a.HexAddressStruct=(0,c.pattern)((0,c.string)(),/^0x[0-9a-f]{40}$/u),a.HexChecksumAddressStruct=(0,c.pattern)((0,c.string)(),/^0x[0-9a-fA-F]{40}$/u),a.isHexString=n,a.isStrictHexString=i,a.assertIsHexString=function(e){(0,d.assert)(n(e),"Value must be a hexadecimal string.")},a.assertIsStrictHexString=function(e){(0,d.assert)(i(e),'Value must be a hexadecimal string, starting with "0x".')},a.isValidHexAddress=function(e){return(0,c.is)(e,a.HexAddressStruct)||o(e)},a.getChecksumAddress=b,a.isValidChecksumAddress=o,a.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},a.remove0x=s},52367:function(e,a,t){"use strict";var c=this&&this.__createBinding||(Object.create?function(e,a,t,c){void 0===c&&(c=t);var f=Object.getOwnPropertyDescriptor(a,t);f&&!("get"in f?!a.__esModule:f.writable||f.configurable)||(f={enumerable:!0,get:function(){return a[t]}}),Object.defineProperty(e,c,f)}:function(e,a,t,c){void 0===c&&(c=t),e[c]=a[t]}),f=this&&this.__exportStar||function(e,a){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(a,t)||c(a,e,t)};Object.defineProperty(a,"__esModule",{value:!0}),f(t(22011),a),f(t(20472),a),f(t(77862),a),f(t(87690),a),f(t(98860),a),f(t(65211),a),f(t(44180),a),f(t(91630),a),f(t(75940),a),f(t(93976),a),f(t(60087),a),f(t(24956),a),f(t(98912),a),f(t(33745),a),f(t(5770),a),f(t(3028),a),f(t(2812),a),f(t(32954),a),f(t(16871),a),f(t(49266),a)},60087:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getJsonRpcIdValidator=a.assertIsJsonRpcError=a.isJsonRpcError=a.assertIsJsonRpcFailure=a.isJsonRpcFailure=a.assertIsJsonRpcSuccess=a.isJsonRpcSuccess=a.assertIsJsonRpcResponse=a.isJsonRpcResponse=a.assertIsPendingJsonRpcResponse=a.isPendingJsonRpcResponse=a.JsonRpcResponseStruct=a.JsonRpcFailureStruct=a.JsonRpcSuccessStruct=a.PendingJsonRpcResponseStruct=a.assertIsJsonRpcRequest=a.isJsonRpcRequest=a.assertIsJsonRpcNotification=a.isJsonRpcNotification=a.JsonRpcNotificationStruct=a.JsonRpcRequestStruct=a.JsonRpcParamsStruct=a.JsonRpcErrorStruct=a.JsonRpcIdStruct=a.JsonRpcVersionStruct=a.jsonrpc2=a.getJsonSize=a.getSafeJson=a.isValidJson=a.JsonStruct=a.UnsafeJsonStruct=a.exactOptional=a.object=void 0;const c=t(35620),f=t(22011),d=t(33745);function r({path:e,branch:a}){const t=e[e.length-1];return(0,d.hasProperty)(a[a.length-2],t)}function n(e){return new c.Struct({...e,type:`optional ${e.type}`,validator:(a,t)=>!r(t)||e.validator(a,t),refiner:(a,t)=>!r(t)||e.refiner(a,t)})}function i(e){return(0,c.create)(e,a.JsonStruct)}a.object=e=>(0,c.object)(e),a.exactOptional=n,a.UnsafeJsonStruct=(0,c.union)([(0,c.literal)(null),(0,c.boolean)(),(0,c.define)("finite number",(e=>(0,c.is)(e,(0,c.number)())&&Number.isFinite(e))),(0,c.string)(),(0,c.array)((0,c.lazy)((()=>a.UnsafeJsonStruct))),(0,c.record)((0,c.string)(),(0,c.lazy)((()=>a.UnsafeJsonStruct)))]),a.JsonStruct=(0,c.coerce)(a.UnsafeJsonStruct,(0,c.any)(),(e=>((0,f.assertStruct)(e,a.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,a)=>{if("__proto__"!==e&&"constructor"!==e)return a})))))),a.isValidJson=function(e){try{return i(e),!0}catch{return!1}},a.getSafeJson=i,a.getJsonSize=function(e){(0,f.assertStruct)(e,a.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},a.jsonrpc2="2.0",a.JsonRpcVersionStruct=(0,c.literal)(a.jsonrpc2),a.JsonRpcIdStruct=(0,c.nullable)((0,c.union)([(0,c.number)(),(0,c.string)()])),a.JsonRpcErrorStruct=(0,a.object)({code:(0,c.integer)(),message:(0,c.string)(),data:n(a.JsonStruct),stack:n((0,c.string)())}),a.JsonRpcParamsStruct=(0,c.union)([(0,c.record)((0,c.string)(),a.JsonStruct),(0,c.array)(a.JsonStruct)]),a.JsonRpcRequestStruct=(0,a.object)({id:a.JsonRpcIdStruct,jsonrpc:a.JsonRpcVersionStruct,method:(0,c.string)(),params:n(a.JsonRpcParamsStruct)}),a.JsonRpcNotificationStruct=(0,a.object)({jsonrpc:a.JsonRpcVersionStruct,method:(0,c.string)(),params:n(a.JsonRpcParamsStruct)}),a.isJsonRpcNotification=function(e){return(0,c.is)(e,a.JsonRpcNotificationStruct)},a.assertIsJsonRpcNotification=function(e,t){(0,f.assertStruct)(e,a.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},a.isJsonRpcRequest=function(e){return(0,c.is)(e,a.JsonRpcRequestStruct)},a.assertIsJsonRpcRequest=function(e,t){(0,f.assertStruct)(e,a.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},a.PendingJsonRpcResponseStruct=(0,c.object)({id:a.JsonRpcIdStruct,jsonrpc:a.JsonRpcVersionStruct,result:(0,c.optional)((0,c.unknown)()),error:(0,c.optional)(a.JsonRpcErrorStruct)}),a.JsonRpcSuccessStruct=(0,a.object)({id:a.JsonRpcIdStruct,jsonrpc:a.JsonRpcVersionStruct,result:a.JsonStruct}),a.JsonRpcFailureStruct=(0,a.object)({id:a.JsonRpcIdStruct,jsonrpc:a.JsonRpcVersionStruct,error:a.JsonRpcErrorStruct}),a.JsonRpcResponseStruct=(0,c.union)([a.JsonRpcSuccessStruct,a.JsonRpcFailureStruct]),a.isPendingJsonRpcResponse=function(e){return(0,c.is)(e,a.PendingJsonRpcResponseStruct)},a.assertIsPendingJsonRpcResponse=function(e,t){(0,f.assertStruct)(e,a.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},a.isJsonRpcResponse=function(e){return(0,c.is)(e,a.JsonRpcResponseStruct)},a.assertIsJsonRpcResponse=function(e,t){(0,f.assertStruct)(e,a.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},a.isJsonRpcSuccess=function(e){return(0,c.is)(e,a.JsonRpcSuccessStruct)},a.assertIsJsonRpcSuccess=function(e,t){(0,f.assertStruct)(e,a.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},a.isJsonRpcFailure=function(e){return(0,c.is)(e,a.JsonRpcFailureStruct)},a.assertIsJsonRpcFailure=function(e,t){(0,f.assertStruct)(e,a.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},a.isJsonRpcError=function(e){return(0,c.is)(e,a.JsonRpcErrorStruct)},a.assertIsJsonRpcError=function(e,t){(0,f.assertStruct)(e,a.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},a.getJsonRpcIdValidator=function(e){const{permitEmptyString:a,permitFractions:t,permitNull:c}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(t||Number.isInteger(e))||"string"==typeof e&&(a||e.length>0)||c&&null===e)}},24956:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0})},98912:function(e,a,t){"use strict";var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.createModuleLogger=a.createProjectLogger=void 0;const f=(0,c(t(17833)).default)("metamask");a.createProjectLogger=function(e){return f.extend(e)},a.createModuleLogger=function(e,a){return e.extend(a)}},33745:(e,a)=>{"use strict";function t(e){return e.charCodeAt(0)<=127}var c;Object.defineProperty(a,"__esModule",{value:!0}),a.calculateNumberSize=a.calculateStringSize=a.isASCII=a.isPlainObject=a.ESCAPE_CHARACTERS_REGEXP=a.JsonSize=a.getKnownPropertyNames=a.hasProperty=a.isObject=a.isNullOrUndefined=a.isNonEmptyArray=void 0,a.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},a.isNullOrUndefined=function(e){return null==e},a.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},a.hasProperty=(e,a)=>Object.hasOwnProperty.call(e,a),a.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},(c=a.JsonSize||(a.JsonSize={}))[c.Null=4]="Null",c[c.Comma=1]="Comma",c[c.Wrapper=1]="Wrapper",c[c.True=4]="True",c[c.False=5]="False",c[c.Quote=1]="Quote",c[c.Colon=1]="Colon",c[c.Date=24]="Date",a.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,a.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let a=e;for(;null!==Object.getPrototypeOf(a);)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(e)===a}catch(e){return!1}},a.isASCII=t,a.calculateStringSize=function(e){return e.split("").reduce(((e,a)=>t(a)?e+1:e+2),0)+(e.match(a.ESCAPE_CHARACTERS_REGEXP)??[]).length},a.calculateNumberSize=function(e){return e.toString().length}},5770:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.hexToBigInt=a.hexToNumber=a.bigIntToHex=a.numberToHex=void 0;const c=t(22011),f=t(93976);a.numberToHex=e=>((0,c.assert)("number"==typeof e,"Value must be a number."),(0,c.assert)(e>=0,"Value must be a non-negative number."),(0,c.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,f.add0x)(e.toString(16))),a.bigIntToHex=e=>((0,c.assert)("bigint"==typeof e,"Value must be a bigint."),(0,c.assert)(e>=0,"Value must be a non-negative bigint."),(0,f.add0x)(e.toString(16))),a.hexToNumber=e=>{(0,f.assertIsHexString)(e);const a=parseInt(e,16);return(0,c.assert)(Number.isSafeInteger(a),"Value is not a safe integer. Use `hexToBigInt` instead."),a},a.hexToBigInt=e=>((0,f.assertIsHexString)(e),BigInt((0,f.add0x)(e)))},3028:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0})},2812:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createDeferredPromise=void 0,a.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let a,t;const c=new Promise(((e,c)=>{a=e,t=c}));return e&&c.catch((e=>{})),{promise:c,resolve:a,reject:t}}},32954:(e,a)=>{"use strict";var t;Object.defineProperty(a,"__esModule",{value:!0}),a.timeSince=a.inMilliseconds=a.Duration=void 0,(t=a.Duration||(a.Duration={}))[t.Millisecond=1]="Millisecond",t[t.Second=1e3]="Second",t[t.Minute=6e4]="Minute",t[t.Hour=36e5]="Hour",t[t.Day=864e5]="Day",t[t.Week=6048e5]="Week",t[t.Year=31536e6]="Year";const c=(e,a)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${a}" must be a non-negative integer. Received: "${e}".`)};a.inMilliseconds=function(e,a){return c(e,"count"),e*a},a.timeSince=function(e){return c(e,"timestamp"),Date.now()-e}},16871:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0})},49266:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.satisfiesVersionRange=a.gtRange=a.gtVersion=a.assertIsSemVerRange=a.assertIsSemVerVersion=a.isValidSemVerRange=a.isValidSemVerVersion=a.VersionRangeStruct=a.VersionStruct=void 0;const c=t(35620),f=t(99589),d=t(22011);a.VersionStruct=(0,c.refine)((0,c.string)(),"Version",(e=>null!==(0,f.valid)(e)||`Expected SemVer version, got "${e}"`)),a.VersionRangeStruct=(0,c.refine)((0,c.string)(),"Version range",(e=>null!==(0,f.validRange)(e)||`Expected SemVer range, got "${e}"`)),a.isValidSemVerVersion=function(e){return(0,c.is)(e,a.VersionStruct)},a.isValidSemVerRange=function(e){return(0,c.is)(e,a.VersionRangeStruct)},a.assertIsSemVerVersion=function(e){(0,d.assertStruct)(e,a.VersionStruct)},a.assertIsSemVerRange=function(e){(0,d.assertStruct)(e,a.VersionRangeStruct)},a.gtVersion=function(e,a){return(0,f.gt)(e,a)},a.gtRange=function(e,a){return(0,f.gtr)(e,a)},a.satisfiesVersionRange=function(e,a){return(0,f.satisfies)(e,a,{includePrerelease:!0})}},39209:(e,a,t)=>{"use strict";var c=t(76578),f="undefined"==typeof globalThis?t.g:globalThis;e.exports=function(){for(var e=[],a=0;a{"use strict";const{normalizeIPv6:c,normalizeIPv4:f,removeDotSegments:d,recomposeAuthority:r,normalizeComponentEncoding:n}=t(34834),i=t(343);function b(e,a,t,c){const f={};return c||(e=u(o(e,t),t),a=u(o(a,t),t)),!(t=t||{}).tolerant&&a.scheme?(f.scheme=a.scheme,f.userinfo=a.userinfo,f.host=a.host,f.port=a.port,f.path=d(a.path||""),f.query=a.query):(void 0!==a.userinfo||void 0!==a.host||void 0!==a.port?(f.userinfo=a.userinfo,f.host=a.host,f.port=a.port,f.path=d(a.path||""),f.query=a.query):(a.path?("/"===a.path.charAt(0)?f.path=d(a.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?f.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+a.path:f.path=a.path:f.path="/"+a.path,f.path=d(f.path)),f.query=a.query):(f.path=e.path,void 0!==a.query?f.query=a.query:f.query=e.query),f.userinfo=e.userinfo,f.host=e.host,f.port=e.port),f.scheme=e.scheme),f.fragment=a.fragment,f}function o(e,a){const t={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},c=Object.assign({},a),f=[],n=i[(c.scheme||t.scheme||"").toLowerCase()];n&&n.serialize&&n.serialize(t,c),void 0!==t.path&&(c.skipEscape?t.path=unescape(t.path):(t.path=escape(t.path),void 0!==t.scheme&&(t.path=t.path.split("%3A").join(":")))),"suffix"!==c.reference&&t.scheme&&(f.push(t.scheme),f.push(":"));const b=r(t,c);if(void 0!==b&&("suffix"!==c.reference&&f.push("//"),f.push(b),t.path&&"/"!==t.path.charAt(0)&&f.push("/")),void 0!==t.path){let e=t.path;c.absolutePath||n&&n.absolutePath||(e=d(e)),void 0===b&&(e=e.replace(/^\/\//u,"/%2F")),f.push(e)}return void 0!==t.query&&(f.push("?"),f.push(t.query)),void 0!==t.fragment&&(f.push("#"),f.push(t.fragment)),f.join("")}const s=Array.from({length:127},((e,a)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(a)))),l=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function u(e,a){const t=Object.assign({},a),d={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=-1!==e.indexOf("%");let n=!1;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);const b=e.match(l);if(b){if(d.scheme=b[1],d.userinfo=b[3],d.host=b[4],d.port=parseInt(b[5],10),d.path=b[6]||"",d.query=b[7],d.fragment=b[8],isNaN(d.port)&&(d.port=b[5]),d.host){const e=f(d.host);if(!1===e.isIPV4){const a=c(e.host,{isIPV4:!1});d.host=a.host.toLowerCase(),n=a.isIPV6}else d.host=e.host,n=!0}void 0!==d.scheme||void 0!==d.userinfo||void 0!==d.host||void 0!==d.port||d.path||void 0!==d.query?void 0===d.scheme?d.reference="relative":void 0===d.fragment?d.reference="absolute":d.reference="uri":d.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==d.reference&&(d.error=d.error||"URI is not a "+t.reference+" reference.");const e=i[(t.scheme||d.scheme||"").toLowerCase()];if(!(t.unicodeSupport||e&&e.unicodeSupport)&&d.host&&(t.domainHost||e&&e.domainHost)&&!1===n&&function(e){let a=0;for(let t=0,c=e.length;t126||s[a])return!0;return!1}(d.host))try{d.host=URL.domainToASCII(d.host.toLowerCase())}catch(e){d.error=d.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(r&&void 0!==d.scheme&&(d.scheme=unescape(d.scheme)),r&&void 0!==d.userinfo&&(d.userinfo=unescape(d.userinfo)),r&&void 0!==d.host&&(d.host=unescape(d.host)),void 0!==d.path&&d.path.length&&(d.path=escape(unescape(d.path))),void 0!==d.fragment&&d.fragment.length&&(d.fragment=encodeURI(decodeURIComponent(d.fragment)))),e&&e.parse&&e.parse(d,t)}else d.error=d.error||"URI can not be parsed.";return d}const h={SCHEMES:i,normalize:function(e,a){return"string"==typeof e?e=o(u(e,a),a):"object"==typeof e&&(e=u(o(e,a),a)),e},resolve:function(e,a,t){const c=Object.assign({scheme:"null"},t);return o(b(u(e,c),u(a,c),c,!0),{...c,skipEscape:!0})},resolveComponents:b,equal:function(e,a,t){return"string"==typeof e?(e=unescape(e),e=o(n(u(e,t),!0),{...t,skipEscape:!0})):"object"==typeof e&&(e=o(n(e,!0),{...t,skipEscape:!0})),"string"==typeof a?(a=unescape(a),a=o(n(u(a,t),!0),{...t,skipEscape:!0})):"object"==typeof a&&(a=o(n(a,!0),{...t,skipEscape:!0})),e.toLowerCase()===a.toLowerCase()},serialize:o,parse:u};e.exports=h,e.exports.default=h,e.exports.fastUri=h},343:e=>{"use strict";const a=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function c(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function f(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function d(e){const a="https"===String(e.scheme).toLowerCase();return e.port!==(a?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const r={scheme:"http",domainHost:!0,parse:f,serialize:d},n={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=c(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(c(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[a,t]=e.resourceName.split("?");e.path=a&&"/"!==a?a:void 0,e.query=t,e.resourceName=void 0}return e.fragment=void 0,e}},i={http:r,https:{scheme:"https",domainHost:r.domainHost,parse:f,serialize:d},ws:n,wss:{scheme:"wss",domainHost:n.domainHost,parse:n.parse,serialize:n.serialize},urn:{scheme:"urn",parse:function(e,a){if(!e.path)return e.error="URN can not be parsed",e;const c=e.path.match(t);if(c){const t=a.scheme||e.scheme||"urn";e.nid=c[1].toLowerCase(),e.nss=c[2];const f=`${t}:${a.nid||e.nid}`,d=i[f];e.path=void 0,d&&(e=d.parse(e,a))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,a){const t=a.scheme||e.scheme||"urn",c=e.nid.toLowerCase(),f=`${t}:${a.nid||c}`,d=i[f];d&&(e=d.serialize(e,a));const r=e,n=e.nss;return r.path=`${c||a.nid}:${n}`,a.skipEscape=!0,r},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){const c=e;return c.uuid=c.nss,c.nss=void 0,t.tolerant||c.uuid&&a.test(c.uuid)||(c.error=c.error||"UUID is not valid."),c},serialize:function(e){const a=e;return a.nss=(e.uuid||"").toLowerCase(),a},skipNormalize:!0}};e.exports=i},64914:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},34834:(e,a,t)=>{"use strict";const{HEX:c}=t(64914);function f(e){if(i(e,".")<3)return{host:e,isIPV4:!1};const a=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[t]=a;return t?{host:n(t,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function d(e,a=!1){let t="",f=!0;for(const a of e){if(void 0===c[a])return;"0"!==a&&!0===f&&(f=!1),f||(t+=a)}return a&&0===t.length&&(t="0"),t}function r(e,a={}){if(i(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let a=0;const t={error:!1,address:"",zone:""},c=[],f=[];let r=!1,n=!1,i=!1;function b(){if(f.length){if(!1===r){const e=d(f);if(void 0===e)return t.error=!0,!1;c.push(e)}f.length=0}return!0}for(let d=0;d7){t.error=!0;break}d-1>=0&&":"===e[d-1]&&(n=!0)}}return f.length&&(r?t.zone=f.join(""):i?c.push(f.join("")):c.push(d(f))),t.address=c.join(""),t}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,a=t.address;return t.zone&&(e+="%"+t.zone,a+="%25"+t.zone),{host:e,escapedHost:a,isIPV6:!0}}}function n(e,a){let t="",c=!0;const f=e.length;for(let d=0;d{"use strict";t.d(a,{HI:()=>Bt,vu:()=>ct});const c=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];function f(e,a){return a&&10!=a?16==a?"0x"==e.slice(0,2)?BigInt(e):BigInt("0x"+e):void 0:BigInt(e)}const d=f;function r(e){const a=e.toString(16);return 4*(a.length-1)+c[parseInt(a[0],16)]}function n(e){return BigInt(e)>BigInt(a)}const o=i,s=b;function l(e){return(BigInt(e)&BigInt(1))==BigInt(1)}function u(e){if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Number too big");return Number(e)}function h(e,a){return BigInt(e)+BigInt(a)}function p(e,a){return BigInt(e)-BigInt(a)}function g(e){return-BigInt(e)}function m(e,a){return BigInt(e)*BigInt(a)}function x(e,a){return BigInt(e)%BigInt(a)}function y(e,a){return BigInt(e)>BigInt(a)}function A(e,a){return BigInt(e)>=BigInt(a)}function v(e,a){return BigInt(e)&BigInt(a)}function w(e,a,t,c){const f="0000000"+t.toString(16),d=new Uint32Array(e.buffer,e.byteOffset+a,c/4),r=1+(4*(f.length-7)-1>>5);for(let e=0;ed[d.length-a-1]=e.toString(16).padStart(8,"0"))),f(d.join(""),16)}function I(e,a){return e.toString(a)}function E(e){const a=new Uint8Array(Math.floor((r(e)-1)/8)+1);return w(a,0,e,a.byteLength),a}const C=d(0),M=d(1);var B=Object.freeze({__proto__:null,abs:function(e){return BigInt(e)>=0?BigInt(e):-BigInt(e)},add:h,band:v,bitLength:r,bits:function(e){let a=BigInt(e);const t=[];for(;a;)a&BigInt(1)?t.push(1):t.push(0),a>>=BigInt(1);return t},bor:function(e,a){return BigInt(e)|BigInt(a)},bxor:function(e,a){return BigInt(e)^BigInt(a)},div:function(e,a){return BigInt(e)/BigInt(a)},e:d,eq:function(e,a){return BigInt(e)==BigInt(a)},exp:function(e,a){return BigInt(e)**BigInt(a)},fromArray:function(e,a){let t=BigInt(0);a=BigInt(a);for(let c=0;c>=BigInt(1)}return t},neg:g,neq:function(e,a){return BigInt(e)!=BigInt(a)},one:M,pow:function(e,a){return BigInt(e)**BigInt(a)},shiftLeft:i,shiftRight:b,shl:o,shr:s,square:function(e){return BigInt(e)*BigInt(e)},sub:p,toArray:function(e,a){const t=[];let c=BigInt(e);for(a=BigInt(a);c;)t.unshift(Number(c%a)),c/=a;return t},toLEBuff:E,toNumber:u,toRprBE:function(e,a,t,c){const f="0000000"+t.toString(16),d=new DataView(e.buffer,e.byteOffset+a,c),r=1+(4*(f.length-7)-1>>5);for(let e=0;e>=1;return t}function k(e,a,t,c,f){e[a]=e[a]+e[t]>>>0,e[f]=(e[f]^e[a])>>>0,e[f]=(e[f]<<16|e[f]>>>16&65535)>>>0,e[c]=e[c]+e[f]>>>0,e[t]=(e[t]^e[c])>>>0,e[t]=(e[t]<<12|e[t]>>>20&4095)>>>0,e[a]=e[a]+e[t]>>>0,e[f]=(e[f]^e[a])>>>0,e[f]=(e[f]<<8|e[f]>>>24&255)>>>0,e[c]=e[c]+e[f]>>>0,e[t]=(e[t]^e[c])>>>0,e[t]=(e[t]<<7|e[t]>>>25&127)>>>0}class N{constructor(e){e=e||[0,0,0,0,0,0,0,0],this.state=[1634760805,857760878,2036477234,1797285236,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],0,0,0,0],this.idx=16,this.buff=new Array(16)}nextU32(){return 16==this.idx&&this.update(),this.buff[this.idx++]}nextU64(){return h(m(this.nextU32(),4294967296),this.nextU32())}nextBool(){return!(1&~this.nextU32())}update(){for(let e=0;e<16;e++)this.buff[e]=this.state[e];for(let a=0;a<10;a++)k(e=this.buff,0,4,8,12),k(e,1,5,9,13),k(e,2,6,10,14),k(e,3,7,11,15),k(e,0,5,10,15),k(e,1,6,11,12),k(e,2,7,8,13),k(e,3,4,9,14);var e;for(let e=0;e<16;e++)this.buff[e]=this.buff[e]+this.state[e]>>>0;this.idx=0,this.state[12]=this.state[12]+1>>>0,0==this.state[12]&&(this.state[13]=this.state[13]+1>>>0,0==this.state[13]&&(this.state[14]=this.state[14]+1>>>0,0==this.state[14]&&(this.state[15]=this.state[15]+1>>>0)))}}let P=null;function R(){return P||(P=new N(function(){const e=function(e){let a=new Uint8Array(e);if(void 0!==globalThis.crypto)globalThis.crypto.getRandomValues(a);else for(let t=0;t>>0;return a}(32),a=new Uint32Array(e.buffer),t=[];for(let e=0;e<8;e++)t.push(a[e]);return t}()),P)}function O(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var D={bigInt2BytesLE:function(e,a){const t=Array(a);let c=BigInt(e);for(let e=0;e>=8n;return t},bigInt2U32LE:function(e,a){const t=Array(a);let c=BigInt(e);for(let e=0;e>=32n;return t},isOcamNum:function(e){return!!Array.isArray(e)&&3==e.length&&"number"==typeof e[0]&&"number"==typeof e[1]&&!!Array.isArray(e[2])}},T=function(e,a,t,c,f,d,r){const n=e.addFunction(a);n.addParam("base","i32"),n.addParam("scalar","i32"),n.addParam("scalarLength","i32"),n.addParam("r","i32"),n.addLocal("i","i32"),n.addLocal("b","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(t));n.addCode(i.if(i.i32_eqz(i.getLocal("scalarLength")),[...i.call(r,i.getLocal("r")),...i.ret([])])),n.addCode(i.call(d,i.getLocal("base"),b)),n.addCode(i.call(r,i.getLocal("r"))),n.addCode(i.setLocal("i",i.getLocal("scalarLength"))),n.addCode(i.block(i.loop(i.setLocal("i",i.i32_sub(i.getLocal("i"),i.i32_const(1))),i.setLocal("b",i.i32_load8_u(i.i32_add(i.getLocal("scalar"),i.getLocal("i")))),...function(){const e=[];for(let a=0;a<8;a++)e.push(...i.call(f,i.getLocal("r"),i.getLocal("r")),...i.if(i.i32_ge_u(i.getLocal("b"),i.i32_const(128>>a)),[...i.setLocal("b",i.i32_sub(i.getLocal("b"),i.i32_const(128>>a))),...i.call(c,i.getLocal("r"),b,i.getLocal("r"))]));return e}(),i.br_if(1,i.i32_eqz(i.getLocal("i"))),i.br(0))))},F=function(e,a){const t=8*e.modules[a].n64,c=e.addFunction(a+"_batchInverse");c.addParam("pIn","i32"),c.addParam("inStep","i32"),c.addParam("n","i32"),c.addParam("pOut","i32"),c.addParam("outStep","i32"),c.addLocal("itAux","i32"),c.addLocal("itIn","i32"),c.addLocal("itOut","i32"),c.addLocal("i","i32");const f=c.getCodeBuilder(),d=f.i32_const(e.alloc(t));c.addCode(f.setLocal("itAux",f.i32_load(f.i32_const(0))),f.i32_store(f.i32_const(0),f.i32_add(f.getLocal("itAux"),f.i32_mul(f.i32_add(f.getLocal("n"),f.i32_const(1)),f.i32_const(t))))),c.addCode(f.call(a+"_one",f.getLocal("itAux")),f.setLocal("itIn",f.getLocal("pIn")),f.setLocal("itAux",f.i32_add(f.getLocal("itAux"),f.i32_const(t))),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("n"))),f.if(f.call(a+"_isZero",f.getLocal("itIn")),f.call(a+"_copy",f.i32_sub(f.getLocal("itAux"),f.i32_const(t)),f.getLocal("itAux")),f.call(a+"_mul",f.getLocal("itIn"),f.i32_sub(f.getLocal("itAux"),f.i32_const(t)),f.getLocal("itAux"))),f.setLocal("itIn",f.i32_add(f.getLocal("itIn"),f.getLocal("inStep"))),f.setLocal("itAux",f.i32_add(f.getLocal("itAux"),f.i32_const(t))),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))),f.setLocal("itIn",f.i32_sub(f.getLocal("itIn"),f.getLocal("inStep"))),f.setLocal("itAux",f.i32_sub(f.getLocal("itAux"),f.i32_const(t))),f.setLocal("itOut",f.i32_add(f.getLocal("pOut"),f.i32_mul(f.i32_sub(f.getLocal("n"),f.i32_const(1)),f.getLocal("outStep")))),f.call(a+"_inverse",f.getLocal("itAux"),f.getLocal("itAux")),f.block(f.loop(f.br_if(1,f.i32_eqz(f.getLocal("i"))),f.if(f.call(a+"_isZero",f.getLocal("itIn")),[...f.call(a+"_copy",f.getLocal("itAux"),f.i32_sub(f.getLocal("itAux"),f.i32_const(t))),...f.call(a+"_zero",f.getLocal("itOut"))],[...f.call(a+"_copy",f.i32_sub(f.getLocal("itAux"),f.i32_const(t)),d),...f.call(a+"_mul",f.getLocal("itAux"),f.getLocal("itIn"),f.i32_sub(f.getLocal("itAux"),f.i32_const(t))),...f.call(a+"_mul",f.getLocal("itAux"),d,f.getLocal("itOut"))]),f.setLocal("itIn",f.i32_sub(f.getLocal("itIn"),f.getLocal("inStep"))),f.setLocal("itOut",f.i32_sub(f.getLocal("itOut"),f.getLocal("outStep"))),f.setLocal("itAux",f.i32_sub(f.getLocal("itAux"),f.i32_const(t))),f.setLocal("i",f.i32_sub(f.getLocal("i"),f.i32_const(1))),f.br(0)))),c.addCode(f.i32_store(f.i32_const(0),f.getLocal("itAux")))},Q=function(e,a,t,c,f,d){void 0===d&&(d=ca?1:-1}function H(e){return e*e}function $(e){return e%2n!==0n}function q(e){return e%2n===0n}function G(e){return e<0n}function z(e){return e>0n}function K(e){return G(e)?e.toString(2).length-1:e.toString(2).length}function V(e){return e<0n?-e:e}function Z(e){return 1n===V(e)}function J(e,a){for(var t,c,f,d=0n,r=1n,n=a,i=V(e);0n!==i;)t=n/i,c=d,f=n,d=r,n=i,r=c-t*r,i=f-t*i;if(!Z(n))throw new Error(e.toString()+" and "+a.toString()+" are not co-prime");return-1===j(d,0n)&&(d+=a),G(e)?-d:d}function W(e,a,t){if(0n===t)throw new Error("Cannot take modPow with modulus 0");var c=1n,f=e%t;for(G(a)&&(a*=-1n,f=J(f,t));z(a);){if(0n===f)return 0n;$(a)&&(c=c*f%t),a/=2n,f=H(f)%t}return c}function Y(e,a){return 0n!==a&&(!!Z(a)||(0===function(e,a){return(e=e>=0n?e:-e)===(a=a>=0n?a:-a)?0:e>a?1:-1}(a,2n)?q(e):e%a===0n))}function X(e,a){for(var t,c,f,d=function(e){return e-1n}(e),r=d,n=0;q(r);)r/=2n,n++;e:for(c=0;c>1&&c>1,e>>1)))),a.addCode(t.setLocal(i,t.i64_add(t.getLocal(i),t.i64_shr_u(t.getLocal(n),t.i64_const(32)))))),e>0&&(a.addCode(t.setLocal(n,t.i64_add(t.i64_and(t.getLocal(n),t.i64_const(4294967295)),t.i64_and(t.getLocal(b),t.i64_const(4294967295))))),a.addCode(t.setLocal(i,t.i64_add(t.i64_add(t.getLocal(i),t.i64_shr_u(t.getLocal(n),t.i64_const(32))),t.getLocal(o))))),a.addCode(t.i64_store32(t.getLocal("r"),4*e,t.getLocal(n))),a.addCode(t.setLocal(b,t.getLocal(i)),t.setLocal(o,t.i64_shr_u(t.getLocal(b),t.i64_const(32))))}a.addCode(t.i64_store32(t.getLocal("r"),4*f*2-4,t.getLocal(b)))}(),function(){const a=e.addFunction(c+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(c+"_mul",t.getLocal("x"),t.getLocal("x"),t.getLocal("r")))}(),function(){!function(){const a=e.addFunction(c+"__mul1");a.addParam("px","i32"),a.addParam("y","i64"),a.addParam("pr","i32"),a.addLocal("c","i64");const t=a.getCodeBuilder();a.addCode(t.setLocal("c",t.i64_mul(t.i64_load32_u(t.getLocal("px"),0,0),t.getLocal("y")))),a.addCode(t.i64_store32(t.getLocal("pr"),0,0,t.getLocal("c")));for(let e=1;e>1n,g=e.alloc(n,ee.bigInt2BytesLE(p,n)),m=p+1n,x=e.alloc(n,ee.bigInt2BytesLE(m,n));e.modules[i]={pq:o,pR2:s,n64:d,q:f,pOne:l,pZero:u,pePlusOne:x};let y=2n;if(ie(f))for(;ne(y,p,f)!==h;)y+=1n;let A=0,v=h;for(;!be(v)&&0n!==v;)A++,v>>=1n;const w=e.alloc(n,ee.bigInt2BytesLE(v,n)),_=ne(y,v,f),I=e.alloc(ee.bigInt2BytesLE((_<>1n,C=e.alloc(n,ee.bigInt2BytesLE(E,n));return e.exportFunction(b+"_copy",i+"_copy"),e.exportFunction(b+"_zero",i+"_zero"),e.exportFunction(b+"_isZero",i+"_isZero"),e.exportFunction(b+"_eq",i+"_eq"),function(){const a=e.addFunction(i+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const t=a.getCodeBuilder();a.addCode(t.ret(t.call(b+"_eq",t.getLocal("x"),t.i32_const(l))))}(),function(){const a=e.addFunction(i+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.if(t.call(b+"_add",t.getLocal("x"),t.getLocal("y"),t.getLocal("r")),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))),t.if(t.call(b+"_gte",t.getLocal("r"),t.i32_const(o)),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))))))}(),function(){const a=e.addFunction(i+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.if(t.call(b+"_sub",t.getLocal("x"),t.getLocal("y"),t.getLocal("r")),t.drop(t.call(b+"_add",t.getLocal("r"),t.i32_const(o),t.getLocal("r")))))}(),function(){const a=e.addFunction(i+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(i+"_sub",t.i32_const(u),t.getLocal("x"),t.getLocal("r")))}(),function(){const a=e.alloc(r*r*8),t=e.addFunction(i+"_mReduct");t.addParam("t","i32"),t.addParam("r","i32"),t.addLocal("np32","i64"),t.addLocal("c","i64"),t.addLocal("m","i64");const c=t.getCodeBuilder(),d=Number(0x100000000n-re(f,0x100000000n));t.addCode(c.setLocal("np32",c.i64_const(d)));for(let e=0;e=r&&a.addCode(t.i64_store32(t.getLocal("r"),4*(e-r),t.getLocal(h))),[h,p]=[p,h],a.addCode(t.setLocal(p,t.i64_shr_u(t.getLocal(h),t.i64_const(32))))}a.addCode(t.i64_store32(t.getLocal("r"),4*r-4,t.getLocal(h))),a.addCode(t.if(t.i32_wrap_i64(t.getLocal(p)),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))),t.if(t.call(b+"_gte",t.getLocal("r"),t.i32_const(o)),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))))))}(),function(){const a=e.addFunction(i+"_square");a.addParam("x","i32"),a.addParam("r","i32"),a.addLocal("c0","i64"),a.addLocal("c1","i64"),a.addLocal("c0_old","i64"),a.addLocal("c1_old","i64"),a.addLocal("np32","i64");for(let e=0;e>1&&c>1,e>>1)))),a.addCode(t.setLocal(h,t.i64_add(t.getLocal(h),t.i64_shr_u(t.getLocal(u),t.i64_const(32)))))),e>0&&(a.addCode(t.setLocal(u,t.i64_add(t.i64_and(t.getLocal(u),t.i64_const(4294967295)),t.i64_and(t.getLocal(p),t.i64_const(4294967295))))),a.addCode(t.setLocal(h,t.i64_add(t.i64_add(t.getLocal(h),t.i64_shr_u(t.getLocal(u),t.i64_const(32))),t.getLocal(g)))));for(let c=Math.max(1,e-r+1);c<=e&&c=r&&a.addCode(t.i64_store32(t.getLocal("r"),4*(e-r),t.getLocal(u))),a.addCode(t.setLocal(p,t.getLocal(h)),t.setLocal(g,t.i64_shr_u(t.getLocal(p),t.i64_const(32))))}a.addCode(t.i64_store32(t.getLocal("r"),4*r-4,t.getLocal(p))),a.addCode(t.if(t.i32_wrap_i64(t.getLocal(g)),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))),t.if(t.call(b+"_gte",t.getLocal("r"),t.i32_const(o)),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))))))}(),function(){const a=e.addFunction(i+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(i+"_mul",t.getLocal("x"),t.getLocal("x"),t.getLocal("r")))}(),function(){const a=e.addFunction(i+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(i+"_mul",t.getLocal("x"),t.i32_const(s),t.getLocal("r")))}(),function(){const a=e.alloc(2*n),t=e.addFunction(i+"_fromMontgomery");t.addParam("x","i32"),t.addParam("r","i32");const c=t.getCodeBuilder();t.addCode(c.call(b+"_copy",c.getLocal("x"),c.i32_const(a))),t.addCode(c.call(b+"_zero",c.i32_const(a+n))),t.addCode(c.call(i+"_mReduct",c.i32_const(a),c.getLocal("r")))}(),function(){const a=e.addFunction(i+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const t=a.getCodeBuilder(),c=t.i32_const(e.alloc(n));a.addCode(t.call(i+"_fromMontgomery",t.getLocal("x"),c),t.call(b+"_gte",c,t.i32_const(x)))}(),function(){const a=e.addFunction(i+"_sign");a.addParam("x","i32"),a.setReturnType("i32");const t=a.getCodeBuilder(),c=t.i32_const(e.alloc(n));a.addCode(t.if(t.call(b+"_isZero",t.getLocal("x")),t.ret(t.i32_const(0))),t.call(i+"_fromMontgomery",t.getLocal("x"),c),t.if(t.call(b+"_gte",c,t.i32_const(x)),t.ret(t.i32_const(-1))),t.ret(t.i32_const(1)))}(),function(){const a=e.addFunction(i+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(i+"_fromMontgomery",t.getLocal("x"),t.getLocal("r"))),a.addCode(t.call(b+"_inverseMod",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))),a.addCode(t.call(i+"_toMontgomery",t.getLocal("r"),t.getLocal("r")))}(),function(){const a=e.addFunction(i+"_one");a.addParam("pr","i32");const t=a.getCodeBuilder();a.addCode(t.call(b+"_copy",t.i32_const(l),t.getLocal("pr")))}(),function(){const a=e.addFunction(i+"_load");a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32"),a.addLocal("p","i32"),a.addLocal("l","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const t=a.getCodeBuilder(),c=t.i32_const(e.alloc(n)),f=e.alloc(n),d=t.i32_const(f);a.addCode(t.call(b+"_zero",t.getLocal("r")),t.setLocal("i",t.i32_const(n)),t.setLocal("p",t.getLocal("scalar")),t.block(t.loop(t.br_if(1,t.i32_gt_u(t.getLocal("i"),t.getLocal("scalarLen"))),t.if(t.i32_eq(t.getLocal("i"),t.i32_const(n)),t.call(i+"_one",c),t.call(i+"_mul",c,t.i32_const(s),c)),t.call(i+"_mul",t.getLocal("p"),c,d),t.call(i+"_add",t.getLocal("r"),d,t.getLocal("r")),t.setLocal("p",t.i32_add(t.getLocal("p"),t.i32_const(n))),t.setLocal("i",t.i32_add(t.getLocal("i"),t.i32_const(n))),t.br(0))),t.setLocal("l",t.i32_rem_u(t.getLocal("scalarLen"),t.i32_const(n))),t.if(t.i32_eqz(t.getLocal("l")),t.ret([])),t.call(b+"_zero",d),t.setLocal("j",t.i32_const(0)),t.block(t.loop(t.br_if(1,t.i32_eq(t.getLocal("j"),t.getLocal("l"))),t.i32_store8(t.getLocal("j"),f,t.i32_load8_u(t.getLocal("p"))),t.setLocal("p",t.i32_add(t.getLocal("p"),t.i32_const(1))),t.setLocal("j",t.i32_add(t.getLocal("j"),t.i32_const(1))),t.br(0))),t.if(t.i32_eq(t.getLocal("i"),t.i32_const(n)),t.call(i+"_one",c),t.call(i+"_mul",c,t.i32_const(s),c)),t.call(i+"_mul",d,c,d),t.call(i+"_add",t.getLocal("r"),d,t.getLocal("r")))}(),function(){const a=e.addFunction(i+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const t=a.getCodeBuilder(),c=t.i32_const(e.alloc(n));a.addCode(t.call(i+"_load",t.getLocal("scalar"),t.getLocal("scalarLen"),c),t.call(i+"_toMontgomery",c,c),t.call(i+"_mul",t.getLocal("x"),c,t.getLocal("r")))}(),te(e,i),ce(e,i+"_batchToMontgomery",i+"_toMontgomery",n,n),ce(e,i+"_batchFromMontgomery",i+"_fromMontgomery",n,n),ce(e,i+"_batchNeg",i+"_neg",n,n),fe(e,i+"_batchAdd",i+"_add",n,n),fe(e,i+"_batchSub",i+"_sub",n,n),fe(e,i+"_batchMul",i+"_mul",n,n),e.exportFunction(i+"_add"),e.exportFunction(i+"_sub"),e.exportFunction(i+"_neg"),e.exportFunction(i+"_isNegative"),e.exportFunction(i+"_isOne"),e.exportFunction(i+"_sign"),e.exportFunction(i+"_mReduct"),e.exportFunction(i+"_mul"),e.exportFunction(i+"_square"),e.exportFunction(i+"_squareOld"),e.exportFunction(i+"_fromMontgomery"),e.exportFunction(i+"_toMontgomery"),e.exportFunction(i+"_inverse"),e.exportFunction(i+"_one"),e.exportFunction(i+"_load"),e.exportFunction(i+"_timesScalar"),ae(e,i+"_exp",n,i+"_mul",i+"_square",b+"_copy",i+"_one"),e.exportFunction(i+"_exp"),e.exportFunction(i+"_batchInverse"),ie(f)&&(function(){const a=e.addFunction(i+"_sqrt");a.addParam("n","i32"),a.addParam("r","i32"),a.addLocal("m","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const t=a.getCodeBuilder(),c=t.i32_const(l),f=t.i32_const(e.alloc(n)),d=t.i32_const(e.alloc(n)),r=t.i32_const(e.alloc(n)),b=t.i32_const(e.alloc(n)),o=t.i32_const(e.alloc(n));a.addCode(t.if(t.call(i+"_isZero",t.getLocal("n")),t.ret(t.call(i+"_zero",t.getLocal("r")))),t.setLocal("m",t.i32_const(A)),t.call(i+"_copy",t.i32_const(I),f),t.call(i+"_exp",t.getLocal("n"),t.i32_const(w),t.i32_const(n),d),t.call(i+"_exp",t.getLocal("n"),t.i32_const(C),t.i32_const(n),r),t.block(t.loop(t.br_if(1,t.call(i+"_eq",d,c)),t.call(i+"_square",d,b),t.setLocal("i",t.i32_const(1)),t.block(t.loop(t.br_if(1,t.call(i+"_eq",b,c)),t.call(i+"_square",b,b),t.setLocal("i",t.i32_add(t.getLocal("i"),t.i32_const(1))),t.br(0))),t.call(i+"_copy",f,o),t.setLocal("j",t.i32_sub(t.i32_sub(t.getLocal("m"),t.getLocal("i")),t.i32_const(1))),t.block(t.loop(t.br_if(1,t.i32_eqz(t.getLocal("j"))),t.call(i+"_square",o,o),t.setLocal("j",t.i32_sub(t.getLocal("j"),t.i32_const(1))),t.br(0))),t.setLocal("m",t.getLocal("i")),t.call(i+"_square",o,f),t.call(i+"_mul",d,f,d),t.call(i+"_mul",r,o,r),t.br(0))),t.if(t.call(i+"_isNegative",r),t.call(i+"_neg",r,t.getLocal("r")),t.call(i+"_copy",r,t.getLocal("r"))))}(),function(){const a=e.addFunction(i+"_isSquare");a.addParam("n","i32"),a.setReturnType("i32");const t=a.getCodeBuilder(),c=t.i32_const(l),f=t.i32_const(e.alloc(n));a.addCode(t.if(t.call(i+"_isZero",t.getLocal("n")),t.ret(t.i32_const(1))),t.call(i+"_exp",t.getLocal("n"),t.i32_const(g),t.i32_const(n),f),t.call(i+"_eq",f,c))}(),e.exportFunction(i+"_sqrt"),e.exportFunction(i+"_isSquare")),e.exportFunction(i+"_batchToMontgomery"),e.exportFunction(i+"_batchFromMontgomery"),i};const le=se,{bitLength:ue}=U;var he=function(e,a,t,c,f){const d=BigInt(a),r=Math.floor((ue(d-1n)-1)/64)+1,n=8*r,i=t||"f1";if(e.modules[i])return i;e.modules[i]={n64:r};const b=f||"int",o=le(e,d,c,b),s=e.modules[o].pR2,l=e.modules[o].pq,u=e.modules[o].pePlusOne;return function(){const a=e.alloc(n),t=e.addFunction(i+"_mul");t.addParam("x","i32"),t.addParam("y","i32"),t.addParam("r","i32");const c=t.getCodeBuilder();t.addCode(c.call(o+"_mul",c.getLocal("x"),c.getLocal("y"),c.i32_const(a))),t.addCode(c.call(o+"_mul",c.i32_const(a),c.i32_const(s),c.getLocal("r")))}(),function(){const a=e.addFunction(i+"_square");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(i+"_mul",t.getLocal("x"),t.getLocal("x"),t.getLocal("r")))}(),function(){const a=e.addFunction(i+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(b+"_inverseMod",t.getLocal("x"),t.i32_const(l),t.getLocal("r")))}(),function(){const a=e.addFunction(i+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const t=a.getCodeBuilder();a.addCode(t.call(b+"_gte",t.getLocal("x"),t.i32_const(u)))}(),e.exportFunction(o+"_add",i+"_add"),e.exportFunction(o+"_sub",i+"_sub"),e.exportFunction(o+"_neg",i+"_neg"),e.exportFunction(i+"_mul"),e.exportFunction(i+"_square"),e.exportFunction(i+"_inverse"),e.exportFunction(i+"_isNegative"),e.exportFunction(o+"_copy",i+"_copy"),e.exportFunction(o+"_zero",i+"_zero"),e.exportFunction(o+"_one",i+"_one"),e.exportFunction(o+"_isZero",i+"_isZero"),e.exportFunction(o+"_eq",i+"_eq"),i};const pe=T,ge=F,me=D;var xe=function(e,a,t,c){if(e.modules[t])return t;const f=8*e.modules[c].n64,d=e.modules[c].q;return e.modules[t]={n64:2*e.modules[c].n64},function(){const a=e.addFunction(t+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.i32_and(d.call(c+"_isZero",r),d.call(c+"_isZero",n)))}(),function(){const a=e.addFunction(t+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.ret(d.i32_and(d.call(c+"_isOne",r),d.call(c+"_isZero",n))))}(),function(){const a=e.addFunction(t+"_zero");a.addParam("x","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.call(c+"_zero",r),d.call(c+"_zero",n))}(),function(){const a=e.addFunction(t+"_one");a.addParam("x","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.call(c+"_one",r),d.call(c+"_zero",n))}(),function(){const a=e.addFunction(t+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_copy",r,i),d.call(c+"_copy",n,b))}(),function(){const d=e.addFunction(t+"_mul");d.addParam("x","i32"),d.addParam("y","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.getLocal("y"),o=r.i32_add(r.getLocal("y"),r.i32_const(f)),s=r.getLocal("r"),l=r.i32_add(r.getLocal("r"),r.i32_const(f)),u=r.i32_const(e.alloc(f)),h=r.i32_const(e.alloc(f)),p=r.i32_const(e.alloc(f)),g=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_mul",n,b,u),r.call(c+"_mul",i,o,h),r.call(c+"_add",n,i,p),r.call(c+"_add",b,o,g),r.call(c+"_mul",p,g,p),r.call(a,h,s),r.call(c+"_add",u,s,s),r.call(c+"_add",u,h,l),r.call(c+"_sub",p,l,l))}(),function(){const a=e.addFunction(t+"_mul1");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("y"),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_mul",r,i,b),d.call(c+"_mul",n,i,o))}(),function(){const d=e.addFunction(t+"_square");d.addParam("x","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.getLocal("r"),o=r.i32_add(r.getLocal("r"),r.i32_const(f)),s=r.i32_const(e.alloc(f)),l=r.i32_const(e.alloc(f)),u=r.i32_const(e.alloc(f)),h=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_mul",n,i,s),r.call(c+"_add",n,i,l),r.call(a,i,u),r.call(c+"_add",n,u,u),r.call(a,s,h),r.call(c+"_add",h,s,h),r.call(c+"_mul",l,u,b),r.call(c+"_sub",b,h,b),r.call(c+"_add",s,s,o))}(),function(){const a=e.addFunction(t+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("y"),b=d.i32_add(d.getLocal("y"),d.i32_const(f)),o=d.getLocal("r"),s=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_add",r,i,o),d.call(c+"_add",n,b,s))}(),function(){const a=e.addFunction(t+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("y"),b=d.i32_add(d.getLocal("y"),d.i32_const(f)),o=d.getLocal("r"),s=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_sub",r,i,o),d.call(c+"_sub",n,b,s))}(),function(){const a=e.addFunction(t+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_neg",r,i),d.call(c+"_neg",n,b))}(),function(){const a=e.addFunction(t+"_conjugate");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_copy",r,i),d.call(c+"_neg",n,b))}(),function(){const a=e.addFunction(t+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_toMontgomery",r,i),d.call(c+"_toMontgomery",n,b))}(),function(){const a=e.addFunction(t+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_fromMontgomery",r,i),d.call(c+"_fromMontgomery",n,b))}(),function(){const a=e.addFunction(t+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("y"),b=d.i32_add(d.getLocal("y"),d.i32_const(f));a.addCode(d.i32_and(d.call(c+"_eq",r,i),d.call(c+"_eq",n,b)))}(),function(){const d=e.addFunction(t+"_inverse");d.addParam("x","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.getLocal("r"),o=r.i32_add(r.getLocal("r"),r.i32_const(f)),s=r.i32_const(e.alloc(f)),l=r.i32_const(e.alloc(f)),u=r.i32_const(e.alloc(f)),h=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_square",n,s),r.call(c+"_square",i,l),r.call(a,l,u),r.call(c+"_sub",s,u,u),r.call(c+"_inverse",u,h),r.call(c+"_mul",n,h,b),r.call(c+"_mul",i,h,o),r.call(c+"_neg",o,o))}(),function(){const a=e.addFunction(t+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_timesScalar",r,d.getLocal("scalar"),d.getLocal("scalarLen"),i),d.call(c+"_timesScalar",n,d.getLocal("scalar"),d.getLocal("scalarLen"),b))}(),function(){const a=e.addFunction(t+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.setLocal("s",d.call(c+"_sign",n)),d.if(d.getLocal("s"),d.ret(d.getLocal("s"))),d.ret(d.call(c+"_sign",r)))}(),function(){const a=e.addFunction(t+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.if(d.call(c+"_isZero",n),d.ret(d.call(c+"_isNegative",r))),d.ret(d.call(c+"_isNegative",n)))}(),e.exportFunction(t+"_isZero"),e.exportFunction(t+"_isOne"),e.exportFunction(t+"_zero"),e.exportFunction(t+"_one"),e.exportFunction(t+"_copy"),e.exportFunction(t+"_mul"),e.exportFunction(t+"_mul1"),e.exportFunction(t+"_square"),e.exportFunction(t+"_add"),e.exportFunction(t+"_sub"),e.exportFunction(t+"_neg"),e.exportFunction(t+"_sign"),e.exportFunction(t+"_conjugate"),e.exportFunction(t+"_fromMontgomery"),e.exportFunction(t+"_toMontgomery"),e.exportFunction(t+"_eq"),e.exportFunction(t+"_inverse"),ge(e,t),pe(e,t+"_exp",2*f,t+"_mul",t+"_square",t+"_copy",t+"_one"),function(){const a=e.addFunction(t+"_sqrt");a.addParam("a","i32"),a.addParam("pr","i32");const r=a.getCodeBuilder(),n=r.i32_const(e.alloc(me.bigInt2BytesLE((BigInt(d||0)-3n)/4n,f))),i=r.i32_const(e.alloc(me.bigInt2BytesLE((BigInt(d||0)-1n)/2n,f))),b=r.getLocal("a"),o=r.i32_const(e.alloc(2*f)),s=r.i32_const(e.alloc(2*f)),l=r.i32_const(e.alloc(2*f)),u=e.alloc(2*f),h=r.i32_const(u),p=r.i32_const(u),g=r.i32_const(u+f),m=r.i32_const(e.alloc(2*f)),x=r.i32_const(e.alloc(2*f));a.addCode(r.call(t+"_one",h),r.call(t+"_neg",h,h),r.call(t+"_exp",b,n,r.i32_const(f),o),r.call(t+"_square",o,s),r.call(t+"_mul",b,s,s),r.call(t+"_conjugate",s,l),r.call(t+"_mul",l,s,l),r.if(r.call(t+"_eq",l,h),r.unreachable()),r.call(t+"_mul",o,b,m),r.if(r.call(t+"_eq",s,h),[...r.call(c+"_zero",p),...r.call(c+"_one",g),...r.call(t+"_mul",h,m,r.getLocal("pr"))],[...r.call(t+"_one",x),...r.call(t+"_add",x,s,x),...r.call(t+"_exp",x,i,r.i32_const(f),x),...r.call(t+"_mul",x,m,r.getLocal("pr"))]))}(),function(){const a=e.addFunction(t+"_isSquare");a.addParam("a","i32"),a.setReturnType("i32");const c=a.getCodeBuilder(),r=c.i32_const(e.alloc(me.bigInt2BytesLE((BigInt(d||0)-3n)/4n,f))),n=c.getLocal("a"),i=c.i32_const(e.alloc(2*f)),b=c.i32_const(e.alloc(2*f)),o=c.i32_const(e.alloc(2*f)),s=e.alloc(2*f),l=c.i32_const(s);a.addCode(c.call(t+"_one",l),c.call(t+"_neg",l,l),c.call(t+"_exp",n,r,c.i32_const(f),i),c.call(t+"_square",i,b),c.call(t+"_mul",n,b,b),c.call(t+"_conjugate",b,o),c.call(t+"_mul",o,b,o),c.if(c.call(t+"_eq",o,l),c.ret(c.i32_const(0))),c.ret(c.i32_const(1)))}(),e.exportFunction(t+"_exp"),e.exportFunction(t+"_timesScalar"),e.exportFunction(t+"_batchInverse"),e.exportFunction(t+"_sqrt"),e.exportFunction(t+"_isSquare"),e.exportFunction(t+"_isNegative"),t};const ye=T,Ae=F;var ve=function(e,a,t,c){if(e.modules[t])return t;const f=8*e.modules[c].n64;return e.modules[t]={n64:3*e.modules[c].n64},function(){const a=e.addFunction(t+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.i32_and(d.i32_and(d.call(c+"_isZero",r),d.call(c+"_isZero",n)),d.call(c+"_isZero",i)))}(),function(){const a=e.addFunction(t+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.ret(d.i32_and(d.i32_and(d.call(c+"_isOne",r),d.call(c+"_isZero",n)),d.call(c+"_isZero",i))))}(),function(){const a=e.addFunction(t+"_zero");a.addParam("x","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.call(c+"_zero",r),d.call(c+"_zero",n),d.call(c+"_zero",i))}(),function(){const a=e.addFunction(t+"_one");a.addParam("x","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.call(c+"_one",r),d.call(c+"_zero",n),d.call(c+"_zero",i))}(),function(){const a=e.addFunction(t+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f)),s=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_copy",r,b),d.call(c+"_copy",n,o),d.call(c+"_copy",i,s))}(),function(){const d=e.addFunction(t+"_mul");d.addParam("x","i32"),d.addParam("y","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.i32_add(r.getLocal("x"),r.i32_const(2*f)),o=r.getLocal("y"),s=r.i32_add(r.getLocal("y"),r.i32_const(f)),l=r.i32_add(r.getLocal("y"),r.i32_const(2*f)),u=r.getLocal("r"),h=r.i32_add(r.getLocal("r"),r.i32_const(f)),p=r.i32_add(r.getLocal("r"),r.i32_const(2*f)),g=r.i32_const(e.alloc(f)),m=r.i32_const(e.alloc(f)),x=r.i32_const(e.alloc(f)),y=r.i32_const(e.alloc(f)),A=r.i32_const(e.alloc(f)),v=r.i32_const(e.alloc(f)),w=r.i32_const(e.alloc(f)),_=r.i32_const(e.alloc(f)),I=r.i32_const(e.alloc(f)),E=r.i32_const(e.alloc(f)),C=r.i32_const(e.alloc(f)),M=r.i32_const(e.alloc(f)),B=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_mul",n,o,g),r.call(c+"_mul",i,s,m),r.call(c+"_mul",b,l,x),r.call(c+"_add",n,i,y),r.call(c+"_add",o,s,A),r.call(c+"_add",n,b,v),r.call(c+"_add",o,l,w),r.call(c+"_add",i,b,_),r.call(c+"_add",s,l,I),r.call(c+"_add",g,m,E),r.call(c+"_add",g,x,C),r.call(c+"_add",m,x,M),r.call(c+"_mul",_,I,u),r.call(c+"_sub",u,M,u),r.call(a,u,u),r.call(c+"_add",g,u,u),r.call(c+"_mul",y,A,h),r.call(c+"_sub",h,E,h),r.call(a,x,B),r.call(c+"_add",h,B,h),r.call(c+"_mul",v,w,p),r.call(c+"_sub",p,C,p),r.call(c+"_add",p,m,p))}(),function(){const d=e.addFunction(t+"_square");d.addParam("x","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.i32_add(r.getLocal("x"),r.i32_const(2*f)),o=r.getLocal("r"),s=r.i32_add(r.getLocal("r"),r.i32_const(f)),l=r.i32_add(r.getLocal("r"),r.i32_const(2*f)),u=r.i32_const(e.alloc(f)),h=r.i32_const(e.alloc(f)),p=r.i32_const(e.alloc(f)),g=r.i32_const(e.alloc(f)),m=r.i32_const(e.alloc(f)),x=r.i32_const(e.alloc(f)),y=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_square",n,u),r.call(c+"_mul",n,i,h),r.call(c+"_add",h,h,p),r.call(c+"_sub",n,i,g),r.call(c+"_add",g,b,g),r.call(c+"_square",g,g),r.call(c+"_mul",i,b,m),r.call(c+"_add",m,m,x),r.call(c+"_square",b,y),r.call(a,x,o),r.call(c+"_add",u,o,o),r.call(a,y,s),r.call(c+"_add",p,s,s),r.call(c+"_add",u,y,l),r.call(c+"_sub",x,l,l),r.call(c+"_add",g,l,l),r.call(c+"_add",p,l,l))}(),function(){const a=e.addFunction(t+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("y"),o=d.i32_add(d.getLocal("y"),d.i32_const(f)),s=d.i32_add(d.getLocal("y"),d.i32_const(2*f)),l=d.getLocal("r"),u=d.i32_add(d.getLocal("r"),d.i32_const(f)),h=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_add",r,b,l),d.call(c+"_add",n,o,u),d.call(c+"_add",i,s,h))}(),function(){const a=e.addFunction(t+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("y"),o=d.i32_add(d.getLocal("y"),d.i32_const(f)),s=d.i32_add(d.getLocal("y"),d.i32_const(2*f)),l=d.getLocal("r"),u=d.i32_add(d.getLocal("r"),d.i32_const(f)),h=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_sub",r,b,l),d.call(c+"_sub",n,o,u),d.call(c+"_sub",i,s,h))}(),function(){const a=e.addFunction(t+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f)),s=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_neg",r,b),d.call(c+"_neg",n,o),d.call(c+"_neg",i,s))}(),function(){const a=e.addFunction(t+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.setLocal("s",d.call(c+"_sign",i)),d.if(d.getLocal("s"),d.ret(d.getLocal("s"))),d.setLocal("s",d.call(c+"_sign",n)),d.if(d.getLocal("s"),d.ret(d.getLocal("s"))),d.ret(d.call(c+"_sign",r)))}(),function(){const a=e.addFunction(t+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f)),s=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_toMontgomery",r,b),d.call(c+"_toMontgomery",n,o),d.call(c+"_toMontgomery",i,s))}(),function(){const a=e.addFunction(t+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f)),s=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_fromMontgomery",r,b),d.call(c+"_fromMontgomery",n,o),d.call(c+"_fromMontgomery",i,s))}(),function(){const a=e.addFunction(t+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("y"),o=d.i32_add(d.getLocal("y"),d.i32_const(f)),s=d.i32_add(d.getLocal("y"),d.i32_const(2*f));a.addCode(d.i32_and(d.i32_and(d.call(c+"_eq",r,b),d.call(c+"_eq",n,o)),d.call(c+"_eq",i,s)))}(),function(){const d=e.addFunction(t+"_inverse");d.addParam("x","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.i32_add(r.getLocal("x"),r.i32_const(2*f)),o=r.getLocal("r"),s=r.i32_add(r.getLocal("r"),r.i32_const(f)),l=r.i32_add(r.getLocal("r"),r.i32_const(2*f)),u=r.i32_const(e.alloc(f)),h=r.i32_const(e.alloc(f)),p=r.i32_const(e.alloc(f)),g=r.i32_const(e.alloc(f)),m=r.i32_const(e.alloc(f)),x=r.i32_const(e.alloc(f)),y=r.i32_const(e.alloc(f)),A=r.i32_const(e.alloc(f)),v=r.i32_const(e.alloc(f)),w=r.i32_const(e.alloc(f)),_=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_square",n,u),r.call(c+"_square",i,h),r.call(c+"_square",b,p),r.call(c+"_mul",n,i,g),r.call(c+"_mul",n,b,m),r.call(c+"_mul",i,b,x),r.call(a,x,y),r.call(c+"_sub",u,y,y),r.call(a,p,A),r.call(c+"_sub",A,g,A),r.call(c+"_sub",h,m,v),r.call(c+"_mul",b,A,w),r.call(c+"_mul",i,v,_),r.call(c+"_add",w,_,w),r.call(a,w,w),r.call(c+"_mul",n,y,_),r.call(c+"_add",_,w,w),r.call(c+"_inverse",w,w),r.call(c+"_mul",w,y,o),r.call(c+"_mul",w,A,s),r.call(c+"_mul",w,v,l))}(),function(){const a=e.addFunction(t+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f)),s=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_timesScalar",r,d.getLocal("scalar"),d.getLocal("scalarLen"),b),d.call(c+"_timesScalar",n,d.getLocal("scalar"),d.getLocal("scalarLen"),o),d.call(c+"_timesScalar",i,d.getLocal("scalar"),d.getLocal("scalarLen"),s))}(),function(){const a=e.addFunction(t+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.if(d.call(c+"_isZero",i),d.if(d.call(c+"_isZero",n),d.ret(d.call(c+"_isNegative",r)),d.ret(d.call(c+"_isNegative",n)))),d.ret(d.call(c+"_isNegative",i)))}(),e.exportFunction(t+"_isZero"),e.exportFunction(t+"_isOne"),e.exportFunction(t+"_zero"),e.exportFunction(t+"_one"),e.exportFunction(t+"_copy"),e.exportFunction(t+"_mul"),e.exportFunction(t+"_square"),e.exportFunction(t+"_add"),e.exportFunction(t+"_sub"),e.exportFunction(t+"_neg"),e.exportFunction(t+"_sign"),e.exportFunction(t+"_fromMontgomery"),e.exportFunction(t+"_toMontgomery"),e.exportFunction(t+"_eq"),e.exportFunction(t+"_inverse"),Ae(e,t),ye(e,t+"_exp",3*f,t+"_mul",t+"_square",t+"_copy",t+"_one"),e.exportFunction(t+"_exp"),e.exportFunction(t+"_timesScalar"),e.exportFunction(t+"_batchInverse"),e.exportFunction(t+"_isNegative"),t};const we=function(e,a,t,c,f,d,r,n){const i=e.addFunction(a);i.addParam("base","i32"),i.addParam("scalar","i32"),i.addParam("scalarLength","i32"),i.addParam("r","i32"),i.addLocal("old0","i32"),i.addLocal("nbits","i32"),i.addLocal("i","i32"),i.addLocal("last","i32"),i.addLocal("cur","i32"),i.addLocal("carry","i32"),i.addLocal("p","i32");const b=i.getCodeBuilder(),o=b.i32_const(e.alloc(t));function s(e){return b.i32_and(b.i32_shr_u(b.i32_load(b.i32_add(b.getLocal("scalar"),b.i32_and(b.i32_shr_u(e,b.i32_const(3)),b.i32_const(4294967292)))),b.i32_and(e,b.i32_const(31))),b.i32_const(1))}function l(e){return[...b.i32_store8(b.getLocal("p"),b.i32_const(e)),...b.setLocal("p",b.i32_add(b.getLocal("p"),b.i32_const(1)))]}i.addCode(b.if(b.i32_eqz(b.getLocal("scalarLength")),[...b.call(n,b.getLocal("r")),...b.ret([])]),b.setLocal("nbits",b.i32_shl(b.getLocal("scalarLength"),b.i32_const(3))),b.setLocal("old0",b.i32_load(b.i32_const(0))),b.setLocal("p",b.getLocal("old0")),b.i32_store(b.i32_const(0),b.i32_and(b.i32_add(b.i32_add(b.getLocal("old0"),b.i32_const(32)),b.getLocal("nbits")),b.i32_const(4294967288))),b.setLocal("i",b.i32_const(1)),b.setLocal("last",s(b.i32_const(0))),b.setLocal("carry",b.i32_const(0)),b.block(b.loop(b.br_if(1,b.i32_eq(b.getLocal("i"),b.getLocal("nbits"))),b.setLocal("cur",s(b.getLocal("i"))),b.if(b.getLocal("last"),b.if(b.getLocal("cur"),b.if(b.getLocal("carry"),[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(1)),...l(1)],[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(1)),...l(255)]),b.if(b.getLocal("carry"),[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(1)),...l(255)],[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(0)),...l(1)])),b.if(b.getLocal("cur"),b.if(b.getLocal("carry"),[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(1)),...l(0)],[...b.setLocal("last",b.i32_const(1)),...b.setLocal("carry",b.i32_const(0)),...l(0)]),b.if(b.getLocal("carry"),[...b.setLocal("last",b.i32_const(1)),...b.setLocal("carry",b.i32_const(0)),...l(0)],[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(0)),...l(0)]))),b.setLocal("i",b.i32_add(b.getLocal("i"),b.i32_const(1))),b.br(0))),b.if(b.getLocal("last"),b.if(b.getLocal("carry"),[...l(255),...l(0),...l(1)],[...l(1)]),b.if(b.getLocal("carry"),[...l(0),...l(1)])),b.setLocal("p",b.i32_sub(b.getLocal("p"),b.i32_const(1))),b.call(r,b.getLocal("base"),o),b.call(n,b.getLocal("r")),b.block(b.loop(b.call(f,b.getLocal("r"),b.getLocal("r")),b.setLocal("cur",b.i32_load8_u(b.getLocal("p"))),b.if(b.getLocal("cur"),b.if(b.i32_eq(b.getLocal("cur"),b.i32_const(1)),b.call(c,b.getLocal("r"),o,b.getLocal("r")),b.call(d,b.getLocal("r"),o,b.getLocal("r")))),b.br_if(1,b.i32_eq(b.getLocal("old0"),b.getLocal("p"))),b.setLocal("p",b.i32_sub(b.getLocal("p"),b.i32_const(1))),b.br(0))),b.i32_store(b.i32_const(0),b.getLocal("old0")))},_e=Q,Ie=function(e,a,t,c,f){const d=8*e.modules[a].n64;!function(){const a=e.addFunction(t+"_getChunk");a.addParam("pScalar","i32"),a.addParam("scalarSize","i32"),a.addParam("startBit","i32"),a.addParam("chunkSize","i32"),a.addLocal("bitsToEnd","i32"),a.addLocal("mask","i32"),a.setReturnType("i32");const c=a.getCodeBuilder();a.addCode(c.setLocal("bitsToEnd",c.i32_sub(c.i32_mul(c.getLocal("scalarSize"),c.i32_const(8)),c.getLocal("startBit"))),c.if(c.i32_gt_s(c.getLocal("chunkSize"),c.getLocal("bitsToEnd")),c.setLocal("mask",c.i32_sub(c.i32_shl(c.i32_const(1),c.getLocal("bitsToEnd")),c.i32_const(1))),c.setLocal("mask",c.i32_sub(c.i32_shl(c.i32_const(1),c.getLocal("chunkSize")),c.i32_const(1)))),c.i32_and(c.i32_shr_u(c.i32_load(c.i32_add(c.getLocal("pScalar"),c.i32_shr_u(c.getLocal("startBit"),c.i32_const(3))),0,0),c.i32_and(c.getLocal("startBit"),c.i32_const(7))),c.getLocal("mask")))}(),function(){const c=e.addFunction(t+"_reduceTable");c.addParam("pTable","i32"),c.addParam("p","i32"),c.addLocal("half","i32"),c.addLocal("it1","i32"),c.addLocal("it2","i32"),c.addLocal("pAcc","i32");const f=c.getCodeBuilder();c.addCode(f.if(f.i32_eq(f.getLocal("p"),f.i32_const(1)),f.ret([])),f.setLocal("half",f.i32_shl(f.i32_const(1),f.i32_sub(f.getLocal("p"),f.i32_const(1)))),f.setLocal("it1",f.getLocal("pTable")),f.setLocal("it2",f.i32_add(f.getLocal("pTable"),f.i32_mul(f.getLocal("half"),f.i32_const(d)))),f.setLocal("pAcc",f.i32_sub(f.getLocal("it2"),f.i32_const(d))),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("it1"),f.getLocal("pAcc"))),f.call(a+"_add",f.getLocal("it1"),f.getLocal("it2"),f.getLocal("it1")),f.call(a+"_add",f.getLocal("pAcc"),f.getLocal("it2"),f.getLocal("pAcc")),f.setLocal("it1",f.i32_add(f.getLocal("it1"),f.i32_const(d))),f.setLocal("it2",f.i32_add(f.getLocal("it2"),f.i32_const(d))),f.br(0))),f.call(t+"_reduceTable",f.getLocal("pTable"),f.i32_sub(f.getLocal("p"),f.i32_const(1))),f.setLocal("p",f.i32_sub(f.getLocal("p"),f.i32_const(1))),f.block(f.loop(f.br_if(1,f.i32_eqz(f.getLocal("p"))),f.call(a+"_double",f.getLocal("pAcc"),f.getLocal("pAcc")),f.setLocal("p",f.i32_sub(f.getLocal("p"),f.i32_const(1))),f.br(0))),f.call(a+"_add",f.getLocal("pTable"),f.getLocal("pAcc"),f.getLocal("pTable")))}(),function(){const r=e.addFunction(t+"_chunk");r.addParam("pBases","i32"),r.addParam("pScalars","i32"),r.addParam("scalarSize","i32"),r.addParam("n","i32"),r.addParam("startBit","i32"),r.addParam("chunkSize","i32"),r.addParam("pr","i32"),r.addLocal("nChunks","i32"),r.addLocal("itScalar","i32"),r.addLocal("endScalar","i32"),r.addLocal("itBase","i32"),r.addLocal("i","i32"),r.addLocal("j","i32"),r.addLocal("nTable","i32"),r.addLocal("pTable","i32"),r.addLocal("idx","i32"),r.addLocal("pIdxTable","i32");const n=r.getCodeBuilder();r.addCode(n.if(n.i32_eqz(n.getLocal("n")),[...n.call(a+"_zero",n.getLocal("pr")),...n.ret([])]),n.setLocal("nTable",n.i32_shl(n.i32_const(1),n.getLocal("chunkSize"))),n.setLocal("pTable",n.i32_load(n.i32_const(0))),n.i32_store(n.i32_const(0),n.i32_add(n.getLocal("pTable"),n.i32_mul(n.getLocal("nTable"),n.i32_const(d)))),n.setLocal("j",n.i32_const(0)),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("j"),n.getLocal("nTable"))),n.call(a+"_zero",n.i32_add(n.getLocal("pTable"),n.i32_mul(n.getLocal("j"),n.i32_const(d)))),n.setLocal("j",n.i32_add(n.getLocal("j"),n.i32_const(1))),n.br(0))),n.setLocal("itBase",n.getLocal("pBases")),n.setLocal("itScalar",n.getLocal("pScalars")),n.setLocal("endScalar",n.i32_add(n.getLocal("pScalars"),n.i32_mul(n.getLocal("n"),n.getLocal("scalarSize")))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("itScalar"),n.getLocal("endScalar"))),n.setLocal("idx",n.call(t+"_getChunk",n.getLocal("itScalar"),n.getLocal("scalarSize"),n.getLocal("startBit"),n.getLocal("chunkSize"))),n.if(n.getLocal("idx"),[...n.setLocal("pIdxTable",n.i32_add(n.getLocal("pTable"),n.i32_mul(n.i32_sub(n.getLocal("idx"),n.i32_const(1)),n.i32_const(d)))),...n.call(c,n.getLocal("pIdxTable"),n.getLocal("itBase"),n.getLocal("pIdxTable"))]),n.setLocal("itScalar",n.i32_add(n.getLocal("itScalar"),n.getLocal("scalarSize"))),n.setLocal("itBase",n.i32_add(n.getLocal("itBase"),n.i32_const(f))),n.br(0))),n.call(t+"_reduceTable",n.getLocal("pTable"),n.getLocal("chunkSize")),n.call(a+"_copy",n.getLocal("pTable"),n.getLocal("pr")),n.i32_store(n.i32_const(0),n.getLocal("pTable")))}(),function(){const c=e.addFunction(t);c.addParam("pBases","i32"),c.addParam("pScalars","i32"),c.addParam("scalarSize","i32"),c.addParam("n","i32"),c.addParam("pr","i32"),c.addLocal("chunkSize","i32"),c.addLocal("nChunks","i32"),c.addLocal("itScalar","i32"),c.addLocal("endScalar","i32"),c.addLocal("itBase","i32"),c.addLocal("itBit","i32"),c.addLocal("i","i32"),c.addLocal("j","i32"),c.addLocal("nTable","i32"),c.addLocal("pTable","i32"),c.addLocal("idx","i32"),c.addLocal("pIdxTable","i32");const f=c.getCodeBuilder(),r=f.i32_const(e.alloc(d)),n=e.alloc([17,17,17,17,17,17,17,17,17,17,16,16,15,14,13,13,12,11,10,9,8,7,7,6,5,4,3,2,1,1,1,1]);c.addCode(f.call(a+"_zero",f.getLocal("pr")),f.if(f.i32_eqz(f.getLocal("n")),f.ret([])),f.setLocal("chunkSize",f.i32_load8_u(f.i32_clz(f.getLocal("n")),n)),f.setLocal("nChunks",f.i32_add(f.i32_div_u(f.i32_sub(f.i32_shl(f.getLocal("scalarSize"),f.i32_const(3)),f.i32_const(1)),f.getLocal("chunkSize")),f.i32_const(1))),f.setLocal("itBit",f.i32_mul(f.i32_sub(f.getLocal("nChunks"),f.i32_const(1)),f.getLocal("chunkSize"))),f.block(f.loop(f.br_if(1,f.i32_lt_s(f.getLocal("itBit"),f.i32_const(0))),f.if(f.i32_eqz(f.call(a+"_isZero",f.getLocal("pr"))),[...f.setLocal("j",f.i32_const(0)),...f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("j"),f.getLocal("chunkSize"))),f.call(a+"_double",f.getLocal("pr"),f.getLocal("pr")),f.setLocal("j",f.i32_add(f.getLocal("j"),f.i32_const(1))),f.br(0)))]),f.call(t+"_chunk",f.getLocal("pBases"),f.getLocal("pScalars"),f.getLocal("scalarSize"),f.getLocal("n"),f.getLocal("itBit"),f.getLocal("chunkSize"),r),f.call(a+"_add",f.getLocal("pr"),r,f.getLocal("pr")),f.setLocal("itBit",f.i32_sub(f.getLocal("itBit"),f.getLocal("chunkSize"))),f.br(0))))}(),e.exportFunction(t),e.exportFunction(t+"_chunk")};var Ee=function(e,a,t,c){const f=e.modules[t].n64,d=8*f;return e.modules[a]||(e.modules[a]={n64:3*f},function(){const c=e.addFunction(a+"_isZeroAffine");c.addParam("p1","i32"),c.setReturnType("i32");const f=c.getCodeBuilder();c.addCode(f.i32_and(f.call(t+"_isZero",f.getLocal("p1")),f.call(t+"_isZero",f.i32_add(f.getLocal("p1"),f.i32_const(d)))))}(),function(){const c=e.addFunction(a+"_isZero");c.addParam("p1","i32"),c.setReturnType("i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_isZero",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))))}(),function(){const c=e.addFunction(a+"_zeroAffine");c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_zero",f.getLocal("pr"))),c.addCode(f.call(t+"_zero",f.i32_add(f.getLocal("pr"),f.i32_const(d))))}(),function(){const c=e.addFunction(a+"_zero");c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_zero",f.getLocal("pr"))),c.addCode(f.call(t+"_one",f.i32_add(f.getLocal("pr"),f.i32_const(d)))),c.addCode(f.call(t+"_zero",f.i32_add(f.getLocal("pr"),f.i32_const(2*d))))}(),function(){const t=e.addFunction(a+"_copyAffine");t.addParam("ps","i32"),t.addParam("pd","i32");const c=t.getCodeBuilder();for(let e=0;e<2*f;e++)t.addCode(c.i64_store(c.getLocal("pd"),8*e,c.i64_load(c.getLocal("ps"),8*e)))}(),function(){const t=e.addFunction(a+"_copy");t.addParam("ps","i32"),t.addParam("pd","i32");const c=t.getCodeBuilder();for(let e=0;e<3*f;e++)t.addCode(c.i64_store(c.getLocal("pd"),8*e,c.i64_load(c.getLocal("ps"),8*e)))}(),function(){const c=e.addFunction(a+"_toJacobian");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.getLocal("pr"),b=f.i32_add(f.getLocal("pr"),f.i32_const(d)),o=f.i32_add(f.getLocal("pr"),f.i32_const(2*d));c.addCode(f.if(f.call(a+"_isZeroAffine",f.getLocal("p1")),f.call(a+"_zero",f.getLocal("pr")),[...f.call(t+"_one",o),...f.call(t+"_copy",n,b),...f.call(t+"_copy",r,i)]))}(),function(){const c=e.addFunction(a+"_eqAffine");c.addParam("p1","i32"),c.addParam("p2","i32"),c.setReturnType("i32"),c.addLocal("z1","i32");const f=c.getCodeBuilder();c.addCode(f.ret(f.i32_and(f.call(t+"_eq",f.getLocal("p1"),f.getLocal("p2")),f.call(t+"_eq",f.i32_add(f.getLocal("p1"),f.i32_const(d)),f.i32_add(f.getLocal("p2"),f.i32_const(d))))))}(),function(){const c=e.addFunction(a+"_eqMixed");c.addParam("p1","i32"),c.addParam("p2","i32"),c.setReturnType("i32"),c.addLocal("z1","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d));c.addCode(f.setLocal("z1",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))));const i=f.getLocal("z1"),b=f.getLocal("p2"),o=f.i32_add(f.getLocal("p2"),f.i32_const(d)),s=f.i32_const(e.alloc(d)),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),f.ret(f.call(a+"_isZeroAffine",f.getLocal("p2")))),f.if(f.call(a+"_isZeroAffine",f.getLocal("p2")),f.ret(f.i32_const(0))),f.if(f.call(t+"_isOne",i),f.ret(f.call(a+"_eqAffine",f.getLocal("p1"),f.getLocal("p2")))),f.call(t+"_square",i,s),f.call(t+"_mul",b,s,l),f.call(t+"_mul",i,s,u),f.call(t+"_mul",o,u,h),f.if(f.call(t+"_eq",r,l),f.if(f.call(t+"_eq",n,h),f.ret(f.i32_const(1)))),f.ret(f.i32_const(0)))}(),function(){const c=e.addFunction(a+"_eq");c.addParam("p1","i32"),c.addParam("p2","i32"),c.setReturnType("i32"),c.addLocal("z1","i32"),c.addLocal("z2","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d));c.addCode(f.setLocal("z1",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))));const i=f.getLocal("z1"),b=f.getLocal("p2"),o=f.i32_add(f.getLocal("p2"),f.i32_const(d));c.addCode(f.setLocal("z2",f.i32_add(f.getLocal("p2"),f.i32_const(2*d))));const s=f.getLocal("z2"),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d)),m=f.i32_const(e.alloc(d)),x=f.i32_const(e.alloc(d)),y=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),f.ret(f.call(a+"_isZero",f.getLocal("p2")))),f.if(f.call(a+"_isZero",f.getLocal("p2")),f.ret(f.i32_const(0))),f.if(f.call(t+"_isOne",i),f.ret(f.call(a+"_eqMixed",f.getLocal("p2"),f.getLocal("p1")))),f.if(f.call(t+"_isOne",s),f.ret(f.call(a+"_eqMixed",f.getLocal("p1"),f.getLocal("p2")))),f.call(t+"_square",i,l),f.call(t+"_square",s,u),f.call(t+"_mul",r,u,h),f.call(t+"_mul",b,l,p),f.call(t+"_mul",i,l,g),f.call(t+"_mul",s,u,m),f.call(t+"_mul",n,m,x),f.call(t+"_mul",o,g,y),f.if(f.call(t+"_eq",h,p),f.if(f.call(t+"_eq",x,y),f.ret(f.i32_const(1)))),f.ret(f.i32_const(0)))}(),function(){const c=e.addFunction(a+"_doubleAffine");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.getLocal("pr"),b=f.i32_add(f.getLocal("pr"),f.i32_const(d)),o=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),s=f.i32_const(e.alloc(d)),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZeroAffine",f.getLocal("p1")),[...f.call(a+"_toJacobian",f.getLocal("p1"),f.getLocal("pr")),...f.ret([])]),f.call(t+"_square",r,s),f.call(t+"_square",n,l),f.call(t+"_square",l,u),f.call(t+"_add",r,l,h),f.call(t+"_square",h,h),f.call(t+"_sub",h,s,h),f.call(t+"_sub",h,u,h),f.call(t+"_add",h,h,h),f.call(t+"_add",s,s,p),f.call(t+"_add",p,s,p),f.call(t+"_add",n,n,o),f.call(t+"_square",p,i),f.call(t+"_sub",i,h,i),f.call(t+"_sub",i,h,i),f.call(t+"_add",u,u,g),f.call(t+"_add",g,g,g),f.call(t+"_add",g,g,g),f.call(t+"_sub",h,i,b),f.call(t+"_mul",b,p,b),f.call(t+"_sub",b,g,b))}(),function(){const c=e.addFunction(a+"_double");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.i32_add(f.getLocal("p1"),f.i32_const(2*d)),b=f.getLocal("pr"),o=f.i32_add(f.getLocal("pr"),f.i32_const(d)),s=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d)),m=f.i32_const(e.alloc(d)),x=f.i32_const(e.alloc(d)),y=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),[...f.call(a+"_copy",f.getLocal("p1"),f.getLocal("pr")),...f.ret([])]),f.if(f.call(t+"_isOne",i),[...f.ret(f.call(a+"_doubleAffine",f.getLocal("p1"),f.getLocal("pr"))),...f.ret([])]),f.call(t+"_square",r,l),f.call(t+"_square",n,u),f.call(t+"_square",u,h),f.call(t+"_add",r,u,p),f.call(t+"_square",p,p),f.call(t+"_sub",p,l,p),f.call(t+"_sub",p,h,p),f.call(t+"_add",p,p,p),f.call(t+"_add",l,l,g),f.call(t+"_add",g,l,g),f.call(t+"_square",g,m),f.call(t+"_mul",n,i,x),f.call(t+"_add",p,p,b),f.call(t+"_sub",m,b,b),f.call(t+"_add",h,h,y),f.call(t+"_add",y,y,y),f.call(t+"_add",y,y,y),f.call(t+"_sub",p,b,o),f.call(t+"_mul",o,g,o),f.call(t+"_sub",o,y,o),f.call(t+"_add",x,x,s))}(),function(){const c=e.addFunction(a+"_addAffine");c.addParam("p1","i32"),c.addParam("p2","i32"),c.addParam("pr","i32"),c.addLocal("z1","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d));c.addCode(f.setLocal("z1",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))));const i=f.getLocal("p2"),b=f.i32_add(f.getLocal("p2"),f.i32_const(d)),o=f.getLocal("pr"),s=f.i32_add(f.getLocal("pr"),f.i32_const(d)),l=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d)),m=f.i32_const(e.alloc(d)),x=f.i32_const(e.alloc(d)),y=f.i32_const(e.alloc(d)),A=f.i32_const(e.alloc(d)),v=f.i32_const(e.alloc(d)),w=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZeroAffine",f.getLocal("p1")),[...f.call(a+"_copyAffine",f.getLocal("p2"),f.getLocal("pr")),...f.call(t+"_one",f.i32_add(f.getLocal("pr"),f.i32_const(2*d))),...f.ret([])]),f.if(f.call(a+"_isZeroAffine",f.getLocal("p2")),[...f.call(a+"_copyAffine",f.getLocal("p1"),f.getLocal("pr")),...f.call(t+"_one",f.i32_add(f.getLocal("pr"),f.i32_const(2*d))),...f.ret([])]),f.if(f.call(t+"_eq",r,i),f.if(f.call(t+"_eq",n,b),[...f.call(a+"_doubleAffine",f.getLocal("p2"),f.getLocal("pr")),...f.ret([])])),f.call(t+"_sub",i,r,u),f.call(t+"_sub",b,n,p),f.call(t+"_square",u,h),f.call(t+"_add",h,h,g),f.call(t+"_add",g,g,g),f.call(t+"_mul",u,g,m),f.call(t+"_add",p,p,x),f.call(t+"_mul",r,g,A),f.call(t+"_square",x,y),f.call(t+"_add",A,A,v),f.call(t+"_sub",y,m,o),f.call(t+"_sub",o,v,o),f.call(t+"_mul",n,m,w),f.call(t+"_add",w,w,w),f.call(t+"_sub",A,o,s),f.call(t+"_mul",s,x,s),f.call(t+"_sub",s,w,s),f.call(t+"_add",u,u,l))}(),function(){const c=e.addFunction(a+"_addMixed");c.addParam("p1","i32"),c.addParam("p2","i32"),c.addParam("pr","i32"),c.addLocal("z1","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d));c.addCode(f.setLocal("z1",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))));const i=f.getLocal("z1"),b=f.getLocal("p2"),o=f.i32_add(f.getLocal("p2"),f.i32_const(d)),s=f.getLocal("pr"),l=f.i32_add(f.getLocal("pr"),f.i32_const(d)),u=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),h=f.i32_const(e.alloc(d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d)),m=f.i32_const(e.alloc(d)),x=f.i32_const(e.alloc(d)),y=f.i32_const(e.alloc(d)),A=f.i32_const(e.alloc(d)),v=f.i32_const(e.alloc(d)),w=f.i32_const(e.alloc(d)),_=f.i32_const(e.alloc(d)),I=f.i32_const(e.alloc(d)),E=f.i32_const(e.alloc(d)),C=f.i32_const(e.alloc(d)),M=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),[...f.call(a+"_copyAffine",f.getLocal("p2"),f.getLocal("pr")),...f.call(t+"_one",f.i32_add(f.getLocal("pr"),f.i32_const(2*d))),...f.ret([])]),f.if(f.call(a+"_isZeroAffine",f.getLocal("p2")),[...f.call(a+"_copy",f.getLocal("p1"),f.getLocal("pr")),...f.ret([])]),f.if(f.call(t+"_isOne",i),[...f.call(a+"_addAffine",r,b,s),...f.ret([])]),f.call(t+"_square",i,h),f.call(t+"_mul",b,h,p),f.call(t+"_mul",i,h,g),f.call(t+"_mul",o,g,m),f.if(f.call(t+"_eq",r,p),f.if(f.call(t+"_eq",n,m),[...f.call(a+"_doubleAffine",f.getLocal("p2"),f.getLocal("pr")),...f.ret([])])),f.call(t+"_sub",p,r,x),f.call(t+"_sub",m,n,A),f.call(t+"_square",x,y),f.call(t+"_add",y,y,v),f.call(t+"_add",v,v,v),f.call(t+"_mul",x,v,w),f.call(t+"_add",A,A,_),f.call(t+"_mul",r,v,E),f.call(t+"_square",_,I),f.call(t+"_add",E,E,C),f.call(t+"_sub",I,w,s),f.call(t+"_sub",s,C,s),f.call(t+"_mul",n,w,M),f.call(t+"_add",M,M,M),f.call(t+"_sub",E,s,l),f.call(t+"_mul",l,_,l),f.call(t+"_sub",l,M,l),f.call(t+"_add",i,x,u),f.call(t+"_square",u,u),f.call(t+"_sub",u,h,u),f.call(t+"_sub",u,y,u))}(),function(){const c=e.addFunction(a+"_add");c.addParam("p1","i32"),c.addParam("p2","i32"),c.addParam("pr","i32"),c.addLocal("z1","i32"),c.addLocal("z2","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d));c.addCode(f.setLocal("z1",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))));const i=f.getLocal("z1"),b=f.getLocal("p2"),o=f.i32_add(f.getLocal("p2"),f.i32_const(d));c.addCode(f.setLocal("z2",f.i32_add(f.getLocal("p2"),f.i32_const(2*d))));const s=f.getLocal("z2"),l=f.getLocal("pr"),u=f.i32_add(f.getLocal("pr"),f.i32_const(d)),h=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d)),m=f.i32_const(e.alloc(d)),x=f.i32_const(e.alloc(d)),y=f.i32_const(e.alloc(d)),A=f.i32_const(e.alloc(d)),v=f.i32_const(e.alloc(d)),w=f.i32_const(e.alloc(d)),_=f.i32_const(e.alloc(d)),I=f.i32_const(e.alloc(d)),E=f.i32_const(e.alloc(d)),C=f.i32_const(e.alloc(d)),M=f.i32_const(e.alloc(d)),B=f.i32_const(e.alloc(d)),L=f.i32_const(e.alloc(d)),S=f.i32_const(e.alloc(d)),k=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),[...f.call(a+"_copy",f.getLocal("p2"),f.getLocal("pr")),...f.ret([])]),f.if(f.call(a+"_isZero",f.getLocal("p2")),[...f.call(a+"_copy",f.getLocal("p1"),f.getLocal("pr")),...f.ret([])]),f.if(f.call(t+"_isOne",i),[...f.call(a+"_addMixed",b,r,l),...f.ret([])]),f.if(f.call(t+"_isOne",s),[...f.call(a+"_addMixed",r,b,l),...f.ret([])]),f.call(t+"_square",i,p),f.call(t+"_square",s,g),f.call(t+"_mul",r,g,m),f.call(t+"_mul",b,p,x),f.call(t+"_mul",i,p,y),f.call(t+"_mul",s,g,A),f.call(t+"_mul",n,A,v),f.call(t+"_mul",o,y,w),f.if(f.call(t+"_eq",m,x),f.if(f.call(t+"_eq",v,w),[...f.call(a+"_double",f.getLocal("p1"),f.getLocal("pr")),...f.ret([])])),f.call(t+"_sub",x,m,_),f.call(t+"_sub",w,v,I),f.call(t+"_add",_,_,E),f.call(t+"_square",E,E),f.call(t+"_mul",_,E,C),f.call(t+"_add",I,I,M),f.call(t+"_mul",m,E,L),f.call(t+"_square",M,B),f.call(t+"_add",L,L,S),f.call(t+"_sub",B,C,l),f.call(t+"_sub",l,S,l),f.call(t+"_mul",v,C,k),f.call(t+"_add",k,k,k),f.call(t+"_sub",L,l,u),f.call(t+"_mul",u,M,u),f.call(t+"_sub",u,k,u),f.call(t+"_add",i,s,h),f.call(t+"_square",h,h),f.call(t+"_sub",h,p,h),f.call(t+"_sub",h,g,h),f.call(t+"_mul",h,_,h))}(),function(){const c=e.addFunction(a+"_negAffine");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.getLocal("pr"),b=f.i32_add(f.getLocal("pr"),f.i32_const(d));c.addCode(f.call(t+"_copy",r,i),f.call(t+"_neg",n,b))}(),function(){const c=e.addFunction(a+"_neg");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.i32_add(f.getLocal("p1"),f.i32_const(2*d)),b=f.getLocal("pr"),o=f.i32_add(f.getLocal("pr"),f.i32_const(d)),s=f.i32_add(f.getLocal("pr"),f.i32_const(2*d));c.addCode(f.call(t+"_copy",r,b),f.call(t+"_neg",n,o),f.call(t+"_copy",i,s))}(),function(){const t=e.addFunction(a+"_subAffine");t.addParam("p1","i32"),t.addParam("p2","i32"),t.addParam("pr","i32");const c=t.getCodeBuilder(),f=c.i32_const(e.alloc(3*d));t.addCode(c.call(a+"_negAffine",c.getLocal("p2"),f),c.call(a+"_addAffine",c.getLocal("p1"),f,c.getLocal("pr")))}(),function(){const t=e.addFunction(a+"_subMixed");t.addParam("p1","i32"),t.addParam("p2","i32"),t.addParam("pr","i32");const c=t.getCodeBuilder(),f=c.i32_const(e.alloc(3*d));t.addCode(c.call(a+"_negAffine",c.getLocal("p2"),f),c.call(a+"_addMixed",c.getLocal("p1"),f,c.getLocal("pr")))}(),function(){const t=e.addFunction(a+"_sub");t.addParam("p1","i32"),t.addParam("p2","i32"),t.addParam("pr","i32");const c=t.getCodeBuilder(),f=c.i32_const(e.alloc(3*d));t.addCode(c.call(a+"_neg",c.getLocal("p2"),f),c.call(a+"_add",c.getLocal("p1"),f,c.getLocal("pr")))}(),function(){const c=e.addFunction(a+"_fromMontgomeryAffine");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_fromMontgomery",f.getLocal("p1"),f.getLocal("pr")));for(let e=1;e<2;e++)c.addCode(f.call(t+"_fromMontgomery",f.i32_add(f.getLocal("p1"),f.i32_const(e*d)),f.i32_add(f.getLocal("pr"),f.i32_const(e*d))))}(),function(){const c=e.addFunction(a+"_fromMontgomery");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_fromMontgomery",f.getLocal("p1"),f.getLocal("pr")));for(let e=1;e<3;e++)c.addCode(f.call(t+"_fromMontgomery",f.i32_add(f.getLocal("p1"),f.i32_const(e*d)),f.i32_add(f.getLocal("pr"),f.i32_const(e*d))))}(),function(){const c=e.addFunction(a+"_toMontgomeryAffine");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_toMontgomery",f.getLocal("p1"),f.getLocal("pr")));for(let e=1;e<2;e++)c.addCode(f.call(t+"_toMontgomery",f.i32_add(f.getLocal("p1"),f.i32_const(e*d)),f.i32_add(f.getLocal("pr"),f.i32_const(e*d))))}(),function(){const c=e.addFunction(a+"_toMontgomery");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_toMontgomery",f.getLocal("p1"),f.getLocal("pr")));for(let e=1;e<3;e++)c.addCode(f.call(t+"_toMontgomery",f.i32_add(f.getLocal("p1"),f.i32_const(e*d)),f.i32_add(f.getLocal("pr"),f.i32_const(e*d))))}(),function(){const c=e.addFunction(a+"_toAffine");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.i32_add(f.getLocal("p1"),f.i32_const(2*d)),b=f.getLocal("pr"),o=f.i32_add(f.getLocal("pr"),f.i32_const(d)),s=f.i32_const(e.alloc(d)),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),[...f.call(t+"_zero",b),...f.call(t+"_zero",o)],[...f.call(t+"_inverse",i,s),...f.call(t+"_square",s,l),...f.call(t+"_mul",s,l,u),...f.call(t+"_mul",r,l,b),...f.call(t+"_mul",n,u,o)]))}(),function(){const f=e.addFunction(a+"_inCurveAffine");f.addParam("pIn","i32"),f.setReturnType("i32");const r=f.getCodeBuilder(),n=r.getLocal("pIn"),i=r.i32_add(r.getLocal("pIn"),r.i32_const(d)),b=r.i32_const(e.alloc(d)),o=r.i32_const(e.alloc(d));f.addCode(r.call(t+"_square",i,b),r.call(t+"_square",n,o),r.call(t+"_mul",n,o,o),r.call(t+"_add",o,r.i32_const(c),o),r.ret(r.call(t+"_eq",b,o)))}(),function(){const t=e.addFunction(a+"_inCurve");t.addParam("pIn","i32"),t.setReturnType("i32");const c=t.getCodeBuilder(),f=c.i32_const(e.alloc(2*d));t.addCode(c.call(a+"_toAffine",c.getLocal("pIn"),f),c.ret(c.call(a+"_inCurveAffine",f)))}(),function(){const c=e.addFunction(a+"_batchToAffine");c.addParam("pIn","i32"),c.addParam("n","i32"),c.addParam("pOut","i32"),c.addLocal("pAux","i32"),c.addLocal("itIn","i32"),c.addLocal("itAux","i32"),c.addLocal("itOut","i32"),c.addLocal("i","i32");const f=c.getCodeBuilder(),r=f.i32_const(e.alloc(d));c.addCode(f.setLocal("pAux",f.i32_load(f.i32_const(0))),f.i32_store(f.i32_const(0),f.i32_add(f.getLocal("pAux"),f.i32_mul(f.getLocal("n"),f.i32_const(d)))),f.call(t+"_batchInverse",f.i32_add(f.getLocal("pIn"),f.i32_const(2*d)),f.i32_const(3*d),f.getLocal("n"),f.getLocal("pAux"),f.i32_const(d)),f.setLocal("itIn",f.getLocal("pIn")),f.setLocal("itAux",f.getLocal("pAux")),f.setLocal("itOut",f.getLocal("pOut")),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("n"))),f.if(f.call(t+"_isZero",f.getLocal("itAux")),[...f.call(t+"_zero",f.getLocal("itOut")),...f.call(t+"_zero",f.i32_add(f.getLocal("itOut"),f.i32_const(d)))],[...f.call(t+"_mul",f.getLocal("itAux"),f.i32_add(f.getLocal("itIn"),f.i32_const(d)),r),...f.call(t+"_square",f.getLocal("itAux"),f.getLocal("itAux")),...f.call(t+"_mul",f.getLocal("itAux"),f.getLocal("itIn"),f.getLocal("itOut")),...f.call(t+"_mul",f.getLocal("itAux"),r,f.i32_add(f.getLocal("itOut"),f.i32_const(d)))]),f.setLocal("itIn",f.i32_add(f.getLocal("itIn"),f.i32_const(3*d))),f.setLocal("itOut",f.i32_add(f.getLocal("itOut"),f.i32_const(2*d))),f.setLocal("itAux",f.i32_add(f.getLocal("itAux"),f.i32_const(d))),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))),f.i32_store(f.i32_const(0),f.getLocal("pAux")))}(),function(){const c=e.addFunction(a+"_normalize");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.i32_add(f.getLocal("p1"),f.i32_const(2*d)),b=f.getLocal("pr"),o=f.i32_add(f.getLocal("pr"),f.i32_const(d)),s=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),f.call(a+"_zero",f.getLocal("pr")),[...f.call(t+"_inverse",i,l),...f.call(t+"_square",l,u),...f.call(t+"_mul",l,u,h),...f.call(t+"_mul",r,u,b),...f.call(t+"_mul",n,h,o),...f.call(t+"_one",s)]))}(),function(){const t=e.addFunction(a+"__reverseBytes");t.addParam("pIn","i32"),t.addParam("n","i32"),t.addParam("pOut","i32"),t.addLocal("itOut","i32"),t.addLocal("itIn","i32");const c=t.getCodeBuilder();t.addCode(c.setLocal("itOut",c.i32_sub(c.i32_add(c.getLocal("pOut"),c.getLocal("n")),c.i32_const(1))),c.setLocal("itIn",c.getLocal("pIn")),c.block(c.loop(c.br_if(1,c.i32_lt_s(c.getLocal("itOut"),c.getLocal("pOut"))),c.i32_store8(c.getLocal("itOut"),c.i32_load8_u(c.getLocal("itIn"))),c.setLocal("itOut",c.i32_sub(c.getLocal("itOut"),c.i32_const(1))),c.setLocal("itIn",c.i32_add(c.getLocal("itIn"),c.i32_const(1))),c.br(0))))}(),function(){const t=e.addFunction(a+"_LEMtoU");t.addParam("pIn","i32"),t.addParam("pOut","i32");const c=t.getCodeBuilder(),f=e.alloc(2*d),r=c.i32_const(f),n=c.i32_const(f),i=c.i32_const(f+d);t.addCode(c.if(c.call(a+"_isZeroAffine",c.getLocal("pIn")),[...c.call(a+"_zeroAffine",c.getLocal("pOut")),...c.ret([])]),c.call(a+"_fromMontgomeryAffine",c.getLocal("pIn"),r),c.call(a+"__reverseBytes",n,c.i32_const(d),c.getLocal("pOut")),c.call(a+"__reverseBytes",i,c.i32_const(d),c.i32_add(c.getLocal("pOut"),c.i32_const(d))))}(),function(){const c=e.addFunction(a+"_LEMtoC");c.addParam("pIn","i32"),c.addParam("pOut","i32");const f=c.getCodeBuilder(),r=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZeroAffine",f.getLocal("pIn")),[...f.call(t+"_zero",f.getLocal("pOut")),...f.i32_store8(f.getLocal("pOut"),f.i32_const(64)),...f.ret([])]),f.call(t+"_fromMontgomery",f.getLocal("pIn"),r),f.call(a+"__reverseBytes",r,f.i32_const(d),f.getLocal("pOut")),f.if(f.i32_eq(f.call(t+"_sign",f.i32_add(f.getLocal("pIn"),f.i32_const(d))),f.i32_const(-1)),f.i32_store8(f.getLocal("pOut"),f.i32_or(f.i32_load8_u(f.getLocal("pOut")),f.i32_const(128)))))}(),function(){const t=e.addFunction(a+"_UtoLEM");t.addParam("pIn","i32"),t.addParam("pOut","i32");const c=t.getCodeBuilder(),f=e.alloc(2*d),r=c.i32_const(f),n=c.i32_const(f),i=c.i32_const(f+d);t.addCode(c.if(c.i32_and(c.i32_load8_u(c.getLocal("pIn")),c.i32_const(64)),[...c.call(a+"_zeroAffine",c.getLocal("pOut")),...c.ret([])]),c.call(a+"__reverseBytes",c.getLocal("pIn"),c.i32_const(d),n),c.call(a+"__reverseBytes",c.i32_add(c.getLocal("pIn"),c.i32_const(d)),c.i32_const(d),i),c.call(a+"_toMontgomeryAffine",r,c.getLocal("pOut")))}(),function(){const f=e.addFunction(a+"_CtoLEM");f.addParam("pIn","i32"),f.addParam("pOut","i32"),f.addLocal("firstByte","i32"),f.addLocal("greatest","i32");const r=f.getCodeBuilder(),n=e.alloc(2*d),i=r.i32_const(n),b=r.i32_const(n+d);f.addCode(r.setLocal("firstByte",r.i32_load8_u(r.getLocal("pIn"))),r.if(r.i32_and(r.getLocal("firstByte"),r.i32_const(64)),[...r.call(a+"_zeroAffine",r.getLocal("pOut")),...r.ret([])]),r.setLocal("greatest",r.i32_and(r.getLocal("firstByte"),r.i32_const(128))),r.call(t+"_copy",r.getLocal("pIn"),b),r.i32_store8(b,r.i32_and(r.getLocal("firstByte"),r.i32_const(63))),r.call(a+"__reverseBytes",b,r.i32_const(d),i),r.call(t+"_toMontgomery",i,r.getLocal("pOut")),r.call(t+"_square",r.getLocal("pOut"),b),r.call(t+"_mul",r.getLocal("pOut"),b,b),r.call(t+"_add",b,r.i32_const(c),b),r.call(t+"_sqrt",b,b),r.call(t+"_neg",b,i),r.if(r.i32_eq(r.call(t+"_sign",b),r.i32_const(-1)),r.if(r.getLocal("greatest"),r.call(t+"_copy",b,r.i32_add(r.getLocal("pOut"),r.i32_const(d))),r.call(t+"_neg",b,r.i32_add(r.getLocal("pOut"),r.i32_const(d)))),r.if(r.getLocal("greatest"),r.call(t+"_neg",b,r.i32_add(r.getLocal("pOut"),r.i32_const(d))),r.call(t+"_copy",b,r.i32_add(r.getLocal("pOut"),r.i32_const(d))))))}(),_e(e,a+"_batchLEMtoU",a+"_LEMtoU",2*d,2*d),_e(e,a+"_batchLEMtoC",a+"_LEMtoC",2*d,d),_e(e,a+"_batchUtoLEM",a+"_UtoLEM",2*d,2*d),_e(e,a+"_batchCtoLEM",a+"_CtoLEM",d,2*d,!0),_e(e,a+"_batchToJacobian",a+"_toJacobian",2*d,3*d,!0),Ie(e,a,a+"_multiexp",a+"_add",3*d),Ie(e,a,a+"_multiexpAffine",a+"_addMixed",2*d),we(e,a+"_timesScalar",3*d,a+"_add",a+"_double",a+"_sub",a+"_copy",a+"_zero"),we(e,a+"_timesScalarAffine",2*d,a+"_addMixed",a+"_double",a+"_subMixed",a+"_copyAffine",a+"_zero"),e.exportFunction(a+"_isZero"),e.exportFunction(a+"_isZeroAffine"),e.exportFunction(a+"_eq"),e.exportFunction(a+"_eqMixed"),e.exportFunction(a+"_eqAffine"),e.exportFunction(a+"_copy"),e.exportFunction(a+"_copyAffine"),e.exportFunction(a+"_zero"),e.exportFunction(a+"_zeroAffine"),e.exportFunction(a+"_double"),e.exportFunction(a+"_doubleAffine"),e.exportFunction(a+"_add"),e.exportFunction(a+"_addMixed"),e.exportFunction(a+"_addAffine"),e.exportFunction(a+"_neg"),e.exportFunction(a+"_negAffine"),e.exportFunction(a+"_sub"),e.exportFunction(a+"_subMixed"),e.exportFunction(a+"_subAffine"),e.exportFunction(a+"_fromMontgomery"),e.exportFunction(a+"_fromMontgomeryAffine"),e.exportFunction(a+"_toMontgomery"),e.exportFunction(a+"_toMontgomeryAffine"),e.exportFunction(a+"_timesScalar"),e.exportFunction(a+"_timesScalarAffine"),e.exportFunction(a+"_normalize"),e.exportFunction(a+"_LEMtoU"),e.exportFunction(a+"_LEMtoC"),e.exportFunction(a+"_UtoLEM"),e.exportFunction(a+"_CtoLEM"),e.exportFunction(a+"_batchLEMtoU"),e.exportFunction(a+"_batchLEMtoC"),e.exportFunction(a+"_batchUtoLEM"),e.exportFunction(a+"_batchCtoLEM"),e.exportFunction(a+"_toAffine"),e.exportFunction(a+"_toJacobian"),e.exportFunction(a+"_batchToAffine"),e.exportFunction(a+"_batchToJacobian"),e.exportFunction(a+"_inCurve"),e.exportFunction(a+"_inCurveAffine")),a};const{isOdd:Ce,modInv:Me,modPow:Be}=U,Le=D;var Se=function(e,a,t,c,f){const d=8*e.modules[c].n64,r=8*e.modules[t].n64,n=e.modules[c].q;let i=n-1n,b=0;for(;!Ce(i);)b++,i>>=1n;let o=2n;for(;1n===Be(o,n>>1n,n);)o+=1n;const s=new Array(b+1);s[b]=Be(o,i,n);let l=b-1;for(;l>=0;)s[l]=Be(s[l+1],2n,n),l--;const u=[],h=(1n<>t);return a}const E=Array(256);for(let e=0;e<256;e++)E[e]=I(e);const C=e.alloc(E);!function(){const t=e.addFunction(a+"__rev");t.addParam("x","i32"),t.addParam("bits","i32"),t.setReturnType("i32");const c=t.getCodeBuilder();t.addCode(c.i32_rotl(c.i32_add(c.i32_add(c.i32_shl(c.i32_load8_u(c.i32_and(c.getLocal("x"),c.i32_const(255)),C,0),c.i32_const(24)),c.i32_shl(c.i32_load8_u(c.i32_and(c.i32_shr_u(c.getLocal("x"),c.i32_const(8)),c.i32_const(255)),C,0),c.i32_const(16))),c.i32_add(c.i32_shl(c.i32_load8_u(c.i32_and(c.i32_shr_u(c.getLocal("x"),c.i32_const(16)),c.i32_const(255)),C,0),c.i32_const(8)),c.i32_load8_u(c.i32_and(c.i32_shr_u(c.getLocal("x"),c.i32_const(24)),c.i32_const(255)),C,0))),c.getLocal("bits")))}(),function(){const c=e.addFunction(a+"__reversePermutation");c.addParam("px","i32"),c.addParam("bits","i32"),c.addLocal("n","i32"),c.addLocal("i","i32"),c.addLocal("ri","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32");const f=c.getCodeBuilder(),d=f.i32_const(e.alloc(r));c.addCode(f.setLocal("n",f.i32_shl(f.i32_const(1),f.getLocal("bits"))),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("n"))),f.setLocal("idx1",f.i32_add(f.getLocal("px"),f.i32_mul(f.getLocal("i"),f.i32_const(r)))),f.setLocal("ri",f.call(a+"__rev",f.getLocal("i"),f.getLocal("bits"))),f.setLocal("idx2",f.i32_add(f.getLocal("px"),f.i32_mul(f.getLocal("ri"),f.i32_const(r)))),f.if(f.i32_lt_u(f.getLocal("i"),f.getLocal("ri")),[...f.call(t+"_copy",f.getLocal("idx1"),d),...f.call(t+"_copy",f.getLocal("idx2"),f.getLocal("idx1")),...f.call(t+"_copy",d,f.getLocal("idx2"))]),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))))}(),function(){const d=e.addFunction(a+"__fftFinal");d.addParam("px","i32"),d.addParam("bits","i32"),d.addParam("reverse","i32"),d.addParam("mulFactor","i32"),d.addLocal("n","i32"),d.addLocal("ndiv2","i32"),d.addLocal("pInv2","i32"),d.addLocal("i","i32"),d.addLocal("mask","i32"),d.addLocal("idx1","i32"),d.addLocal("idx2","i32");const n=d.getCodeBuilder(),i=n.i32_const(e.alloc(r));d.addCode(n.if(n.i32_and(n.i32_eqz(n.getLocal("reverse")),n.call(c+"_isOne",n.getLocal("mulFactor"))),n.ret([])),n.setLocal("n",n.i32_shl(n.i32_const(1),n.getLocal("bits"))),n.setLocal("mask",n.i32_sub(n.getLocal("n"),n.i32_const(1))),n.setLocal("i",n.i32_const(1)),n.setLocal("ndiv2",n.i32_shr_u(n.getLocal("n"),n.i32_const(1))),n.block(n.loop(n.br_if(1,n.i32_ge_u(n.getLocal("i"),n.getLocal("ndiv2"))),n.setLocal("idx1",n.i32_add(n.getLocal("px"),n.i32_mul(n.getLocal("i"),n.i32_const(r)))),n.setLocal("idx2",n.i32_add(n.getLocal("px"),n.i32_mul(n.i32_sub(n.getLocal("n"),n.getLocal("i")),n.i32_const(r)))),n.if(n.getLocal("reverse"),n.if(n.call(c+"_isOne",n.getLocal("mulFactor")),[...n.call(t+"_copy",n.getLocal("idx1"),i),...n.call(t+"_copy",n.getLocal("idx2"),n.getLocal("idx1")),...n.call(t+"_copy",i,n.getLocal("idx2"))],[...n.call(t+"_copy",n.getLocal("idx1"),i),...n.call(f,n.getLocal("idx2"),n.getLocal("mulFactor"),n.getLocal("idx1")),...n.call(f,i,n.getLocal("mulFactor"),n.getLocal("idx2"))]),n.if(n.call(c+"_isOne",n.getLocal("mulFactor")),[],[...n.call(f,n.getLocal("idx1"),n.getLocal("mulFactor"),n.getLocal("idx1")),...n.call(f,n.getLocal("idx2"),n.getLocal("mulFactor"),n.getLocal("idx2"))])),n.setLocal("i",n.i32_add(n.getLocal("i"),n.i32_const(1))),n.br(0))),n.if(n.call(c+"_isOne",n.getLocal("mulFactor")),[],[...n.call(f,n.getLocal("px"),n.getLocal("mulFactor"),n.getLocal("px")),...n.setLocal("idx2",n.i32_add(n.getLocal("px"),n.i32_mul(n.getLocal("ndiv2"),n.i32_const(r)))),...n.call(f,n.getLocal("idx2"),n.getLocal("mulFactor"),n.getLocal("idx2"))]))}(),function(){const n=e.addFunction(a+"_rawfft");n.addParam("px","i32"),n.addParam("bits","i32"),n.addParam("reverse","i32"),n.addParam("mulFactor","i32"),n.addLocal("s","i32"),n.addLocal("k","i32"),n.addLocal("j","i32"),n.addLocal("m","i32"),n.addLocal("mdiv2","i32"),n.addLocal("n","i32"),n.addLocal("pwm","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r)),s=i.i32_const(e.alloc(r));n.addCode(i.call(a+"__reversePermutation",i.getLocal("px"),i.getLocal("bits")),i.setLocal("n",i.i32_shl(i.i32_const(1),i.getLocal("bits"))),i.setLocal("s",i.i32_const(1)),i.block(i.loop(i.br_if(1,i.i32_gt_u(i.getLocal("s"),i.getLocal("bits"))),i.setLocal("m",i.i32_shl(i.i32_const(1),i.getLocal("s"))),i.setLocal("pwm",i.i32_add(i.i32_const(p),i.i32_mul(i.getLocal("s"),i.i32_const(d)))),i.setLocal("k",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_ge_u(i.getLocal("k"),i.getLocal("n"))),i.call(c+"_one",b),i.setLocal("mdiv2",i.i32_shr_u(i.getLocal("m"),i.i32_const(1))),i.setLocal("j",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_ge_u(i.getLocal("j"),i.getLocal("mdiv2"))),i.setLocal("idx1",i.i32_add(i.getLocal("px"),i.i32_mul(i.i32_add(i.getLocal("k"),i.getLocal("j")),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("idx1"),i.i32_mul(i.getLocal("mdiv2"),i.i32_const(r)))),i.call(f,i.getLocal("idx2"),b,o),i.call(t+"_copy",i.getLocal("idx1"),s),i.call(t+"_add",s,o,i.getLocal("idx1")),i.call(t+"_sub",s,o,i.getLocal("idx2")),i.call(c+"_mul",b,i.getLocal("pwm"),b),i.setLocal("j",i.i32_add(i.getLocal("j"),i.i32_const(1))),i.br(0))),i.setLocal("k",i.i32_add(i.getLocal("k"),i.getLocal("m"))),i.br(0))),i.setLocal("s",i.i32_add(i.getLocal("s"),i.i32_const(1))),i.br(0))),i.call(a+"__fftFinal",i.getLocal("px"),i.getLocal("bits"),i.getLocal("reverse"),i.getLocal("mulFactor")))}(),function(){const t=e.addFunction(a+"__log2");t.addParam("n","i32"),t.setReturnType("i32"),t.addLocal("bits","i32"),t.addLocal("aux","i32");const c=t.getCodeBuilder();t.addCode(c.setLocal("aux",c.i32_shr_u(c.getLocal("n"),c.i32_const(1)))),t.addCode(c.setLocal("bits",c.i32_const(0))),t.addCode(c.block(c.loop(c.br_if(1,c.i32_eqz(c.getLocal("aux"))),c.setLocal("aux",c.i32_shr_u(c.getLocal("aux"),c.i32_const(1))),c.setLocal("bits",c.i32_add(c.getLocal("bits"),c.i32_const(1))),c.br(0)))),t.addCode(c.if(c.i32_ne(c.getLocal("n"),c.i32_shl(c.i32_const(1),c.getLocal("bits"))),c.unreachable())),t.addCode(c.if(c.i32_gt_u(c.getLocal("bits"),c.i32_const(b)),c.unreachable())),t.addCode(c.getLocal("bits"))}(),function(){const t=e.addFunction(a+"_fft");t.addParam("px","i32"),t.addParam("n","i32"),t.addLocal("bits","i32");const f=t.getCodeBuilder(),r=f.i32_const(e.alloc(d));t.addCode(f.setLocal("bits",f.call(a+"__log2",f.getLocal("n"))),f.call(c+"_one",r),f.call(a+"_rawfft",f.getLocal("px"),f.getLocal("bits"),f.i32_const(0),r))}(),function(){const t=e.addFunction(a+"_ifft");t.addParam("px","i32"),t.addParam("n","i32"),t.addLocal("bits","i32"),t.addLocal("pInv2","i32");const c=t.getCodeBuilder();t.addCode(c.setLocal("bits",c.call(a+"__log2",c.getLocal("n"))),c.setLocal("pInv2",c.i32_add(c.i32_const(x),c.i32_mul(c.getLocal("bits"),c.i32_const(d)))),c.call(a+"_rawfft",c.getLocal("px"),c.getLocal("bits"),c.i32_const(1),c.getLocal("pInv2")))}(),function(){const n=e.addFunction(a+"_fftJoin");n.addParam("pBuff1","i32"),n.addParam("pBuff2","i32"),n.addParam("n","i32"),n.addParam("first","i32"),n.addParam("inc","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32"),n.addLocal("i","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r)),s=i.i32_const(e.alloc(r));n.addCode(i.call(c+"_copy",i.getLocal("first"),b),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("pBuff1"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("pBuff2"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.call(f,i.getLocal("idx2"),b,o),i.call(t+"_copy",i.getLocal("idx1"),s),i.call(t+"_add",s,o,i.getLocal("idx1")),i.call(t+"_sub",s,o,i.getLocal("idx2")),i.call(c+"_mul",b,i.getLocal("inc"),b),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const n=e.addFunction(a+"_fftJoinExt");n.addParam("pBuff1","i32"),n.addParam("pBuff2","i32"),n.addParam("n","i32"),n.addParam("first","i32"),n.addParam("inc","i32"),n.addParam("totalBits","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32"),n.addLocal("i","i32"),n.addLocal("pShiftToM","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r));n.addCode(i.setLocal("pShiftToM",i.i32_add(i.i32_const(w),i.i32_mul(i.getLocal("totalBits"),i.i32_const(d)))),i.call(c+"_copy",i.getLocal("first"),b),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("pBuff1"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("pBuff2"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.call(t+"_add",i.getLocal("idx1"),i.getLocal("idx2"),o),i.call(f,i.getLocal("idx2"),i.getLocal("pShiftToM"),i.getLocal("idx2")),i.call(t+"_add",i.getLocal("idx1"),i.getLocal("idx2"),i.getLocal("idx2")),i.call(f,i.getLocal("idx2"),b,i.getLocal("idx2")),i.call(t+"_copy",o,i.getLocal("idx1")),i.call(c+"_mul",b,i.getLocal("inc"),b),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const n=e.addFunction(a+"_fftJoinExtInv");n.addParam("pBuff1","i32"),n.addParam("pBuff2","i32"),n.addParam("n","i32"),n.addParam("first","i32"),n.addParam("inc","i32"),n.addParam("totalBits","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32"),n.addLocal("i","i32"),n.addLocal("pShiftToM","i32"),n.addLocal("pSConst","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r));n.addCode(i.setLocal("pShiftToM",i.i32_add(i.i32_const(w),i.i32_mul(i.getLocal("totalBits"),i.i32_const(d)))),i.setLocal("pSConst",i.i32_add(i.i32_const(_),i.i32_mul(i.getLocal("totalBits"),i.i32_const(d)))),i.call(c+"_copy",i.getLocal("first"),b),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("pBuff1"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("pBuff2"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.call(f,i.getLocal("idx2"),b,o),i.call(t+"_sub",i.getLocal("idx1"),o,i.getLocal("idx2")),i.call(f,i.getLocal("idx2"),i.getLocal("pSConst"),i.getLocal("idx2")),i.call(f,i.getLocal("idx1"),i.getLocal("pShiftToM"),i.getLocal("idx1")),i.call(t+"_sub",o,i.getLocal("idx1"),i.getLocal("idx1")),i.call(f,i.getLocal("idx1"),i.getLocal("pSConst"),i.getLocal("idx1")),i.call(c+"_mul",b,i.getLocal("inc"),b),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const n=e.addFunction(a+"_fftMix");n.addParam("pBuff","i32"),n.addParam("n","i32"),n.addParam("exp","i32"),n.addLocal("nGroups","i32"),n.addLocal("nPerGroup","i32"),n.addLocal("nPerGroupDiv2","i32"),n.addLocal("pairOffset","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32"),n.addLocal("i","i32"),n.addLocal("j","i32"),n.addLocal("pwm","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r)),s=i.i32_const(e.alloc(r));n.addCode(i.setLocal("nPerGroup",i.i32_shl(i.i32_const(1),i.getLocal("exp"))),i.setLocal("nPerGroupDiv2",i.i32_shr_u(i.getLocal("nPerGroup"),i.i32_const(1))),i.setLocal("nGroups",i.i32_shr_u(i.getLocal("n"),i.getLocal("exp"))),i.setLocal("pairOffset",i.i32_mul(i.getLocal("nPerGroupDiv2"),i.i32_const(r))),i.setLocal("pwm",i.i32_add(i.i32_const(p),i.i32_mul(i.getLocal("exp"),i.i32_const(d)))),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("nGroups"))),i.call(c+"_one",b),i.setLocal("j",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("j"),i.getLocal("nPerGroupDiv2"))),i.setLocal("idx1",i.i32_add(i.getLocal("pBuff"),i.i32_mul(i.i32_add(i.i32_mul(i.getLocal("i"),i.getLocal("nPerGroup")),i.getLocal("j")),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("idx1"),i.getLocal("pairOffset"))),i.call(f,i.getLocal("idx2"),b,o),i.call(t+"_copy",i.getLocal("idx1"),s),i.call(t+"_add",s,o,i.getLocal("idx1")),i.call(t+"_sub",s,o,i.getLocal("idx2")),i.call(c+"_mul",b,i.getLocal("pwm"),b),i.setLocal("j",i.i32_add(i.getLocal("j"),i.i32_const(1))),i.br(0))),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const c=e.addFunction(a+"_fftFinal");c.addParam("pBuff","i32"),c.addParam("n","i32"),c.addParam("factor","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("ndiv2","i32");const d=c.getCodeBuilder(),n=d.i32_const(e.alloc(r));c.addCode(d.setLocal("ndiv2",d.i32_shr_u(d.getLocal("n"),d.i32_const(1))),d.if(d.i32_and(d.getLocal("n"),d.i32_const(1)),d.call(f,d.i32_add(d.getLocal("pBuff"),d.i32_mul(d.getLocal("ndiv2"),d.i32_const(r))),d.getLocal("factor"),d.i32_add(d.getLocal("pBuff"),d.i32_mul(d.getLocal("ndiv2"),d.i32_const(r))))),d.setLocal("i",d.i32_const(0)),d.block(d.loop(d.br_if(1,d.i32_ge_u(d.getLocal("i"),d.getLocal("ndiv2"))),d.setLocal("idx1",d.i32_add(d.getLocal("pBuff"),d.i32_mul(d.getLocal("i"),d.i32_const(r)))),d.setLocal("idx2",d.i32_add(d.getLocal("pBuff"),d.i32_mul(d.i32_sub(d.i32_sub(d.getLocal("n"),d.i32_const(1)),d.getLocal("i")),d.i32_const(r)))),d.call(f,d.getLocal("idx2"),d.getLocal("factor"),n),d.call(f,d.getLocal("idx1"),d.getLocal("factor"),d.getLocal("idx2")),d.call(t+"_copy",n,d.getLocal("idx1")),d.setLocal("i",d.i32_add(d.getLocal("i"),d.i32_const(1))),d.br(0))))}(),function(){const n=e.addFunction(a+"_prepareLagrangeEvaluation");n.addParam("pBuff1","i32"),n.addParam("pBuff2","i32"),n.addParam("n","i32"),n.addParam("first","i32"),n.addParam("inc","i32"),n.addParam("totalBits","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32"),n.addLocal("i","i32"),n.addLocal("pShiftToM","i32"),n.addLocal("pSConst","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r));n.addCode(i.setLocal("pShiftToM",i.i32_add(i.i32_const(w),i.i32_mul(i.getLocal("totalBits"),i.i32_const(d)))),i.setLocal("pSConst",i.i32_add(i.i32_const(_),i.i32_mul(i.getLocal("totalBits"),i.i32_const(d)))),i.call(c+"_copy",i.getLocal("first"),b),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("pBuff1"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("pBuff2"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.call(f,i.getLocal("idx1"),i.getLocal("pShiftToM"),o),i.call(t+"_sub",i.getLocal("idx2"),o,o),i.call(t+"_sub",i.getLocal("idx1"),i.getLocal("idx2"),i.getLocal("idx2")),i.call(f,o,i.getLocal("pSConst"),i.getLocal("idx1")),i.call(f,i.getLocal("idx2"),b,i.getLocal("idx2")),i.call(c+"_mul",b,i.getLocal("inc"),b),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),e.exportFunction(a+"_fft"),e.exportFunction(a+"_ifft"),e.exportFunction(a+"_rawfft"),e.exportFunction(a+"_fftJoin"),e.exportFunction(a+"_fftJoinExt"),e.exportFunction(a+"_fftJoinExtInv"),e.exportFunction(a+"_fftMix"),e.exportFunction(a+"_fftFinal"),e.exportFunction(a+"_prepareLagrangeEvaluation")},ke=function(e,a,t){const c=8*e.modules[t].n64;return function(){const f=e.addFunction(a+"_zero");f.addParam("px","i32"),f.addParam("n","i32"),f.addLocal("lastp","i32"),f.addLocal("p","i32");const d=f.getCodeBuilder();f.addCode(d.setLocal("p",d.getLocal("px")),d.setLocal("lastp",d.i32_add(d.getLocal("px"),d.i32_mul(d.getLocal("n"),d.i32_const(c)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("p"),d.getLocal("lastp"))),d.call(t+"_zero",d.getLocal("p")),d.setLocal("p",d.i32_add(d.getLocal("p"),d.i32_const(c))),d.br(0))))}(),function(){const f=e.addFunction(a+"_constructLC");f.addParam("ppolynomials","i32"),f.addParam("psignals","i32"),f.addParam("nSignals","i32"),f.addParam("pres","i32"),f.addLocal("i","i32"),f.addLocal("j","i32"),f.addLocal("pp","i32"),f.addLocal("ps","i32"),f.addLocal("pd","i32"),f.addLocal("ncoefs","i32");const d=f.getCodeBuilder(),r=d.i32_const(e.alloc(c));f.addCode(d.setLocal("i",d.i32_const(0)),d.setLocal("pp",d.getLocal("ppolynomials")),d.setLocal("ps",d.getLocal("psignals")),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("i"),d.getLocal("nSignals"))),d.setLocal("ncoefs",d.i32_load(d.getLocal("pp"))),d.setLocal("pp",d.i32_add(d.getLocal("pp"),d.i32_const(4))),d.setLocal("j",d.i32_const(0)),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("j"),d.getLocal("ncoefs"))),d.setLocal("pd",d.i32_add(d.getLocal("pres"),d.i32_mul(d.i32_load(d.getLocal("pp")),d.i32_const(c)))),d.setLocal("pp",d.i32_add(d.getLocal("pp"),d.i32_const(4))),d.call(t+"_mul",d.getLocal("ps"),d.getLocal("pp"),r),d.call(t+"_add",r,d.getLocal("pd"),d.getLocal("pd")),d.setLocal("pp",d.i32_add(d.getLocal("pp"),d.i32_const(c))),d.setLocal("j",d.i32_add(d.getLocal("j"),d.i32_const(1))),d.br(0))),d.setLocal("ps",d.i32_add(d.getLocal("ps"),d.i32_const(c))),d.setLocal("i",d.i32_add(d.getLocal("i"),d.i32_const(1))),d.br(0))))}(),e.exportFunction(a+"_zero"),e.exportFunction(a+"_constructLC"),a},Ne=function(e,a,t){const c=8*e.modules[t].n64;return function(){const f=e.addFunction(a+"_buildABC");f.addParam("pCoefs","i32"),f.addParam("nCoefs","i32"),f.addParam("pWitness","i32"),f.addParam("pA","i32"),f.addParam("pB","i32"),f.addParam("pC","i32"),f.addParam("offsetOut","i32"),f.addParam("nOut","i32"),f.addParam("offsetWitness","i32"),f.addParam("nWitness","i32"),f.addLocal("it","i32"),f.addLocal("ita","i32"),f.addLocal("itb","i32"),f.addLocal("last","i32"),f.addLocal("m","i32"),f.addLocal("c","i32"),f.addLocal("s","i32"),f.addLocal("pOut","i32");const d=f.getCodeBuilder(),r=d.i32_const(e.alloc(c));f.addCode(d.setLocal("ita",d.getLocal("pA")),d.setLocal("itb",d.getLocal("pB")),d.setLocal("last",d.i32_add(d.getLocal("pA"),d.i32_mul(d.getLocal("nOut"),d.i32_const(c)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("ita"),d.getLocal("last"))),d.call(t+"_zero",d.getLocal("ita")),d.call(t+"_zero",d.getLocal("itb")),d.setLocal("ita",d.i32_add(d.getLocal("ita"),d.i32_const(c))),d.setLocal("itb",d.i32_add(d.getLocal("itb"),d.i32_const(c))),d.br(0))),d.setLocal("it",d.getLocal("pCoefs")),d.setLocal("last",d.i32_add(d.getLocal("pCoefs"),d.i32_mul(d.getLocal("nCoefs"),d.i32_const(c+12)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("it"),d.getLocal("last"))),d.setLocal("s",d.i32_load(d.getLocal("it"),8)),d.if(d.i32_or(d.i32_lt_u(d.getLocal("s"),d.getLocal("offsetWitness")),d.i32_ge_u(d.getLocal("s"),d.i32_add(d.getLocal("offsetWitness"),d.getLocal("nWitness")))),[...d.setLocal("it",d.i32_add(d.getLocal("it"),d.i32_const(c+12))),...d.br(1)]),d.setLocal("m",d.i32_load(d.getLocal("it"))),d.if(d.i32_eq(d.getLocal("m"),d.i32_const(0)),d.setLocal("pOut",d.getLocal("pA")),d.if(d.i32_eq(d.getLocal("m"),d.i32_const(1)),d.setLocal("pOut",d.getLocal("pB")),[...d.setLocal("it",d.i32_add(d.getLocal("it"),d.i32_const(c+12))),...d.br(1)])),d.setLocal("c",d.i32_load(d.getLocal("it"),4)),d.if(d.i32_or(d.i32_lt_u(d.getLocal("c"),d.getLocal("offsetOut")),d.i32_ge_u(d.getLocal("c"),d.i32_add(d.getLocal("offsetOut"),d.getLocal("nOut")))),[...d.setLocal("it",d.i32_add(d.getLocal("it"),d.i32_const(c+12))),...d.br(1)]),d.setLocal("pOut",d.i32_add(d.getLocal("pOut"),d.i32_mul(d.i32_sub(d.getLocal("c"),d.getLocal("offsetOut")),d.i32_const(c)))),d.call(t+"_mul",d.i32_add(d.getLocal("pWitness"),d.i32_mul(d.i32_sub(d.getLocal("s"),d.getLocal("offsetWitness")),d.i32_const(c))),d.i32_add(d.getLocal("it"),d.i32_const(12)),r),d.call(t+"_add",d.getLocal("pOut"),r,d.getLocal("pOut")),d.setLocal("it",d.i32_add(d.getLocal("it"),d.i32_const(c+12))),d.br(0))),d.setLocal("ita",d.getLocal("pA")),d.setLocal("itb",d.getLocal("pB")),d.setLocal("it",d.getLocal("pC")),d.setLocal("last",d.i32_add(d.getLocal("pA"),d.i32_mul(d.getLocal("nOut"),d.i32_const(c)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("ita"),d.getLocal("last"))),d.call(t+"_mul",d.getLocal("ita"),d.getLocal("itb"),d.getLocal("it")),d.setLocal("ita",d.i32_add(d.getLocal("ita"),d.i32_const(c))),d.setLocal("itb",d.i32_add(d.getLocal("itb"),d.i32_const(c))),d.setLocal("it",d.i32_add(d.getLocal("it"),d.i32_const(c))),d.br(0))))}(),function(){const f=e.addFunction(a+"_joinABC");f.addParam("pA","i32"),f.addParam("pB","i32"),f.addParam("pC","i32"),f.addParam("n","i32"),f.addParam("pP","i32"),f.addLocal("ita","i32"),f.addLocal("itb","i32"),f.addLocal("itc","i32"),f.addLocal("itp","i32"),f.addLocal("last","i32");const d=f.getCodeBuilder(),r=d.i32_const(e.alloc(c));f.addCode(d.setLocal("ita",d.getLocal("pA")),d.setLocal("itb",d.getLocal("pB")),d.setLocal("itc",d.getLocal("pC")),d.setLocal("itp",d.getLocal("pP")),d.setLocal("last",d.i32_add(d.getLocal("pA"),d.i32_mul(d.getLocal("n"),d.i32_const(c)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("ita"),d.getLocal("last"))),d.call(t+"_mul",d.getLocal("ita"),d.getLocal("itb"),r),d.call(t+"_sub",r,d.getLocal("itc"),d.getLocal("itp")),d.setLocal("ita",d.i32_add(d.getLocal("ita"),d.i32_const(c))),d.setLocal("itb",d.i32_add(d.getLocal("itb"),d.i32_const(c))),d.setLocal("itc",d.i32_add(d.getLocal("itc"),d.i32_const(c))),d.setLocal("itp",d.i32_add(d.getLocal("itp"),d.i32_const(c))),d.br(0))))}(),function(){const f=e.addFunction(a+"_batchAdd");f.addParam("pa","i32"),f.addParam("pb","i32"),f.addParam("n","i32"),f.addParam("pr","i32"),f.addLocal("ita","i32"),f.addLocal("itb","i32"),f.addLocal("itr","i32"),f.addLocal("last","i32");const d=f.getCodeBuilder();f.addCode(d.setLocal("ita",d.getLocal("pa")),d.setLocal("itb",d.getLocal("pb")),d.setLocal("itr",d.getLocal("pr")),d.setLocal("last",d.i32_add(d.getLocal("pa"),d.i32_mul(d.getLocal("n"),d.i32_const(c)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("ita"),d.getLocal("last"))),d.call(t+"_add",d.getLocal("ita"),d.getLocal("itb"),d.getLocal("itr")),d.setLocal("ita",d.i32_add(d.getLocal("ita"),d.i32_const(c))),d.setLocal("itb",d.i32_add(d.getLocal("itb"),d.i32_const(c))),d.setLocal("itr",d.i32_add(d.getLocal("itr"),d.i32_const(c))),d.br(0))))}(),e.exportFunction(a+"_buildABC"),e.exportFunction(a+"_joinABC"),e.exportFunction(a+"_batchAdd"),a},Pe=function(e,a,t,c,f,d,r,n){const i=e.addFunction(a);i.addParam("pIn","i32"),i.addParam("n","i32"),i.addParam("pFirst","i32"),i.addParam("pInc","i32"),i.addParam("pOut","i32"),i.addLocal("pOldFree","i32"),i.addLocal("i","i32"),i.addLocal("pFrom","i32"),i.addLocal("pTo","i32");const b=i.getCodeBuilder(),o=b.i32_const(e.alloc(r));i.addCode(b.setLocal("pFrom",b.getLocal("pIn")),b.setLocal("pTo",b.getLocal("pOut"))),i.addCode(b.call(c+"_copy",b.getLocal("pFirst"),o)),i.addCode(b.setLocal("i",b.i32_const(0)),b.block(b.loop(b.br_if(1,b.i32_eq(b.getLocal("i"),b.getLocal("n"))),b.call(n,b.getLocal("pFrom"),o,b.getLocal("pTo")),b.setLocal("pFrom",b.i32_add(b.getLocal("pFrom"),b.i32_const(f))),b.setLocal("pTo",b.i32_add(b.getLocal("pTo"),b.i32_const(d))),b.call(c+"_mul",o,b.getLocal("pInc"),o),b.setLocal("i",b.i32_add(b.getLocal("i"),b.i32_const(1))),b.br(0)))),e.exportFunction(a)};const Re=D,Oe=se,De=he,Te=xe,Fe=ve,Qe=Ee,Ue=Se,je=ke,He=Ne,$e=Pe,{bitLength:qe,modInv:Ge,isOdd:ze,isNegative:Ke}=U,Ve=D,Ze=se,Je=he,We=xe,Ye=ve,Xe=Ee,ea=Se,aa=ke,ta=Ne,ca=Pe,{bitLength:fa,isOdd:da,isNegative:ra}=U;var na=function(e,a){const t=a||"bn128";if(e.modules[t])return t;const c=21888242871839275222246405745257275088696311157297823662689037894645226208583n,f=21888242871839275222246405745257275088548364400416034343698204186575808495617n,d=Math.floor((qe(c-1n)-1)/64)+1,r=8*d,n=r,i=r,b=2*i,o=12*i,s=e.alloc(Re.bigInt2BytesLE(f,n)),l=Oe(e,c,"f1m");De(e,f,"fr","frm");const u=e.alloc(Re.bigInt2BytesLE(y(3n),i)),h=Qe(e,"g1m","f1m",u);Ue(e,"frm","frm","frm","frm_mul"),je(e,"pol","frm"),He(e,"qap","frm");const p=Te(e,"f1m_neg","f2m","f1m"),g=e.alloc([...Re.bigInt2BytesLE(y(19485874751759354771024239261021720505790618469301721065564631296452457478373n),i),...Re.bigInt2BytesLE(y(266929791119991161246907387137283842545076965332900288569378510910307636690n),i)]),m=Qe(e,"g2m","f2m",g);function x(a,t){const c=e.addFunction(a);c.addParam("pG","i32"),c.addParam("pFr","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),d=f.i32_const(e.alloc(r));c.addCode(f.call("frm_fromMontgomery",f.getLocal("pFr"),d),f.call(t,f.getLocal("pG"),d,f.i32_const(r),f.getLocal("pr"))),e.exportFunction(a)}function y(e){return BigInt(e)*(1n<0n;)ze(e)?a.push(1):a.push(0),e>>=1n;return a}(),D=e.alloc(O),T=3*b,F=O.length-1,Q=O.reduce(((e,a)=>e+(0!=a?1:0)),0),U=6*r,j=3*r*2+(Q+F+1)*T;function H(a){const f=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[8376118865763821496583973867626364092589906065868298776909617916018768340080n,16469823323077808223889137241176536799009286646108169935659301613961712198316n],[21888242871839275220042445260109153167277707414472061641714758635765020556617n,0n],[11697423496358154304825782922584725312912383441159505038794027105778954184319n,303847389135065887422783454877609941456349188919719272345083954437860409601n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3321304630594332808241809054958361220322477375291206261884409189760185844239n,5722266937896532885780051958958348231143373700109372999374820235121374419868n],[21888242871839275222246405745257275088696311157297823662689037894645226208582n,0n],[13512124006075453725662431877630910996106405091429524885779419978626457868503n,5418419548761466998357268504080738289687024511189653727029736280683514010267n],[2203960485148121921418603742825762020974279258880205651966n,0n],[10190819375481120917420622822672549775783927716138318623895010788866272024264n,21584395482704209334823622290379665147239961968378104390343953940207365798982n],[2203960485148121921418603742825762020974279258880205651967n,0n],[18566938241244942414004596690298913868373833782006617400804628704885040364344n,16165975933942742336466353786298926857552937457188450663314217659523851788715n]]],d=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[21575463638280843010398324269430826099269044274347216827212613867836435027261n,10307601595873709700152284273816112264069230130616436755625194854815875713954n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3772000881919853776433695186713858239009073593817195771773381919316419345261n,2236595495967245188281701248203181795121068902605861227855261137820944008926n],[2203960485148121921418603742825762020974279258880205651966n,0n],[18429021223477853657660792034369865839114504446431234726392080002137598044644n,9344045779998320333812420223237981029506012124075525679208581902008406485703n]],[[1n,0n],[2581911344467009335267311115468803099551665605076196740867805258568234346338n,19937756971775647987995932169929341994314640652964949448313374472400716661030n],[2203960485148121921418603742825762020974279258880205651966n,0n],[5324479202449903542726783395506214481928257762400643279780343368557297135718n,16208900380737693084919495127334387981393726419856888799917914180988844123039n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[13981852324922362344252311234282257507216387789820983642040889267519694726527n,7629828391165209371577384193250820201684255241773809077146787135900891633097n]]],r=e.addFunction(t+"__frobeniusMap"+a);r.addParam("x","i32"),r.addParam("r","i32");const n=r.getCodeBuilder();for(let t=0;t<6;t++){const c=0==t?n.getLocal("x"):n.i32_add(n.getLocal("x"),n.i32_const(t*b)),s=c,u=n.i32_add(n.getLocal("x"),n.i32_const(t*b+i)),h=0==t?n.getLocal("r"):n.i32_add(n.getLocal("r"),n.i32_const(t*b)),g=h,m=n.i32_add(n.getLocal("r"),n.i32_const(t*b+i)),x=o(f[Math.floor(t/3)][a%12],d[t%3][a%6]),A=e.alloc([...Re.bigInt2BytesLE(y(x[0]),32),...Re.bigInt2BytesLE(y(x[1]),32)]);a%2==1?r.addCode(n.call(l+"_copy",s,g),n.call(l+"_neg",u,m),n.call(p+"_mul",h,n.i32_const(A),h)):r.addCode(n.call(p+"_mul",c,n.i32_const(A),h))}function o(e,a){const t=BigInt(e[0]),f=BigInt(e[1]),d=BigInt(a[0]),r=BigInt(a[1]),n=[(t*d-f*r)%c,(t*r+f*d)%c];return Ke(n[0])&&(n[0]=n[0]+c),n}}function $(){!function(){const a=e.addFunction(t+"__cyclotomicSquare");a.addParam("x","i32"),a.addParam("r","i32");const c=a.getCodeBuilder(),f=c.getLocal("x"),d=c.i32_add(c.getLocal("x"),c.i32_const(b)),r=c.i32_add(c.getLocal("x"),c.i32_const(2*b)),n=c.i32_add(c.getLocal("x"),c.i32_const(3*b)),i=c.i32_add(c.getLocal("x"),c.i32_const(4*b)),o=c.i32_add(c.getLocal("x"),c.i32_const(5*b)),s=c.getLocal("r"),l=c.i32_add(c.getLocal("r"),c.i32_const(b)),u=c.i32_add(c.getLocal("r"),c.i32_const(2*b)),h=c.i32_add(c.getLocal("r"),c.i32_const(3*b)),g=c.i32_add(c.getLocal("r"),c.i32_const(4*b)),m=c.i32_add(c.getLocal("r"),c.i32_const(5*b)),x=c.i32_const(e.alloc(b)),y=c.i32_const(e.alloc(b)),A=c.i32_const(e.alloc(b)),v=c.i32_const(e.alloc(b)),w=c.i32_const(e.alloc(b)),_=c.i32_const(e.alloc(b)),I=c.i32_const(e.alloc(b)),E=c.i32_const(e.alloc(b));a.addCode(c.call(p+"_mul",f,i,I),c.call(p+"_mul",i,c.i32_const(L),x),c.call(p+"_add",f,x,x),c.call(p+"_add",f,i,E),c.call(p+"_mul",E,x,x),c.call(p+"_mul",c.i32_const(L),I,E),c.call(p+"_add",I,E,E),c.call(p+"_sub",x,E,x),c.call(p+"_add",I,I,y),c.call(p+"_mul",n,r,I),c.call(p+"_mul",r,c.i32_const(L),A),c.call(p+"_add",n,A,A),c.call(p+"_add",n,r,E),c.call(p+"_mul",E,A,A),c.call(p+"_mul",c.i32_const(L),I,E),c.call(p+"_add",I,E,E),c.call(p+"_sub",A,E,A),c.call(p+"_add",I,I,v),c.call(p+"_mul",d,o,I),c.call(p+"_mul",o,c.i32_const(L),w),c.call(p+"_add",d,w,w),c.call(p+"_add",d,o,E),c.call(p+"_mul",E,w,w),c.call(p+"_mul",c.i32_const(L),I,E),c.call(p+"_add",I,E,E),c.call(p+"_sub",w,E,w),c.call(p+"_add",I,I,_),c.call(p+"_sub",x,f,s),c.call(p+"_add",s,s,s),c.call(p+"_add",x,s,s),c.call(p+"_add",y,i,g),c.call(p+"_add",g,g,g),c.call(p+"_add",y,g,g),c.call(p+"_mul",_,c.i32_const(k),E),c.call(p+"_add",E,n,h),c.call(p+"_add",h,h,h),c.call(p+"_add",E,h,h),c.call(p+"_sub",w,r,u),c.call(p+"_add",u,u,u),c.call(p+"_add",w,u,u),c.call(p+"_sub",A,d,l),c.call(p+"_add",l,l,l),c.call(p+"_add",A,l,l),c.call(p+"_add",v,o,m),c.call(p+"_add",m,m,m),c.call(p+"_add",v,m,m))}(),function(a,c){const f=function(e){let a=e;const t=[];for(;a>0n;){if(ze(a)){const e=2-Number(a%4n);t.push(e),a-=BigInt(e)}else t.push(0);a>>=1n}return t}(a).map((e=>-1==e?255:e)),d=e.alloc(f),r=e.addFunction(t+"__cyclotomicExp_"+c);r.addParam("x","i32"),r.addParam("r","i32"),r.addLocal("bit","i32"),r.addLocal("i","i32");const n=r.getCodeBuilder(),i=n.getLocal("x"),b=n.getLocal("r"),s=n.i32_const(e.alloc(o));r.addCode(n.call(R+"_conjugate",i,s),n.call(R+"_one",b),n.if(n.teeLocal("bit",n.i32_load8_s(n.i32_const(f.length-1),d)),n.if(n.i32_eq(n.getLocal("bit"),n.i32_const(1)),n.call(R+"_mul",b,i,b),n.call(R+"_mul",b,s,b))),n.setLocal("i",n.i32_const(f.length-2)),n.block(n.loop(n.call(t+"__cyclotomicSquare",b,b),n.if(n.teeLocal("bit",n.i32_load8_s(n.getLocal("i"),d)),n.if(n.i32_eq(n.getLocal("bit"),n.i32_const(1)),n.call(R+"_mul",b,i,b),n.call(R+"_mul",b,s,b))),n.br_if(1,n.i32_eqz(n.getLocal("i"))),n.setLocal("i",n.i32_sub(n.getLocal("i"),n.i32_const(1))),n.br(0))))}(4965661367192848881n,"w0");const a=e.addFunction(t+"__finalExponentiationLastChunk");a.addParam("x","i32"),a.addParam("r","i32");const c=a.getCodeBuilder(),f=c.getLocal("x"),d=c.getLocal("r"),r=c.i32_const(e.alloc(o)),n=c.i32_const(e.alloc(o)),i=c.i32_const(e.alloc(o)),s=c.i32_const(e.alloc(o)),l=c.i32_const(e.alloc(o)),u=c.i32_const(e.alloc(o)),h=c.i32_const(e.alloc(o)),g=c.i32_const(e.alloc(o)),m=c.i32_const(e.alloc(o)),x=c.i32_const(e.alloc(o)),y=c.i32_const(e.alloc(o)),A=c.i32_const(e.alloc(o)),v=c.i32_const(e.alloc(o)),w=c.i32_const(e.alloc(o)),_=c.i32_const(e.alloc(o)),I=c.i32_const(e.alloc(o)),E=c.i32_const(e.alloc(o)),C=c.i32_const(e.alloc(o)),M=c.i32_const(e.alloc(o)),B=c.i32_const(e.alloc(o)),S=c.i32_const(e.alloc(o));a.addCode(c.call(t+"__cyclotomicExp_w0",f,r),c.call(R+"_conjugate",r,r),c.call(t+"__cyclotomicSquare",r,n),c.call(t+"__cyclotomicSquare",n,i),c.call(R+"_mul",i,n,s),c.call(t+"__cyclotomicExp_w0",s,l),c.call(R+"_conjugate",l,l),c.call(t+"__cyclotomicSquare",l,u),c.call(t+"__cyclotomicExp_w0",u,h),c.call(R+"_conjugate",h,h),c.call(R+"_conjugate",s,g),c.call(R+"_conjugate",h,m),c.call(R+"_mul",m,l,x),c.call(R+"_mul",x,g,y),c.call(R+"_mul",y,n,A),c.call(R+"_mul",y,l,v),c.call(R+"_mul",v,f,w),c.call(t+"__frobeniusMap1",A,_),c.call(R+"_mul",_,w,I),c.call(t+"__frobeniusMap2",y,E),c.call(R+"_mul",E,I,C),c.call(R+"_conjugate",f,M),c.call(R+"_mul",M,A,B),c.call(t+"__frobeniusMap3",B,S),c.call(R+"_mul",S,C,d))}e.modules[t]={n64:d,pG1gen:v,pG1zero:_,pG1b:u,pG2gen:E,pG2zero:M,pG2b:g,pq:e.modules.f1m.pq,pr:s,pOneT:B,prePSize:U,preQSize:j,r:f.toString(),q:c.toString()};const q=e.alloc(U),G=e.alloc(j);function z(a){const c=e.addFunction(t+"_pairingEq"+a);for(let e=0;e0n;)da(e)?a.push(1):a.push(0),e>>=1n;return a}(),O=e.alloc(R),D=3*i,T=R.length-1,F=R.reduce(((e,a)=>e+(0!=a?1:0)),0),Q=6*r,U=3*r*2+(F+T+1)*D,j=15132376222941642752n;function H(a){const t=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n,151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n],[2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n,1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n,877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n,3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n,2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n,3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n]]],f=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[0n,4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[0n,1n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[0n,793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n]],[[1n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n]]],d=e.addFunction(P+"_frobeniusMap"+a);d.addParam("x","i32"),d.addParam("r","i32");const b=d.getCodeBuilder();for(let c=0;c<6;c++){const s=0==c?b.getLocal("x"):b.i32_add(b.getLocal("x"),b.i32_const(c*i)),l=s,u=b.i32_add(b.getLocal("x"),b.i32_const(c*i+n)),p=0==c?b.getLocal("r"):b.i32_add(b.getLocal("r"),b.i32_const(c*i)),g=p,x=b.i32_add(b.getLocal("r"),b.i32_const(c*i+n)),y=o(t[Math.floor(c/3)][a%12],f[c%3][a%6]),A=e.alloc([...Ve.bigInt2BytesLE(v(y[0]),r),...Ve.bigInt2BytesLE(v(y[1]),r)]);a%2==1?d.addCode(b.call(h+"_copy",l,g),b.call(h+"_neg",u,x),b.call(m+"_mul",p,b.i32_const(A),p)):d.addCode(b.call(m+"_mul",s,b.i32_const(A),p))}function o(e,a){const t=e[0],f=e[1],d=a[0],r=a[1],n=[(t*d-f*r)%c,(t*r+f*d)%c];return ra(n[0])&&(n[0]=n[0]+c),n}}e.modules[t]={n64q:d,n64r:o,n8q:r,n8r:s,pG1gen:_,pG1zero:E,pG1b:p,pG2gen:M,pG2zero:L,pG2b:x,pq:e.modules.f1m.pq,pr:u,pOneT:S,r:f,q:c,prePSize:Q,preQSize:U},function(){const a=e.addFunction(N+"_mul1");a.addParam("pA","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const t=a.getCodeBuilder(),c=t.getLocal("pA"),f=t.i32_add(t.getLocal("pA"),t.i32_const(2*n)),d=t.i32_add(t.getLocal("pA"),t.i32_const(4*n)),r=t.getLocal("pC1"),i=t.getLocal("pR"),b=t.i32_add(t.getLocal("pR"),t.i32_const(2*n)),o=t.i32_add(t.getLocal("pR"),t.i32_const(4*n)),s=t.i32_const(e.alloc(2*n)),l=t.i32_const(e.alloc(2*n));a.addCode(t.call(m+"_add",c,f,s),t.call(m+"_add",f,d,l),t.call(m+"_mul",f,r,o),t.call(m+"_mul",l,r,i),t.call(m+"_sub",i,o,i),t.call(m+"_mulNR",i,i),t.call(m+"_mul",s,r,b),t.call(m+"_sub",b,o,b))}(),function(){const a=e.addFunction(N+"_mul01");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const t=a.getCodeBuilder(),c=t.getLocal("pA"),f=t.i32_add(t.getLocal("pA"),t.i32_const(2*n)),d=t.i32_add(t.getLocal("pA"),t.i32_const(4*n)),r=t.getLocal("pC0"),i=t.getLocal("pC1"),b=t.getLocal("pR"),o=t.i32_add(t.getLocal("pR"),t.i32_const(2*n)),s=t.i32_add(t.getLocal("pR"),t.i32_const(4*n)),l=t.i32_const(e.alloc(2*n)),u=t.i32_const(e.alloc(2*n)),h=t.i32_const(e.alloc(2*n)),p=t.i32_const(e.alloc(2*n));a.addCode(t.call(m+"_mul",c,r,l),t.call(m+"_mul",f,i,u),t.call(m+"_add",c,f,h),t.call(m+"_add",c,d,p),t.call(m+"_add",f,d,b),t.call(m+"_mul",b,i,b),t.call(m+"_sub",b,u,b),t.call(m+"_mulNR",b,b),t.call(m+"_add",b,l,b),t.call(m+"_add",r,i,o),t.call(m+"_mul",o,h,o),t.call(m+"_sub",o,l,o),t.call(m+"_sub",o,u,o),t.call(m+"_mul",p,r,s),t.call(m+"_sub",s,l,s),t.call(m+"_add",s,u,s))}(),function(){const a=e.addFunction(P+"_mul014");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pC4","i32"),a.addParam("pR","i32");const t=a.getCodeBuilder(),c=t.getLocal("pA"),f=t.i32_add(t.getLocal("pA"),t.i32_const(6*n)),d=t.getLocal("pC0"),r=t.getLocal("pC1"),i=t.getLocal("pC4"),b=t.i32_const(e.alloc(6*n)),o=t.i32_const(e.alloc(6*n)),s=t.i32_const(e.alloc(2*n)),l=t.getLocal("pR"),u=t.i32_add(t.getLocal("pR"),t.i32_const(6*n));a.addCode(t.call(N+"_mul01",c,d,r,b),t.call(N+"_mul1",f,i,o),t.call(m+"_add",r,i,s),t.call(N+"_add",f,c,u),t.call(N+"_mul01",u,d,s,u),t.call(N+"_sub",u,b,u),t.call(N+"_sub",u,o,u),t.call(N+"_copy",o,l),t.call(N+"_mulNR",l,l),t.call(N+"_add",l,b,l))}(),function(){const a=e.addFunction(t+"_ell");a.addParam("pP","i32"),a.addParam("pCoefs","i32"),a.addParam("pF","i32");const c=a.getCodeBuilder(),f=c.getLocal("pP"),d=c.i32_add(c.getLocal("pP"),c.i32_const(r)),i=c.getLocal("pF"),b=c.getLocal("pCoefs"),o=c.i32_add(c.getLocal("pCoefs"),c.i32_const(n)),s=c.i32_add(c.getLocal("pCoefs"),c.i32_const(2*n)),l=c.i32_add(c.getLocal("pCoefs"),c.i32_const(3*n)),u=c.i32_add(c.getLocal("pCoefs"),c.i32_const(4*n)),p=e.alloc(2*n),g=c.i32_const(p),m=c.i32_const(p),x=c.i32_const(p+n),y=e.alloc(2*n),A=c.i32_const(y),v=c.i32_const(y),w=c.i32_const(y+n);a.addCode(c.call(h+"_mul",b,d,m),c.call(h+"_mul",o,d,x),c.call(h+"_mul",s,f,v),c.call(h+"_mul",l,f,w),c.call(P+"_mul014",i,u,A,g,i))}();const $=e.alloc(Q),q=e.alloc(U);function G(a){const c=e.addFunction(t+"_pairingEq"+a);for(let e=0;e0n;){if(da(a)){const e=2-Number(a%4n);t.push(e),a-=BigInt(e)}else t.push(0);a>>=1n}return t}(a).map((e=>-1==e?255:e)),r=e.alloc(d),n=e.addFunction(t+"__cyclotomicExp_"+f);n.addParam("x","i32"),n.addParam("r","i32"),n.addLocal("bit","i32"),n.addLocal("i","i32");const i=n.getCodeBuilder(),o=i.getLocal("x"),s=i.getLocal("r"),l=i.i32_const(e.alloc(b));n.addCode(i.call(P+"_conjugate",o,l),i.call(P+"_one",s),i.if(i.teeLocal("bit",i.i32_load8_s(i.i32_const(d.length-1),r)),i.if(i.i32_eq(i.getLocal("bit"),i.i32_const(1)),i.call(P+"_mul",s,o,s),i.call(P+"_mul",s,l,s))),i.setLocal("i",i.i32_const(d.length-2)),i.block(i.loop(i.call(t+"__cyclotomicSquare",s,s),i.if(i.teeLocal("bit",i.i32_load8_s(i.getLocal("i"),r)),i.if(i.i32_eq(i.getLocal("bit"),i.i32_const(1)),i.call(P+"_mul",s,o,s),i.call(P+"_mul",s,l,s))),i.br_if(1,i.i32_eqz(i.getLocal("i"))),i.setLocal("i",i.i32_sub(i.getLocal("i"),i.i32_const(1))),i.br(0)))),c&&n.addCode(i.call(P+"_conjugate",s,s))}(j,!0,"w0");const a=e.addFunction(t+"_finalExponentiation");a.addParam("x","i32"),a.addParam("r","i32");const c=a.getCodeBuilder(),f=c.getLocal("x"),d=c.getLocal("r"),r=c.i32_const(e.alloc(b)),n=c.i32_const(e.alloc(b)),o=c.i32_const(e.alloc(b)),s=c.i32_const(e.alloc(b)),l=c.i32_const(e.alloc(b)),u=c.i32_const(e.alloc(b)),h=c.i32_const(e.alloc(b));a.addCode(c.call(P+"_frobeniusMap6",f,r),c.call(P+"_inverse",f,n),c.call(P+"_mul",r,n,o),c.call(P+"_copy",o,n),c.call(P+"_frobeniusMap2",o,o),c.call(P+"_mul",o,n,o),c.call(t+"__cyclotomicSquare",o,n),c.call(P+"_conjugate",n,n),c.call(t+"__cyclotomicExp_w0",o,s),c.call(t+"__cyclotomicSquare",s,l),c.call(P+"_mul",n,s,u),c.call(t+"__cyclotomicExp_w0",u,n),c.call(t+"__cyclotomicExp_w0",n,r),c.call(t+"__cyclotomicExp_w0",r,h),c.call(P+"_mul",h,l,h),c.call(t+"__cyclotomicExp_w0",h,l),c.call(P+"_conjugate",u,u),c.call(P+"_mul",l,u,l),c.call(P+"_mul",l,o,l),c.call(P+"_conjugate",o,u),c.call(P+"_mul",n,o,n),c.call(P+"_frobeniusMap3",n,n),c.call(P+"_mul",h,u,h),c.call(P+"_frobeniusMap1",h,h),c.call(P+"_mul",s,r,s),c.call(P+"_frobeniusMap2",s,s),c.call(P+"_mul",s,n,s),c.call(P+"_mul",s,h,s),c.call(P+"_mul",s,l,d))}();for(let a=1;a<=5;a++)G(a),e.exportFunction(t+"_pairingEq"+a);!function(){const a=e.addFunction(t+"_pairing");a.addParam("p","i32"),a.addParam("q","i32"),a.addParam("r","i32");const c=a.getCodeBuilder(),f=c.i32_const(e.alloc(b));a.addCode(c.call(t+"_prepareG1",c.getLocal("p"),c.i32_const($))),a.addCode(c.call(t+"_prepareG2",c.getLocal("q"),c.i32_const(q))),a.addCode(c.call(t+"_millerLoop",c.i32_const($),c.i32_const(q),f)),a.addCode(c.call(t+"_finalExponentiation",f,c.getLocal("r")))}(),e.exportFunction(t+"_pairing"),e.exportFunction(t+"_prepareG1"),e.exportFunction(t+"_prepareG2"),e.exportFunction(t+"_millerLoop"),e.exportFunction(t+"_finalExponentiation"),e.exportFunction(t+"_finalExponentiationOld"),e.exportFunction(t+"__cyclotomicSquare"),e.exportFunction(t+"__cyclotomicExp_w0"),e.exportFunction(N+"_mul1"),e.exportFunction(N+"_mul01"),e.exportFunction(P+"_mul014"),e.exportFunction(g+"_inGroupAffine"),e.exportFunction(g+"_inGroup"),e.exportFunction(y+"_inGroupAffine"),e.exportFunction(y+"_inGroup")};function ba(e,a){let t=e;void 0===a&&0==(a=Math.floor((r(e)-1)/8)+1)&&(a=1);const c=new Uint8Array(a),f=new DataView(c.buffer);let d=0;for(;d>=BigInt(32)):d+2<=a?(f.setUint16(d,Number(t&BigInt(65535)),!0),d+=2,t>>=BigInt(16)):(f.setUint8(d,Number(t&BigInt(255)),!0),d+=1,t>>=BigInt(8));if(t)throw new Error("Number does not fit in this length");return c}const oa=[];for(let e=0;e<256;e++)oa[e]=sa(e,8);function sa(e,a){let t=0,c=e;for(let e=0;e>=1;return t}function la(e,a){return(oa[e>>>24]|oa[e>>>16&255]<<8|oa[e>>>8&255]<<16|oa[255&e]<<24)>>>32-a}function ua(e){return(4294901760&e?(e&=4294901760,16):0)|(4278255360&e?(e&=4278255360,8):0)|(4042322160&e?(e&=4042322160,4):0)|(3435973836&e?(e&=3435973836,2):0)|!!(2863311530&e)}function ha(e,a){const t=e.byteLength/a,c=ua(t);if(t!=1<t){const c=e.slice(f*a,(f+1)*a);e.set(e.slice(t*a,(t+1)*a),f*a),e.set(c,t*a)}}}function pa(e,a){const t=new Uint8Array(a*e.length);for(let c=0;c0;)t>=4?(t-=4,a+=BigInt(f.getUint32(t))<=2?(t-=2,a+=BigInt(f.getUint16(t))<0;)d-4>=0?(d-=4,f.setUint32(d,Number(t&BigInt(4294967295))),t>>=BigInt(32)):d-2>=0?(d-=2,f.setUint16(d,Number(t&BigInt(65535))),t>>=BigInt(16)):(d-=1,f.setUint8(d,Number(t&BigInt(255))),t>>=BigInt(8));if(t)throw new Error("Number does not fit in this length");return c},bitReverse:la,buffReverseBits:ha,buffer2array:ga,leBuff2int:function(e){let a=BigInt(0),t=0;const c=new DataView(e.buffer,e.byteOffset,e.byteLength);for(;t{t[c]=e(a[c])})),t}return a},stringifyFElements:function e(a,t){if("bigint"==typeof t||void 0!==t.eq)return t.toString(10);if(t instanceof Uint8Array)return a.toString(a.e(t));if(Array.isArray(t))return t.map(e.bind(this,a));if("object"==typeof t){const c={};return Object.keys(t).forEach((f=>{c[f]=e(a,t[f])})),c}return t},unstringifyBigInts:function e(a){if("string"==typeof a&&/^[0-9]+$/.test(a))return BigInt(a);if("string"==typeof a&&/^0x[0-9a-fA-F]+$/.test(a))return BigInt(a);if(Array.isArray(a))return a.map(e);if("object"==typeof a){if(null===a)return null;const t={};return Object.keys(a).forEach((c=>{t[c]=e(a[c])})),t}return a},unstringifyFElements:function e(a,t){if("string"==typeof t&&/^[0-9]+$/.test(t))return a.e(t);if("string"==typeof t&&/^0x[0-9a-fA-F]+$/.test(t))return a.e(t);if(Array.isArray(t))return t.map(e.bind(this,a));if("object"==typeof t){if(null===t)return null;const c={};return Object.keys(t).forEach((f=>{c[f]=e(a,t[f])})),c}return t}});const xa=1<<30;class ya{constructor(e){this.buffers=[],this.byteLength=e;for(let a=0;a0;){const e=r+n>xa?xa-r:n,a=new Uint8Array(this.buffers[d].buffer,this.buffers[d].byteOffset+r,e);if(e==t)return a.slice();f||(f=t<=xa?new Uint8Array(t):new ya(t)),f.set(a,t-n),n-=e,d++,r=0}return f}set(e,a){void 0===a&&(a=0);const t=e.byteLength;if(0==t)return;const c=Math.floor(a/xa);if(c==Math.floor((a+t-1)/xa))return e instanceof ya&&1==e.buffers.length?this.buffers[c].set(e.buffers[0],a%xa):this.buffers[c].set(e,a%xa);let f=c,d=a%xa,r=t;for(;r>0;){const a=d+r>xa?xa-d:r,c=e.slice(t-r,t-r+a);new Uint8Array(this.buffers[f].buffer,this.buffers[f].byteOffset+d,a).set(c),r-=a,f++,d=0}}}function Aa(e,a,t,c){return async function(f){const d=Math.floor(f.byteLength/t);if(d*t!==f.byteLength)throw new Error("Invalid buffer size");const r=Math.floor(d/e.concurrency),n=[];for(let i=0;i=0;e--)this.w[e]=this.square(this.w[e+1]);if(!this.eq(this.w[0],this.one))throw new Error("Error calculating roots of unity");this.batchToMontgomery=Aa(e,a+"_batchToMontgomery",this.n8,this.n8),this.batchFromMontgomery=Aa(e,a+"_batchFromMontgomery",this.n8,this.n8)}op2(e,a,t){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,t),this.tm.instance.exports[this.prefix+e](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op2Bool(e,a,t){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,t),!!this.tm.instance.exports[this.prefix+e](this.pOp1,this.pOp2)}op1(e,a){return this.tm.setBuff(this.pOp1,a),this.tm.instance.exports[this.prefix+e](this.pOp1,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op1Bool(e,a){return this.tm.setBuff(this.pOp1,a),!!this.tm.instance.exports[this.prefix+e](this.pOp1,this.pOp3)}add(e,a){return this.op2("_add",e,a)}eq(e,a){return this.op2Bool("_eq",e,a)}isZero(e){return this.op1Bool("_isZero",e)}sub(e,a){return this.op2("_sub",e,a)}neg(e){return this.op1("_neg",e)}inv(e){return this.op1("_inverse",e)}toMontgomery(e){return this.op1("_toMontgomery",e)}fromMontgomery(e){return this.op1("_fromMontgomery",e)}mul(e,a){return this.op2("_mul",e,a)}div(e,a){return this.tm.setBuff(this.pOp1,e),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_inverse"](this.pOp2,this.pOp2),this.tm.instance.exports[this.prefix+"_mul"](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}square(e){return this.op1("_square",e)}isSquare(e){return this.op1Bool("_isSquare",e)}sqrt(e){return this.op1("_sqrt",e)}exp(e,a){return a instanceof Uint8Array||(a=E(d(a))),this.tm.setBuff(this.pOp1,e),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_exp"](this.pOp1,this.pOp2,a.byteLength,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}isNegative(e){return this.op1Bool("_isNegative",e)}e(e,a){if(e instanceof Uint8Array)return e;let t=d(e,a);n(t)?(t=g(t),y(t,this.p)&&(t=x(t,this.p)),t=p(this.p,t)):y(t,this.p)&&(t=x(t,this.p));const c=ba(t,this.n8);return this.toMontgomery(c)}toString(e,a){return I(_(this.fromMontgomery(e),0),a)}fromRng(e){let a;const t=new Uint8Array(this.n8);do{a=C;for(let t=0;t{this.reject=a,this.resolve=e}))}}const Ba="data:application/javascript;base64,"+globalThis.btoa('(function thread(self) {\n const MAXMEM = 32767;\n let instance;\n let memory;\n\n if (self) {\n self.onmessage = function(e) {\n let data;\n if (e.data) {\n data = e.data;\n } else {\n data = e;\n }\n\n if (data[0].cmd == "INIT") {\n init(data[0]).then(function() {\n self.postMessage(data.result);\n });\n } else if (data[0].cmd == "TERMINATE") {\n self.close();\n } else {\n const res = runTask(data);\n self.postMessage(res);\n }\n };\n }\n\n async function init(data) {\n const code = new Uint8Array(data.code);\n const wasmModule = await WebAssembly.compile(code);\n memory = new WebAssembly.Memory({initial:data.init, maximum: MAXMEM});\n\n instance = await WebAssembly.instantiate(wasmModule, {\n env: {\n "memory": memory\n }\n });\n }\n\n\n\n function alloc(length) {\n const u32 = new Uint32Array(memory.buffer, 0, 1);\n while (u32[0] & 3) u32[0]++; // Return always aligned pointers\n const res = u32[0];\n u32[0] += length;\n if (u32[0] + length > memory.buffer.byteLength) {\n const currentPages = memory.buffer.byteLength / 0x10000;\n let requiredPages = Math.floor((u32[0] + length) / 0x10000)+1;\n if (requiredPages>MAXMEM) requiredPages=MAXMEM;\n memory.grow(requiredPages-currentPages);\n }\n return res;\n }\n\n function allocBuffer(buffer) {\n const p = alloc(buffer.byteLength);\n setBuffer(p, buffer);\n return p;\n }\n\n function getBuffer(pointer, length) {\n const u8 = new Uint8Array(memory.buffer);\n return new Uint8Array(u8.buffer, u8.byteOffset + pointer, length);\n }\n\n function setBuffer(pointer, buffer) {\n const u8 = new Uint8Array(memory.buffer);\n u8.set(new Uint8Array(buffer), pointer);\n }\n\n function runTask(task) {\n if (task[0].cmd == "INIT") {\n return init(task[0]);\n }\n const ctx = {\n vars: [],\n out: []\n };\n const u32a = new Uint32Array(memory.buffer, 0, 1);\n const oldAlloc = u32a[0];\n for (let i=0; i0;e++)if(0==this.working[e]){const a=this.actionQueue.shift();this.postAction(e,a.data,a.transfers,a.deferred)}}queueAction(e,a){const t=new Ma;if(this.singleThread){const a=this.taskManager(e);t.resolve(a)}else this.actionQueue.push({data:e,transfers:a,deferred:t}),this.processWorks();return t.promise}resetMemory(){this.u32[0]=this.initalPFree}allocBuff(e){const a=this.alloc(e.byteLength);return this.setBuff(a,e),a}getBuff(e,a){return this.u8.slice(e,e+a)}setBuff(e,a){this.u8.set(new Uint8Array(a),e)}alloc(e){for(;3&this.u32[0];)this.u32[0]++;const a=this.u32[0];return this.u32[0]+=e,a}async terminate(){for(let e=0;esetTimeout(e,200)))}}function Sa(e,a){const t=e[a],c=e.Fr,f=e.tm;e[a].batchApplyKey=async function(e,d,r,n,i){let b,o,s,l,u;if(n=n||"affine",i=i||"affine","G1"==a)"jacobian"==n?(s=3*t.F.n8,b="g1m_batchApplyKey"):(s=2*t.F.n8,b="g1m_batchApplyKeyMixed"),l=3*t.F.n8,"jacobian"==i?u=3*t.F.n8:(o="g1m_batchToAffine",u=2*t.F.n8);else if("G2"==a)"jacobian"==n?(s=3*t.F.n8,b="g2m_batchApplyKey"):(s=2*t.F.n8,b="g2m_batchApplyKeyMixed"),l=3*t.F.n8,"jacobian"==i?u=3*t.F.n8:(o="g2m_batchToAffine",u=2*t.F.n8);else{if("Fr"!=a)throw new Error("Invalid group: "+a);b="frm_batchApplyKey",s=t.n8,l=t.n8,u=t.n8}const h=Math.floor(e.byteLength/s),p=Math.floor(h/f.concurrency),g=[];r=c.e(r);let m=c.e(d);for(let a=0;a=0;e--){if(!t.isZero(p))for(let e=0;eb&&(p=b),p<1024&&(p=1024);const g=[];for(let a=0;a(n&&n.debug(`Multiexp end: ${i}: ${a}/${s}`),e))))}const m=await Promise.all(g);let x=t.zero;for(let e=m.length-1;e>=0;e--)x=t.add(x,m[e]);return x}t.multiExp=async function(e,a,t,c){return await d(e,a,"jacobian",t,c)},t.multiExpAffine=async function(e,a,t,c){return await d(e,a,"affine",t,c)}}function Pa(e,a){const t=e[a],c=e.Fr,f=t.tm;async function d(e,n,i,b,o,s){let l,u,h,p,g,m,x,y;i=i||"affine",b=b||"affine","G1"==a?("affine"==i?(l=2*t.F.n8,p="g1m_batchToJacobian"):l=3*t.F.n8,u=3*t.F.n8,n&&(y="g1m_fftFinal"),x="g1m_fftJoin",m="g1m_fftMix","affine"==b?(h=2*t.F.n8,g="g1m_batchToAffine"):h=3*t.F.n8):"G2"==a?("affine"==i?(l=2*t.F.n8,p="g2m_batchToJacobian"):l=3*t.F.n8,u=3*t.F.n8,n&&(y="g2m_fftFinal"),x="g2m_fftJoin",m="g2m_fftMix","affine"==b?(h=2*t.F.n8,g="g2m_batchToAffine"):h=3*t.F.n8):"Fr"==a&&(l=t.n8,u=t.n8,h=t.n8,n&&(y="frm_fftFinal"),m="frm_fftMix",x="frm_fftJoin");let A=!1;Array.isArray(e)?(e=pa(e,l),A=!0):e=e.slice(0,e.byteLength);const v=e.byteLength/l,w=ua(v);if(1<1<<28?new ya(2*s[0].byteLength):new Uint8Array(2*s[0].byteLength),l.set(s[0]),l.set(s[1],s[0].byteLength),l}(e,i,b,o,s):await async function(e,a,t,f,n){let i,b;i=e.slice(0,e.byteLength/2),b=e.slice(e.byteLength/2,e.byteLength);const o=[];[i,b]=await r(i,b,"fftJoinExt",c.one,c.shift,a,"jacobian",f,n),o.push(d(i,!1,"jacobian",t,f,n)),o.push(d(b,!1,"jacobian",t,f,n));const s=await Promise.all(o);let l;return l=s[0].byteLength>1<<28?new ya(2*s[0].byteLength):new Uint8Array(2*s[0].byteLength),l.set(s[0]),l.set(s[1],s[0].byteLength),l}(e,i,b,o,s),A?ga(a,h):a}let _,I,E;n&&(_=c.inv(c.e(v))),ha(e,l);let C=Math.min(16384,v),M=v/C;for(;M=16;)M*=2,C/=2;const B=ua(C),L=[];for(let a=0;a(o&&o.debug(`${s}: fft ${w} mix end: ${a}/${M}`),e))))}E=await Promise.all(L);for(let e=0;e(o&&o.debug(`${s}: fft ${w} join ${e}/${w} ${r+1}/${a} ${n}/${t/2}`),c))))}const r=await Promise.all(d);for(let e=0;e0;a--)I.set(E[a],e),e+=C*h,delete E[a];I.set(E[0].slice(0,(C-1)*h),e),delete E[0]}else for(let e=0;e65536&&(A=65536);const v=[];for(let a=0;a(s&&s.debug(`${l}: fftJoinExt End: ${a}/${y}`),e))))}const w=await Promise.all(v);let _,I;y*g>1<<28?(_=new ya(y*g),I=new ya(y*g)):(_=new Uint8Array(y*g),I=new Uint8Array(y*g));let E=0;for(let e=0;ec.s+1)throw i&&i.error("lagrangeEvaluations input too big"),new Error("lagrangeEvaluations input too big");let u=e.slice(0,e.byteLength/2),h=e.slice(e.byteLength/2,e.byteLength);const p=c.exp(c.shift,s/2),g=c.inv(c.sub(c.one,p));[u,h]=await r(u,h,"prepareLagrangeEvaluation",g,c.shiftInv,f,"jacobian",i,b+" prep");const m=[];let x;return m.push(d(u,!0,"jacobian",n,i,b+" t0")),m.push(d(h,!0,"jacobian",n,i,b+" t1")),[u,h]=await Promise.all(m),x=u.byteLength>1<<28?new ya(2*u.byteLength):new Uint8Array(2*u.byteLength),x.set(u),x.set(h,u.byteLength),x},t.fftMix=async function(e){const d=3*t.F.n8;let r,n;if("G1"==a)r="g1m_fftMix",n="g1m_fftJoin";else if("G2"==a)r="g2m_fftMix",n="g2m_fftJoin";else{if("Fr"!=a)throw new Error("Invalid group");r="frm_fftMix",n="frm_fftJoin"}const i=Math.floor(e.byteLength/d),b=ua(i);let o=1<=0;e--)u.set(l[e][0],h),h+=l[e][0].byteLength;return u}}async function Ra(e){const a=await async function(e,a){const t=new La;t.memory=new WebAssembly.Memory({initial:Ca}),t.u8=new Uint8Array(t.memory.buffer),t.u32=new Uint32Array(t.memory.buffer);const c=await WebAssembly.compile(e.code);if(t.instance=await WebAssembly.instantiate(c,{env:{memory:t.memory}}),t.singleThread=a,t.initalPFree=t.u32[0],t.pq=e.pq,t.pr=e.pr,t.pG1gen=e.pG1gen,t.pG1zero=e.pG1zero,t.pG2gen=e.pG2gen,t.pG2zero=e.pG2zero,t.pOneT=e.pOneT,a)t.code=e.code,t.taskManager=function(){const e=32767;let a,t;async function c(c){const f=new Uint8Array(c.code),d=await WebAssembly.compile(f);t=new WebAssembly.Memory({initial:c.init,maximum:e}),a=await WebAssembly.instantiate(d,{env:{memory:t}})}function f(a){const c=new Uint32Array(t.buffer,0,1);for(;3&c[0];)c[0]++;const f=c[0];if(c[0]+=a,c[0]+a>t.buffer.byteLength){const f=t.buffer.byteLength/65536;let d=Math.floor((c[0]+a)/65536)+1;d>e&&(d=e),t.grow(d-f)}return f}function d(e){const a=f(e.byteLength);return n(a,e),a}function r(e,a){const c=new Uint8Array(t.buffer);return new Uint8Array(c.buffer,c.byteOffset+e,a)}function n(e,a){new Uint8Array(t.buffer).set(new Uint8Array(a),e)}function i(e){if("INIT"==e[0].cmd)return c(e[0]);const i={vars:[],out:[]},b=new Uint32Array(t.buffer,0,1)[0];for(let t=0;t64&&(a=64),t.concurrency=a;for(let e=0;e>8n&0xFFn)),a.push(Number(t>>16n&0xFFn)),a.push(Number(t>>24n&0xFFn)),a}function Qa(e){const a=function(e){for(var a=[],t=0;t>6,128|63&c):c<55296||c>=57344?a.push(224|c>>12,128|c>>6&63,128|63&c):(t++,c=65536+((1023&c)<<10|1023&e.charCodeAt(t)),a.push(240|c>>18,128|c>>12&63,128|c>>6&63,128|63&c))}return a}(e);return[...qa(a.length),...a]}function Ua(e){const a=[];let t=Oa(e);if(Da(t))throw new Error("Number cannot be negative");for(;!Ta(t);)a.push(Number(0x7Fn&t)),t>>=7n;0==a.length&&a.push(0);for(let e=0;e0xFFFFFFFFn)throw new Error("Number too big");if(a>0x7FFFFFFFn&&(a-=0x100000000n),a<-2147483648n)throw new Error("Number too small");return ja(a)}function $a(e){let a=Oa(e);if(a>0xFFFFFFFFFFFFFFFFn)throw new Error("Number too big");if(a>0x7FFFFFFFFFFFFFFFn&&(a-=0x10000000000000000n),a<-9223372036854775808n)throw new Error("Number too small");return ja(a)}function qa(e){let a=Oa(e);if(a>0xFFFFFFFFn)throw new Error("Number too big");return Ua(a)}function Ga(e){return Array.from(e,(function(e){return("0"+(255&e).toString(16)).slice(-2)})).join("")}class za{constructor(e){this.func=e,this.functionName=e.functionName,this.module=e.module}setLocal(e,a){const t=this.func.localIdxByName[e];if(void 0===t)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${e} `);return[...a,33,...qa(t)]}teeLocal(e,a){const t=this.func.localIdxByName[e];if(void 0===t)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${e} `);return[...a,34,...qa(t)]}getLocal(e){const a=this.func.localIdxByName[e];if(void 0===a)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${e} `);return[32,...qa(a)]}i64_load8_s(e,a,t){return[...e,48,void 0===t?0:t,...qa(a||0)]}i64_load8_u(e,a,t){return[...e,49,void 0===t?0:t,...qa(a||0)]}i64_load16_s(e,a,t){return[...e,50,void 0===t?1:t,...qa(a||0)]}i64_load16_u(e,a,t){return[...e,51,void 0===t?1:t,...qa(a||0)]}i64_load32_s(e,a,t){return[...e,52,void 0===t?2:t,...qa(a||0)]}i64_load32_u(e,a,t){return[...e,53,void 0===t?2:t,...qa(a||0)]}i64_load(e,a,t){return[...e,41,void 0===t?3:t,...qa(a||0)]}i64_store(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=3,r=a):Array.isArray(t)?(f=a,d=3,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,55,d,...qa(f)]}i64_store32(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=2,r=a):Array.isArray(t)?(f=a,d=2,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,62,d,...qa(f)]}i64_store16(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=1,r=a):Array.isArray(t)?(f=a,d=1,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,61,d,...qa(f)]}i64_store8(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=0,r=a):Array.isArray(t)?(f=a,d=0,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,60,d,...qa(f)]}i32_load8_s(e,a,t){return[...e,44,void 0===t?0:t,...qa(a||0)]}i32_load8_u(e,a,t){return[...e,45,void 0===t?0:t,...qa(a||0)]}i32_load16_s(e,a,t){return[...e,46,void 0===t?1:t,...qa(a||0)]}i32_load16_u(e,a,t){return[...e,47,void 0===t?1:t,...qa(a||0)]}i32_load(e,a,t){return[...e,40,void 0===t?2:t,...qa(a||0)]}i32_store(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=2,r=a):Array.isArray(t)?(f=a,d=2,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,54,d,...qa(f)]}i32_store16(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=1,r=a):Array.isArray(t)?(f=a,d=1,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,59,d,...qa(f)]}i32_store8(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=0,r=a):Array.isArray(t)?(f=a,d=0,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,58,d,...qa(f)]}call(e,...a){const t=this.module.functionIdxByName[e];if(void 0===t)throw new Error(`Function not defined: Function: ${e}`);return[...[].concat(...a),16,...qa(t)]}call_indirect(e,...a){return[...[].concat(...a),...e,17,0,0]}if(e,a,t){return t?[...e,4,64,...a,5,...t,11]:[...e,4,64,...a,11]}block(e){return[2,64,...e,11]}loop(...e){return[3,64,...[].concat(...e),11]}br_if(e,a){return[...a,13,...qa(e)]}br(e){return[12,...qa(e)]}ret(e){return[...e,15]}drop(e){return[...e,26]}i64_const(e){return[66,...$a(e)]}i32_const(e){return[65,...Ha(e)]}i64_eqz(e){return[...e,80]}i64_eq(e,a){return[...e,...a,81]}i64_ne(e,a){return[...e,...a,82]}i64_lt_s(e,a){return[...e,...a,83]}i64_lt_u(e,a){return[...e,...a,84]}i64_gt_s(e,a){return[...e,...a,85]}i64_gt_u(e,a){return[...e,...a,86]}i64_le_s(e,a){return[...e,...a,87]}i64_le_u(e,a){return[...e,...a,88]}i64_ge_s(e,a){return[...e,...a,89]}i64_ge_u(e,a){return[...e,...a,90]}i64_add(e,a){return[...e,...a,124]}i64_sub(e,a){return[...e,...a,125]}i64_mul(e,a){return[...e,...a,126]}i64_div_s(e,a){return[...e,...a,127]}i64_div_u(e,a){return[...e,...a,128]}i64_rem_s(e,a){return[...e,...a,129]}i64_rem_u(e,a){return[...e,...a,130]}i64_and(e,a){return[...e,...a,131]}i64_or(e,a){return[...e,...a,132]}i64_xor(e,a){return[...e,...a,133]}i64_shl(e,a){return[...e,...a,134]}i64_shr_s(e,a){return[...e,...a,135]}i64_shr_u(e,a){return[...e,...a,136]}i64_extend_i32_s(e){return[...e,172]}i64_extend_i32_u(e){return[...e,173]}i64_clz(e){return[...e,121]}i64_ctz(e){return[...e,122]}i32_eqz(e){return[...e,69]}i32_eq(e,a){return[...e,...a,70]}i32_ne(e,a){return[...e,...a,71]}i32_lt_s(e,a){return[...e,...a,72]}i32_lt_u(e,a){return[...e,...a,73]}i32_gt_s(e,a){return[...e,...a,74]}i32_gt_u(e,a){return[...e,...a,75]}i32_le_s(e,a){return[...e,...a,76]}i32_le_u(e,a){return[...e,...a,77]}i32_ge_s(e,a){return[...e,...a,78]}i32_ge_u(e,a){return[...e,...a,79]}i32_add(e,a){return[...e,...a,106]}i32_sub(e,a){return[...e,...a,107]}i32_mul(e,a){return[...e,...a,108]}i32_div_s(e,a){return[...e,...a,109]}i32_div_u(e,a){return[...e,...a,110]}i32_rem_s(e,a){return[...e,...a,111]}i32_rem_u(e,a){return[...e,...a,112]}i32_and(e,a){return[...e,...a,113]}i32_or(e,a){return[...e,...a,114]}i32_xor(e,a){return[...e,...a,115]}i32_shl(e,a){return[...e,...a,116]}i32_shr_s(e,a){return[...e,...a,117]}i32_shr_u(e,a){return[...e,...a,118]}i32_rotl(e,a){return[...e,...a,119]}i32_rotr(e,a){return[...e,...a,120]}i32_wrap_i64(e){return[...e,167]}i32_clz(e){return[...e,103]}i32_ctz(e){return[...e,104]}unreachable(){return[0]}current_memory(){return[63,0]}comment(){return[]}}const Ka={i32:127,i64:126,f32:125,f64:124,anyfunc:112,func:96,emptyblock:64};class Va{constructor(e,a,t,c,f){if("import"==t)this.fnType="import",this.moduleName=c,this.fieldName=f;else{if("internal"!=t)throw new Error("Invalid function fnType: "+t);this.fnType="internal"}this.module=e,this.fnName=a,this.params=[],this.locals=[],this.localIdxByName={},this.code=[],this.returnType=null,this.nextLocal=0}addParam(e,a){if(this.localIdxByName[e])throw new Error(`param already exists. Function: ${this.fnName}, Param: ${e} `);const t=this.nextLocal++;this.localIdxByName[e]=t,this.params.push({type:a})}addLocal(e,a,t){const c=t||1;if(this.localIdxByName[e])throw new Error(`local already exists. Function: ${this.fnName}, Param: ${e} `);const f=this.nextLocal++;this.localIdxByName[e]=f,this.locals.push({type:a,length:c})}setReturnType(e){if(this.returnType)throw new Error(`returnType already defined. Function: ${this.fnName}`);this.returnType=e}getSignature(){return[96,...qa(this.params.length),...this.params.map((e=>Ka[e.type])),...this.returnType?[1,Ka[this.returnType]]:[0]]}getBody(){const e=this.locals.map((e=>[...qa(e.length),Ka[e.type]])),a=[...qa(this.locals.length),...[].concat(...e),...this.code,11];return[...qa(a.length),...a]}addCode(...e){this.code.push(...[].concat(...e))}getCodeBuilder(){return new za(this)}}class Za{constructor(){this.functions=[],this.functionIdxByName={},this.nImportFunctions=0,this.nInternalFunctions=0,this.memory={pagesSize:1,moduleName:"env",fieldName:"memory"},this.free=8,this.datas=[],this.modules={},this.exports=[],this.functionsTable=[]}build(){return this._setSignatures(),new Uint8Array([...Fa(1836278016),...Fa(1),...this._buildType(),...this._buildImport(),...this._buildFunctionDeclarations(),...this._buildFunctionsTable(),...this._buildExports(),...this._buildElements(),...this._buildCode(),...this._buildData()])}addFunction(e){if(void 0!==this.functionIdxByName[e])throw new Error(`Function already defined: ${e}`);const a=this.functions.length;return this.functionIdxByName[e]=a,this.functions.push(new Va(this,e,"internal")),this.nInternalFunctions++,this.functions[a]}addIimportFunction(e,a,t){if(void 0!==this.functionIdxByName[e])throw new Error(`Function already defined: ${e}`);if(this.functions.length>0&&"internal"==this.functions[this.functions.length-1].type)throw new Error(`Import functions must be declared before internal: ${e}`);let c=t||e;const f=this.functions.length;return this.functionIdxByName[e]=f,this.functions.push(new Va(this,e,"import",a,c)),this.nImportFunctions++,this.functions[f]}setMemory(e,a,t){this.memory={pagesSize:e,moduleName:a||"env",fieldName:t||"memory"}}exportFunction(e,a){const t=a||e;if(void 0===this.functionIdxByName[e])throw new Error(`Function not defined: ${e}`);const c=this.functionIdxByName[e];t!=e&&(this.functionIdxByName[t]=c),this.exports.push({exportName:t,idx:c})}addFunctionToTable(e){const a=this.functionIdxByName[e];this.functionsTable.push(a)}addData(e,a){this.datas.push({offset:e,bytes:a})}alloc(e,a){let t,c;(Array.isArray(e)||ArrayBuffer.isView(e))&&void 0===a?(t=e.length,c=e):(t=e,c=a),t=1+(t-1>>3)<<3;const f=this.free;return this.free+=t,c&&this.addData(f,c),f}allocString(e){const a=(new globalThis.TextEncoder).encode(e);return this.alloc([...a,0])}_setSignatures(){this.signatures=[];const e={};if(this.functionsTable.length>0){const a=this.functions[this.functionsTable[0]].getSignature();e["s_"+Ga(a)]=0,this.signatures.push(a)}for(let a=0;a=0)c=await async function(e,a){if(!e&&globalThis.curve_bn128)return globalThis.curve_bn128;const t=new Za;t.setMemory(25),na(t),a&&a(t);const c={};c.code=t.build(),c.pq=t.modules.f1m.pq,c.pr=t.modules.frm.pq,c.pG1gen=t.modules.bn128.pG1gen,c.pG1zero=t.modules.bn128.pG1zero,c.pG1b=t.modules.bn128.pG1b,c.pG2gen=t.modules.bn128.pG2gen,c.pG2zero=t.modules.bn128.pG2zero,c.pG2b=t.modules.bn128.pG2b,c.pOneT=t.modules.bn128.pOneT,c.prePSize=t.modules.bn128.prePSize,c.preQSize=t.modules.bn128.preQSize,c.n8q=32,c.n8r=32,c.q=t.modules.bn128.q,c.r=t.modules.bn128.r;const f={name:"bn128",wasm:c,q:d("21888242871839275222246405745257275088696311157297823662689037894645226208583"),r:d("21888242871839275222246405745257275088548364400416034343698204186575808495617"),n8q:32,n8r:32,cofactorG2:d("30644e72e131a029b85045b68181585e06ceecda572a2489345f2299c0f9fa8d",16),singleThread:!!e},r=await Ra(f);return r.terminate=async function(){f.singleThread||(globalThis.curve_bn128=null,await this.tm.terminate())},e||(globalThis.curve_bn128=r),r}(a,t);else{if(!(["BLS12381"].indexOf(f)>=0))throw new Error(`Curve not supported: ${e}`);c=await async function(e,a){if(!e&&globalThis.curve_bls12381)return globalThis.curve_bls12381;const t=new Za;t.setMemory(25),ia(t),a&&a(t);const c={};c.code=t.build(),c.pq=t.modules.f1m.pq,c.pr=t.modules.frm.pq,c.pG1gen=t.modules.bls12381.pG1gen,c.pG1zero=t.modules.bls12381.pG1zero,c.pG1b=t.modules.bls12381.pG1b,c.pG2gen=t.modules.bls12381.pG2gen,c.pG2zero=t.modules.bls12381.pG2zero,c.pG2b=t.modules.bls12381.pG2b,c.pOneT=t.modules.bls12381.pOneT,c.prePSize=t.modules.bls12381.prePSize,c.preQSize=t.modules.bls12381.preQSize,c.n8q=48,c.n8r=32,c.q=t.modules.bls12381.q,c.r=t.modules.bls12381.r;const f={name:"bls12381",wasm:c,q:d("1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab",16),r:d("73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001",16),n8q:48,n8r:32,cofactorG1:d("0x396c8c005555e1568c00aaab0000aaab",16),cofactorG2:d("0x5d543a95414e7f1091d50792876a202cd91de4547085abaa68a205b2e5a7ddfa628f1cb4d9e82ef21537e293a6691ae1616ec6e786f0c70cf1c38e31c7238e5",16),singleThread:!!e},r=await Ra(f);return r.terminate=async function(){f.singleThread||(globalThis.curve_bls12381=null,await this.tm.terminate())},e||(globalThis.curve_bls12381=r),r}(a,t)}return c}globalThis.curve_bn128=null,globalThis.curve_bls12381=null,d("73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001",16),d("21888242871839275222246405745257275088548364400416034343698204186575808495617"),d("1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab",16),d("21888242871839275222246405745257275088696311157297823662689037894645226208583");const Wa=B,Ya=ma;class Xa{constructor(e){this.F=e,this.p=Wa.fromString("21888242871839275222246405745257275088548364400416034343698204186575808495617"),this.pm1d2=Wa.div(Wa.sub(this.p,Wa.e(1)),Wa.e(2)),this.Generator=[e.e("995203441582195749578291179787384436505546430278305826713579947235728471134"),e.e("5472060717959818805561601436314318772137091100104008585924551046643952123905")],this.Base8=[e.e("5299619240641551281634865583518297030282874472190772894086521144482721001553"),e.e("16950150798460657717958625567821834550301663161624707787222815936182638968203")],this.order=Wa.fromString("21888242871839275222246405745257275088614511777268538073601725287587578984328"),this.subOrder=Wa.shiftRight(this.order,3),this.A=e.e("168700"),this.D=e.e("168696")}addPoint(e,a){const t=this.F,c=[],f=t.mul(e[0],a[1]),d=t.mul(e[1],a[0]),r=t.mul(t.sub(e[1],t.mul(this.A,e[0])),t.add(a[0],a[1])),n=t.mul(f,d),i=t.mul(this.D,n);return c[0]=t.div(t.add(f,d),t.add(t.one,i)),c[1]=t.div(t.add(r,t.sub(t.mul(this.A,f),d)),t.sub(t.one,i)),c}mulPointEscalar(e,a){const t=this.F;let c=[t.e("0"),t.e("1")],f=a,d=e;for(;!Wa.isZero(f);)Wa.isOdd(f)&&(c=this.addPoint(c,d)),d=this.addPoint(d,d),f=Wa.shiftRight(f,1);return c}inSubgroup(e){const a=this.F;if(!this.inCurve(e))return!1;const t=this.mulPointEscalar(e,this.subOrder);return a.isZero(t[0])&&a.eq(t[1],a.one)}inCurve(e){const a=this.F,t=a.square(e[0]),c=a.square(e[1]);return!!a.eq(a.add(a.mul(this.A,t),c),a.add(a.one,a.mul(a.mul(t,c),this.D)))}packPoint(e){const a=this.F,t=new Uint8Array(32);a.toRprLE(t,0,e[1]);const c=a.toObject(e[0]);return Wa.gt(c,this.pm1d2)&&(t[31]=128|t[31]),t}unpackPoint(e){const a=this.F;let t=!1;const c=new Array(2);if(128&e[31]&&(t=!0,e[31]=127&e[31]),c[1]=a.fromRprLE(e,0),Wa.gt(a.toObject(c[1]),this.p))return null;const f=a.square(c[1]),d=a.div(a.sub(a.one,f),a.sub(this.A,a.mul(this.D,f))),r=a.exp(d,a.half);if(!a.eq(a.one,r))return null;let n=a.sqrt(d);return null==n?null:(t&&(n=a.neg(n)),c[0]=n,c)}}var et=t(72206),at=t(60654),tt=t(48287).Buffer;async function ct(){const e=await async function(){const e=await Ja("bn128",!0);return new Xa(e.Fr)}();return new ft(e)}class ft{constructor(e){this.babyJub=e,this.bases=[]}baseHash(e,a){return"blake"==e?at("blake256").update(a).digest():"blake2b"==e?tt.from(et(32).update(tt.from(a)).digest()):void 0}hash(e,a){(a=a||{}).baseHash=a.baseHash||"blake";const t=this.babyJub,c=this.buffer2bits(e),f=Math.floor((c.length-1)/200)+1;let d=[t.F.zero,t.F.one];for(let e=0;e>1,a[8*t+2]=(4&c)>>2,a[8*t+3]=(8&c)>>3,a[8*t+4]=(16&c)>>4,a[8*t+5]=(32&c)>>5,a[8*t+6]=(64&c)>>6,a[8*t+7]=(128&c)>>7}return a}}var dt=t(31176),rt=t.n(dt);let nt=!1,it=!1;const bt={debug:1,default:2,info:2,warning:3,error:4,off:5};let ot=bt.default,st=null;const lt=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((a=>{try{if("test"!=="test".normalize(a))throw new Error("bad normalize")}catch(t){e.push(a)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var ut,ht;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(ut||(ut={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(ht||(ht={}));const pt="0123456789abcdef";class gt{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,a){const t=e.toLowerCase();null==bt[t]&&this.throwArgumentError("invalid log level name","logLevel",e),ot>bt[t]||console.log.apply(console,a)}debug(...e){this._log(gt.levels.DEBUG,e)}info(...e){this._log(gt.levels.INFO,e)}warn(...e){this._log(gt.levels.WARNING,e)}makeError(e,a,t){if(it)return this.makeError("censored error",a,{});a||(a=gt.errors.UNKNOWN_ERROR),t||(t={});const c=[];Object.keys(t).forEach((e=>{const a=t[e];try{if(a instanceof Uint8Array){let t="";for(let e=0;e>4],t+=pt[15&a[e]];c.push(e+"=Uint8Array(0x"+t+")")}else c.push(e+"="+JSON.stringify(a))}catch(a){c.push(e+"="+JSON.stringify(t[e].toString()))}})),c.push(`code=${a}`),c.push(`version=${this.version}`);const f=e;let d="";switch(a){case ht.NUMERIC_FAULT:{d="NUMERIC_FAULT";const a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":d+="-"+a;break;case"negative-power":case"negative-width":d+="-unsupported";break;case"unbound-bitwise-result":d+="-unbound-result"}break}case ht.CALL_EXCEPTION:case ht.INSUFFICIENT_FUNDS:case ht.MISSING_NEW:case ht.NONCE_EXPIRED:case ht.REPLACEMENT_UNDERPRICED:case ht.TRANSACTION_REPLACED:case ht.UNPREDICTABLE_GAS_LIMIT:d=a}d&&(e+=" [ See: https://links.ethers.org/v5-errors-"+d+" ]"),c.length&&(e+=" ("+c.join(", ")+")");const r=new Error(e);return r.reason=f,r.code=a,Object.keys(t).forEach((function(e){r[e]=t[e]})),r}throwError(e,a,t){throw this.makeError(e,a,t)}throwArgumentError(e,a,t){return this.throwError(e,gt.errors.INVALID_ARGUMENT,{argument:a,value:t})}assert(e,a,t,c){e||this.throwError(a,t,c)}assertArgument(e,a,t,c){e||this.throwArgumentError(a,t,c)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),lt&&this.throwError("platform missing String.prototype.normalize",gt.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:lt})}checkSafeUint53(e,a){"number"==typeof e&&(null==a&&(a="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(a,gt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(a,gt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,a,t){t=t?": "+t:"",ea&&this.throwError("too many arguments"+t,gt.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:a})}checkNew(e,a){e!==Object&&null!=e||this.throwError("missing new",gt.errors.MISSING_NEW,{name:a.name})}checkAbstract(e,a){e===a?this.throwError("cannot instantiate abstract class "+JSON.stringify(a.name)+" directly; use a sub-class",gt.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",gt.errors.MISSING_NEW,{name:a.name})}static globalLogger(){return st||(st=new gt("logger/5.7.0")),st}static setCensorship(e,a){if(!e&&a&&this.globalLogger().throwError("cannot permanently disable censorship",gt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),nt){if(!e)return;this.globalLogger().throwError("error censorship permanent",gt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}it=!!e,nt=!!a}static setLogLevel(e){const a=bt[e.toLowerCase()];null!=a?ot=a:gt.globalLogger().warn("invalid log level - "+e)}static from(e){return new gt(e)}}gt.errors=ht,gt.levels=ut;const mt=new gt("bytes/5.7.0");function xt(e){return e.slice||(e.slice=function(){const a=Array.prototype.slice.call(arguments);return xt(new Uint8Array(Array.prototype.slice.apply(e,a)))}),e}function yt(e){return"number"==typeof e&&e==e&&e%1==0}function At(e,a){if(a||(a={}),"number"==typeof e){mt.checkSafeUint53(e,"invalid arrayify value");const a=[];for(;e;)a.unshift(255&e),e=parseInt(String(e/256));return 0===a.length&&a.push(0),xt(new Uint8Array(a))}if(a.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),function(e){return!!e.toHexString}(e)&&(e=e.toHexString()),function(e,a){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||a&&e.length!==2+2*a)}(e)){let t=e.substring(2);t.length%2&&("left"===a.hexPad?t="0"+t:"right"===a.hexPad?t+="0":mt.throwArgumentError("hex data is odd-length","value",e));const c=[];for(let e=0;e=256)return!1}return!0}(e)?xt(new Uint8Array(e)):mt.throwArgumentError("invalid arrayify value","value",e)}function vt(e){return"0x"+rt().keccak_256(At(e))}const wt=new gt("strings/5.7.0");var _t,It;function Et(e,a,t,c,f){if(e===It.BAD_PREFIX||e===It.UNEXPECTED_CONTINUE){let e=0;for(let c=a+1;c>6==2;c++)e++;return e}return e===It.OVERRUN?t.length-a-1:0}function Ct(e,a=_t.current){a!=_t.current&&(wt.checkNormalize(),e=e.normalize(a));let t=[];for(let a=0;a>6|192),t.push(63&c|128);else if(55296==(64512&c)){a++;const f=e.charCodeAt(a);if(a>=e.length||56320!=(64512&f))throw new Error("invalid utf-8 string");const d=65536+((1023&c)<<10)+(1023&f);t.push(d>>18|240),t.push(d>>12&63|128),t.push(d>>6&63|128),t.push(63&d|128)}else t.push(c>>12|224),t.push(c>>6&63|128),t.push(63&c|128)}return At(t)}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(_t||(_t={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(It||(It={})),Object.freeze({error:function(e,a,t,c,f){return wt.throwArgumentError(`invalid codepoint at offset ${a}; ${e}`,"bytes",t)},ignore:Et,replace:function(e,a,t,c,f){return e===It.OVERLONG?(c.push(f),0):(c.push(65533),Et(e,a,t))}});const Mt="mimcsponge";async function Bt(){const e=await Ja("bn128",!0);return new Lt(e.Fr)}class Lt{constructor(e){this.F=e,this.cts=this.getConstants(Mt,220)}getIV(e){const a=this.F;void 0===e&&(e=Mt);const t=vt(Ct(e+"_iv"));return Wa.e(t).mod(a.p)}getConstants(e,a){const t=this.F;void 0===e&&(e=Mt),void 0===a&&(a=220);const c=new Array(a);let f=vt(Ct(Mt));for(let e=1;e{"use strict";t.d(a,{r:()=>c});const c="6.13.2"},35273:(e,a,t)=>{"use strict";t.d(a,{y:()=>R});var c=t(57339),f=t(21228),d=t(30031),r=t(27033),n=t(19353);class i extends f.Ue{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,a){let t=n.V.dereference(a,"string");try{t=(0,d.b)(t)}catch(e){return this._throwError(e.message,a)}return e.writeValue(t)}decode(e){return(0,d.b)((0,r.up)(e.readValue(),20))}}var b=t(88081);class o extends f.Ue{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,a){return this.coder.encode(e,a)}decode(e){return this.coder.decode(e)}}function s(e,a,t){let d=[];if(Array.isArray(t))d=t;else if(t&&"object"==typeof t){let e={};d=a.map((a=>{const f=a.localName;return(0,c.vA)(f,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:a},value:t}),(0,c.vA)(!e[f],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:a},value:t}),e[f]=!0,t[f]}))}else(0,c.MR)(!1,"invalid tuple value","tuple",t);(0,c.MR)(a.length===d.length,"types/value length mismatch","tuple",t);let r=new f.AU,n=new f.AU,i=[];a.forEach(((e,a)=>{let t=d[a];if(e.dynamic){let a=n.length;e.encode(n,t);let c=r.writeUpdatableValue();i.push((e=>{c(e+a)}))}else e.encode(r,t)})),i.forEach((e=>{e(r.length)}));let b=e.appendWriter(r);return b+=e.appendWriter(n),b}function l(e,a){let t=[],d=[],r=e.subReader(0);return a.forEach((a=>{let f=null;if(a.dynamic){let t=e.readIndex(),d=r.subReader(t);try{f=a.decode(d)}catch(e){if((0,c.bJ)(e,"BUFFER_OVERRUN"))throw e;f=e,f.baseType=a.name,f.name=a.localName,f.type=a.type}}else try{f=a.decode(e)}catch(e){if((0,c.bJ)(e,"BUFFER_OVERRUN"))throw e;f=e,f.baseType=a.name,f.name=a.localName,f.type=a.type}if(null==f)throw new Error("investigate");t.push(f),d.push(a.localName||null)})),f.Q7.fromItems(t,d)}class u extends f.Ue{coder;length;constructor(e,a,t){super("array",e.type+"["+(a>=0?a:"")+"]",t,-1===a||e.dynamic),(0,b.n)(this,{coder:e,length:a})}defaultValue(){const e=this.coder.defaultValue(),a=[];for(let t=0;te||t<-(e+w))&&this._throwError("value out-of-bounds",a),t=(0,r.JJ)(t,8*f.Yx)}else(t(0,r.dK)(c,8*this.size))&&this._throwError("value out-of-bounds",a);return e.writeValue(t)}decode(e){let a=(0,r.dK)(e.readValue(),8*this.size);return this.signed&&(a=(0,r.ST)(a,8*this.size)),a}}var E=t(87303);class C extends g{constructor(e){super("string",e)}defaultValue(){return""}encode(e,a){return super.encode(e,(0,E.YW)(n.V.dereference(a,"string")))}decode(e){return(0,E._v)(super.decode(e))}}class M extends f.Ue{coders;constructor(e,a){let t=!1;const c=[];e.forEach((e=>{e.dynamic&&(t=!0),c.push(e.type)})),super("tuple","tuple("+c.join(",")+")",a,t),(0,b.n)(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((a=>{e.push(a.defaultValue())}));const a=this.coders.reduce(((e,a)=>{const t=a.localName;return t&&(e[t]||(e[t]=0),e[t]++),e}),{});return this.coders.forEach(((t,c)=>{let f=t.localName;f&&1===a[f]&&("length"===f&&(f="_length"),null==e[f]&&(e[f]=e[c]))})),Object.freeze(e)}encode(e,a){const t=n.V.dereference(a,"tuple");return s(e,this.coders,t)}decode(e){return l(e,this.coders)}}var B=t(76124);const L=new Map;L.set(0,"GENERIC_PANIC"),L.set(1,"ASSERT_FALSE"),L.set(17,"OVERFLOW"),L.set(18,"DIVIDE_BY_ZERO"),L.set(33,"ENUM_RANGE_ERROR"),L.set(34,"BAD_STORAGE_DATA"),L.set(49,"STACK_UNDERFLOW"),L.set(50,"ARRAY_RANGE_ERROR"),L.set(65,"OUT_OF_MEMORY"),L.set(81,"UNINITIALIZED_FUNCTION_CALL");const S=new RegExp(/^bytes([0-9]*)$/),k=new RegExp(/^(u?int)([0-9]*)$/);let N=null,P=1024;class R{#Se(e){if(e.isArray())return new u(this.#Se(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new M(e.components.map((e=>this.#Se(e))),e.name);switch(e.baseType){case"address":return new i(e.name);case"bool":return new h(e.name);case"string":return new C(e.name);case"bytes":return new m(e.name);case"":return new A(e.name)}let a=e.type.match(k);if(a){let t=parseInt(a[2]||"256");return(0,c.MR)(0!==t&&t<=256&&t%8==0,"invalid "+a[1]+" bit length","param",e),new I(t/8,"int"===a[1],e.name)}if(a=e.type.match(S),a){let t=parseInt(a[1]);return(0,c.MR)(0!==t&&t<=32,"invalid bytes length","param",e),new x(t,e.name)}(0,c.MR)(!1,"invalid type","type",e.type)}getDefaultValue(e){const a=e.map((e=>this.#Se(B.aX.from(e))));return new M(a,"_").defaultValue()}encode(e,a){(0,c.dd)(a.length,e.length,"types/values length mismatch");const t=e.map((e=>this.#Se(B.aX.from(e)))),d=new M(t,"_"),r=new f.AU;return d.encode(r,a),r.data}decode(e,a,t){const c=e.map((e=>this.#Se(B.aX.from(e))));return new M(c,"_").decode(new f.mP(a,t,P))}static _setDefaultMaxInflation(e){(0,c.MR)("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),P=e}static defaultAbiCoder(){return null==N&&(N=new R),N}static getBuiltinCallException(e,a,t){return function(e,a,t,f){let r="missing revert data",n=null,i=null;if(t){r="execution reverted";const e=(0,p.q5)(t);if(t=(0,p.c$)(t),0===e.length)r+=" (no data present; likely require(false) occurred",n="require(false)";else if(e.length%32!=4)r+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===(0,p.c$)(e.slice(0,4)))try{n=f.decode(["string"],e.slice(4))[0],i={signature:"Error(string)",name:"Error",args:[n]},r+=`: ${JSON.stringify(n)}`}catch(e){r+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===(0,p.c$)(e.slice(0,4)))try{const a=Number(f.decode(["uint256"],e.slice(4))[0]);i={signature:"Panic(uint256)",name:"Panic",args:[a]},n=`Panic due to ${L.get(a)||"UNKNOWN"}(${a})`,r+=`: ${n}`}catch(e){r+=" (could not decode panic code)"}else r+=" (unknown custom error)"}const b={to:a.to?(0,d.b)(a.to):null,data:a.data||"0x"};return a.from&&(b.from=(0,d.b)(a.from)),(0,c.xz)(r,"CALL_EXCEPTION",{action:e,data:t,reason:n,transaction:b,invocation:null,revert:i})}(e,a,t,R.defaultAbiCoder())}}},21228:(e,a,t)=>{"use strict";t.d(a,{AU:()=>y,Q7:()=>g,Ue:()=>x,Yx:()=>n,mP:()=>A});var c=t(27033),f=t(57339),d=t(36212),r=t(88081);const n=32,i=new Uint8Array(n),b=["then"],o={},s=new WeakMap;function l(e){return s.get(e)}function u(e,a){s.set(e,a)}function h(e,a){const t=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw t.error=a,t}function p(e,a,t){return e.indexOf(null)>=0?a.map(((e,a)=>e instanceof g?p(l(e),e,t):e)):e.reduce(((e,c,f)=>{let d=a.getValue(c);return c in e||(t&&d instanceof g&&(d=p(l(d),d,t)),e[c]=d),e}),{})}class g extends Array{#ke;constructor(...e){const a=e[0];let t=e[1],f=(e[2]||[]).slice(),d=!0;a!==o&&(t=e,f=[],d=!1),super(t.length),t.forEach(((e,a)=>{this[a]=e}));const r=f.reduce(((e,a)=>("string"==typeof a&&e.set(a,(e.get(a)||0)+1),e)),new Map);if(u(this,Object.freeze(t.map(((e,a)=>{const t=f[a];return null!=t&&1===r.get(t)?t:null})))),this.#ke=[],null==this.#ke&&this.#ke,!d)return;Object.freeze(this);const n=new Proxy(this,{get:(e,a,t)=>{if("string"==typeof a){if(a.match(/^[0-9]+$/)){const t=(0,c.WZ)(a,"%index");if(t<0||t>=this.length)throw new RangeError("out of result range");const f=e[t];return f instanceof Error&&h(`index ${t}`,f),f}if(b.indexOf(a)>=0)return Reflect.get(e,a,t);const f=e[a];if(f instanceof Function)return function(...a){return f.apply(this===t?e:this,a)};if(!(a in e))return e.getValue.apply(this===t?e:this,[a])}return Reflect.get(e,a,t)}});return u(n,l(this)),n}toArray(e){const a=[];return this.forEach(((t,c)=>{t instanceof Error&&h(`index ${c}`,t),e&&t instanceof g&&(t=t.toArray(e)),a.push(t)})),a}toObject(e){const a=l(this);return a.reduce(((t,c,d)=>((0,f.vA)(null!=c,`value at index ${d} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),p(a,this,e))),{})}slice(e,a){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==a&&(a=this.length),a<0&&(a+=this.length)<0&&(a=0),a>this.length&&(a=this.length);const t=l(this),c=[],f=[];for(let d=e;d{this.#_e[e]=m(a)}}}class A{allowLoose;#_e;#Re;#Oe;#De;#Te;constructor(e,a,t){(0,r.n)(this,{allowLoose:!!a}),this.#_e=(0,d.Lm)(e),this.#Oe=0,this.#De=null,this.#Te=null!=t?t:1024,this.#Re=0}get data(){return(0,d.c$)(this.#_e)}get dataLength(){return this.#_e.length}get consumed(){return this.#Re}get bytes(){return new Uint8Array(this.#_e)}#Fe(e){if(this.#De)return this.#De.#Fe(e);this.#Oe+=e,(0,f.vA)(this.#Te<1||this.#Oe<=this.#Te*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#Te} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,d.Lm)(this.#_e),offset:this.#Re,length:e,info:{bytesRead:this.#Oe,dataLength:this.dataLength}})}#Qe(e,a,t){let c=Math.ceil(a/n)*n;return this.#Re+c>this.#_e.length&&(this.allowLoose&&t&&this.#Re+a<=this.#_e.length?c=a:(0,f.vA)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,d.Lm)(this.#_e),length:this.#_e.length,offset:this.#Re+c})),this.#_e.slice(this.#Re,this.#Re+c)}subReader(e){const a=new A(this.#_e.slice(this.#Re+e),this.allowLoose,this.#Te);return a.#De=this,a}readBytes(e,a){let t=this.#Qe(0,e,!!a);return this.#Fe(e),this.#Re+=t.length,t.slice(0,e)}readValue(){return(0,c.Dg)(this.readBytes(n))}readIndex(){return(0,c.Ro)(this.readBytes(n))}}},76124:(e,a,t)=>{"use strict";t.d(a,{FK:()=>$,Pw:()=>V,Zp:()=>K,aX:()=>H,bp:()=>z,hc:()=>J});var c=t(27033),f=t(57339),d=t(88081),r=t(38264);function n(e){const a=new Set;return e.forEach((e=>a.add(e))),Object.freeze(a)}const i=n("external public payable override".split(" ")),b="constant external internal payable private public pure view override",o=n(b.split(" ")),s="constructor error event fallback function receive struct",l=n(s.split(" ")),u="calldata memory storage payable indexed",h=n(u.split(" ")),p=n([s,u,"tuple returns",b].join(" ").split(" ")),g={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},m=new RegExp("^(\\s*)"),x=new RegExp("^([0-9]+)"),y=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),A=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),v=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class w{#Re;#Ue;get offset(){return this.#Re}get length(){return this.#Ue.length-this.#Re}constructor(e){this.#Re=0,this.#Ue=e.slice()}clone(){return new w(this.#Ue)}reset(){this.#Re=0}#je(e=0,a=0){return new w(this.#Ue.slice(e,a).map((a=>Object.freeze(Object.assign({},a,{match:a.match-e,linkBack:a.linkBack-e,linkNext:a.linkNext-e})))))}popKeyword(e){const a=this.peek();if("KEYWORD"!==a.type||!e.has(a.text))throw new Error(`expected keyword ${a.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const a=this.peek();throw new Error(`expected ${e}; got ${a.type} ${JSON.stringify(a.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const a=this.#je(this.#Re+1,e.match+1);return this.#Re=e.match+1,a}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const a=[];for(;this.#Re=this.#Ue.length)throw new Error("out-of-bounds");return this.#Ue[this.#Re]}peekKeyword(e){const a=this.peekType("KEYWORD");return null!=a&&e.has(a)?a:null}peekType(e){if(0===this.length)return null;const a=this.peek();return a.type===e?a.text:null}pop(){const e=this.peek();return this.#Re++,e}toString(){const e=[];for(let a=this.#Re;a`}}function _(e){const a=[],t=a=>{const t=r0&&"NUMBER"===a[a.length-1].type){const t=a.pop().text;e=t+e,a[a.length-1].value=(0,c.WZ)(t)}if(0===a.length||"BRACKET"!==a[a.length-1].type)throw new Error("missing opening bracket");a[a.length-1].text+=e}}else if(i=n.match(y),i){if(b.text=i[1],r+=b.text.length,p.has(b.text)){b.type="KEYWORD";continue}if(b.text.match(v)){b.type="TYPE";continue}b.type="ID"}else{if(i=n.match(x),!i)throw new Error(`unexpected token ${JSON.stringify(n[0])} at position ${r}`);b.text=i[1],b.type="NUMBER",r+=b.text.length}}return new w(a.map((e=>Object.freeze(e))))}function I(e,a){let t=[];for(const c in a.keys())e.has(c)&&t.push(c);if(t.length>1)throw new Error(`conflicting types: ${t.join(", ")}`)}function E(e,a){if(a.peekKeyword(l)){const t=a.pop().text;if(t!==e)throw new Error(`expected ${e}, got ${t}`)}return a.popType("ID")}function C(e,a){const t=new Set;for(;;){const c=e.peekType("KEYWORD");if(null==c||a&&!a.has(c))break;if(e.pop(),t.has(c))throw new Error(`duplicate keywords: ${JSON.stringify(c)}`);t.add(c)}return Object.freeze(t)}function M(e){let a=C(e,o);return I(a,n("constant payable nonpayable".split(" "))),I(a,n("pure view payable nonpayable".split(" "))),a.has("view")?"view":a.has("pure")?"pure":a.has("payable")?"payable":a.has("nonpayable")?"nonpayable":a.has("constant")?"view":"nonpayable"}function B(e,a){return e.popParams().map((e=>H.from(e,a)))}function L(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return(0,c.Ab)(e.pop().text);throw new Error("invalid gas")}return null}function S(e){if(e.length)throw new Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}const k=new RegExp(/^(.*)\[([0-9]*)\]$/);function N(e){const a=e.match(v);if((0,f.MR)(a,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(a[2]){const t=parseInt(a[2]);(0,f.MR)(0!==t&&t<=32,"invalid bytes length","type",e)}else if(a[3]){const t=parseInt(a[3]);(0,f.MR)(0!==t&&t<=256&&t%8==0,"invalid numeric width","type",e)}return e}const P={},R=Symbol.for("_ethers_internal"),O="_ParamTypeInternal",D="_ErrorInternal",T="_EventInternal",F="_ConstructorInternal",Q="_FallbackInternal",U="_FunctionInternal",j="_StructInternal";class H{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,a,t,c,r,n,i,b){if((0,f.gk)(e,P,"ParamType"),Object.defineProperty(this,R,{value:O}),n&&(n=Object.freeze(n.slice())),"array"===c){if(null==i||null==b)throw new Error("")}else if(null!=i||null!=b)throw new Error("");if("tuple"===c){if(null==n)throw new Error("")}else if(null!=n)throw new Error("");(0,d.n)(this,{name:a,type:t,baseType:c,indexed:r,components:n,arrayLength:i,arrayChildren:b})}format(e){if(null==e&&(e="sighash"),"json"===e){const a=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=a,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const t={type:"tuple"===this.baseType?"tuple":this.type,name:a};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.isTuple()&&(t.components=this.components.map((a=>JSON.parse(a.format(e))))),JSON.stringify(t)}let a="";return this.isArray()?(a+=this.arrayChildren.format(e),a+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?a+="("+this.components.map((a=>a.format(e))).join("full"===e?", ":",")+")":a+=this.type,"sighash"!==e&&(!0===this.indexed&&(a+=" indexed"),"full"===e&&this.name&&(a+=" "+this.name)),a}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,a){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const t=this;return e.map((e=>t.arrayChildren.walk(e,a)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const t=this;return e.map(((e,c)=>t.components[c].walk(e,a)))}return a(this.type,e)}#He(e,a,t,c){if(this.isArray()){if(!Array.isArray(a))throw new Error("invalid array value");if(-1!==this.arrayLength&&a.length!==this.arrayLength)throw new Error("array is wrong length");const f=this.arrayChildren,d=a.slice();return d.forEach(((a,c)=>{f.#He(e,a,t,(e=>{d[c]=e}))})),void c(d)}if(this.isTuple()){const f=this.components;let d;if(Array.isArray(a))d=a.slice();else{if(null==a||"object"!=typeof a)throw new Error("invalid tuple value");d=f.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in a))throw new Error(`missing value for component ${e.name}`);return a[e.name]}))}if(d.length!==this.components.length)throw new Error("array is wrong length");return d.forEach(((a,c)=>{f[c].#He(e,a,t,(e=>{d[c]=e}))})),void c(d)}const f=t(this.type,a);f.then?e.push(async function(){c(await f)}()):c(f)}async walkAsync(e,a){const t=[],c=[e];return this.#He(t,e,a,(e=>{c[0]=e})),t.length&&await Promise.all(t),c[0]}static from(e,a){if(H.isParamType(e))return e;if("string"==typeof e)try{return H.from(_(e),a)}catch(a){(0,f.MR)(!1,"invalid param type","obj",e)}else if(e instanceof w){let t="",c="",f=null;C(e,n(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",f=e.popParams().map((e=>H.from(e))),t=`tuple(${f.map((e=>e.format())).join(",")})`):(t=N(e.popType("TYPE")),c=t);let d=null,r=null;for(;e.length&&e.peekType("BRACKET");){const a=e.pop();d=new H(P,"",t,c,null,f,r,d),r=a.value,t+=a.text,c="array",f=null}let i=null;if(C(e,h).has("indexed")){if(!a)throw new Error("");i=!0}const b=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new H(P,b,t,c,i,f,r,d)}const t=e.name;(0,f.MR)(!t||"string"==typeof t&&t.match(A),"invalid name","obj.name",t);let c=e.indexed;null!=c&&((0,f.MR)(a,"parameter cannot be indexed","obj.indexed",e.indexed),c=!!c);let d=e.type,r=d.match(k);if(r){const a=parseInt(r[2]||"-1"),f=H.from({type:r[1],components:e.components});return new H(P,t||"",d,"array",c,null,a,f)}if("tuple"===d||d.startsWith("tuple(")||d.startsWith("(")){const a=null!=e.components?e.components.map((e=>H.from(e))):null;return new H(P,t||"",d,"tuple",c,a,null,null)}return d=N(e.type),new H(P,t||"",d,d,c,null,null,null)}static isParamType(e){return e&&e[R]===O}}class ${type;inputs;constructor(e,a,t){(0,f.gk)(e,P,"Fragment"),t=Object.freeze(t.slice()),(0,d.n)(this,{type:a,inputs:t})}static from(e){if("string"==typeof e){try{$.from(JSON.parse(e))}catch(e){}return $.from(_(e))}if(e instanceof w)switch(e.peekKeyword(l)){case"constructor":return V.from(e);case"error":return z.from(e);case"event":return K.from(e);case"fallback":case"receive":return Z.from(e);case"function":return J.from(e);case"struct":return W.from(e)}else if("object"==typeof e){switch(e.type){case"constructor":return V.from(e);case"error":return z.from(e);case"event":return K.from(e);case"fallback":case"receive":return Z.from(e);case"function":return J.from(e);case"struct":return W.from(e)}(0,f.vA)(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,f.MR)(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return V.isFragment(e)}static isError(e){return z.isFragment(e)}static isEvent(e){return K.isFragment(e)}static isFunction(e){return J.isFragment(e)}static isStruct(e){return W.isFragment(e)}}class q extends ${name;constructor(e,a,t,c){super(e,a,c),(0,f.MR)("string"==typeof t&&t.match(A),"invalid identifier","name",t),c=Object.freeze(c.slice()),(0,d.n)(this,{name:t})}}function G(e,a){return"("+a.map((a=>a.format(e))).join("full"===e?", ":",")+")"}class z extends q{constructor(e,a,t){super(e,"error",a,t),Object.defineProperty(this,R,{value:D})}get selector(){return(0,r.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((a=>JSON.parse(a.format(e))))});const a=[];return"sighash"!==e&&a.push("error"),a.push(this.name+G(e,this.inputs)),a.join(" ")}static from(e){if(z.isFragment(e))return e;if("string"==typeof e)return z.from(_(e));if(e instanceof w){const a=E("error",e),t=B(e);return S(e),new z(P,a,t)}return new z(P,e.name,e.inputs?e.inputs.map(H.from):[])}static isFragment(e){return e&&e[R]===D}}class K extends q{anonymous;constructor(e,a,t,c){super(e,"event",a,t),Object.defineProperty(this,R,{value:T}),(0,d.n)(this,{anonymous:c})}get topicHash(){return(0,r.id)(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((a=>JSON.parse(a.format(e))))});const a=[];return"sighash"!==e&&a.push("event"),a.push(this.name+G(e,this.inputs)),"sighash"!==e&&this.anonymous&&a.push("anonymous"),a.join(" ")}static getTopicHash(e,a){return a=(a||[]).map((e=>H.from(e))),new K(P,e,a,!1).topicHash}static from(e){if(K.isFragment(e))return e;if("string"==typeof e)try{return K.from(_(e))}catch(a){(0,f.MR)(!1,"invalid event fragment","obj",e)}else if(e instanceof w){const a=E("event",e),t=B(e,!0),c=!!C(e,n(["anonymous"])).has("anonymous");return S(e),new K(P,a,t,c)}return new K(P,e.name,e.inputs?e.inputs.map((e=>H.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[R]===T}}class V extends ${payable;gas;constructor(e,a,t,c,f){super(e,a,t),Object.defineProperty(this,R,{value:F}),(0,d.n)(this,{payable:c,gas:f})}format(e){if((0,f.vA)(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((a=>JSON.parse(a.format(e))))});const a=[`constructor${G(e,this.inputs)}`];return this.payable&&a.push("payable"),null!=this.gas&&a.push(`@${this.gas.toString()}`),a.join(" ")}static from(e){if(V.isFragment(e))return e;if("string"==typeof e)try{return V.from(_(e))}catch(a){(0,f.MR)(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof w){C(e,n(["constructor"]));const a=B(e),t=!!C(e,i).has("payable"),c=L(e);return S(e),new V(P,"constructor",a,t,c)}return new V(P,"constructor",e.inputs?e.inputs.map(H.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[R]===F}}class Z extends ${payable;constructor(e,a,t){super(e,"fallback",a),Object.defineProperty(this,R,{value:Q}),(0,d.n)(this,{payable:t})}format(e){const a=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:a,stateMutability:e})}return`${a}()${this.payable?" payable":""}`}static from(e){if(Z.isFragment(e))return e;if("string"==typeof e)try{return Z.from(_(e))}catch(a){(0,f.MR)(!1,"invalid fallback fragment","obj",e)}else if(e instanceof w){const a=e.toString(),t=e.peekKeyword(n(["fallback","receive"]));if((0,f.MR)(t,"type must be fallback or receive","obj",a),"receive"===e.popKeyword(n(["fallback","receive"]))){const a=B(e);return(0,f.MR)(0===a.length,"receive cannot have arguments","obj.inputs",a),C(e,n(["payable"])),S(e),new Z(P,[],!0)}let c=B(e);c.length?(0,f.MR)(1===c.length&&"bytes"===c[0].type,"invalid fallback inputs","obj.inputs",c.map((e=>e.format("minimal"))).join(", ")):c=[H.from("bytes")];const d=M(e);if((0,f.MR)("nonpayable"===d||"payable"===d,"fallback cannot be constants","obj.stateMutability",d),C(e,n(["returns"])).has("returns")){const a=B(e);(0,f.MR)(1===a.length&&"bytes"===a[0].type,"invalid fallback outputs","obj.outputs",a.map((e=>e.format("minimal"))).join(", "))}return S(e),new Z(P,c,"payable"===d)}if("receive"===e.type)return new Z(P,[],!0);if("fallback"===e.type){const a=[H.from("bytes")],t="payable"===e.stateMutability;return new Z(P,a,t)}(0,f.MR)(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[R]===Q}}class J extends q{constant;outputs;stateMutability;payable;gas;constructor(e,a,t,c,f,r){super(e,"function",a,c),Object.defineProperty(this,R,{value:U}),f=Object.freeze(f.slice());const n="view"===t||"pure"===t,i="payable"===t;(0,d.n)(this,{constant:n,gas:r,outputs:f,payable:i,stateMutability:t})}get selector(){return(0,r.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((a=>JSON.parse(a.format(e)))),outputs:this.outputs.map((a=>JSON.parse(a.format(e))))});const a=[];return"sighash"!==e&&a.push("function"),a.push(this.name+G(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&a.push(this.stateMutability),this.outputs&&this.outputs.length&&(a.push("returns"),a.push(G(e,this.outputs))),null!=this.gas&&a.push(`@${this.gas.toString()}`)),a.join(" ")}static getSelector(e,a){return a=(a||[]).map((e=>H.from(e))),new J(P,e,"view",a,[],null).selector}static from(e){if(J.isFragment(e))return e;if("string"==typeof e)try{return J.from(_(e))}catch(a){(0,f.MR)(!1,"invalid function fragment","obj",e)}else if(e instanceof w){const a=E("function",e),t=B(e),c=M(e);let f=[];C(e,n(["returns"])).has("returns")&&(f=B(e));const d=L(e);return S(e),new J(P,a,c,t,f,d)}let a=e.stateMutability;return null==a&&(a="payable","boolean"==typeof e.constant?(a="view",e.constant||(a="payable","boolean"!=typeof e.payable||e.payable||(a="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(a="nonpayable")),new J(P,e.name,a,e.inputs?e.inputs.map(H.from):[],e.outputs?e.outputs.map(H.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[R]===U}}class W extends q{constructor(e,a,t){super(e,"struct",a,t),Object.defineProperty(this,R,{value:j})}format(){throw new Error("@TODO")}static from(e){if("string"==typeof e)try{return W.from(_(e))}catch(a){(0,f.MR)(!1,"invalid struct fragment","obj",e)}else if(e instanceof w){const a=E("struct",e),t=B(e);return S(e),new W(P,a,t)}return new W(P,e.name,e.inputs?e.inputs.map(H.from):[])}static isFragment(e){return e&&e[R]===j}}},73622:(e,a,t)=>{"use strict";t.d(a,{KA:()=>y});var c=t(15539),f=t(38264),d=t(88081),r=t(57339),n=t(36212),i=t(27033),b=t(35273),o=t(21228),s=t(76124),l=t(19353);class u{fragment;name;signature;topic;args;constructor(e,a,t){const c=e.name,f=e.format();(0,d.n)(this,{fragment:e,name:c,signature:f,topic:a,args:t})}}class h{fragment;name;args;signature;selector;value;constructor(e,a,t,c){const f=e.name,r=e.format();(0,d.n)(this,{fragment:e,name:f,args:t,signature:r,selector:a,value:c})}}class p{fragment;name;args;signature;selector;constructor(e,a,t){const c=e.name,f=e.format();(0,d.n)(this,{fragment:e,name:c,args:t,signature:f,selector:a})}}class g{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){(0,d.n)(this,{hash:e,_isIndexed:!0})}}const m={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},x={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let a="unknown panic code";return e>=0&&e<=255&&m[e.toString()]&&(a=m[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${a})`}}};class y{fragments;deploy;fallback;receive;#$e;#qe;#Ge;#ze;constructor(e){let a=[];a="string"==typeof e?JSON.parse(e):e,this.#Ge=new Map,this.#$e=new Map,this.#qe=new Map;const t=[];for(const e of a)try{t.push(s.FK.from(e))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(e)}:`,a.message)}(0,d.n)(this,{fragments:Object.freeze(t)});let c=null,f=!1;this.#ze=this.getAbiCoder(),this.fragments.forEach(((e,a)=>{let t;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void(0,d.n)(this,{deploy:e});case"fallback":return void(0===e.inputs.length?f=!0:((0,r.MR)(!c||e.payable!==c.payable,"conflicting fallback fragments",`fragments[${a}]`,e),c=e,f=c.payable));case"function":t=this.#Ge;break;case"event":t=this.#qe;break;case"error":t=this.#$e;break;default:return}const n=e.format();t.has(n)||t.set(n,e)})),this.deploy||(0,d.n)(this,{deploy:s.Pw.from("constructor()")}),(0,d.n)(this,{fallback:c,receive:f})}format(e){const a=e?"minimal":"full";return this.fragments.map((e=>e.format(a)))}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return b.y.defaultAbiCoder()}#Ke(e,a,t){if((0,n.Lo)(e)){const a=e.toLowerCase();for(const e of this.#Ge.values())if(a===e.selector)return e;return null}if(-1===e.indexOf("(")){const c=[];for(const[a,t]of this.#Ge)a.split("(")[0]===e&&c.push(t);if(a){const e=a.length>0?a[a.length-1]:null;let t=a.length,f=!0;l.V.isTyped(e)&&"overrides"===e.type&&(f=!1,t--);for(let e=c.length-1;e>=0;e--){const a=c[e].inputs.length;a===t||f&&a===t-1||c.splice(e,1)}for(let e=c.length-1;e>=0;e--){const t=c[e].inputs;for(let f=0;f=t.length){if("overrides"===a[f].type)continue;c.splice(e,1);break}if(a[f].type!==t[f].baseType){c.splice(e,1);break}}}}if(1===c.length&&a&&a.length!==c[0].inputs.length){const e=a[a.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&c.splice(0,1)}if(0===c.length)return null;if(c.length>1&&t){const a=c.map((e=>JSON.stringify(e.format()))).join(", ");(0,r.MR)(!1,`ambiguous function description (i.e. matches ${a})`,"key",e)}return c[0]}return this.#Ge.get(s.hc.from(e).format())||null}getFunctionName(e){const a=this.#Ke(e,null,!1);return(0,r.MR)(a,"no matching function","key",e),a.name}hasFunction(e){return!!this.#Ke(e,null,!1)}getFunction(e,a){return this.#Ke(e,a||null,!0)}forEachFunction(e){const a=Array.from(this.#Ge.keys());a.sort(((e,a)=>e.localeCompare(a)));for(let t=0;t=0;e--)c[e].inputs.length=0;e--){const t=c[e].inputs;for(let f=0;f1&&t){const a=c.map((e=>JSON.stringify(e.format()))).join(", ");(0,r.MR)(!1,`ambiguous event description (i.e. matches ${a})`,"key",e)}return c[0]}return this.#qe.get(s.Zp.from(e).format())||null}getEventName(e){const a=this.#Ve(e,null,!1);return(0,r.MR)(a,"no matching event","key",e),a.name}hasEvent(e){return!!this.#Ve(e,null,!1)}getEvent(e,a){return this.#Ve(e,a||null,!0)}forEachEvent(e){const a=Array.from(this.#qe.keys());a.sort(((e,a)=>e.localeCompare(a)));for(let t=0;t1){const t=a.map((e=>JSON.stringify(e.format()))).join(", ");(0,r.MR)(!1,`ambiguous error description (i.e. ${t})`,"name",e)}return a[0]}if("Error(string)"===(e=s.bp.from(e).format()))return s.bp.from("error Error(string)");if("Panic(uint256)"===e)return s.bp.from("error Panic(uint256)");return this.#$e.get(e)||null}forEachError(e){const a=Array.from(this.#$e.keys());a.sort(((e,a)=>e.localeCompare(a)));for(let t=0;t"string"===e.type?(0,f.id)(a):"bytes"===e.type?(0,c.S)((0,n.c$)(a)):("bool"===e.type&&"boolean"==typeof a?a=a?"0x01":"0x00":e.type.match(/^u?int/)?a=(0,i.up)(a):e.type.match(/^bytes/)?a=(0,n.X_)(a,32):"address"===e.type&&this.#ze.encode(["address"],[a]),(0,n.nx)((0,n.c$)(a),32));for(a.forEach(((a,c)=>{const f=e.inputs[c];f.indexed?null==a?t.push(null):"array"===f.baseType||"tuple"===f.baseType?(0,r.MR)(!1,"filtering with tuples or arrays not supported","contract."+f.name,a):Array.isArray(a)?t.push(a.map((e=>d(f,e)))):t.push(d(f,a)):(0,r.MR)(null==a,"cannot filter non-indexed parameters; must be null","contract."+f.name,a)}));t.length&&null===t[t.length-1];)t.pop();return t}encodeEventLog(e,a){if("string"==typeof e){const a=this.getEvent(e);(0,r.MR)(a,"unknown event","eventFragment",e),e=a}const t=[],d=[],n=[];return e.anonymous||t.push(e.topicHash),(0,r.MR)(a.length===e.inputs.length,"event arguments/values mismatch","values",a),e.inputs.forEach(((e,r)=>{const i=a[r];if(e.indexed)if("string"===e.type)t.push((0,f.id)(i));else if("bytes"===e.type)t.push((0,c.S)(i));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");t.push(this.#ze.encode([e.type],[i]))}else d.push(e),n.push(i)})),{data:this.#ze.encode(d,n),topics:t}}decodeEventLog(e,a,t){if("string"==typeof e){const a=this.getEvent(e);(0,r.MR)(a,"unknown event","eventFragment",e),e=a}if(null!=t&&!e.anonymous){const a=e.topicHash;(0,r.MR)((0,n.Lo)(t[0],32)&&t[0].toLowerCase()===a,"fragment/topic mismatch","topics[0]",t[0]),t=t.slice(1)}const c=[],f=[],d=[];e.inputs.forEach(((e,a)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(c.push(s.aX.from({type:"bytes32",name:e.name})),d.push(!0)):(c.push(e),d.push(!1)):(f.push(e),d.push(!1))}));const i=null!=t?this.#ze.decode(c,(0,n.xW)(t)):null,b=this.#ze.decode(f,a,!0),l=[],u=[];let h=0,p=0;return e.inputs.forEach(((e,a)=>{let t=null;if(e.indexed)if(null==i)t=new g(null);else if(d[a])t=new g(i[p++]);else try{t=i[p++]}catch(e){t=e}else try{t=b[h++]}catch(e){t=e}l.push(t),u.push(e.name||null)})),o.Q7.fromItems(l,u)}parseTransaction(e){const a=(0,n.q5)(e.data,"tx.data"),t=(0,i.Ab)(null!=e.value?e.value:0,"tx.value"),c=this.getFunction((0,n.c$)(a.slice(0,4)));if(!c)return null;const f=this.#ze.decode(c.inputs,a.slice(4));return new h(c,c.selector,f,t)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const a=this.getEvent(e.topics[0]);return!a||a.anonymous?null:new u(a,a.topicHash,this.decodeEventLog(a,e.data,e.topics))}parseError(e){const a=(0,n.c$)(e),t=this.getError((0,n.ZG)(a,0,4));if(!t)return null;const c=this.#ze.decode(t.inputs,(0,n.ZG)(a,4));return new p(t,t.selector,c)}static from(e){return e instanceof y?e:"string"==typeof e?new y(JSON.parse(e)):"function"==typeof e.formatJson?new y(e.formatJson()):"function"==typeof e.format?new y(e.format("json")):new y(e)}}},19353:(e,a,t)=>{"use strict";t.d(a,{V:()=>b});var c=t(57339),f=t(88081);const d={};function r(e,a){let t=!1;return a<0&&(t=!0,a*=-1),new b(d,`${t?"":"u"}int${a}`,e,{signed:t,width:a})}function n(e,a){return new b(d,`bytes${a||""}`,e,{size:a})}const i=Symbol.for("_ethers_typed");class b{type;value;#ee;_typedSymbol;constructor(e,a,t,r){null==r&&(r=null),(0,c.gk)(d,e,"Typed"),(0,f.n)(this,{_typedSymbol:i,type:a,value:t}),this.#ee=r,this.format()}format(){if("array"===this.type)throw new Error("");if("dynamicArray"===this.type)throw new Error("");return"tuple"===this.type?`tuple(${this.value.map((e=>e.format())).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#ee}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#ee?-1:!1===this.#ee?this.value.length:null}static from(e,a){return new b(d,e,a)}static uint8(e){return r(e,8)}static uint16(e){return r(e,16)}static uint24(e){return r(e,24)}static uint32(e){return r(e,32)}static uint40(e){return r(e,40)}static uint48(e){return r(e,48)}static uint56(e){return r(e,56)}static uint64(e){return r(e,64)}static uint72(e){return r(e,72)}static uint80(e){return r(e,80)}static uint88(e){return r(e,88)}static uint96(e){return r(e,96)}static uint104(e){return r(e,104)}static uint112(e){return r(e,112)}static uint120(e){return r(e,120)}static uint128(e){return r(e,128)}static uint136(e){return r(e,136)}static uint144(e){return r(e,144)}static uint152(e){return r(e,152)}static uint160(e){return r(e,160)}static uint168(e){return r(e,168)}static uint176(e){return r(e,176)}static uint184(e){return r(e,184)}static uint192(e){return r(e,192)}static uint200(e){return r(e,200)}static uint208(e){return r(e,208)}static uint216(e){return r(e,216)}static uint224(e){return r(e,224)}static uint232(e){return r(e,232)}static uint240(e){return r(e,240)}static uint248(e){return r(e,248)}static uint256(e){return r(e,256)}static uint(e){return r(e,256)}static int8(e){return r(e,-8)}static int16(e){return r(e,-16)}static int24(e){return r(e,-24)}static int32(e){return r(e,-32)}static int40(e){return r(e,-40)}static int48(e){return r(e,-48)}static int56(e){return r(e,-56)}static int64(e){return r(e,-64)}static int72(e){return r(e,-72)}static int80(e){return r(e,-80)}static int88(e){return r(e,-88)}static int96(e){return r(e,-96)}static int104(e){return r(e,-104)}static int112(e){return r(e,-112)}static int120(e){return r(e,-120)}static int128(e){return r(e,-128)}static int136(e){return r(e,-136)}static int144(e){return r(e,-144)}static int152(e){return r(e,-152)}static int160(e){return r(e,-160)}static int168(e){return r(e,-168)}static int176(e){return r(e,-176)}static int184(e){return r(e,-184)}static int192(e){return r(e,-192)}static int200(e){return r(e,-200)}static int208(e){return r(e,-208)}static int216(e){return r(e,-216)}static int224(e){return r(e,-224)}static int232(e){return r(e,-232)}static int240(e){return r(e,-240)}static int248(e){return r(e,-248)}static int256(e){return r(e,-256)}static int(e){return r(e,-256)}static bytes1(e){return n(e,1)}static bytes2(e){return n(e,2)}static bytes3(e){return n(e,3)}static bytes4(e){return n(e,4)}static bytes5(e){return n(e,5)}static bytes6(e){return n(e,6)}static bytes7(e){return n(e,7)}static bytes8(e){return n(e,8)}static bytes9(e){return n(e,9)}static bytes10(e){return n(e,10)}static bytes11(e){return n(e,11)}static bytes12(e){return n(e,12)}static bytes13(e){return n(e,13)}static bytes14(e){return n(e,14)}static bytes15(e){return n(e,15)}static bytes16(e){return n(e,16)}static bytes17(e){return n(e,17)}static bytes18(e){return n(e,18)}static bytes19(e){return n(e,19)}static bytes20(e){return n(e,20)}static bytes21(e){return n(e,21)}static bytes22(e){return n(e,22)}static bytes23(e){return n(e,23)}static bytes24(e){return n(e,24)}static bytes25(e){return n(e,25)}static bytes26(e){return n(e,26)}static bytes27(e){return n(e,27)}static bytes28(e){return n(e,28)}static bytes29(e){return n(e,29)}static bytes30(e){return n(e,30)}static bytes31(e){return n(e,31)}static bytes32(e){return n(e,32)}static address(e){return new b(d,"address",e)}static bool(e){return new b(d,"bool",!!e)}static bytes(e){return new b(d,"bytes",e)}static string(e){return new b(d,"string",e)}static array(e,a){throw new Error("not implemented yet")}static tuple(e,a){throw new Error("not implemented yet")}static overrides(e){return new b(d,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===i}static dereference(e,a){if(b.isTyped(e)){if(e.type!==a)throw new Error(`invalid type: expecetd ${a}, got ${e.type}`);return e.value}return e}}},30031:(e,a,t)=>{"use strict";t.d(a,{b:()=>l});var c=t(15539),f=t(36212),d=t(57339);const r=BigInt(0),n=BigInt(36);function i(e){const a=(e=e.toLowerCase()).substring(2).split(""),t=new Uint8Array(40);for(let e=0;e<40;e++)t[e]=a[e].charCodeAt(0);const d=(0,f.q5)((0,c.S)(t));for(let e=0;e<40;e+=2)d[e>>1]>>4>=8&&(a[e]=a[e].toUpperCase()),(15&d[e>>1])>=8&&(a[e+1]=a[e+1].toUpperCase());return"0x"+a.join("")}const b={};for(let e=0;e<10;e++)b[String(e)]=String(e);for(let e=0;e<26;e++)b[String.fromCharCode(65+e)]=String(10+e);const o=15;const s=function(){const e={};for(let a=0;a<36;a++)e["0123456789abcdefghijklmnopqrstuvwxyz"[a]]=BigInt(a);return e}();function l(e){if((0,d.MR)("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const a=i(e);return(0,d.MR)(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||a===e,"bad address checksum","address",e),a}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,d.MR)(e.substring(2,4)===function(e){let a=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>b[e])).join("");for(;a.length>=o;){let e=a.substring(0,o);a=parseInt(e,10)%97+a.substring(e.length)}let t=String(98-parseInt(a,10)%97);for(;t.length<2;)t="0"+t;return t}(e),"bad icap checksum","address",e);let a=function(e){e=e.toLowerCase();let a=r;for(let t=0;t{"use strict";t.d(a,{$C:()=>d,PW:()=>r,tG:()=>i});var c=t(57339),f=t(30031);function d(e){return e&&"function"==typeof e.getAddress}function r(e){try{return(0,f.b)(e),!0}catch(e){}return!1}async function n(e,a){const t=await a;return null!=t&&"0x0000000000000000000000000000000000000000"!==t||((0,c.vA)("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),(0,c.MR)(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),(0,f.b)(t)}function i(e,a){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?(0,f.b)(e):((0,c.vA)(null!=a,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),n(e,a.resolveName(e))):d(e)?n(e,e.getAddress()):e&&"function"==typeof e.then?n(e,e):void(0,c.MR)(!1,"unsupported addressable value","target",e)}},98982:(e,a,t)=>{"use strict";t.d(a,{j:()=>c});const c="0x0000000000000000000000000000000000000000"},24391:(e,a,t)=>{"use strict";t.d(a,{NZ:()=>Q});var c=t(19353),f=t(73622),d=t(41442),r=t(43948),n=t(88081),i=t(57339),b=t(27033),o=t(36212),s=t(99381);class l extends r.tG{interface;fragment;args;constructor(e,a,t){super(e,e.provider);const c=a.decodeEventLog(t,e.data,e.topics);(0,n.n)(this,{args:c,fragment:t,interface:a})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class u extends r.tG{error;constructor(e,a){super(e,e.provider),(0,n.n)(this,{error:a})}}class h extends r.z5{#Ze;constructor(e,a,t){super(t,a),this.#Ze=e}get logs(){return super.logs.map((e=>{const a=e.topics.length?this.#Ze.getEvent(e.topics[0]):null;if(a)try{return new l(e,this.#Ze,a)}catch(a){return new u(e,a)}return e}))}}class p extends r.uI{#Ze;constructor(e,a,t){super(t,a),this.#Ze=e}async wait(e,a){const t=await super.wait(e,a);return null==t?null:new h(this.#Ze,this.provider,t)}}class g extends s.z{log;constructor(e,a,t,c){super(e,a,t),(0,n.n)(this,{log:c})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class m extends g{constructor(e,a,t,c,f){super(e,a,t,new l(f,e.interface,c));const d=e.interface.decodeEventLog(c,this.log.data,this.log.topics);(0,n.n)(this,{args:d,fragment:c})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const x=BigInt(0);function y(e){return e&&"function"==typeof e.call}function A(e){return e&&"function"==typeof e.estimateGas}function v(e){return e&&"function"==typeof e.resolveName}function w(e){return e&&"function"==typeof e.sendTransaction}function _(e){if(null!=e){if(v(e))return e;if(e.provider)return e.provider}}class I{#H;fragment;constructor(e,a,t){if((0,n.n)(this,{fragment:a}),a.inputs.lengthnull==t[a]?null:e.walkAsync(t[a],((e,a)=>"address"===e?Array.isArray(a)?Promise.all(a.map((e=>(0,d.tG)(e,f)))):(0,d.tG)(a,f):a)))));return e.interface.encodeFilterTopics(a,c)}()}getTopicFilter(){return this.#H}}function E(e,a){return null==e?null:"function"==typeof e[a]?e:e.provider&&"function"==typeof e.provider[a]?e.provider:null}function C(e){return null==e?null:e.provider||null}async function M(e,a){const t=c.V.dereference(e,"overrides");(0,i.MR)("object"==typeof t,"invalid overrides parameter","overrides",e);const f=(0,r.VS)(t);return(0,i.MR)(null==f.to||(a||[]).indexOf("to")>=0,"cannot override to","overrides.to",f.to),(0,i.MR)(null==f.data||(a||[]).indexOf("data")>=0,"cannot override data","overrides.data",f.data),f.from&&(f.from=f.from),f}function B(e){const a=async function(a){const t=await M(a,["data"]);t.to=await e.getAddress(),t.from&&(t.from=await(0,d.tG)(t.from,_(e.runner)));const c=e.interface,f=(0,b.Ab)(t.value||x,"overrides.value")===x,r="0x"===(t.data||"0x");!c.fallback||c.fallback.payable||!c.receive||r||f||(0,i.MR)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",a),(0,i.MR)(c.fallback||r,"cannot send data to receive-only contract","overrides.data",t.data);const n=c.receive||c.fallback&&c.fallback.payable;return(0,i.MR)(n||f,"cannot send value to non-payable fallback","overrides.value",t.value),(0,i.MR)(c.fallback||r,"cannot send data to receive-only contract","overrides.data",t.data),t},t=async function(t){const c=e.runner;(0,i.vA)(w(c),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await c.sendTransaction(await a(t)),d=C(e.runner);return new p(e.interface,d,f)},c=async e=>await t(e);return(0,n.n)(c,{_contract:e,estimateGas:async function(t){const c=E(e.runner,"estimateGas");return(0,i.vA)(A(c),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await c.estimateGas(await a(t))},populateTransaction:a,send:t,staticCall:async function(t){const c=E(e.runner,"call");(0,i.vA)(y(c),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await a(t);try{return await c.call(f)}catch(a){if((0,i.E)(a)&&a.data)throw e.interface.makeError(a.data,f);throw a}}}),c}const L=Symbol.for("_ethersInternal_contract"),S=new WeakMap;function k(e){return S.get(e[L])}async function N(e,a){let t,c=null;if(Array.isArray(a)){const c=function(a){if((0,o.Lo)(a,32))return a;const t=e.interface.getEvent(a);return(0,i.MR)(t,"unknown fragment","name",a),t.topicHash};t=a.map((e=>null==e?null:Array.isArray(e)?e.map(c):c(e)))}else"*"===a?t=[null]:"string"==typeof a?(0,o.Lo)(a,32)?t=[a]:(c=e.interface.getEvent(a),(0,i.MR)(c,"unknown fragment","event",a),t=[c.topicHash]):(f=a)&&"object"==typeof f&&"getTopicFilter"in f&&"function"==typeof f.getTopicFilter&&f.fragment?t=await a.getTopicFilter():"fragment"in a?(c=a.fragment,t=[c.topicHash]):(0,i.MR)(!1,"unknown event name","event",a);var f;return t=t.map((e=>{if(null==e)return null;if(Array.isArray(e)){const a=Array.from(new Set(e.map((e=>e.toLowerCase()))).values());return 1===a.length?a[0]:(a.sort(),a)}return e.toLowerCase()})),{fragment:c,tag:t.map((e=>null==e?"null":Array.isArray(e)?e.join("|"):e)).join("&"),topics:t}}async function P(e,a){const{subs:t}=k(e);return t.get((await N(e,a)).tag)||null}async function R(e,a,t){const c=C(e.runner);(0,i.vA)(c,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:a});const{fragment:f,tag:d,topics:r}=await N(e,t),{addr:n,subs:b}=k(e);let o=b.get(d);if(!o){const a={address:n||e,topics:r},i=a=>{let c=f;if(null==c)try{c=e.interface.getEvent(a.topics[0])}catch(e){}if(c){const d=c,r=f?e.interface.decodeEventLog(f,a.data,a.topics):[];D(e,t,r,(c=>new m(e,c,t,d,a)))}else D(e,t,[],(c=>new g(e,c,t,a)))};let s=[];o={tag:d,listeners:[],start:()=>{s.length||s.push(c.on(a,i))},stop:async()=>{if(0==s.length)return;let e=s;s=[],await Promise.all(e),c.off(a,i)}},b.set(d,o)}return o}let O=Promise.resolve();async function D(e,a,t,c){try{await O}catch(e){}const f=async function(e,a,t,c){await O;const f=await P(e,a);if(!f)return!1;const d=f.listeners.length;return f.listeners=f.listeners.filter((({listener:a,once:f})=>{const d=Array.from(t);c&&d.push(c(f?null:a));try{a.call(e,...d)}catch(e){}return!f})),0===f.listeners.length&&(f.stop(),k(e).subs.delete(f.tag)),d>0}(e,a,t,c);return O=f,await f}const T=["then"];class F{target;interface;runner;filters;[L];fallback;constructor(e,a,t,c){(0,i.MR)("string"==typeof e||(0,d.$C)(e),"invalid value for Contract target","target",e),null==t&&(t=null);const r=f.KA.from(a);let b;(0,n.n)(this,{target:e,runner:t,interface:r}),Object.defineProperty(this,L,{value:{}});let s=null,l=null;if(c){const e=C(t);l=new p(this.interface,e,c)}let u=new Map;if("string"==typeof e)if((0,o.Lo)(e))s=e,b=Promise.resolve(e);else{const a=E(t,"resolveName");if(!v(a))throw(0,i.xz)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});b=a.resolveName(e).then((a=>{if(null==a)throw(0,i.xz)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return k(this).addr=a,a}))}else b=e.getAddress().then((e=>{if(null==e)throw new Error("TODO");return k(this).addr=e,e}));var h;h={addrPromise:b,addr:s,deployTx:l,subs:u},S.set(this[L],h);const g=new Proxy({},{get:(e,a,t)=>{if("symbol"==typeof a||T.indexOf(a)>=0)return Reflect.get(e,a,t);try{return this.getEvent(a)}catch(e){if(!(0,i.bJ)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,a)=>T.indexOf(a)>=0?Reflect.has(e,a):Reflect.has(e,a)||this.interface.hasEvent(String(a))});return(0,n.n)(this,{filters:g}),(0,n.n)(this,{fallback:r.receive||r.fallback?B(this):null}),new Proxy(this,{get:(e,a,t)=>{if("symbol"==typeof a||a in e||T.indexOf(a)>=0)return Reflect.get(e,a,t);try{return e.getFunction(a)}catch(e){if(!(0,i.bJ)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,a)=>"symbol"==typeof a||a in e||T.indexOf(a)>=0?Reflect.has(e,a):e.interface.hasFunction(a)})}connect(e){return new F(this.target,this.interface,e)}attach(e){return new F(e,this.interface,this.runner)}async getAddress(){return await k(this).addrPromise}async getDeployedCode(){const e=C(this.runner);(0,i.vA)(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const a=await e.getCode(await this.getAddress());return"0x"===a?null:a}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;const a=C(this.runner);return(0,i.vA)(null!=a,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise(((e,t)=>{const c=async()=>{try{if(null!=await this.getDeployedCode())return e(this);a.once("block",c)}catch(e){t(e)}};c()}))}deploymentTransaction(){return k(this).deployTx}getFunction(e){return"string"!=typeof e&&(e=e.format()),function(e,a){const t=function(...t){const c=e.interface.getFunction(a,t);return(0,i.vA)(c,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:a,args:t}}),c},f=async function(...a){const f=t(...a);let r={};if(f.inputs.length+1===a.length&&(r=await M(a.pop()),r.from&&(r.from=await(0,d.tG)(r.from,_(e.runner)))),f.inputs.length!==a.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const i=await async function(e,a,t){const f=E(e,"resolveName"),r=v(f)?f:null;return await Promise.all(a.map(((e,a)=>e.walkAsync(t[a],((e,a)=>(a=c.V.dereference(a,e),"address"===e?(0,d.tG)(a,r):a))))))}(e.runner,f.inputs,a);return Object.assign({},r,await(0,n.k)({to:e.getAddress(),data:e.interface.encodeFunctionData(f,i)}))},r=async function(...e){const a=await o(...e);return 1===a.length?a[0]:a},b=async function(...a){const t=e.runner;(0,i.vA)(w(t),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await t.sendTransaction(await f(...a)),d=C(e.runner);return new p(e.interface,d,c)},o=async function(...a){const c=E(e.runner,"call");(0,i.vA)(y(c),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const d=await f(...a);let r="0x";try{r=await c.call(d)}catch(a){if((0,i.E)(a)&&a.data)throw e.interface.makeError(a.data,d);throw a}const n=t(...a);return e.interface.decodeFunctionResult(n,r)},s=async(...e)=>t(...e).constant?await r(...e):await b(...e);return(0,n.n)(s,{name:e.interface.getFunctionName(a),_contract:e,_key:a,getFragment:t,estimateGas:async function(...a){const t=E(e.runner,"estimateGas");return(0,i.vA)(A(t),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await t.estimateGas(await f(...a))},populateTransaction:f,send:b,staticCall:r,staticCallResult:o}),Object.defineProperty(s,"fragment",{configurable:!1,enumerable:!0,get:()=>{const t=e.interface.getFunction(a);return(0,i.vA)(t,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:a}}),t}}),s}(this,e)}getEvent(e){return"string"!=typeof e&&(e=e.format()),function(e,a){const t=function(...t){const c=e.interface.getEvent(a,t);return(0,i.vA)(c,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:a,args:t}}),c},c=function(...a){return new I(e,t(...a),a)};return(0,n.n)(c,{name:e.interface.getEventName(a),_contract:e,_key:a,getFragment:t}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const t=e.interface.getEvent(a);return(0,i.vA)(t,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:a}}),t}}),c}(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,a,t){null==a&&(a=0),null==t&&(t="latest");const{addr:c,addrPromise:f}=k(this),d=c||await f,{fragment:n,topics:b}=await N(this,e),o={address:d,topics:b,fromBlock:a,toBlock:t},s=C(this.runner);return(0,i.vA)(s,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await s.getLogs(o)).map((e=>{let a=n;if(null==a)try{a=this.interface.getEvent(e.topics[0])}catch(e){}if(a)try{return new l(e,this.interface,a)}catch(a){return new u(e,a)}return new r.tG(e,s)}))}async on(e,a){const t=await R(this,"on",e);return t.listeners.push({listener:a,once:!1}),t.start(),this}async once(e,a){const t=await R(this,"once",e);return t.listeners.push({listener:a,once:!0}),t.start(),this}async emit(e,...a){return await D(this,e,a,null)}async listenerCount(e){if(e){const a=await P(this,e);return a?a.listeners.length:0}const{subs:a}=k(this);let t=0;for(const{listeners:e}of a.values())t+=e.length;return t}async listeners(e){if(e){const a=await P(this,e);return a?a.listeners.map((({listener:e})=>e)):[]}const{subs:a}=k(this);let t=[];for(const{listeners:e}of a.values())t=t.concat(e.map((({listener:e})=>e)));return t}async off(e,a){const t=await P(this,e);if(!t)return this;if(a){const e=t.listeners.map((({listener:e})=>e)).indexOf(a);e>=0&&t.listeners.splice(e,1)}return null!=a&&0!==t.listeners.length||(t.stop(),k(this).subs.delete(t.tag)),this}async removeAllListeners(e){if(e){const a=await P(this,e);if(!a)return this;a.stop(),k(this).subs.delete(a.tag)}else{const{subs:e}=k(this);for(const{tag:a,stop:t}of e.values())t(),e.delete(a)}return this}async addListener(e,a){return await this.on(e,a)}async removeListener(e,a){return await this.off(e,a)}static buildClass(e){return class extends F{constructor(a,t=null){super(a,e,t)}}}static from(e,a,t){return null==t&&(t=null),new this(e,a,t)}}class Q extends(function(){return F}()){}},8180:(e,a,t)=>{"use strict";t.d(a,{n1:()=>x,Gz:()=>y,T_:()=>A,po:()=>v});var c=t(4655),f=t(84877),d=t(3439),r=t(37171),n=t(86558),i=t(10750);const[b,o]=(()=>n.Ay.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),s=new Uint32Array(80),l=new Uint32Array(80);class u extends r.D{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:a,Bh:t,Bl:c,Ch:f,Cl:d,Dh:r,Dl:n,Eh:i,El:b,Fh:o,Fl:s,Gh:l,Gl:u,Hh:h,Hl:p}=this;return[e,a,t,c,f,d,r,n,i,b,o,s,l,u,h,p]}set(e,a,t,c,f,d,r,n,i,b,o,s,l,u,h,p){this.Ah=0|e,this.Al=0|a,this.Bh=0|t,this.Bl=0|c,this.Ch=0|f,this.Cl=0|d,this.Dh=0|r,this.Dl=0|n,this.Eh=0|i,this.El=0|b,this.Fh=0|o,this.Fl=0|s,this.Gh=0|l,this.Gl=0|u,this.Hh=0|h,this.Hl=0|p}process(e,a){for(let t=0;t<16;t++,a+=4)s[t]=e.getUint32(a),l[t]=e.getUint32(a+=4);for(let e=16;e<80;e++){const a=0|s[e-15],t=0|l[e-15],c=n.Ay.rotrSH(a,t,1)^n.Ay.rotrSH(a,t,8)^n.Ay.shrSH(a,t,7),f=n.Ay.rotrSL(a,t,1)^n.Ay.rotrSL(a,t,8)^n.Ay.shrSL(a,t,7),d=0|s[e-2],r=0|l[e-2],i=n.Ay.rotrSH(d,r,19)^n.Ay.rotrBH(d,r,61)^n.Ay.shrSH(d,r,6),b=n.Ay.rotrSL(d,r,19)^n.Ay.rotrBL(d,r,61)^n.Ay.shrSL(d,r,6),o=n.Ay.add4L(f,b,l[e-7],l[e-16]),u=n.Ay.add4H(o,c,i,s[e-7],s[e-16]);s[e]=0|u,l[e]=0|o}let{Ah:t,Al:c,Bh:f,Bl:d,Ch:r,Cl:i,Dh:u,Dl:h,Eh:p,El:g,Fh:m,Fl:x,Gh:y,Gl:A,Hh:v,Hl:w}=this;for(let e=0;e<80;e++){const a=n.Ay.rotrSH(p,g,14)^n.Ay.rotrSH(p,g,18)^n.Ay.rotrBH(p,g,41),_=n.Ay.rotrSL(p,g,14)^n.Ay.rotrSL(p,g,18)^n.Ay.rotrBL(p,g,41),I=p&m^~p&y,E=g&x^~g&A,C=n.Ay.add5L(w,_,E,o[e],l[e]),M=n.Ay.add5H(C,v,a,I,b[e],s[e]),B=0|C,L=n.Ay.rotrSH(t,c,28)^n.Ay.rotrBH(t,c,34)^n.Ay.rotrBH(t,c,39),S=n.Ay.rotrSL(t,c,28)^n.Ay.rotrBL(t,c,34)^n.Ay.rotrBL(t,c,39),k=t&f^t&r^f&r,N=c&d^c&i^d&i;v=0|y,w=0|A,y=0|m,A=0|x,m=0|p,x=0|g,({h:p,l:g}=n.Ay.add(0|u,0|h,0|M,0|B)),u=0|r,h=0|i,r=0|f,i=0|d,f=0|t,d=0|c;const P=n.Ay.add3L(B,S,N);t=n.Ay.add3H(P,M,L,k),c=0|P}({h:t,l:c}=n.Ay.add(0|this.Ah,0|this.Al,0|t,0|c)),({h:f,l:d}=n.Ay.add(0|this.Bh,0|this.Bl,0|f,0|d)),({h:r,l:i}=n.Ay.add(0|this.Ch,0|this.Cl,0|r,0|i)),({h:u,l:h}=n.Ay.add(0|this.Dh,0|this.Dl,0|u,0|h)),({h:p,l:g}=n.Ay.add(0|this.Eh,0|this.El,0|p,0|g)),({h:m,l:x}=n.Ay.add(0|this.Fh,0|this.Fl,0|m,0|x)),({h:y,l:A}=n.Ay.add(0|this.Gh,0|this.Gl,0|y,0|A)),({h:v,l:w}=n.Ay.add(0|this.Hh,0|this.Hl,0|v,0|w)),this.set(t,c,f,d,r,i,u,h,p,g,m,x,y,A,v,w)}roundClean(){s.fill(0),l.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const h=(0,i.ld)((()=>new u));var p=t(57339);const g=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}(),m=g.crypto||g.msCrypto;function x(e){switch(e){case"sha256":return d.s.create();case"sha512":return h.create()}(0,p.MR)(!1,"invalid hashing algorithm name","algorithm",e)}function y(e,a){const t={sha256:d.s,sha512:h}[e];return(0,p.MR)(null!=t,"invalid hmac algorithm","algorithm",e),c.w.create(t,a)}function A(e,a,t,c,r){const n={sha256:d.s,sha512:h}[r];return(0,p.MR)(null!=n,"invalid pbkdf2 algorithm","algorithm",r),(0,f.A)(n,e,a,{c:t,dkLen:c})}function v(e){(0,p.vA)(null!=m,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),(0,p.MR)(Number.isInteger(e)&&e>0&&e<=1024,"invalid length","length",e);const a=new Uint8Array(e);return m.getRandomValues(a),a}},15539:(e,a,t)=>{"use strict";t.d(a,{S:()=>E});var c=t(27125),f=t(86558),d=t(10750);const[r,n,i]=[[],[],[]],b=BigInt(0),o=BigInt(1),s=BigInt(2),l=BigInt(7),u=BigInt(256),h=BigInt(113);for(let e=0,a=o,t=1,c=0;e<24;e++){[t,c]=[c,(2*t+3*c)%5],r.push(2*(5*c+t)),n.push((e+1)*(e+2)/2%64);let f=b;for(let e=0;e<7;e++)a=(a<>l)*h)%u,a&s&&(f^=o<<(o<t>32?(0,f.WM)(e,a,t):(0,f.P5)(e,a,t),x=(e,a,t)=>t>32?(0,f.im)(e,a,t):(0,f.B4)(e,a,t);class y extends d.Vw{constructor(e,a,t,f=!1,r=24){if(super(),this.blockLen=e,this.suffix=a,this.outputLen=t,this.enableXOF=f,this.rounds=r,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,c.ai)(t),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,d.DH)(this.state)}keccak(){!function(e,a=24){const t=new Uint32Array(10);for(let c=24-a;c<24;c++){for(let a=0;a<10;a++)t[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(let a=0;a<10;a+=2){const c=(a+8)%10,f=(a+2)%10,d=t[f],r=t[f+1],n=m(d,r,1)^t[c],i=x(d,r,1)^t[c+1];for(let t=0;t<50;t+=10)e[a+t]^=n,e[a+t+1]^=i}let a=e[2],f=e[3];for(let t=0;t<24;t++){const c=n[t],d=m(a,f,c),i=x(a,f,c),b=r[t];a=e[b],f=e[b+1],e[b]=d,e[b+1]=i}for(let a=0;a<50;a+=10){for(let c=0;c<10;c++)t[c]=e[a+c];for(let c=0;c<10;c++)e[a+c]^=~t[(c+2)%10]&t[(c+4)%10]}e[0]^=p[c],e[1]^=g[c]}t.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,c.t2)(this);const{blockLen:a,state:t}=this,f=(e=(0,d.ZJ)(e)).length;for(let c=0;c=t&&this.keccak();const d=Math.min(t-this.posOut,f-c);e.set(a.subarray(this.posOut,this.posOut+d),c),this.posOut+=d,c+=d}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,c.ai)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,c.CG)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:a,suffix:t,outputLen:c,rounds:f,enableXOF:d}=this;return e||(e=new y(a,t,c,d,f)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=f,e.suffix=t,e.outputLen=c,e.enableXOF=d,e.destroyed=this.destroyed,e}}const A=((e,a,t)=>(0,d.ld)((()=>new y(a,e,t))))(1,136,32);var v=t(36212);let w=!1;const _=function(e){return A(e)};let I=_;function E(e){const a=(0,v.q5)(e,"data");return(0,v.c$)(I(a))}E._=_,E.lock=function(){w=!0},E.register=function(e){if(w)throw new TypeError("keccak256 is locked");I=e},Object.freeze(E)},68650:(e,a,t)=>{"use strict";t.d(a,{s:()=>s});var c=t(8180),f=t(36212);const d=function(e){return(0,c.n1)("sha256").update(e).digest()},r=function(e){return(0,c.n1)("sha512").update(e).digest()};let n=d,i=r,b=!1,o=!1;function s(e){const a=(0,f.q5)(e,"data");return(0,f.c$)(n(a))}function l(e){const a=(0,f.q5)(e,"data");return(0,f.c$)(i(a))}s._=d,s.lock=function(){b=!0},s.register=function(e){if(b)throw new Error("sha256 is locked");n=e},Object.freeze(s),l._=r,l.lock=function(){o=!0},l.register=function(e){if(o)throw new Error("sha512 is locked");i=e},Object.freeze(s)},20260:(e,a,t)=>{"use strict";t.d(a,{t:()=>p});const c="0x0000000000000000000000000000000000000000000000000000000000000000";var f=t(36212),d=t(27033),r=t(57339);const n=BigInt(0),i=BigInt(1),b=BigInt(2),o=BigInt(27),s=BigInt(28),l=BigInt(35),u={};function h(e){return(0,f.nx)((0,d.c4)(e),32)}class p{#Je;#We;#Ye;#Xe;get r(){return this.#Je}set r(e){(0,r.MR)(32===(0,f.pO)(e),"invalid r","value",e),this.#Je=(0,f.c$)(e)}get s(){return this.#We}set s(e){(0,r.MR)(32===(0,f.pO)(e),"invalid s","value",e);const a=(0,f.c$)(e);(0,r.MR)(parseInt(a.substring(0,3))<8,"non-canonical s","value",a),this.#We=a}get v(){return this.#Ye}set v(e){const a=(0,d.WZ)(e,"value");(0,r.MR)(27===a||28===a,"invalid v","v",e),this.#Ye=a}get networkV(){return this.#Xe}get legacyChainId(){const e=this.networkV;return null==e?null:p.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=(0,f.q5)(this.s);return this.yParity&&(e[0]|=128),(0,f.c$)(e)}get compactSerialized(){return(0,f.xW)([this.r,this.yParityAndS])}get serialized(){return(0,f.xW)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,a,t,c){(0,r.gk)(e,u,"Signature"),this.#Je=a,this.#We=t,this.#Ye=c,this.#Xe=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new p(u,this.r,this.s,this.v);return this.networkV&&(e.#Xe=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const a=(0,d.Ab)(e,"v");return a==o||a==s?n:((0,r.MR)(a>=l,"invalid EIP-155 v","v",e),(a-l)/b)}static getChainIdV(e,a){return(0,d.Ab)(e)*b+BigInt(35+a-27)}static getNormalizedV(e){const a=(0,d.Ab)(e);return a===n||a===o?27:a===i||a===s?28:((0,r.MR)(a>=l,"invalid v","v",e),a&i?27:28)}static from(e){function a(a,t){(0,r.MR)(a,t,"signature",e)}if(null==e)return new p(u,c,c,27);if("string"==typeof e){const t=(0,f.q5)(e,"signature");if(64===t.length){const e=(0,f.c$)(t.slice(0,32)),a=t.slice(32,64),c=128&a[0]?28:27;return a[0]&=127,new p(u,e,(0,f.c$)(a),c)}if(65===t.length){const e=(0,f.c$)(t.slice(0,32)),c=t.slice(32,64);a(!(128&c[0]),"non-canonical s");const d=p.getNormalizedV(t[64]);return new p(u,e,(0,f.c$)(c),d)}a(!1,"invalid raw signature length")}if(e instanceof p)return e.clone();const t=e.r;a(null!=t,"missing r");const n=h(t),i=function(e,t){if(null!=e)return h(e);if(null!=t){a((0,f.Lo)(t,32),"invalid yParityAndS");const e=(0,f.q5)(t);return e[0]&=127,(0,f.c$)(e)}a(!1,"missing s")}(e.s,e.yParityAndS);a(!(128&(0,f.q5)(i)[0]),"non-canonical s");const{networkV:b,v:o}=function(e,t,c){if(null!=e){const a=(0,d.Ab)(e);return{networkV:a>=l?a:void 0,v:p.getNormalizedV(a)}}if(null!=t)return a((0,f.Lo)(t,32),"invalid yParityAndS"),{v:128&(0,f.q5)(t)[0]?28:27};if(null!=c){switch((0,d.WZ)(c,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}a(!1,"invalid yParity")}a(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),s=new p(u,n,i,o);return b&&(s.#Xe=b),a(null==e.yParity||(0,d.WZ)(e.yParity,"sig.yParity")===s.yParity,"yParity mismatch"),a(null==e.yParityAndS||e.yParityAndS===s.yParityAndS,"yParityAndS mismatch"),s}}},15496:(e,a,t)=>{"use strict";t.d(a,{h:()=>be});var c={};t.r(c),t.d(c,{OG:()=>x,My:()=>b,Ph:()=>l,lX:()=>u,Id:()=>m,fg:()=>v,qj:()=>g,aT:()=>s,lq:()=>h,z:()=>p,Q5:()=>_});var f=t(3439);BigInt(0);const d=BigInt(1),r=BigInt(2),n=e=>e instanceof Uint8Array,i=Array.from({length:256},((e,a)=>a.toString(16).padStart(2,"0")));function b(e){if(!n(e))throw new Error("Uint8Array expected");let a="";for(let t=0;te+a.length),0));let t=0;return e.forEach((e=>{if(!n(e))throw new Error("Uint8Array expected");a.set(e,t),t+=e.length})),a}const x=e=>(r<new Uint8Array(e),A=e=>Uint8Array.from(e);function v(e,a,t){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof a||a<2)throw new Error("qByteLen must be a number");if("function"!=typeof t)throw new Error("hmacFn must be a function");let c=y(e),f=y(e),d=0;const r=()=>{c.fill(1),f.fill(0),d=0},n=(...e)=>t(f,c,...e),i=(e=y())=>{f=n(A([0]),e),c=n(),0!==e.length&&(f=n(A([1]),e),c=n())},b=()=>{if(d++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const t=[];for(;e{let t;for(r(),i(e);!(t=a(b()));)i();return r(),t}}const w={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,a)=>a.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function _(e,a,t={}){const c=(a,t,c)=>{const f=w[t];if("function"!=typeof f)throw new Error(`Invalid validator "${t}", expected function`);const d=e[a];if(!(c&&void 0===d||f(d,e)))throw new Error(`Invalid param ${String(a)}=${d} (${typeof d}), expected ${t}`)};for(const[e,t]of Object.entries(a))c(e,t,!1);for(const[e,a]of Object.entries(t))c(e,a,!0);return e}const I=BigInt(0),E=BigInt(1),C=BigInt(2),M=BigInt(3),B=BigInt(4),L=BigInt(5),S=BigInt(8);function k(e,a){const t=e%a;return t>=I?t:a+t}function N(e,a,t){if(t<=I||a 0");if(t===E)return I;let c=E;for(;a>I;)a&E&&(c=c*e%t),e=e*e%t,a>>=E;return c}function P(e,a,t){let c=e;for(;a-- >I;)c*=c,c%=t;return c}function R(e,a){if(e===I||a<=I)throw new Error(`invert: expected positive integers, got n=${e} mod=${a}`);let t=k(e,a),c=a,f=I,d=E,r=E,n=I;for(;t!==I;){const e=c/t,a=c%t,i=f-r*e,b=d-n*e;c=t,t=a,f=r,d=n,r=i,n=b}if(c!==E)throw new Error("invert: does not exist");return k(f,a)}BigInt(9),BigInt(16);const O=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function D(e,a){const t=void 0!==a?a:e.toString(2).length;return{nBitLength:t,nByteLength:Math.ceil(t/8)}}function T(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const a=e.toString(2).length;return Math.ceil(a/8)}function F(e){const a=T(e);return a+Math.ceil(a/2)}var Q=t(4655),U=t(10750);const j=BigInt(0),H=BigInt(1);function $(e){return _(e.Fp,O.reduce(((e,a)=>(e[a]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),_(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...D(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:q,aT:G}=c,z={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:a}=z;if(e.length<2||2!==e[0])throw new a("Invalid signature integer tag");const t=e[1],c=e.subarray(2,t+2);if(!t||c.length!==t)throw new a("Invalid signature integer: wrong length");if(128&c[0])throw new a("Invalid signature integer: negative");if(0===c[0]&&!(128&c[1]))throw new a("Invalid signature integer: unnecessary leading zero");return{d:q(c),l:e.subarray(t+2)}},toSig(e){const{Err:a}=z,t="string"==typeof e?G(e):e;if(!(t instanceof Uint8Array))throw new Error("ui8a expected");let c=t.length;if(c<2||48!=t[0])throw new a("Invalid signature tag");if(t[1]!==c-2)throw new a("Invalid signature: incorrect length");const{d:f,l:d}=z._parseInt(t.subarray(2)),{d:r,l:n}=z._parseInt(d);if(n.length)throw new a("Invalid signature: left bytes after parsing");return{r:f,s:r}},hexFromSig(e){const a=e=>8&Number.parseInt(e[0],16)?"00"+e:e,t=e=>{const a=e.toString(16);return 1&a.length?`0${a}`:a},c=a(t(e.s)),f=a(t(e.r)),d=c.length/2,r=f.length/2,n=t(d),i=t(r);return`30${t(r+d+4)}02${i}${f}02${n}${c}`}},K=BigInt(0),V=BigInt(1),Z=(BigInt(2),BigInt(3));function J(e){const a=function(e){const a=$(e);return _(a,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...a})}(e),{Fp:t,n:c}=a,f=t.BYTES+1,d=2*t.BYTES+1;function r(e){return k(e,c)}function n(e){return R(e,c)}const{ProjectivePoint:i,normPrivateKeyToScalar:o,weierstrassEquation:y,isWithinCurveOrder:A}=function(e){const a=function(e){const a=$(e);_(a,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:t,Fp:c,a:f}=a;if(t){if(!c.eql(f,c.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof t||"bigint"!=typeof t.beta||"function"!=typeof t.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...a})}(e),{Fp:t}=a,c=a.toBytes||((e,a,c)=>{const f=a.toAffine();return m(Uint8Array.from([4]),t.toBytes(f.x),t.toBytes(f.y))}),f=a.fromBytes||(e=>{const a=e.subarray(1);return{x:t.fromBytes(a.subarray(0,t.BYTES)),y:t.fromBytes(a.subarray(t.BYTES,2*t.BYTES))}});function d(e){const{a:c,b:f}=a,d=t.sqr(e),r=t.mul(d,e);return t.add(t.add(r,t.mul(e,c)),f)}if(!t.eql(t.sqr(a.Gy),d(a.Gx)))throw new Error("bad generator point: equation left != right");function r(e){return"bigint"==typeof e&&Kt.eql(e,t.ZERO);return f(a)&&f(c)?u.ZERO:new u(a,c,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const a=t.invertBatch(e.map((e=>e.pz)));return e.map(((e,t)=>e.toAffine(a[t]))).map(u.fromAffine)}static fromHex(e){const a=u.fromAffine(f(g("pointHex",e)));return a.assertValidity(),a}static fromPrivateKey(e){return u.BASE.multiply(i(e))}_setWindowSize(e){this._WINDOW_SIZE=e,o.delete(this)}assertValidity(){if(this.is0()){if(a.allowInfinityPoint&&!t.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:c}=this.toAffine();if(!t.isValid(e)||!t.isValid(c))throw new Error("bad point: x or y not FE");const f=t.sqr(c),r=d(e);if(!t.eql(f,r))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(t.isOdd)return!t.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){s(e);const{px:a,py:c,pz:f}=this,{px:d,py:r,pz:n}=e,i=t.eql(t.mul(a,n),t.mul(d,f)),b=t.eql(t.mul(c,n),t.mul(r,f));return i&&b}negate(){return new u(this.px,t.neg(this.py),this.pz)}double(){const{a:e,b:c}=a,f=t.mul(c,Z),{px:d,py:r,pz:n}=this;let i=t.ZERO,b=t.ZERO,o=t.ZERO,s=t.mul(d,d),l=t.mul(r,r),h=t.mul(n,n),p=t.mul(d,r);return p=t.add(p,p),o=t.mul(d,n),o=t.add(o,o),i=t.mul(e,o),b=t.mul(f,h),b=t.add(i,b),i=t.sub(l,b),b=t.add(l,b),b=t.mul(i,b),i=t.mul(p,i),o=t.mul(f,o),h=t.mul(e,h),p=t.sub(s,h),p=t.mul(e,p),p=t.add(p,o),o=t.add(s,s),s=t.add(o,s),s=t.add(s,h),s=t.mul(s,p),b=t.add(b,s),h=t.mul(r,n),h=t.add(h,h),s=t.mul(h,p),i=t.sub(i,s),o=t.mul(h,l),o=t.add(o,o),o=t.add(o,o),new u(i,b,o)}add(e){s(e);const{px:c,py:f,pz:d}=this,{px:r,py:n,pz:i}=e;let b=t.ZERO,o=t.ZERO,l=t.ZERO;const h=a.a,p=t.mul(a.b,Z);let g=t.mul(c,r),m=t.mul(f,n),x=t.mul(d,i),y=t.add(c,f),A=t.add(r,n);y=t.mul(y,A),A=t.add(g,m),y=t.sub(y,A),A=t.add(c,d);let v=t.add(r,i);return A=t.mul(A,v),v=t.add(g,x),A=t.sub(A,v),v=t.add(f,d),b=t.add(n,i),v=t.mul(v,b),b=t.add(m,x),v=t.sub(v,b),l=t.mul(h,A),b=t.mul(p,x),l=t.add(b,l),b=t.sub(m,l),l=t.add(m,l),o=t.mul(b,l),m=t.add(g,g),m=t.add(m,g),x=t.mul(h,x),A=t.mul(p,A),m=t.add(m,x),x=t.sub(g,x),x=t.mul(h,x),A=t.add(A,x),g=t.mul(m,A),o=t.add(o,g),g=t.mul(v,A),b=t.mul(y,b),b=t.sub(b,g),g=t.mul(y,m),l=t.mul(v,l),l=t.add(l,g),new u(b,o,l)}subtract(e){return this.add(e.negate())}is0(){return this.equals(u.ZERO)}wNAF(e){return p.wNAFCached(this,o,e,(e=>{const a=t.invertBatch(e.map((e=>e.pz)));return e.map(((e,t)=>e.toAffine(a[t]))).map(u.fromAffine)}))}multiplyUnsafe(e){const c=u.ZERO;if(e===K)return c;if(n(e),e===V)return this;const{endo:f}=a;if(!f)return p.unsafeLadder(this,e);let{k1neg:d,k1:r,k2neg:i,k2:b}=f.splitScalar(e),o=c,s=c,l=this;for(;r>K||b>K;)r&V&&(o=o.add(l)),b&V&&(s=s.add(l)),l=l.double(),r>>=V,b>>=V;return d&&(o=o.negate()),i&&(s=s.negate()),s=new u(t.mul(s.px,f.beta),s.py,s.pz),o.add(s)}multiply(e){n(e);let c,f,d=e;const{endo:r}=a;if(r){const{k1neg:e,k1:a,k2neg:n,k2:i}=r.splitScalar(d);let{p:b,f:o}=this.wNAF(a),{p:s,f:l}=this.wNAF(i);b=p.constTimeNegate(e,b),s=p.constTimeNegate(n,s),s=new u(t.mul(s.px,r.beta),s.py,s.pz),c=b.add(s),f=o.add(l)}else{const{p:e,f:a}=this.wNAF(d);c=e,f=a}return u.normalizeZ([c,f])[0]}multiplyAndAddUnsafe(e,a,t){const c=u.BASE,f=(e,a)=>a!==K&&a!==V&&e.equals(c)?e.multiply(a):e.multiplyUnsafe(a),d=f(this,a).add(f(e,t));return d.is0()?void 0:d}toAffine(e){const{px:a,py:c,pz:f}=this,d=this.is0();null==e&&(e=d?t.ONE:t.inv(f));const r=t.mul(a,e),n=t.mul(c,e),i=t.mul(f,e);if(d)return{x:t.ZERO,y:t.ZERO};if(!t.eql(i,t.ONE))throw new Error("invZ was invalid");return{x:r,y:n}}isTorsionFree(){const{h:e,isTorsionFree:t}=a;if(e===V)return!0;if(t)return t(u,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:t}=a;return e===V?this:t?t(u,this):this.multiplyUnsafe(a.h)}toRawBytes(e=!0){return this.assertValidity(),c(u,this,e)}toHex(e=!0){return b(this.toRawBytes(e))}}u.BASE=new u(a.Gx,a.Gy,t.ONE),u.ZERO=new u(t.ZERO,t.ONE,t.ZERO);const h=a.nBitLength,p=function(e,a){const t=(e,a)=>{const t=a.negate();return e?t:a},c=e=>({windows:Math.ceil(a/e)+1,windowSize:2**(e-1)});return{constTimeNegate:t,unsafeLadder(a,t){let c=e.ZERO,f=a;for(;t>j;)t&H&&(c=c.add(f)),f=f.double(),t>>=H;return c},precomputeWindow(e,a){const{windows:t,windowSize:f}=c(a),d=[];let r=e,n=r;for(let e=0;e>=l,c>n&&(c-=s,d+=H);const r=a,u=a+Math.abs(c)-1,h=e%2!=0,p=c<0;0===c?b=b.add(t(h,f[r])):i=i.add(t(p,f[u]))}return{p:i,f:b}},wNAFCached(e,a,t,c){const f=e._WINDOW_SIZE||1;let d=a.get(e);return d||(d=this.precomputeWindow(e,f),1!==f&&a.set(e,c(d))),this.wNAF(f,d,t)}}}(u,a.endo?Math.ceil(h/2):h);return{CURVE:a,ProjectivePoint:u,normPrivateKeyToScalar:i,weierstrassEquation:d,isWithinCurveOrder:r}}({...a,toBytes(e,a,c){const f=a.toAffine(),d=t.toBytes(f.x),r=m;return c?r(Uint8Array.from([a.hasEvenY()?2:3]),d):r(Uint8Array.from([4]),d,t.toBytes(f.y))},fromBytes(e){const a=e.length,c=e[0],r=e.subarray(1);if(a!==f||2!==c&&3!==c){if(a===d&&4===c)return{x:t.fromBytes(r.subarray(0,t.BYTES)),y:t.fromBytes(r.subarray(t.BYTES,2*t.BYTES))};throw new Error(`Point of length ${a} was invalid. Expected ${f} compressed bytes or ${d} uncompressed bytes`)}{const e=l(r);if(!(K<(n=e)&&nb(h(e,a.nByteLength));function I(e){return e>c>>V}const C=(e,a,t)=>l(e.slice(a,t));class M{constructor(e,a,t){this.r=e,this.s=a,this.recovery=t,this.assertValidity()}static fromCompact(e){const t=a.nByteLength;return e=g("compactSignature",e,2*t),new M(C(e,0,t),C(e,t,2*t))}static fromDER(e){const{r:a,s:t}=z.toSig(g("DER",e));return new M(a,t)}assertValidity(){if(!A(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!A(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new M(this.r,this.s,e)}recoverPublicKey(e){const{r:c,s:f,recovery:d}=this,b=N(g("msgHash",e));if(null==d||![0,1,2,3].includes(d))throw new Error("recovery id invalid");const o=2===d||3===d?c+a.n:c;if(o>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const s=1&d?"03":"02",l=i.fromHex(s+w(o)),u=n(o),h=r(-b*u),p=r(f*u),m=i.BASE.multiplyAndAddUnsafe(l,h,p);if(!m)throw new Error("point at infinify");return m.assertValidity(),m}hasHighS(){return I(this.s)}normalizeS(){return this.hasHighS()?new M(this.r,r(-this.s),this.recovery):this}toDERRawBytes(){return s(this.toDERHex())}toDERHex(){return z.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return s(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const B={isValidPrivateKey(e){try{return o(e),!0}catch(e){return!1}},normPrivateKeyToScalar:o,randomPrivateKey:()=>{const e=F(a.n);return function(e,a,t=!1){const c=e.length,f=T(a),d=F(a);if(c<16||c1024)throw new Error(`expected ${d}-1024 bytes of input, got ${c}`);const r=k(t?l(e):u(e),a-E)+E;return t?p(r,f):h(r,f)}(a.randomBytes(e),a.n)},precompute:(e=8,a=i.BASE)=>(a._setWindowSize(e),a.multiply(BigInt(3)),a)};function L(e){const a=e instanceof Uint8Array,t="string"==typeof e,c=(a||t)&&e.length;return a?c===f||c===d:t?c===2*f||c===2*d:e instanceof i}const S=a.bits2int||function(e){const t=l(e),c=8*e.length-a.nBitLength;return c>0?t>>BigInt(c):t},N=a.bits2int_modN||function(e){return r(S(e))},P=x(a.nBitLength);function O(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(K<=e&&ee in f)))throw new Error("sign() legacy options not supported");const{hash:d,randomBytes:b}=a;let{lowS:s,prehash:l,extraEntropy:u}=f;null==s&&(s=!0),e=g("msgHash",e),l&&(e=g("prehashed msgHash",d(e)));const h=N(e),p=o(c),x=[O(p),O(h)];if(null!=u){const e=!0===u?b(t.BYTES):u;x.push(g("extraEntropy",e))}const y=m(...x),v=h;return{seed:y,k2sig:function(e){const a=S(e);if(!A(a))return;const t=n(a),c=i.BASE.multiply(a).toAffine(),f=r(c.x);if(f===K)return;const d=r(t*r(v+f*p));if(d===K)return;let b=(c.x===f?0:2)|Number(c.y&V),o=d;return s&&I(d)&&(o=function(e){return I(e)?r(-e):e}(d),b^=1),new M(f,o,b)}}}(e,c,f),s=a;return v(s.hash.outputLen,s.nByteLength,s.hmac)(d,b)},verify:function(e,t,c,f=Q){const d=e;if(t=g("msgHash",t),c=g("publicKey",c),"strict"in f)throw new Error("options.strict was renamed to lowS");const{lowS:b,prehash:o}=f;let s,l;try{if("string"==typeof d||d instanceof Uint8Array)try{s=M.fromDER(d)}catch(e){if(!(e instanceof z.Err))throw e;s=M.fromCompact(d)}else{if("object"!=typeof d||"bigint"!=typeof d.r||"bigint"!=typeof d.s)throw new Error("PARSE");{const{r:e,s:a}=d;s=new M(e,a)}}l=i.fromHex(c)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(b&&s.hasHighS())return!1;o&&(t=a.hash(t));const{r:u,s:h}=s,p=N(t),m=n(h),x=r(p*m),y=r(u*m),A=i.BASE.multiplyAndAddUnsafe(l,x,y)?.toAffine();return!!A&&r(A.x)===u},ProjectivePoint:i,Signature:M,utils:B}}function W(e){return{hash:e,hmac:(a,...t)=>(0,Q.w)(e,a,(0,U.Id)(...t)),randomBytes:U.po}}BigInt(4);const Y=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),X=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ee=BigInt(1),ae=BigInt(2),te=(e,a)=>(e+a/ae)/a;const ce=function(e,a,t=!1,c={}){if(e<=I)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:f,nByteLength:d}=D(e,a);if(d>2048)throw new Error("Field lengths over 2048 bytes are not supported");const r=function(e){if(e%B===M){const a=(e+E)/B;return function(e,t){const c=e.pow(t,a);if(!e.eql(e.sqr(c),t))throw new Error("Cannot find square root");return c}}if(e%S===L){const a=(e-L)/S;return function(e,t){const c=e.mul(t,C),f=e.pow(c,a),d=e.mul(t,f),r=e.mul(e.mul(d,C),f),n=e.mul(d,e.sub(r,e.ONE));if(!e.eql(e.sqr(n),t))throw new Error("Cannot find square root");return n}}return function(e){const a=(e-E)/C;let t,c,f;for(t=e-E,c=0;t%C===I;t/=C,c++);for(f=C;fk(a,e),isValid:a=>{if("bigint"!=typeof a)throw new Error("Invalid field element: expected bigint, got "+typeof a);return I<=a&&ae===I,isOdd:e=>(e&E)===E,neg:a=>k(-a,e),eql:(e,a)=>e===a,sqr:a=>k(a*a,e),add:(a,t)=>k(a+t,e),sub:(a,t)=>k(a-t,e),mul:(a,t)=>k(a*t,e),pow:(e,a)=>function(e,a,t){if(t 0");if(t===I)return e.ONE;if(t===E)return a;let c=e.ONE,f=a;for(;t>I;)t&E&&(c=e.mul(c,f)),f=e.sqr(f),t>>=E;return c}(n,e,a),div:(a,t)=>k(a*R(t,e),e),sqrN:e=>e*e,addN:(e,a)=>e+a,subN:(e,a)=>e-a,mulN:(e,a)=>e*a,inv:a=>R(a,e),sqrt:c.sqrt||(e=>r(n,e)),invertBatch:e=>function(e,a){const t=new Array(a.length),c=a.reduce(((a,c,f)=>e.is0(c)?a:(t[f]=a,e.mul(a,c))),e.ONE),f=e.inv(c);return a.reduceRight(((a,c,f)=>e.is0(c)?a:(t[f]=e.mul(a,t[f]),e.mul(a,c))),f),t}(n,e),cmov:(e,a,t)=>t?a:e,toBytes:e=>t?p(e,d):h(e,d),fromBytes:e=>{if(e.length!==d)throw new Error(`Fp.fromBytes: expected ${d}, got ${e.length}`);return t?u(e):l(e)}});return Object.freeze(n)}(Y,void 0,void 0,{sqrt:function(e){const a=Y,t=BigInt(3),c=BigInt(6),f=BigInt(11),d=BigInt(22),r=BigInt(23),n=BigInt(44),i=BigInt(88),b=e*e*e%a,o=b*b*e%a,s=P(o,t,a)*o%a,l=P(s,t,a)*o%a,u=P(l,ae,a)*b%a,h=P(u,f,a)*u%a,p=P(h,d,a)*h%a,g=P(p,n,a)*p%a,m=P(g,i,a)*g%a,x=P(m,n,a)*p%a,y=P(x,t,a)*o%a,A=P(y,r,a)*h%a,v=P(A,c,a)*b%a,w=P(v,ae,a);if(!ce.eql(ce.sqr(w),e))throw new Error("Cannot find square root");return w}}),fe=function(e,a){const t=a=>J({...e,...W(a)});return Object.freeze({...t(a),create:t})}({a:BigInt(0),b:BigInt(7),Fp:ce,n:X,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const a=X,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),c=-ee*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),f=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),d=t,r=BigInt("0x100000000000000000000000000000000"),n=te(d*e,a),i=te(-c*e,a);let b=k(e-n*t-i*f,a),o=k(-n*c-i*d,a);const s=b>r,l=o>r;if(s&&(b=a-b),l&&(o=a-o),b>r||o>r)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:s,k1:b,k2neg:l,k2:o}}}},f.s);BigInt(0),fe.ProjectivePoint;var de=t(57339),re=t(36212),ne=t(27033),ie=t(20260);class be{#ea;constructor(e){(0,de.MR)(32===(0,re.pO)(e),"invalid private key","privateKey","[REDACTED]"),this.#ea=(0,re.c$)(e)}get privateKey(){return this.#ea}get publicKey(){return be.computePublicKey(this.#ea)}get compressedPublicKey(){return be.computePublicKey(this.#ea,!0)}sign(e){(0,de.MR)(32===(0,re.pO)(e),"invalid digest length","digest",e);const a=fe.sign((0,re.Lm)(e),(0,re.Lm)(this.#ea),{lowS:!0});return ie.t.from({r:(0,ne.up)(a.r,32),s:(0,ne.up)(a.s,32),v:a.recovery?28:27})}computeSharedSecret(e){const a=be.computePublicKey(e);return(0,re.c$)(fe.getSharedSecret((0,re.Lm)(this.#ea),(0,re.q5)(a),!1))}static computePublicKey(e,a){let t=(0,re.q5)(e,"key");if(32===t.length){const e=fe.getPublicKey(t,!!a);return(0,re.c$)(e)}if(64===t.length){const e=new Uint8Array(65);e[0]=4,e.set(t,1),t=e}const c=fe.ProjectivePoint.fromHex(t);return(0,re.c$)(c.toRawBytes(a))}static recoverPublicKey(e,a){(0,de.MR)(32===(0,re.pO)(e),"invalid digest length","digest",e);const t=ie.t.from(a);let c=fe.Signature.fromCompact((0,re.Lm)((0,re.xW)([t.r,t.s])));c=c.addRecoveryBit(t.yParity);const f=c.recoverPublicKey((0,re.Lm)(e));return(0,de.MR)(null!=f,"invalid signautre for digest","signature",a),"0x"+f.toHex(!1)}static addPoints(e,a,t){const c=fe.ProjectivePoint.fromHex(be.computePublicKey(e).substring(2)),f=fe.ProjectivePoint.fromHex(be.computePublicKey(a).substring(2));return"0x"+c.add(f).toHex(!!t)}}},38264:(e,a,t)=>{"use strict";t.d(a,{id:()=>d});var c=t(15539),f=t(87303);function d(e){return(0,c.S)((0,f.YW)(e))}},64563:(e,a,t)=>{"use strict";t.d(a,{Wh:()=>Ee,kM:()=>Ie});var c=t(15539),f=t(57339),d=t(87303),r=t(36212),n="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const i=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),b=4;function o(e){return function(e){let a=0;return()=>e[a++]}(function(e){let a=0;function t(){return e[a++]<<8|e[a++]}let c=t(),f=1,d=[0,1];for(let e=1;e>--i&1}const s=2**31,l=s>>>1,u=l>>1,h=s-1;let p=0;for(let e=0;e<31;e++)p=p<<1|o();let g=[],m=0,x=s;for(;;){let e=Math.floor(((p-m+1)*f-1)/x),a=0,t=c;for(;t-a>1;){let c=a+t>>>1;e>>1|o(),r=r<<1^l,n=(n^l)<<1|l|1;m=r,x=1+n-r}let y=c-4;return g.map((a=>{switch(a-y){case 3:return y+65792+(e[n++]<<16|e[n++]<<8|e[n++]);case 2:return y+256+(e[n++]<<8|e[n++]);case 1:return y+e[n++];default:return a-1}}))}(function(e){let a=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,t)=>a[e.charCodeAt(0)]=t));let t=e.length,c=new Uint8Array(6*t>>3);for(let f=0,d=0,r=0,n=0;f=8&&(c[d++]=n>>(r-=8));return c}(e)))}function s(e){return 1&e?~e>>1:e>>1}function l(e,a){let t=Array(e);for(let c=0,f=0;c{let a=u(e);if(a.length)return a}))}function p(e){let a=[];for(;;){let t=e();if(0==t)break;a.push(x(t,e))}for(;;){let t=e()-1;if(t<0)break;a.push(y(t,e))}return a.flat()}function g(e){let a=[];for(;;){let t=e(a.length);if(!t)break;a.push(t)}return a}function m(e,a,t){let c=Array(e).fill().map((()=>[]));for(let f=0;fc[a].push(e)));return c}function x(e,a){let t=1+a(),c=a(),f=g(a);return m(f.length,1+e,a).flatMap(((e,a)=>{let[d,...r]=e;return Array(f[a]).fill().map(((e,a)=>{let f=a*c;return[d+a*t,r.map((e=>e+f))]}))}))}function y(e,a){return m(1+a(),1+e,a).map((e=>[e[0],e.slice(1)]))}function A(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function v(e){let a=e.length;if(a<4096)return String.fromCodePoint(...e);let t=[];for(let c=0;c>24&255}function O(e){return 16777215&e}let D,T,F,Q;function U(e){return e>=I&&e=E&&e=C&&aM&&ae.map((e=>[e,a+1<<24]))))),T=new Set(u(e)),F=new Map,Q=new Map;for(let[a,t]of p(e)){if(!T.has(a)&&2==t.length){let[e,c]=t,f=Q.get(e);f||(f=new Map,Q.set(e,f)),f.set(c,a)}F.set(a,t.reverse())}}();let a=[],t=[],c=!1;function f(e){let t=D.get(e);t&&(c=!0,e|=t),a.push(e)}for(let c of e)for(;;){if(c<128)a.push(c);else if(U(c)){let e=c-I,a=e%L/B|0,t=e%B;f(E+(e/L|0)),f(C+a),t>0&&f(M+t)}else{let e=F.get(c);e?t.push(...e):f(c)}if(!t.length)break;c=t.pop()}if(c&&a.length>1){let e=R(a[0]);for(let t=1;t0&&f>=e)0==e?(a.push(c,...t),t.length=0,c=r):t.push(r),f=e;else{let d=j(c,r);d>=0?c=d:0==f&&0==e?(a.push(c),c=r):(t.push(r),f=e)}}return c>=0&&a.push(c,...t),a}(H(e))}const G=45,z=".",K=65039,V=1,Z=e=>Array.from(e);function J(e,a){return e.P.has(a)||e.Q.has(a)}class W extends Array{get is_emoji(){return!0}}let Y,X,ee,ae,te,ce,fe,de,re,ne,ie,be;function oe(){if(Y)return;let e=o(n);const a=()=>u(e),t=()=>new Set(a()),c=(e,a)=>a.forEach((a=>e.add(a)));Y=new Map(p(e)),X=t(),ee=a(),ae=new Set(a().map((e=>ee[e]))),ee=new Set(ee),te=t(),ce=t();let f=h(e),d=e();const r=()=>{let e=new Set;return a().forEach((a=>c(e,f[a]))),c(e,a()),e};fe=g((a=>{let t=g(e).map((e=>e+96));if(t.length){let c=a>=d;return t[0]-=32,t=v(t),c&&(t=`Restricted[${t}]`),{N:t,P:r(),Q:r(),M:!e(),R:c}}})),de=t(),re=new Map;let i=a().concat(Z(de)).sort(((e,a)=>e-a));i.forEach(((a,t)=>{let c=e(),f=i[t]=c?i[t-c]:{V:[],M:new Map};f.V.push(a),de.has(a)||re.set(a,f)}));for(let{V:e,M:a}of new Set(re.values())){let t=[];for(let a of e){let e=fe.filter((e=>J(e,a))),f=t.find((({G:a})=>e.some((e=>a.has(e)))));f||(f={G:new Set,V:[]},t.push(f)),f.V.push(a),c(f.G,e)}let f=t.flatMap((e=>Z(e.G)));for(let{G:e,V:c}of t){let t=new Set(f.filter((a=>!e.has(a))));for(let e of c)a.set(e,t)}}ne=new Set;let b=new Set;const s=e=>ne.has(e)?b.add(e):ne.add(e);for(let e of fe){for(let a of e.P)s(a);for(let a of e.Q)s(a)}for(let e of ne)re.has(e)||b.has(e)||re.set(e,V);c(ne,$(ne)),ie=function(e){let a=[],t=u(e);return function e({S:t,B:c},f,d){if(!(4&t&&d===f[f.length-1])){2&t&&(d=f[f.length-1]),1&t&&a.push(f);for(let a of c)for(let t of a.Q)e(a,[...f,t],d)}}(function a(c){return{S:e(),B:g((()=>{let c=u(e).map((e=>t[e]));if(c.length)return a(c)})),Q:c}}([]),[]),a}(e).map((e=>W.from(e))).sort(w),be=new Map;for(let e of ie){let a=[be];for(let t of e){let e=a.map((e=>{let a=e.get(t);return a||(a=new Map,e.set(t,a)),a}));t===K?a.push(...e):a=e}for(let t of a)t.V=e}}function se(e){return(he(e)?"":`${le(ue([e]))} `)+A(e)}function le(e){return`"${e}"‎`}function ue(e,a=1/0,t=A){let c=[];var f;f=e[0],oe(),ee.has(f)&&c.push("◌"),e.length>a&&(a>>=1,e=[...e.slice(0,a),8230,...e.slice(-a)]);let d=0,r=e.length;for(let a=0;a{let f=function(e){let a=[];for(let t=0,c=e.length;t0;)if(95!==e[--a])throw new Error("underscore allowed only at start")}(n),!(d.emoji=r>1||c[0].is_emoji)&&n.every((e=>e<128)))!function(e){if(e.length>=4&&e[2]==G&&e[3]==G)throw new Error(`invalid label extension: "${v(e.slice(0,4))}"`)}(n),e="ASCII";else{let a=c.flatMap((e=>e.is_emoji?[]:e));if(a.length){if(ee.has(n[0]))throw xe("leading combining mark");for(let e=1;eJ(e,t)));if(!e.length)throw fe.some((e=>J(e,t)))?me(a[0],t):ge(t);if(a=e,1==e.length)break}return a}(t);!function(e,a){for(let t of a)if(!J(e,t))throw me(e,t);if(e.M){let e=$(a);for(let a=1,t=e.length;ab)throw new Error(`excessive non-spacing marks: ${le(ue(e.slice(a-1,c)))} (${c-a}/${b})`);a=c}}}(f,a),function(e,a){let t,c=[];for(let e of a){let a=re.get(e);if(a===V)return;if(a){let c=a.M.get(e);if(t=t?t.filter((e=>c.has(e))):Z(c),!t.length)return}else c.push(e)}if(t)for(let a of t)if(c.every((e=>J(a,e))))throw new Error(`whole-script confusable: ${e.N}/${a.N}`)}(f,t),e=f.N}else e="Emoji"}d.type=e}catch(e){d.error=e}return d}))}function ge(e){return new Error(`disallowed character: ${se(e)}`)}function me(e,a){let t=se(a),c=fe.find((e=>e.P.has(a)));return c&&(t=`${c.N} ${t}`),new Error(`illegal mixture: ${e.N} + ${t}`)}function xe(e){return new Error(`illegal placement: ${e}`)}function ye(e){return e.filter((e=>e!=K))}function Ae(e,a){let t,c=be,f=e.length;for(;f&&(c=c.get(e[--f]),c);){let{V:d}=c;d&&(t=d,a&&a.push(...e.slice(f).reverse()),e.length=f)}return t}const ve=new Uint8Array(32);function we(e){return(0,f.MR)(0!==e.length,"invalid ENS name; empty component","comp",e),e}function _e(e){const a=(0,d.YW)(function(e){try{if(0===e.length)throw new Error("empty label");return function(e){return function(e){return e.map((({input:a,error:t,output:c})=>{if(t){let c=t.message;throw new Error(1==e.length?c:`Invalid label ${le(ue(a,63))}: ${c}`)}return v(c)})).join(z)}(pe(e,q,ye))}(e)}catch(a){(0,f.MR)(!1,`invalid ENS name (${a.message})`,"name",e)}}(e)),t=[];if(0===e.length)return t;let c=0;for(let e=0;e{(0,f.MR)(a.length<=t,`label ${JSON.stringify(e)} exceeds ${t} bytes`,"name",e);const c=new Uint8Array(a.length+1);return c.set(a,1),c[0]=c.length-1,c}))))+"00"}ve.fill(0)},43948:(e,a,t)=>{"use strict";t.d(a,{J9:()=>s,VS:()=>l,eB:()=>u,tG:()=>h,uI:()=>g,z5:()=>p});var c=t(88081),f=t(36212),d=t(27033),r=t(57339),n=t(8177);const i=BigInt(0);function b(e){return null==e?null:e}function o(e){return null==e?null:e.toString()}class s{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,a,t){(0,c.n)(this,{gasPrice:b(e),maxFeePerGas:b(a),maxPriorityFeePerGas:b(t)})}toJSON(){const{gasPrice:e,maxFeePerGas:a,maxPriorityFeePerGas:t}=this;return{_type:"FeeData",gasPrice:o(e),maxFeePerGas:o(a),maxPriorityFeePerGas:o(t)}}}function l(e){const a={};e.to&&(a.to=e.to),e.from&&(a.from=e.from),e.data&&(a.data=(0,f.c$)(e.data));const t="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const c of t)c in e&&null!=e[c]&&(a[c]=(0,d.Ab)(e[c],`request.${c}`));const c="type,nonce".split(/,/);for(const t of c)t in e&&null!=e[t]&&(a[t]=(0,d.WZ)(e[t],`request.${t}`));return e.accessList&&(a.accessList=(0,n.$)(e.accessList)),"blockTag"in e&&(a.blockTag=e.blockTag),"enableCcipRead"in e&&(a.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(a.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(a.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(a.kzg=e.kzg),"blobs"in e&&e.blobs&&(a.blobs=e.blobs.map((e=>(0,f.f)(e)?(0,f.c$)(e):Object.assign({},e)))),a}class u{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#aa;constructor(e,a){this.#aa=e.transactions.map((e=>"string"!=typeof e?new g(e,a):e)),(0,c.n)(this,{provider:a,hash:b(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:b(e.prevRandao),extraData:e.extraData,baseFeePerGas:b(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#aa.map((e=>"string"==typeof e?e:e.hash))}get prefetchedTransactions(){const e=this.#aa.slice();return 0===e.length?[]:((0,r.vA)("object"==typeof e[0],"transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:a,extraData:t,gasLimit:c,gasUsed:f,hash:d,miner:r,prevRandao:n,nonce:i,number:b,parentHash:s,parentBeaconBlockRoot:l,stateRoot:u,receiptsRoot:h,timestamp:p,transactions:g}=this;return{_type:"Block",baseFeePerGas:o(e),difficulty:o(a),extraData:t,gasLimit:o(c),gasUsed:o(f),blobGasUsed:o(this.blobGasUsed),excessBlobGas:o(this.excessBlobGas),hash:d,miner:r,prevRandao:n,nonce:i,number:b,parentHash:s,timestamp:p,parentBeaconBlockRoot:l,stateRoot:u,receiptsRoot:h,transactions:g}}[Symbol.iterator](){let e=0;const a=this.transactions;return{next:()=>enew h(e,a))));let t=i;null!=e.effectiveGasPrice?t=e.effectiveGasPrice:null!=e.gasPrice&&(t=e.gasPrice),(0,c.n)(this,{provider:a,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:t,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#ta}toJSON(){const{to:e,from:a,contractAddress:t,hash:c,index:f,blockHash:d,blockNumber:r,logsBloom:n,logs:i,status:b,root:s}=this;return{_type:"TransactionReceipt",blockHash:d,blockNumber:r,contractAddress:t,cumulativeGasUsed:o(this.cumulativeGasUsed),from:a,gasPrice:o(this.gasPrice),blobGasUsed:o(this.blobGasUsed),blobGasPrice:o(this.blobGasPrice),gasUsed:o(this.gasUsed),hash:c,index:f,logs:i,logsBloom:n,root:s,status:b,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(b)return null;const{blockNumber:e,nonce:a}=await(0,c.k)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(a{if(null==e||0!==e.status)return e;(0,r.vA)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},l=await this.provider.getTransactionReceipt(this.hash);if(0===t)return s(l);if(l){if(await l.confirmations()>=t)return s(l)}else if(await o(),0===t)return null;const u=new Promise(((e,a)=>{const c=[],n=()=>{c.forEach((e=>e()))};if(c.push((()=>{b=!0})),f>0){const e=setTimeout((()=>{n(),a((0,r.xz)("wait for transaction timeout","TIMEOUT"))}),f);c.push((()=>{clearTimeout(e)}))}const i=async c=>{if(await c.confirmations()>=t){n();try{e(s(c))}catch(e){a(e)}}};if(c.push((()=>{this.provider.off(this.hash,i)})),this.provider.on(this.hash,i),d>=0){const e=async()=>{try{await o()}catch(e){if((0,r.bJ)(e,"TRANSACTION_REPLACED"))return n(),void a(e)}b||this.provider.once("block",e)};c.push((()=>{this.provider.off("block",e)})),this.provider.once("block",e)}}));return await u}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return(0,r.vA)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),x(this)}reorderedEvent(e){return(0,r.vA)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,r.vA)(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),m(this,e)}replaceableTransaction(e){(0,r.MR)(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const a=new g(this,this.provider);return a.#ca=e,a}}function m(e,a){return{orphan:"reorder-transaction",tx:e,other:a}}function x(e){return{orphan:"drop-transaction",tx:e}}},8177:(e,a,t)=>{"use strict";t.d(a,{$:()=>n});var c=t(30031),f=t(57339),d=t(36212);function r(e,a){return{address:(0,c.b)(e),storageKeys:a.map(((e,a)=>((0,f.MR)((0,d.Lo)(e,32),"invalid slot",`storageKeys[${a}]`,e),e.toLowerCase())))}}function n(e){if(Array.isArray(e))return e.map(((a,t)=>Array.isArray(a)?((0,f.MR)(2===a.length,"invalid slot set",`value[${t}]`,a),r(a[0],a[1])):((0,f.MR)(null!=a&&"object"==typeof a,"invalid address-slot set","value",e),r(a.address,a.storageKeys))));(0,f.MR)(null!=e&&"object"==typeof e,"invalid access list","value",e);const a=Object.keys(e).map((a=>{const t=e[a].reduce(((e,a)=>(e[a]=!0,e)),{});return r(a,Object.keys(t).sort())}));return a.sort(((e,a)=>e.address.localeCompare(a.address))),a}},20415:(e,a,t)=>{"use strict";t.d(a,{K:()=>r,x:()=>n});var c=t(30031),f=t(15496),d=t(15539);function r(e){let a;return a="string"==typeof e?f.h.computePublicKey(e,!1):e.publicKey,(0,c.b)((0,d.S)("0x"+a.substring(4)).substring(26))}function n(e,a){return r(f.h.recoverPublicKey(e,a))}},79453:(e,a,t)=>{"use strict";t.d(a,{Z:()=>D});var c=t(30031),f=t(98982),d=t(68650),r=t(20260),n=t(15539),i=t(15496),b=t(57339),o=t(27033),s=t(36212);function l(e){let a=e.toString(16);for(;a.length<2;)a="0"+a;return"0x"+a}function u(e,a,t){let c=0;for(let f=0;f{(0,b.vA)(a<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:a})};if(e[a]>=248){const c=e[a]-247;t(a+1+c);const f=u(e,a+1,c);return t(a+1+c+f),h(e,a,a+1+c,c+f)}if(e[a]>=192){const c=e[a]-192;return t(a+1+c),h(e,a,a+1,c)}if(e[a]>=184){const c=e[a]-183;t(a+1+c);const f=u(e,a+1,c);return t(a+1+c+f),{consumed:1+c+f,result:(0,s.c$)(e.slice(a+1+c,a+1+c+f))}}if(e[a]>=128){const c=e[a]-128;return t(a+1+c),{consumed:1+c,result:(0,s.c$)(e.slice(a+1,a+1+c))}}return{consumed:1,result:l(e[a])}}function g(e){const a=(0,s.q5)(e,"data"),t=p(a,0);return(0,b.MR)(t.consumed===a.length,"unexpected junk after rlp payload","data",e),t.result}var m=t(65735),x=t(8177),y=t(20415);const A=BigInt(0),v=BigInt(2),w=BigInt(27),_=BigInt(28),I=BigInt(35),E=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),C=131072;function M(e,a){let t=e.toString(16);for(;t.length<2;)t="0"+t;return t+=(0,d.s)(a).substring(4),"0x"+t}function B(e){return"0x"===e?null:(0,c.b)(e)}function L(e,a){try{return(0,x.$)(e)}catch(t){(0,b.MR)(!1,t.message,a,e)}}function S(e,a){return"0x"===e?0:(0,o.WZ)(e,a)}function k(e,a){if("0x"===e)return A;const t=(0,o.Ab)(e,a);return(0,b.MR)(t<=E,"value exceeds uint size",a,t),t}function N(e,a){const t=(0,o.Ab)(e,"value"),c=(0,o.c4)(t);return(0,b.MR)(c.length<=32,"value too large",`tx.${a}`,t),c}function P(e){return(0,x.$)(e).map((e=>[e.address,e.storageKeys]))}function R(e,a){(0,b.MR)(Array.isArray(e),`invalid ${a}`,"value",e);for(let a=0;aObject.assign({},e)))}set blobs(e){if(null==e)return void(this.#ma=null);const a=[],t=[];for(let c=0;ce.data)),t.map((e=>e.commitment)),t.map((e=>e.proof))])]):(0,s.xW)(["0x03",(0,m.R)(c)])}(this,t,a?this.blobs:null)}(0,b.vA)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#xa(!0,!0)}get unsignedSerialized(){return this.#xa(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,a=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,t=null!=this.accessList,c=null!=this.#ha||this.#pa;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&(0,b.vA)(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),(0,b.vA)(!a||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),(0,b.vA)(0!==this.type||!t,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const f=[];return null!=this.type?f.push(this.type):a?f.push(2):e?(f.push(1),t||f.push(0)):t?(f.push(1),f.push(2)):(c&&this.to||(f.push(0),f.push(1),f.push(2)),f.push(3)),f.sort(),f}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return D.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new D;if("string"==typeof e){const a=(0,s.q5)(e);if(a[0]>=127)return D.from(function(e){const a=g(e);(0,b.MR)(Array.isArray(a)&&(9===a.length||6===a.length),"invalid field count for legacy transaction","data",e);const t={type:0,nonce:S(a[0],"nonce"),gasPrice:k(a[1],"gasPrice"),gasLimit:k(a[2],"gasLimit"),to:B(a[3]),value:k(a[4],"value"),data:(0,s.c$)(a[5]),chainId:A};if(6===a.length)return t;const c=k(a[6],"v"),f=k(a[7],"r"),d=k(a[8],"s");if(f===A&&d===A)t.chainId=c;else{let e=(c-I)/v;e{"use strict";t.d(a,{Lm:()=>r,Lo:()=>n,X_:()=>g,ZG:()=>u,c$:()=>o,f:()=>i,nx:()=>p,pO:()=>l,q5:()=>d,xW:()=>s});var c=t(57339);function f(e,a,t){if(e instanceof Uint8Array)return t?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const a=new Uint8Array((e.length-2)/2);let t=2;for(let c=0;c>4]+b[15&c]}return t}function s(e){return"0x"+e.map((e=>o(e).substring(2))).join("")}function l(e){return n(e,!0)?(e.length-2)/2:d(e).length}function u(e,a,t){const f=d(e);return null!=t&&t>f.length&&(0,c.vA)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:f,length:f.length,offset:t}),o(f.slice(null==a?0:a,null==t?f.length:t))}function h(e,a,t){const f=d(e);(0,c.vA)(a>=f.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(f),length:a,offset:a+1});const r=new Uint8Array(a);return r.fill(0),t?r.set(f,a-f.length):r.set(f,0),o(r)}function p(e,a){return h(e,a,!0)}function g(e,a){return h(e,a,!1)}},57339:(e,a,t)=>{"use strict";t.d(a,{E:()=>n,MR:()=>o,SP:()=>u,bJ:()=>r,dd:()=>s,gk:()=>h,vA:()=>b,xz:()=>i});var c=t(99529),f=t(88081);function d(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(d).join(", ")+" ]";if(e instanceof Uint8Array){const a="0123456789abcdef";let t="0x";for(let c=0;c>4],t+=a[15&e[c]];return t}if("object"==typeof e&&"function"==typeof e.toJSON)return d(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const a=Object.keys(e);return a.sort(),"{ "+a.map((a=>`${d(a)}: ${d(e[a])}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function r(e,a){return e&&e.code===a}function n(e){return r(e,"CALL_EXCEPTION")}function i(e,a,t){let r,n=e;{const f=[];if(t){if("message"in t||"code"in t||"name"in t)throw new Error(`value will overwrite populated values: ${d(t)}`);for(const e in t){if("shortMessage"===e)continue;const a=t[e];f.push(e+"="+d(a))}}f.push(`code=${a}`),f.push(`version=${c.r}`),f.length&&(e+=" ("+f.join(", ")+")")}switch(a){case"INVALID_ARGUMENT":r=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":r=new RangeError(e);break;default:r=new Error(e)}return(0,f.n)(r,{code:a}),t&&Object.assign(r,t),null==r.shortMessage&&(0,f.n)(r,{shortMessage:n}),r}function b(e,a,t,c){if(!e)throw i(a,t,c)}function o(e,a,t,c){b(e,a,"INVALID_ARGUMENT",{argument:t,value:c})}function s(e,a,t){null==t&&(t=""),t&&(t=": "+t),b(e>=a,"missing arguemnt"+t,"MISSING_ARGUMENT",{count:e,expectedCount:a}),b(e<=a,"too many arguments"+t,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:a})}const l=["NFD","NFC","NFKD","NFKC"].reduce(((e,a)=>{try{if("test"!=="test".normalize(a))throw new Error("bad");if("NFD"===a){if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken")}e.push(a)}catch(e){}return e}),[]);function u(e){b(l.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}function h(e,a,t){if(null==t&&(t=""),e!==a){let e=t,a="new";t&&(e+=".",a+=" "+t),b(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:a})}}},99381:(e,a,t)=>{"use strict";t.d(a,{z:()=>f});var c=t(88081);class f{filter;emitter;#ya;constructor(e,a,t){this.#ya=a,(0,c.n)(this,{emitter:e,filter:t})}async removeListener(){null!=this.#ya&&await this.emitter.off(this.filter,this.#ya)}}},27033:(e,a,t)=>{"use strict";t.d(a,{Ab:()=>s,Dg:()=>h,JJ:()=>b,Ro:()=>g,ST:()=>i,WZ:()=>p,c4:()=>x,dK:()=>o,nD:()=>y,up:()=>m});var c=t(36212),f=t(57339);const d=BigInt(0),r=BigInt(1),n=9007199254740991;function i(e,a){const t=l(e,"value"),c=BigInt(p(a,"width"));return(0,f.vA)(t>>c===d,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),t>>c-r?-((~t&(r<=-n&&e<=n,"overflow",a||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(t){(0,f.MR)(!1,`invalid BigNumberish string: ${t.message}`,a||"value",e)}}(0,f.MR)(!1,"invalid BigNumberish value",a||"value",e)}function l(e,a){const t=s(e,a);return(0,f.vA)(t>=d,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),t}const u="0123456789abcdef";function h(e){if(e instanceof Uint8Array){let a="0x0";for(const t of e)a+=u[t>>4],a+=u[15&t];return BigInt(a)}return s(e)}function p(e,a){switch(typeof e){case"bigint":return(0,f.MR)(e>=-n&&e<=n,"overflow",a||"value",e),Number(e);case"number":return(0,f.MR)(Number.isInteger(e),"underflow",a||"value",e),(0,f.MR)(e>=-n&&e<=n,"overflow",a||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return p(BigInt(e),a)}catch(t){(0,f.MR)(!1,`invalid numeric string: ${t.message}`,a||"value",e)}}(0,f.MR)(!1,"invalid numeric value",a||"value",e)}function g(e){return p(h(e))}function m(e,a){let t=l(e,"value").toString(16);if(null==a)t.length%2&&(t="0"+t);else{const c=p(a,"width");for((0,f.vA)(2*c>=t.length,`value exceeds width (${c} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});t.length<2*c;)t="0"+t}return"0x"+t}function x(e){const a=l(e,"value");if(a===d)return new Uint8Array([]);let t=a.toString(16);t.length%2&&(t="0"+t);const c=new Uint8Array(t.length/2);for(let e=0;e{"use strict";function c(e,a,t){const c=a.split("|").map((e=>e.trim()));for(let t=0;tPromise.resolve(e[a]))))).reduce(((e,t,c)=>(e[a[c]]=t,e)),{})}function d(e,a,t){for(let f in a){let d=a[f];const r=t?t[f]:null;r&&c(d,r,f),Object.defineProperty(e,f,{enumerable:!0,value:d,writable:!1})}}t.d(a,{k:()=>f,n:()=>d})},65735:(e,a,t)=>{"use strict";t.d(a,{R:()=>n});var c=t(36212);function f(e){const a=[];for(;e;)a.unshift(255&e),e>>=8;return a}function d(e){if(Array.isArray(e)){let a=[];if(e.forEach((function(e){a=a.concat(d(e))})),a.length<=55)return a.unshift(192+a.length),a;const t=f(a.length);return t.unshift(247+t.length),t.concat(a)}const a=Array.prototype.slice.call((0,c.q5)(e,"object"));if(1===a.length&&a[0]<=127)return a;if(a.length<=55)return a.unshift(128+a.length),a;const t=f(a.length);return t.unshift(183+t.length),t.concat(a)}const r="0123456789abcdef";function n(e){let a="0x";for(const t of d(e))a+=r[t>>4],a+=r[15&t];return a}},99770:(e,a,t)=>{"use strict";t.d(a,{ck:()=>y,g5:()=>A,XS:()=>x});var c=t(57339),f=t(36212),d=t(27033),r=t(88081);const n=BigInt(-1),i=BigInt(0),b=BigInt(1),o=BigInt(5),s={};let l="0000";for(;l.length<80;)l+=l;function u(e){let a=l;for(;a.length=-a&&ei?(0,d.ST)((0,d.dK)(e,f),f):-(0,d.ST)((0,d.dK)(-e,f),f)}else{const a=b<=0&&enull==d[e]?t:((0,c.MR)(typeof d[e]===a,"invalid fixed format ("+e+" not "+a+")","format."+e,d[e]),d[e]);a=r("signed","boolean",a),t=r("width","number",t),f=r("decimals","number",f)}return(0,c.MR)(t%8==0,"invalid FixedNumber width (not byte aligned)","format.width",t),(0,c.MR)(f<=80,"invalid FixedNumber decimals (too large)","format.decimals",f),{signed:a,width:t,decimals:f,name:(a?"":"u")+"fixed"+String(t)+"x"+String(f)}}class g{format;#Aa;#va;#wa;_value;constructor(e,a,t){(0,c.gk)(e,s,"FixedNumber"),this.#va=a,this.#Aa=t;const f=function(e,a){let t="";e0?t*=u(c):c<0&&(a*=u(-c)),at?1:0}eq(e){return 0===this.cmp(e)}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#va;return this.#vai&&(e+=this.#wa-b),e=this.#va/this.#wa*this.#wa,this.#Ia(e,"ceiling")}round(e){if(null==e&&(e=0),e>=this.decimals)return this;const a=this.decimals-e,t=o*u(a-1);let c=this.value+t;const f=u(a);return c=c/f*f,h(c,this.#Aa,"round"),new g(s,c,this.#Aa)}isZero(){return this.#va===i}isNegative(){return this.#va0){const a=u(b);(0,c.vA)(n%a===i,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),n/=a}else b<0&&(n*=u(-b));return h(n,r,"fromValue"),new g(s,n,r)}static fromString(e,a){const t=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,c.MR)(t&&t[2].length+t[3].length>0,"invalid FixedNumber string value","value",e);const f=p(a);let d=t[2]||"0",r=t[3]||"";for(;r.length=0,"invalid unit","unit",a),t=3*e}else null!=a&&(t=(0,d.WZ)(a,"unit"));return g.fromString(e,{decimals:t,width:512}).value}function y(e){return function(e){let a=18;return a=(0,d.WZ)(18,"unit"),g.fromValue(e,a,{decimals:a,width:512}).toString()}(e)}function A(e){return x(e,18)}},87303:(e,a,t)=>{"use strict";t.d(a,{YW:()=>n,_v:()=>i});var c=t(36212),f=t(57339);function d(e,a,t,c,f){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let c=a+1;c>6==2;c++)e++;return e}return"OVERRUN"===e?t.length-a-1:0}const r=Object.freeze({error:function(e,a,t,c,d){(0,f.MR)(!1,`invalid codepoint at offset ${a}; ${e}`,"bytes",t)},ignore:d,replace:function(e,a,t,c,r){return"OVERLONG"===e?((0,f.MR)("number"==typeof r,"invalid bad code point for replacement","badCodepoint",r),c.push(r),0):(c.push(65533),d(e,a,t))}});function n(e,a){(0,f.MR)("string"==typeof e,"invalid string value","str",e),null!=a&&((0,f.SP)(a),e=e.normalize(a));let t=[];for(let a=0;a>6|192),t.push(63&c|128);else if(55296==(64512&c)){a++;const d=e.charCodeAt(a);(0,f.MR)(a>18|240),t.push(r>>12&63|128),t.push(r>>6&63|128),t.push(63&r|128)}else t.push(c>>12|224),t.push(c>>6&63|128),t.push(63&c|128)}return new Uint8Array(t)}function i(e,a){return function(e,a){null==a&&(a=r.error);const t=(0,c.q5)(e,"bytes"),f=[];let d=0;for(;d>7)){f.push(e);continue}let c=null,r=null;if(192==(224&e))c=1,r=127;else if(224==(240&e))c=2,r=2047;else{if(240!=(248&e)){d+=a(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",d-1,t,f);continue}c=3,r=65535}if(d-1+c>=t.length){d+=a("OVERRUN",d-1,t,f);continue}let n=e&(1<<8-c-1)-1;for(let e=0;e1114111?d+=a("OUT_OF_RANGE",d-1-c,t,f,n):n>=55296&&n<=57343?d+=a("UTF16_SURROGATE",d-1-c,t,f,n):n<=r?d+=a("OVERLONG",d-1-c,t,f,n):f.push(n))}return f}(e,a).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}},27125:(e,a,t)=>{"use strict";function c(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function f(e,...a){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(a.length>0&&!a.includes(e.length))throw new Error(`Expected Uint8Array of length ${a}, not of length=${e.length}`)}function d(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");c(e.outputLen),c(e.blockLen)}function r(e,a=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(a&&e.finished)throw new Error("Hash#digest() has already been called")}function n(e,a){f(e);const t=a.outputLen;if(e.lengthn,ai:()=>c,ee:()=>f,t2:()=>r,tW:()=>d})},37171:(e,a,t)=>{"use strict";t.d(a,{D:()=>d});var c=t(27125),f=t(10750);class d extends f.Vw{constructor(e,a,t,c){super(),this.blockLen=e,this.outputLen=a,this.padOffset=t,this.isLE=c,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,f.O8)(this.buffer)}update(e){(0,c.t2)(this);const{view:a,buffer:t,blockLen:d}=this,r=(e=(0,f.ZJ)(e)).length;for(let c=0;cd-n&&(this.process(t,0),n=0);for(let e=n;e>f&d),n=Number(t&d),i=c?4:0,b=c?0:4;e.setUint32(a+i,r,c),e.setUint32(a+b,n,c)}(t,d-8,BigInt(8*this.length),r),this.process(t,0);const i=(0,f.O8)(e),b=this.outputLen;if(b%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const o=b/4,s=this.get();if(o>s.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e{"use strict";t.d(a,{Ay:()=>s,B4:()=>i,P5:()=>n,WM:()=>b,im:()=>o,lD:()=>r});const c=BigInt(2**32-1),f=BigInt(32);function d(e,a=!1){return a?{h:Number(e&c),l:Number(e>>f&c)}:{h:0|Number(e>>f&c),l:0|Number(e&c)}}function r(e,a=!1){let t=new Uint32Array(e.length),c=new Uint32Array(e.length);for(let f=0;fe<>>32-t,i=(e,a,t)=>a<>>32-t,b=(e,a,t)=>a<>>64-t,o=(e,a,t)=>e<>>64-t,s={fromBig:d,split:r,toBig:(e,a)=>BigInt(e>>>0)<>>0),shrSH:(e,a,t)=>e>>>t,shrSL:(e,a,t)=>e<<32-t|a>>>t,rotrSH:(e,a,t)=>e>>>t|a<<32-t,rotrSL:(e,a,t)=>e<<32-t|a>>>t,rotrBH:(e,a,t)=>e<<64-t|a>>>t-32,rotrBL:(e,a,t)=>e>>>t-32|a<<64-t,rotr32H:(e,a)=>a,rotr32L:(e,a)=>e,rotlSH:n,rotlSL:i,rotlBH:b,rotlBL:o,add:function(e,a,t,c){const f=(a>>>0)+(c>>>0);return{h:e+t+(f/2**32|0)|0,l:0|f}},add3L:(e,a,t)=>(e>>>0)+(a>>>0)+(t>>>0),add3H:(e,a,t,c)=>a+t+c+(e/2**32|0)|0,add4L:(e,a,t,c)=>(e>>>0)+(a>>>0)+(t>>>0)+(c>>>0),add4H:(e,a,t,c,f)=>a+t+c+f+(e/2**32|0)|0,add5H:(e,a,t,c,f,d)=>a+t+c+f+d+(e/2**32|0)|0,add5L:(e,a,t,c,f)=>(e>>>0)+(a>>>0)+(t>>>0)+(c>>>0)+(f>>>0)}},4655:(e,a,t)=>{"use strict";t.d(a,{w:()=>r});var c=t(27125),f=t(10750);class d extends f.Vw{constructor(e,a){super(),this.finished=!1,this.destroyed=!1,(0,c.tW)(e);const t=(0,f.ZJ)(a);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const d=this.blockLen,r=new Uint8Array(d);r.set(t.length>d?e.create().update(t).digest():t);for(let e=0;enew d(e,a).update(t).digest();r.create=(e,a)=>new d(e,a)},84877:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var c=t(27125),f=t(4655),d=t(10750);function r(e,a,t,r){const{c:n,dkLen:i,DK:b,PRF:o,PRFSalt:s}=function(e,a,t,r){(0,c.tW)(e);const n=(0,d.tY)({dkLen:32,asyncTick:10},r),{c:i,dkLen:b,asyncTick:o}=n;if((0,c.ai)(i),(0,c.ai)(b),(0,c.ai)(o),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const s=(0,d.ZJ)(a),l=(0,d.ZJ)(t),u=new Uint8Array(b),h=f.w.create(e,s),p=h._cloneInto().update(l);return{c:i,dkLen:b,asyncTick:o,DK:u,PRF:h,PRFSalt:p}}(e,a,t,r);let l;const u=new Uint8Array(4),h=(0,d.O8)(u),p=new Uint8Array(o.outputLen);for(let e=1,a=0;a{"use strict";t.d(a,{s:()=>o});var c=t(37171),f=t(10750);const d=(e,a,t)=>e&a^e&t^a&t,r=new Uint32Array([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]),n=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64);class b extends c.D{constructor(){super(64,32,8,!1),this.A=0|n[0],this.B=0|n[1],this.C=0|n[2],this.D=0|n[3],this.E=0|n[4],this.F=0|n[5],this.G=0|n[6],this.H=0|n[7]}get(){const{A:e,B:a,C:t,D:c,E:f,F:d,G:r,H:n}=this;return[e,a,t,c,f,d,r,n]}set(e,a,t,c,f,d,r,n){this.A=0|e,this.B=0|a,this.C=0|t,this.D=0|c,this.E=0|f,this.F=0|d,this.G=0|r,this.H=0|n}process(e,a){for(let t=0;t<16;t++,a+=4)i[t]=e.getUint32(a,!1);for(let e=16;e<64;e++){const a=i[e-15],t=i[e-2],c=(0,f.Ow)(a,7)^(0,f.Ow)(a,18)^a>>>3,d=(0,f.Ow)(t,17)^(0,f.Ow)(t,19)^t>>>10;i[e]=d+i[e-7]+c+i[e-16]|0}let{A:t,B:c,C:n,D:b,E:o,F:s,G:l,H:u}=this;for(let e=0;e<64;e++){const a=u+((0,f.Ow)(o,6)^(0,f.Ow)(o,11)^(0,f.Ow)(o,25))+((h=o)&s^~h&l)+r[e]+i[e]|0,p=((0,f.Ow)(t,2)^(0,f.Ow)(t,13)^(0,f.Ow)(t,22))+d(t,c,n)|0;u=l,l=s,s=o,o=b+a|0,b=n,n=c,c=t,t=a+p|0}var h;t=t+this.A|0,c=c+this.B|0,n=n+this.C|0,b=b+this.D|0,o=o+this.E|0,s=s+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(t,c,n,b,o,s,l,u)}roundClean(){i.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const o=(0,f.ld)((()=>new b))},10750:(e,a,t)=>{"use strict";t.d(a,{Vw:()=>l,$h:()=>b,tY:()=>h,Id:()=>s,O8:()=>r,po:()=>g,Ow:()=>n,ZJ:()=>o,DH:()=>d,ld:()=>p});const c="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,f=e=>e instanceof Uint8Array,d=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),r=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),n=(e,a)=>e<<32-a|e>>>a;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");const i=async()=>{};async function b(e,a,t){let c=Date.now();for(let f=0;f=0&&ee+a.length),0));let t=0;return e.forEach((e=>{if(!f(e))throw new Error("Uint8Array expected");a.set(e,t),t+=e.length})),a}class l{clone(){return this._cloneInto()}}const u={}.toString;function h(e,a){if(void 0!==a&&"[object Object]"!==u.call(a))throw new Error("Options should be object or undefined");return Object.assign(e,a)}function p(e){const a=a=>e().update(o(a)).digest(),t=e();return a.outputLen=t.outputLen,a.blockLen=t.blockLen,a.create=()=>e(),a}function g(e=32){if(c&&"function"==typeof c.getRandomValues)return c.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},63837:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},72079:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},3219:e=>{"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},62951:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},64589:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},23241:e=>{"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},1636:e=>{"use strict";e.exports={rE:"6.5.7"}},15579:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},__webpack_module_cache__={};function __webpack_require__(e){var a=__webpack_module_cache__[e];if(void 0!==a)return a.exports;var t=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(t.exports,t,t.exports,__webpack_require__),t.loaded=!0,t.exports}__webpack_require__.amdO={},__webpack_require__.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(a,{a}),a},__webpack_require__.d=(e,a)=>{for(var t in a)__webpack_require__.o(a,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{BatchBlockService:()=>d.B3,BatchEventsService:()=>d.JY,BatchTransactionService:()=>d.AF,Deposit:()=>r.dA,ENS__factory:()=>f.p2,ERC20__factory:()=>f.Xc,GET_DEPOSITS:()=>t.GET_DEPOSITS,GET_ECHO_EVENTS:()=>t.GET_ECHO_EVENTS,GET_ENCRYPTED_NOTES:()=>t.GET_ENCRYPTED_NOTES,GET_GOVERNANCE_APY:()=>t.GET_GOVERNANCE_APY,GET_GOVERNANCE_EVENTS:()=>t.GET_GOVERNANCE_EVENTS,GET_NOTE_ACCOUNTS:()=>t.GET_NOTE_ACCOUNTS,GET_REGISTERED:()=>t.GET_REGISTERED,GET_STATISTIC:()=>t.GET_STATISTIC,GET_WITHDRAWALS:()=>t.GET_WITHDRAWALS,INDEX_DB_ERROR:()=>b.Fl,IndexedDB:()=>b.mc,Invoice:()=>r.qO,MAX_FEE:()=>m.KN,MAX_TOVARISH_EVENTS:()=>y.o,MIN_FEE:()=>m.Ss,MIN_STAKE_BALANCE:()=>m.pO,MerkleTreeService:()=>o.s,Mimc:()=>s.p,Multicall__factory:()=>f.Q2,NetId:()=>u.zr,NoteAccount:()=>n.Ad,OffchainOracle__factory:()=>f.Hk,OvmGasPriceOracle__factory:()=>f.Ld,Pedersen:()=>h.Hr,RelayerClient:()=>m.OR,ReverseRecords__factory:()=>f.Rp,TokenPriceOracle:()=>p.T,TornadoBrowserProvider:()=>g.D2,TornadoFeeOracle:()=>i.o,TornadoRpcSigner:()=>g.Vr,TornadoVoidSigner:()=>g.Gd,TornadoWallet:()=>g.nA,TovarishClient:()=>y.E,_META:()=>t._META,addNetwork:()=>u.AE,addressSchemaType:()=>c.SC,ajv:()=>c.SS,base64ToBytes:()=>A.Kp,bigIntReplacer:()=>A.gn,bnSchemaType:()=>c.iL,bnToBytes:()=>A.jm,buffPedersenHash:()=>h.UB,bufferToBytes:()=>A.lY,bytes32BNSchemaType:()=>c.i1,bytes32SchemaType:()=>c.yF,bytesToBN:()=>A.Ju,bytesToBase64:()=>A.if,bytesToHex:()=>A.My,calculateScore:()=>m.zy,calculateSnarkProof:()=>v.i,chunk:()=>A.iv,concatBytes:()=>A.Id,convertETHToTokenAmount:()=>i.N,createDeposit:()=>r.Hr,crypto:()=>A.Et,customConfig:()=>u.cX,defaultConfig:()=>u.sb,defaultUserAgent:()=>g.mJ,depositsEventsSchema:()=>c.CI,digest:()=>A.br,downloadZip:()=>w._6,echoEventsSchema:()=>c.ME,enabledChains:()=>u.Af,encryptedNotesSchema:()=>c.XW,factories:()=>f.XB,fetch:()=>g.hd,fetchData:()=>g.Fd,fetchGetUrlFunc:()=>g.uY,getActiveTokenInstances:()=>u.oY,getActiveTokens:()=>u.h9,getAllDeposits:()=>t.getAllDeposits,getAllEncryptedNotes:()=>t.getAllEncryptedNotes,getAllGovernanceEvents:()=>t.getAllGovernanceEvents,getAllGraphEchoEvents:()=>t.getAllGraphEchoEvents,getAllRegisters:()=>t.getAllRegisters,getAllWithdrawals:()=>t.getAllWithdrawals,getConfig:()=>u.zj,getDeposits:()=>t.getDeposits,getEncryptedNotes:()=>t.getEncryptedNotes,getEventsSchemaValidator:()=>c.ZC,getGovernanceEvents:()=>t.getGovernanceEvents,getGraphEchoEvents:()=>t.getGraphEchoEvents,getHttpAgent:()=>g.WU,getIndexedDB:()=>b.W7,getInstanceByAddress:()=>u.Zh,getMeta:()=>t.getMeta,getNetworkConfig:()=>u.RY,getNoteAccounts:()=>t.getNoteAccounts,getProvider:()=>g.sO,getProviderWithNetId:()=>g.MF,getRegisters:()=>t.getRegisters,getRelayerEnsSubdomains:()=>u.o2,getStatistic:()=>t.getStatistic,getStatusSchema:()=>c.c_,getSupportedInstances:()=>m.XF,getTokenBalances:()=>x.H,getWeightRandom:()=>m.c$,getWithdrawals:()=>t.getWithdrawals,governanceEventsSchema:()=>c.FR,hexToBytes:()=>A.aT,initGroth16:()=>v.O,isNode:()=>A.Ll,jobsSchema:()=>c.Us,leBuff2Int:()=>A.ae,leInt2Buff:()=>A.EI,mimc:()=>s.f,multicall:()=>l.C,packEncryptedMessage:()=>n.Fr,pedersen:()=>h.NO,pickWeightedRandomRelayer:()=>m.sN,populateTransaction:()=>g.zr,proofSchemaType:()=>c.Y6,queryGraph:()=>t.queryGraph,rBigInt:()=>A.ib,registeredEventsSchema:()=>c.dX,sleep:()=>A.yy,substring:()=>A.uU,toFixedHex:()=>A.$W,toFixedLength:()=>A.sY,unpackEncryptedMessage:()=>n.ol,unzipAsync:()=>w.fY,validateUrl:()=>A.wv,withdrawalsEventsSchema:()=>c.$j,zipAsync:()=>w.a8});var e=__webpack_require__(94513),a={};for(const t in e)"default"!==t&&(a[t]=()=>e[t]);__webpack_require__.d(__webpack_exports__,a);var t=__webpack_require__(52049),c=__webpack_require__(59511),f=__webpack_require__(21278),d=__webpack_require__(9723),r=__webpack_require__(7240),n=__webpack_require__(33298),i=__webpack_require__(37182),b=__webpack_require__(83968),o=__webpack_require__(5217),s=__webpack_require__(22901),l=__webpack_require__(48486),u=__webpack_require__(59499),h=__webpack_require__(85111),p=__webpack_require__(34525),g=__webpack_require__(68434),m=__webpack_require__(57194),x=__webpack_require__(7393),y=__webpack_require__(96838),A=__webpack_require__(67418),v=__webpack_require__(26746),w=__webpack_require__(18995)})(),__webpack_exports__})())); \ No newline at end of file + deps: ${t}}`};const r={keyword:"dependencies",type:"object",schemaType:"object",error:a.error,code(e){const[a,t]=function({schema:e}){const a={},t={};for(const c in e)"__proto__"!==c&&((Array.isArray(e[c])?a:t)[c]=e[c]);return[a,t]}(e);n(e,a),i(e,t)}};function n(e,a=e.schema){const{gen:t,data:f,it:r}=e;if(0===Object.keys(a).length)return;const n=t.let("missing");for(const i in a){const b=a[i];if(0===b.length)continue;const o=(0,d.propertyInData)(t,f,i,r.opts.ownProperties);e.setParams({property:i,depsCount:b.length,deps:b.join(", ")}),r.allErrors?t.if(o,(()=>{for(const a of b)(0,d.checkReportMissingProp)(e,a)})):(t.if(c._`${o} && (${(0,d.checkMissingProp)(e,b,n)})`),(0,d.reportMissingProp)(e,n),t.else())}}function i(e,a=e.schema){const{gen:t,data:c,keyword:r,it:n}=e,i=t.name("valid");for(const b in a)(0,f.alwaysValidSchema)(n,a[b])||(t.if((0,d.propertyInData)(t,c,b,n.opts.ownProperties),(()=>{const a=e.subschema({keyword:r,schemaProp:b},i);e.mergeValidEvaluated(a,i)}),(()=>t.var(i,!0))),e.ok(i))}a.validatePropertyDeps=n,a.validateSchemaDeps=i,a.default=r},1239:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>c.str`must match "${e.ifClause}" schema`,params:({params:e})=>c._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:a,parentSchema:t,it:d}=e;void 0===t.then&&void 0===t.else&&(0,f.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const n=r(d,"then"),i=r(d,"else");if(!n&&!i)return;const b=a.let("valid",!0),o=a.name("_valid");if(function(){const a=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(a)}(),e.reset(),n&&i){const t=a.let("ifClause");e.setParams({ifClause:t}),a.if(o,s("then",t),s("else",t))}else n?a.if(o,s("then")):a.if((0,c.not)(o),s("else"));function s(t,f){return()=>{const d=e.subschema({keyword:t},o);a.assign(b,o),e.mergeValidEvaluated(d,b),f?a.assign(f,c._`${t}`):e.setParams({ifClause:t})}}e.pass(b,(()=>e.error(!0)))}};function r(e,a){const t=e.schema[a];return void 0!==t&&!(0,f.alwaysValidSchema)(e,t)}a.default=d},56378:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15457),f=t(65354),d=t(20494),r=t(93966),n=t(12661),i=t(83025),b=t(19713),o=t(38660),s=t(40117),l=t(45333),u=t(57923),h=t(16505),p=t(96163),g=t(15844),m=t(1239),x=t(14426);a.default=function(e=!1){const a=[u.default,h.default,p.default,g.default,m.default,x.default,b.default,o.default,i.default,s.default,l.default];return e?a.push(f.default,r.default):a.push(c.default,d.default),a.push(n.default),a}},20494:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateTuple=void 0;const c=t(99029),f=t(94227),d=t(15765),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:a,it:t}=e;if(Array.isArray(a))return n(e,"additionalItems",a);t.items=!0,(0,f.alwaysValidSchema)(t,a)||e.ok((0,d.validateArray)(e))}};function n(e,a,t=e.schema){const{gen:d,parentSchema:r,data:n,keyword:i,it:b}=e;!function(e){const{opts:c,errSchemaPath:d}=b,r=t.length,n=r===e.minItems&&(r===e.maxItems||!1===e[a]);if(c.strictTuples&&!n){const e=`"${i}" is ${r}-tuple, but minItems or maxItems/${a} are not specified or different at path "${d}"`;(0,f.checkStrictMode)(b,e,c.strictTuples)}}(r),b.opts.unevaluated&&t.length&&!0!==b.items&&(b.items=f.mergeEvaluated.items(d,t.length,b.items));const o=d.name("valid"),s=d.const("len",c._`${n}.length`);t.forEach(((a,t)=>{(0,f.alwaysValidSchema)(b,a)||(d.if(c._`${s} > ${t}`,(()=>e.subschema({keyword:i,schemaProp:t,dataProp:t},o))),e.ok(o))}))}a.validateTuple=n,a.default=r},93966:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(15765),r=t(15457),n={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>c.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>c._`{limit: ${e}}`},code(e){const{schema:a,parentSchema:t,it:c}=e,{prefixItems:n}=t;c.items=!0,(0,f.alwaysValidSchema)(c,a)||(n?(0,r.validateAdditionalItems)(e,n):e.ok((0,d.validateArray)(e)))}};a.default=n},57923:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(94227),f={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:a,schema:t,it:f}=e;if((0,c.alwaysValidSchema)(f,t))return void e.fail();const d=a.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},d),e.failResult(d,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};a.default=f},96163:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>c._`{passingSchemas: ${e.passing}}`},code(e){const{gen:a,schema:t,parentSchema:d,it:r}=e;if(!Array.isArray(t))throw new Error("ajv implementation error");if(r.opts.discriminator&&d.discriminator)return;const n=t,i=a.let("valid",!1),b=a.let("passing",null),o=a.name("_valid");e.setParams({passing:b}),a.block((function(){n.forEach(((t,d)=>{let n;(0,f.alwaysValidSchema)(r,t)?a.var(o,!0):n=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},o),d>0&&a.if(c._`${o} && ${i}`).assign(i,!1).assign(b,c._`[${b}, ${d}]`).else(),a.if(o,(()=>{a.assign(i,!0),a.assign(b,d),n&&e.mergeEvaluated(n,c.Name)}))}))})),e.result(i,(()=>e.reset()),(()=>e.error(!0)))}};a.default=d},45333:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15765),f=t(99029),d=t(94227),r=t(94227),n={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:a,schema:t,data:n,parentSchema:i,it:b}=e,{opts:o}=b,s=(0,c.allSchemaProperties)(t),l=s.filter((e=>(0,d.alwaysValidSchema)(b,t[e])));if(0===s.length||l.length===s.length&&(!b.opts.unevaluated||!0===b.props))return;const u=o.strictSchema&&!o.allowMatchingProperties&&i.properties,h=a.name("valid");!0===b.props||b.props instanceof f.Name||(b.props=(0,r.evaluatedPropsToName)(a,b.props));const{props:p}=b;function g(e){for(const a in u)new RegExp(e).test(a)&&(0,d.checkStrictMode)(b,`property ${a} matches pattern ${e} (use allowMatchingProperties)`)}function m(t){a.forIn("key",n,(d=>{a.if(f._`${(0,c.usePattern)(e,t)}.test(${d})`,(()=>{const c=l.includes(t);c||e.subschema({keyword:"patternProperties",schemaProp:t,dataProp:d,dataPropType:r.Type.Str},h),b.opts.unevaluated&&!0!==p?a.assign(f._`${p}[${d}]`,!0):c||b.allErrors||a.if((0,f.not)(h),(()=>a.break()))}))}))}!function(){for(const e of s)u&&g(e),b.allErrors?m(e):(a.var(h,!0),m(e),a.if(h))}()}};a.default=n},65354:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(20494),f={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,c.validateTuple)(e,"items")};a.default=f},40117:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(62586),f=t(15765),d=t(94227),r=t(38660),n={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:a,schema:t,parentSchema:n,data:i,it:b}=e;"all"===b.opts.removeAdditional&&void 0===n.additionalProperties&&r.default.code(new c.KeywordCxt(b,r.default,"additionalProperties"));const o=(0,f.allSchemaProperties)(t);for(const e of o)b.definedProperties.add(e);b.opts.unevaluated&&o.length&&!0!==b.props&&(b.props=d.mergeEvaluated.props(a,(0,d.toHash)(o),b.props));const s=o.filter((e=>!(0,d.alwaysValidSchema)(b,t[e])));if(0===s.length)return;const l=a.name("valid");for(const t of s)u(t)?h(t):(a.if((0,f.propertyInData)(a,i,t,b.opts.ownProperties)),h(t),b.allErrors||a.else().var(l,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(l);function u(e){return b.opts.useDefaults&&!b.compositeRule&&void 0!==t[e].default}function h(a){e.subschema({keyword:"properties",schemaProp:a,dataProp:a},l)}}};a.default=n},19713:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>c._`{propertyName: ${e.propertyName}}`},code(e){const{gen:a,schema:t,data:d,it:r}=e;if((0,f.alwaysValidSchema)(r,t))return;const n=a.name("valid");a.forIn("key",d,(t=>{e.setParams({propertyName:t}),e.subschema({keyword:"propertyNames",data:t,dataTypes:["string"],propertyName:t,compositeRule:!0},n),a.if((0,c.not)(n),(()=>{e.error(!0),r.allErrors||a.break()}))})),e.ok(n)}};a.default=d},14426:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(94227),f={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:a,it:t}){void 0===a.if&&(0,c.checkStrictMode)(t,`"${e}" without "if" is ignored`)}};a.default=f},15765:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateUnion=a.validateArray=a.usePattern=a.callValidateCode=a.schemaProperties=a.allSchemaProperties=a.noPropertyInData=a.propertyInData=a.isOwnProperty=a.hasPropFunc=a.reportMissingProp=a.checkMissingProp=a.checkReportMissingProp=void 0;const c=t(99029),f=t(94227),d=t(42023),r=t(94227);function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:c._`Object.prototype.hasOwnProperty`})}function i(e,a,t){return c._`${n(e)}.call(${a}, ${t})`}function b(e,a,t,f){const d=c._`${a}${(0,c.getProperty)(t)} === undefined`;return f?(0,c.or)(d,(0,c.not)(i(e,a,t))):d}function o(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}a.checkReportMissingProp=function(e,a){const{gen:t,data:f,it:d}=e;t.if(b(t,f,a,d.opts.ownProperties),(()=>{e.setParams({missingProperty:c._`${a}`},!0),e.error()}))},a.checkMissingProp=function({gen:e,data:a,it:{opts:t}},f,d){return(0,c.or)(...f.map((f=>(0,c.and)(b(e,a,f,t.ownProperties),c._`${d} = ${f}`))))},a.reportMissingProp=function(e,a){e.setParams({missingProperty:a},!0),e.error()},a.hasPropFunc=n,a.isOwnProperty=i,a.propertyInData=function(e,a,t,f){const d=c._`${a}${(0,c.getProperty)(t)} !== undefined`;return f?c._`${d} && ${i(e,a,t)}`:d},a.noPropertyInData=b,a.allSchemaProperties=o,a.schemaProperties=function(e,a){return o(a).filter((t=>!(0,f.alwaysValidSchema)(e,a[t])))},a.callValidateCode=function({schemaCode:e,data:a,it:{gen:t,topSchemaRef:f,schemaPath:r,errorPath:n},it:i},b,o,s){const l=s?c._`${e}, ${a}, ${f}${r}`:a,u=[[d.default.instancePath,(0,c.strConcat)(d.default.instancePath,n)],[d.default.parentData,i.parentData],[d.default.parentDataProperty,i.parentDataProperty],[d.default.rootData,d.default.rootData]];i.opts.dynamicRef&&u.push([d.default.dynamicAnchors,d.default.dynamicAnchors]);const h=c._`${l}, ${t.object(...u)}`;return o!==c.nil?c._`${b}.call(${o}, ${h})`:c._`${b}(${h})`};const s=c._`new RegExp`;a.usePattern=function({gen:e,it:{opts:a}},t){const f=a.unicodeRegExp?"u":"",{regExp:d}=a.code,n=d(t,f);return e.scopeValue("pattern",{key:n.toString(),ref:n,code:c._`${"new RegExp"===d.code?s:(0,r.useFunc)(e,d)}(${t}, ${f})`})},a.validateArray=function(e){const{gen:a,data:t,keyword:d,it:r}=e,n=a.name("valid");if(r.allErrors){const e=a.let("valid",!0);return i((()=>a.assign(e,!1))),e}return a.var(n,!0),i((()=>a.break())),n;function i(r){const i=a.const("len",c._`${t}.length`);a.forRange("i",0,i,(t=>{e.subschema({keyword:d,dataProp:t,dataPropType:f.Type.Num},n),a.if((0,c.not)(n),r)}))}},a.validateUnion=function(e){const{gen:a,schema:t,keyword:d,it:r}=e;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some((e=>(0,f.alwaysValidSchema)(r,e)))&&!r.opts.unevaluated)return;const n=a.let("valid",!1),i=a.name("_valid");a.block((()=>t.forEach(((t,f)=>{const r=e.subschema({keyword:d,schemaProp:f,compositeRule:!0},i);a.assign(n,c._`${n} || ${i}`),e.mergeValidEvaluated(r,i)||a.if((0,c.not)(n))})))),e.result(n,(()=>e.reset()),(()=>e.error(!0)))}},83463:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};a.default=t},72128:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(83463),f=t(13693),d=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",c.default,f.default];a.default=d},13693:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.callRef=a.getValidate=void 0;const c=t(34551),f=t(15765),d=t(99029),r=t(42023),n=t(73835),i=t(94227),b={keyword:"$ref",schemaType:"string",code(e){const{gen:a,schema:t,it:f}=e,{baseId:r,schemaEnv:i,validateName:b,opts:l,self:u}=f,{root:h}=i;if(("#"===t||"#/"===t)&&r===h.baseId)return function(){if(i===h)return s(e,b,i,i.$async);const t=a.scopeValue("root",{ref:h});return s(e,d._`${t}.validate`,h,h.$async)}();const p=n.resolveRef.call(u,h,r,t);if(void 0===p)throw new c.default(f.opts.uriResolver,r,t);return p instanceof n.SchemaEnv?function(a){const t=o(e,a);s(e,t,a,a.$async)}(p):function(c){const f=a.scopeValue("schema",!0===l.code.source?{ref:c,code:(0,d.stringify)(c)}:{ref:c}),r=a.name("valid"),n=e.subschema({schema:c,dataTypes:[],schemaPath:d.nil,topSchemaRef:f,errSchemaPath:t},r);e.mergeEvaluated(n),e.ok(r)}(p)}};function o(e,a){const{gen:t}=e;return a.validate?t.scopeValue("validate",{ref:a.validate}):d._`${t.scopeValue("wrapper",{ref:a})}.validate`}function s(e,a,t,c){const{gen:n,it:b}=e,{allErrors:o,schemaEnv:s,opts:l}=b,u=l.passContext?r.default.this:d.nil;function h(e){const a=d._`${e}.errors`;n.assign(r.default.vErrors,d._`${r.default.vErrors} === null ? ${a} : ${r.default.vErrors}.concat(${a})`),n.assign(r.default.errors,d._`${r.default.vErrors}.length`)}function p(e){var a;if(!b.opts.unevaluated)return;const c=null===(a=null==t?void 0:t.validate)||void 0===a?void 0:a.evaluated;if(!0!==b.props)if(c&&!c.dynamicProps)void 0!==c.props&&(b.props=i.mergeEvaluated.props(n,c.props,b.props));else{const a=n.var("props",d._`${e}.evaluated.props`);b.props=i.mergeEvaluated.props(n,a,b.props,d.Name)}if(!0!==b.items)if(c&&!c.dynamicItems)void 0!==c.items&&(b.items=i.mergeEvaluated.items(n,c.items,b.items));else{const a=n.var("items",d._`${e}.evaluated.items`);b.items=i.mergeEvaluated.items(n,a,b.items,d.Name)}}c?function(){if(!s.$async)throw new Error("async schema referenced by sync schema");const t=n.let("valid");n.try((()=>{n.code(d._`await ${(0,f.callValidateCode)(e,a,u)}`),p(a),o||n.assign(t,!0)}),(e=>{n.if(d._`!(${e} instanceof ${b.ValidationError})`,(()=>n.throw(e))),h(e),o||n.assign(t,!1)})),e.ok(t)}():e.result((0,f.callValidateCode)(e,a,u),(()=>p(a)),(()=>h(a)))}a.getValidate=o,a.callRef=s,a.default=b},36653:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(97652),d=t(73835),r=t(34551),n=t(94227),i={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:a}})=>e===f.DiscrError.Tag?`tag "${a}" must be string`:`value of tag "${a}" must be in oneOf`,params:({params:{discrError:e,tag:a,tagName:t}})=>c._`{error: ${e}, tag: ${t}, tagValue: ${a}}`},code(e){const{gen:a,data:t,schema:i,parentSchema:b,it:o}=e,{oneOf:s}=b;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=i.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const u=a.let("valid",!1),h=a.const("tag",c._`${t}${(0,c.getProperty)(l)}`);function p(t){const f=a.name("valid"),d=e.subschema({keyword:"oneOf",schemaProp:t},f);return e.mergeEvaluated(d,c.Name),f}a.if(c._`typeof ${h} == "string"`,(()=>function(){const t=function(){var e;const a={},t=f(b);let c=!0;for(let a=0;ae.error(!1,{discrError:f.DiscrError.Tag,tag:h,tagName:l}))),e.ok(u)}};a.default=i},97652:(e,a)=>{"use strict";var t;Object.defineProperty(a,"__esModule",{value:!0}),a.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t||(a.DiscrError=t={}))},86144:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(72128),f=t(67060),d=t(56378),r=t(97532),n=t(69857),i=[c.default,f.default,(0,d.default)(),r.default,n.metadataVocabulary,n.contentVocabulary];a.default=i},94737:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>c.str`must match format "${e}"`,params:({schemaCode:e})=>c._`{format: ${e}}`},code(e,a){const{gen:t,data:f,$data:d,schema:r,schemaCode:n,it:i}=e,{opts:b,errSchemaPath:o,schemaEnv:s,self:l}=i;b.validateFormats&&(d?function(){const d=t.scopeValue("formats",{ref:l.formats,code:b.code.formats}),r=t.const("fDef",c._`${d}[${n}]`),i=t.let("fType"),o=t.let("format");t.if(c._`typeof ${r} == "object" && !(${r} instanceof RegExp)`,(()=>t.assign(i,c._`${r}.type || "string"`).assign(o,c._`${r}.validate`)),(()=>t.assign(i,c._`"string"`).assign(o,r))),e.fail$data((0,c.or)(!1===b.strictSchema?c.nil:c._`${n} && !${o}`,function(){const e=s.$async?c._`(${r}.async ? await ${o}(${f}) : ${o}(${f}))`:c._`${o}(${f})`,t=c._`(typeof ${o} == "function" ? ${e} : ${o}.test(${f}))`;return c._`${o} && ${o} !== true && ${i} === ${a} && !${t}`}()))}():function(){const d=l.formats[r];if(!d)return void function(){if(!1!==b.strictSchema)throw new Error(e());function e(){return`unknown format "${r}" ignored in schema at path "${o}"`}l.logger.warn(e())}();if(!0===d)return;const[n,i,u]=function(e){const a=e instanceof RegExp?(0,c.regexpCode)(e):b.code.formats?c._`${b.code.formats}${(0,c.getProperty)(r)}`:void 0,f=t.scopeValue("formats",{key:r,ref:e,code:a});return"object"!=typeof e||e instanceof RegExp?["string",e,f]:[e.type||"string",e.validate,c._`${f}.validate`]}(d);n===a&&e.pass(function(){if("object"==typeof d&&!(d instanceof RegExp)&&d.async){if(!s.$async)throw new Error("async format in sync schema");return c._`await ${u}(${f})`}return"function"==typeof i?c._`${u}(${f})`:c._`${u}.test(${f})`}())}())}};a.default=f},97532:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=[t(94737).default];a.default=c},69857:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.contentVocabulary=a.metadataVocabulary=void 0,a.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],a.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},27935:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(76250),r={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>c._`{allowedValue: ${e}}`},code(e){const{gen:a,data:t,$data:r,schemaCode:n,schema:i}=e;r||i&&"object"==typeof i?e.fail$data(c._`!${(0,f.useFunc)(a,d.default)}(${t}, ${n})`):e.fail(c._`${i} !== ${t}`)}};a.default=r},28643:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(76250),r={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>c._`{allowedValues: ${e}}`},code(e){const{gen:a,data:t,$data:r,schema:n,schemaCode:i,it:b}=e;if(!r&&0===n.length)throw new Error("enum must have non-empty array");const o=n.length>=b.opts.loopEnum;let s;const l=()=>null!=s?s:s=(0,f.useFunc)(a,d.default);let u;if(o||r)u=a.let("valid"),e.block$data(u,(function(){a.assign(u,!1),a.forOf("v",i,(e=>a.if(c._`${l()}(${t}, ${e})`,(()=>a.assign(u,!0).break()))))}));else{if(!Array.isArray(n))throw new Error("ajv implementation error");const e=a.const("vSchema",i);u=(0,c.or)(...n.map(((a,f)=>function(e,a){const f=n[a];return"object"==typeof f&&null!==f?c._`${l()}(${t}, ${e}[${a}])`:c._`${t} === ${f}`}(e,f))))}e.pass(u)}};a.default=r},67060:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(75882),f=t(63439),d=t(77307),r=t(90422),n=t(34486),i=t(34003),b=t(61163),o=t(60617),s=t(27935),l=t(28643),u=[c.default,f.default,d.default,r.default,n.default,i.default,b.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},s.default,l.default];a.default=u},61163:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:a}){const t="maxItems"===e?"more":"fewer";return c.str`must NOT have ${t} than ${a} items`},params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:a,data:t,schemaCode:f}=e,d="maxItems"===a?c.operators.GT:c.operators.LT;e.fail$data(c._`${t}.length ${d} ${f}`)}};a.default=f},77307:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(53853),r={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:a}){const t="maxLength"===e?"more":"fewer";return c.str`must NOT have ${t} than ${a} characters`},params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:a,data:t,schemaCode:r,it:n}=e,i="maxLength"===a?c.operators.GT:c.operators.LT,b=!1===n.opts.unicode?c._`${t}.length`:c._`${(0,f.useFunc)(e.gen,d.default)}(${t})`;e.fail$data(c._`${b} ${i} ${r}`)}};a.default=r},75882:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=c.operators,d={maximum:{okStr:"<=",ok:f.LTE,fail:f.GT},minimum:{okStr:">=",ok:f.GTE,fail:f.LT},exclusiveMaximum:{okStr:"<",ok:f.LT,fail:f.GTE},exclusiveMinimum:{okStr:">",ok:f.GT,fail:f.LTE}},r={message:({keyword:e,schemaCode:a})=>c.str`must be ${d[e].okStr} ${a}`,params:({keyword:e,schemaCode:a})=>c._`{comparison: ${d[e].okStr}, limit: ${a}}`},n={keyword:Object.keys(d),type:"number",schemaType:"number",$data:!0,error:r,code(e){const{keyword:a,data:t,schemaCode:f}=e;e.fail$data(c._`${t} ${d[a].fail} ${f} || isNaN(${t})`)}};a.default=n},34486:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:a}){const t="maxProperties"===e?"more":"fewer";return c.str`must NOT have ${t} than ${a} properties`},params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:a,data:t,schemaCode:f}=e,d="maxProperties"===a?c.operators.GT:c.operators.LT;e.fail$data(c._`Object.keys(${t}).length ${d} ${f}`)}};a.default=f},63439:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>c.str`must be multiple of ${e}`,params:({schemaCode:e})=>c._`{multipleOf: ${e}}`},code(e){const{gen:a,data:t,schemaCode:f,it:d}=e,r=d.opts.multipleOfPrecision,n=a.let("res"),i=r?c._`Math.abs(Math.round(${n}) - ${n}) > 1e-${r}`:c._`${n} !== parseInt(${n})`;e.fail$data(c._`(${f} === 0 || (${n} = ${t}/${f}, ${i}))`)}};a.default=f},90422:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15765),f=t(99029),d={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>f.str`must match pattern "${e}"`,params:({schemaCode:e})=>f._`{pattern: ${e}}`},code(e){const{data:a,$data:t,schema:d,schemaCode:r,it:n}=e,i=n.opts.unicodeRegExp?"u":"",b=t?f._`(new RegExp(${r}, ${i}))`:(0,c.usePattern)(e,d);e.fail$data(f._`!${b}.test(${a})`)}};a.default=d},34003:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15765),f=t(99029),d=t(94227),r={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>f.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>f._`{missingProperty: ${e}}`},code(e){const{gen:a,schema:t,schemaCode:r,data:n,$data:i,it:b}=e,{opts:o}=b;if(!i&&0===t.length)return;const s=t.length>=o.loopRequired;if(b.allErrors?function(){if(s||i)e.block$data(f.nil,l);else for(const a of t)(0,c.checkReportMissingProp)(e,a)}():function(){const d=a.let("missing");if(s||i){const t=a.let("valid",!0);e.block$data(t,(()=>function(t,d){e.setParams({missingProperty:t}),a.forOf(t,r,(()=>{a.assign(d,(0,c.propertyInData)(a,n,t,o.ownProperties)),a.if((0,f.not)(d),(()=>{e.error(),a.break()}))}),f.nil)}(d,t))),e.ok(t)}else a.if((0,c.checkMissingProp)(e,t,d)),(0,c.reportMissingProp)(e,d),a.else()}(),o.strictRequired){const a=e.parentSchema.properties,{definedProperties:c}=e.it;for(const e of t)if(void 0===(null==a?void 0:a[e])&&!c.has(e)){const a=`required property "${e}" is not defined at "${b.schemaEnv.baseId+b.errSchemaPath}" (strictRequired)`;(0,d.checkStrictMode)(b,a,b.opts.strictRequired)}}function l(){a.forOf("prop",r,(t=>{e.setParams({missingProperty:t}),a.if((0,c.noPropertyInData)(a,n,t,o.ownProperties),(()=>e.error()))}))}}};a.default=r},60617:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(10208),f=t(99029),d=t(94227),r=t(76250),n={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:a}})=>f.str`must NOT have duplicate items (items ## ${a} and ${e} are identical)`,params:({params:{i:e,j:a}})=>f._`{i: ${e}, j: ${a}}`},code(e){const{gen:a,data:t,$data:n,schema:i,parentSchema:b,schemaCode:o,it:s}=e;if(!n&&!i)return;const l=a.let("valid"),u=b.items?(0,c.getSchemaTypes)(b.items):[];function h(d,r){const n=a.name("item"),i=(0,c.checkDataTypes)(u,n,s.opts.strictNumbers,c.DataType.Wrong),b=a.const("indices",f._`{}`);a.for(f._`;${d}--;`,(()=>{a.let(n,f._`${t}[${d}]`),a.if(i,f._`continue`),u.length>1&&a.if(f._`typeof ${n} == "string"`,f._`${n} += "_"`),a.if(f._`typeof ${b}[${n}] == "number"`,(()=>{a.assign(r,f._`${b}[${n}]`),e.error(),a.assign(l,!1).break()})).code(f._`${b}[${n}] = ${d}`)}))}function p(c,n){const i=(0,d.useFunc)(a,r.default),b=a.name("outer");a.label(b).for(f._`;${c}--;`,(()=>a.for(f._`${n} = ${c}; ${n}--;`,(()=>a.if(f._`${i}(${t}[${c}], ${t}[${n}])`,(()=>{e.error(),a.assign(l,!1).break(b)}))))))}e.block$data(l,(function(){const c=a.let("i",f._`${t}.length`),d=a.let("j");e.setParams({i:c,j:d}),a.assign(l,!0),a.if(f._`${c} > 1`,(()=>(u.length>0&&!u.some((e=>"object"===e||"array"===e))?h:p)(c,d)))}),f._`${o} === false`),e.ok(l)}};a.default=n},87568:(e,a,t)=>{var c=a;c.bignum=t(72344),c.define=t(47363).define,c.base=t(9673),c.constants=t(22153),c.decoders=t(22853),c.encoders=t(24669)},47363:(e,a,t)=>{var c=t(87568),f=t(56698);function d(e,a){this.name=e,this.body=a,this.decoders={},this.encoders={}}a.define=function(e,a){return new d(e,a)},d.prototype._createNamed=function(e){var a;try{a=t(68961).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){a=function(e){this._initNamed(e)}}return f(a,e),a.prototype._initNamed=function(a){e.call(this,a)},new a(this)},d.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(c.decoders[e])),this.decoders[e]},d.prototype.decode=function(e,a,t){return this._getDecoder(a).decode(e,t)},d.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(c.encoders[e])),this.encoders[e]},d.prototype.encode=function(e,a,t){return this._getEncoder(a).encode(e,t)}},47227:(e,a,t)=>{var c=t(56698),f=t(9673).Reporter,d=t(48287).Buffer;function r(e,a){f.call(this,a),d.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function n(e,a){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof n||(e=new n(e,a)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return a.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=d.byteLength(e);else{if(!d.isBuffer(e))return a.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}c(r,f),a.t=r,r.prototype.save=function(){return{offset:this.offset,reporter:f.prototype.save.call(this)}},r.prototype.restore=function(e){var a=new r(this.base);return a.offset=e.offset,a.length=this.offset,this.offset=e.offset,f.prototype.restore.call(this,e.reporter),a},r.prototype.isEmpty=function(){return this.offset===this.length},r.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},r.prototype.skip=function(e,a){if(!(this.offset+e<=this.length))return this.error(a||"DecoderBuffer overrun");var t=new r(this.base);return t._reporterState=this._reporterState,t.offset=this.offset,t.length=this.offset+e,this.offset+=e,t},r.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},a.d=n,n.prototype.join=function(e,a){return e||(e=new d(this.length)),a||(a=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(t){t.join(e,a),a+=t.length})):("number"==typeof this.value?e[a]=this.value:"string"==typeof this.value?e.write(this.value,a):d.isBuffer(this.value)&&this.value.copy(e,a),a+=this.length)),e}},9673:(e,a,t)=>{var c=a;c.Reporter=t(89220).a,c.DecoderBuffer=t(47227).t,c.EncoderBuffer=t(47227).d,c.Node=t(90993)},90993:(e,a,t)=>{var c=t(9673).Reporter,f=t(9673).EncoderBuffer,d=t(9673).DecoderBuffer,r=t(43349),n=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],i=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(n);function b(e,a){var t={};this._baseState=t,t.enc=e,t.parent=a||null,t.children=null,t.tag=null,t.args=null,t.reverseArgs=null,t.choice=null,t.optional=!1,t.any=!1,t.obj=!1,t.use=null,t.useDecoder=null,t.key=null,t.default=null,t.explicit=null,t.implicit=null,t.contains=null,t.parent||(t.children=[],this._wrap())}e.exports=b;var o=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];b.prototype.clone=function(){var e=this._baseState,a={};o.forEach((function(t){a[t]=e[t]}));var t=new this.constructor(a.parent);return t._baseState=a,t},b.prototype._wrap=function(){var e=this._baseState;i.forEach((function(a){this[a]=function(){var t=new this.constructor(this);return e.children.push(t),t[a].apply(t,arguments)}}),this)},b.prototype._init=function(e){var a=this._baseState;r(null===a.parent),e.call(this),a.children=a.children.filter((function(e){return e._baseState.parent===this}),this),r.equal(a.children.length,1,"Root node can have only one child")},b.prototype._useArgs=function(e){var a=this._baseState,t=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==t.length&&(r(null===a.children),a.children=t,t.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(r(null===a.args),a.args=e,a.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var a={};return Object.keys(e).forEach((function(t){t==(0|t)&&(t|=0);var c=e[t];a[c]=t})),a})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){b.prototype[e]=function(){var a=this._baseState;throw new Error(e+" not implemented for encoding: "+a.enc)}})),n.forEach((function(e){b.prototype[e]=function(){var a=this._baseState,t=Array.prototype.slice.call(arguments);return r(null===a.tag),a.tag=e,this._useArgs(t),this}})),b.prototype.use=function(e){r(e);var a=this._baseState;return r(null===a.use),a.use=e,this},b.prototype.optional=function(){return this._baseState.optional=!0,this},b.prototype.def=function(e){var a=this._baseState;return r(null===a.default),a.default=e,a.optional=!0,this},b.prototype.explicit=function(e){var a=this._baseState;return r(null===a.explicit&&null===a.implicit),a.explicit=e,this},b.prototype.implicit=function(e){var a=this._baseState;return r(null===a.explicit&&null===a.implicit),a.implicit=e,this},b.prototype.obj=function(){var e=this._baseState,a=Array.prototype.slice.call(arguments);return e.obj=!0,0!==a.length&&this._useArgs(a),this},b.prototype.key=function(e){var a=this._baseState;return r(null===a.key),a.key=e,this},b.prototype.any=function(){return this._baseState.any=!0,this},b.prototype.choice=function(e){var a=this._baseState;return r(null===a.choice),a.choice=e,this._useArgs(Object.keys(e).map((function(a){return e[a]}))),this},b.prototype.contains=function(e){var a=this._baseState;return r(null===a.use),a.contains=e,this},b.prototype._decode=function(e,a){var t=this._baseState;if(null===t.parent)return e.wrapResult(t.children[0]._decode(e,a));var c,f=t.default,r=!0,n=null;if(null!==t.key&&(n=e.enterKey(t.key)),t.optional){var i=null;if(null!==t.explicit?i=t.explicit:null!==t.implicit?i=t.implicit:null!==t.tag&&(i=t.tag),null!==i||t.any){if(r=this._peekTag(e,i,t.any),e.isError(r))return r}else{var b=e.save();try{null===t.choice?this._decodeGeneric(t.tag,e,a):this._decodeChoice(e,a),r=!0}catch(e){r=!1}e.restore(b)}}if(t.obj&&r&&(c=e.enterObject()),r){if(null!==t.explicit){var o=this._decodeTag(e,t.explicit);if(e.isError(o))return o;e=o}var s=e.offset;if(null===t.use&&null===t.choice){t.any&&(b=e.save());var l=this._decodeTag(e,null!==t.implicit?t.implicit:t.tag,t.any);if(e.isError(l))return l;t.any?f=e.raw(b):e=l}if(a&&a.track&&null!==t.tag&&a.track(e.path(),s,e.length,"tagged"),a&&a.track&&null!==t.tag&&a.track(e.path(),e.offset,e.length,"content"),t.any||(f=null===t.choice?this._decodeGeneric(t.tag,e,a):this._decodeChoice(e,a)),e.isError(f))return f;if(t.any||null!==t.choice||null===t.children||t.children.forEach((function(t){t._decode(e,a)})),t.contains&&("octstr"===t.tag||"bitstr"===t.tag)){var u=new d(f);f=this._getUse(t.contains,e._reporterState.obj)._decode(u,a)}}return t.obj&&r&&(f=e.leaveObject(c)),null===t.key||null===f&&!0!==r?null!==n&&e.exitKey(n):e.leaveKey(n,t.key,f),f},b.prototype._decodeGeneric=function(e,a,t){var c=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(a,e,c.args[0],t):/str$/.test(e)?this._decodeStr(a,e,t):"objid"===e&&c.args?this._decodeObjid(a,c.args[0],c.args[1],t):"objid"===e?this._decodeObjid(a,null,null,t):"gentime"===e||"utctime"===e?this._decodeTime(a,e,t):"null_"===e?this._decodeNull(a,t):"bool"===e?this._decodeBool(a,t):"objDesc"===e?this._decodeStr(a,e,t):"int"===e||"enum"===e?this._decodeInt(a,c.args&&c.args[0],t):null!==c.use?this._getUse(c.use,a._reporterState.obj)._decode(a,t):a.error("unknown tag: "+e)},b.prototype._getUse=function(e,a){var t=this._baseState;return t.useDecoder=this._use(e,a),r(null===t.useDecoder._baseState.parent),t.useDecoder=t.useDecoder._baseState.children[0],t.implicit!==t.useDecoder._baseState.implicit&&(t.useDecoder=t.useDecoder.clone(),t.useDecoder._baseState.implicit=t.implicit),t.useDecoder},b.prototype._decodeChoice=function(e,a){var t=this._baseState,c=null,f=!1;return Object.keys(t.choice).some((function(d){var r=e.save(),n=t.choice[d];try{var i=n._decode(e,a);if(e.isError(i))return!1;c={type:d,value:i},f=!0}catch(a){return e.restore(r),!1}return!0}),this),f?c:e.error("Choice not matched")},b.prototype._createEncoderBuffer=function(e){return new f(e,this.reporter)},b.prototype._encode=function(e,a,t){var c=this._baseState;if(null===c.default||c.default!==e){var f=this._encodeValue(e,a,t);if(void 0!==f&&!this._skipDefault(f,a,t))return f}},b.prototype._encodeValue=function(e,a,t){var f=this._baseState;if(null===f.parent)return f.children[0]._encode(e,a||new c);var d=null;if(this.reporter=a,f.optional&&void 0===e){if(null===f.default)return;e=f.default}var r=null,n=!1;if(f.any)d=this._createEncoderBuffer(e);else if(f.choice)d=this._encodeChoice(e,a);else if(f.contains)r=this._getUse(f.contains,t)._encode(e,a),n=!0;else if(f.children)r=f.children.map((function(t){if("null_"===t._baseState.tag)return t._encode(null,a,e);if(null===t._baseState.key)return a.error("Child should have a key");var c=a.enterKey(t._baseState.key);if("object"!=typeof e)return a.error("Child expected, but input is not object");var f=t._encode(e[t._baseState.key],a,e);return a.leaveKey(c),f}),this).filter((function(e){return e})),r=this._createEncoderBuffer(r);else if("seqof"===f.tag||"setof"===f.tag){if(!f.args||1!==f.args.length)return a.error("Too many args for : "+f.tag);if(!Array.isArray(e))return a.error("seqof/setof, but data is not Array");var i=this.clone();i._baseState.implicit=null,r=this._createEncoderBuffer(e.map((function(t){var c=this._baseState;return this._getUse(c.args[0],e)._encode(t,a)}),i))}else null!==f.use?d=this._getUse(f.use,t)._encode(e,a):(r=this._encodePrimitive(f.tag,e),n=!0);if(!f.any&&null===f.choice){var b=null!==f.implicit?f.implicit:f.tag,o=null===f.implicit?"universal":"context";null===b?null===f.use&&a.error("Tag could be omitted only for .use()"):null===f.use&&(d=this._encodeComposite(b,n,o,r))}return null!==f.explicit&&(d=this._encodeComposite(f.explicit,!1,"context",d)),d},b.prototype._encodeChoice=function(e,a){var t=this._baseState,c=t.choice[e.type];return c||r(!1,e.type+" not found in "+JSON.stringify(Object.keys(t.choice))),c._encode(e.value,a)},b.prototype._encodePrimitive=function(e,a){var t=this._baseState;if(/str$/.test(e))return this._encodeStr(a,e);if("objid"===e&&t.args)return this._encodeObjid(a,t.reverseArgs[0],t.args[1]);if("objid"===e)return this._encodeObjid(a,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(a,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(a,t.args&&t.reverseArgs[0]);if("bool"===e)return this._encodeBool(a);if("objDesc"===e)return this._encodeStr(a,e);throw new Error("Unsupported tag: "+e)},b.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},b.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},89220:(e,a,t)=>{var c=t(56698);function f(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function d(e,a){this.path=e,this.rethrow(a)}a.a=f,f.prototype.isError=function(e){return e instanceof d},f.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},f.prototype.restore=function(e){var a=this._reporterState;a.obj=e.obj,a.path=a.path.slice(0,e.pathLen)},f.prototype.enterKey=function(e){return this._reporterState.path.push(e)},f.prototype.exitKey=function(e){var a=this._reporterState;a.path=a.path.slice(0,e-1)},f.prototype.leaveKey=function(e,a,t){var c=this._reporterState;this.exitKey(e),null!==c.obj&&(c.obj[a]=t)},f.prototype.path=function(){return this._reporterState.path.join("/")},f.prototype.enterObject=function(){var e=this._reporterState,a=e.obj;return e.obj={},a},f.prototype.leaveObject=function(e){var a=this._reporterState,t=a.obj;return a.obj=e,t},f.prototype.error=function(e){var a,t=this._reporterState,c=e instanceof d;if(a=c?e:new d(t.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!t.options.partial)throw a;return c||t.errors.push(a),a},f.prototype.wrapResult=function(e){var a=this._reporterState;return a.options.partial?{result:this.isError(e)?null:e,errors:a.errors}:e},c(d,Error),d.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,d),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},74598:(e,a,t)=>{var c=t(22153);a.tagClass={0:"universal",1:"application",2:"context",3:"private"},a.tagClassByName=c._reverse(a.tagClass),a.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},a.tagByName=c._reverse(a.tag)},22153:(e,a,t)=>{var c=a;c._reverse=function(e){var a={};return Object.keys(e).forEach((function(t){(0|t)==t&&(t|=0);var c=e[t];a[c]=t})),a},c.der=t(74598)},62010:(e,a,t)=>{var c=t(56698),f=t(87568),d=f.base,r=f.bignum,n=f.constants.der;function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new b,this.tree._init(e.body)}function b(e){d.Node.call(this,"der",e)}function o(e,a){var t=e.readUInt8(a);if(e.isError(t))return t;var c=n.tagClass[t>>6],f=!(32&t);if(31&~t)t&=31;else{var d=t;for(t=0;!(128&~d);){if(d=e.readUInt8(a),e.isError(d))return d;t<<=7,t|=127&d}}return{cls:c,primitive:f,tag:t,tagStr:n.tag[t]}}function s(e,a,t){var c=e.readUInt8(t);if(e.isError(c))return c;if(!a&&128===c)return null;if(!(128&c))return c;var f=127&c;if(f>4)return e.error("length octect is too long");c=0;for(var d=0;d{var c=a;c.der=t(62010),c.pem=t(58903)},58903:(e,a,t)=>{var c=t(56698),f=t(48287).Buffer,d=t(62010);function r(e){d.call(this,e),this.enc="pem"}c(r,d),e.exports=r,r.prototype.decode=function(e,a){for(var t=e.toString().split(/[\r\n]+/g),c=a.label.toUpperCase(),r=/^-----(BEGIN|END) ([^-]+)-----$/,n=-1,i=-1,b=0;b{var c=t(56698),f=t(48287).Buffer,d=t(87568),r=d.base,n=d.constants.der;function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new b,this.tree._init(e.body)}function b(e){r.Node.call(this,"der",e)}function o(e){return e<10?"0"+e:e}e.exports=i,i.prototype.encode=function(e,a){return this.tree._encode(e,a).join()},c(b,r.Node),b.prototype._encodeComposite=function(e,a,t,c){var d,r=function(e,a,t,c){var f;if("seqof"===e?e="seq":"setof"===e&&(e="set"),n.tagByName.hasOwnProperty(e))f=n.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return c.error("Unknown tag: "+e);f=e}return f>=31?c.error("Multi-octet tag encoding unsupported"):(a||(f|=32),f|=n.tagClassByName[t||"universal"]<<6)}(e,a,t,this.reporter);if(c.length<128)return(d=new f(2))[0]=r,d[1]=c.length,this._createEncoderBuffer([d,c]);for(var i=1,b=c.length;b>=256;b>>=8)i++;(d=new f(2+i))[0]=r,d[1]=128|i,b=1+i;for(var o=c.length;o>0;b--,o>>=8)d[b]=255&o;return this._createEncoderBuffer([d,c])},b.prototype._encodeStr=function(e,a){if("bitstr"===a)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===a){for(var t=new f(2*e.length),c=0;c=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var d=0;for(c=0;c=128;r>>=7)d++}var n=new f(d),i=n.length-1;for(c=e.length-1;c>=0;c--)for(r=e[c],n[i--]=127&r;(r>>=7)>0;)n[i--]=128|127&r;return this._createEncoderBuffer(n)},b.prototype._encodeTime=function(e,a){var t,c=new Date(e);return"gentime"===a?t=[o(c.getFullYear()),o(c.getUTCMonth()+1),o(c.getUTCDate()),o(c.getUTCHours()),o(c.getUTCMinutes()),o(c.getUTCSeconds()),"Z"].join(""):"utctime"===a?t=[o(c.getFullYear()%100),o(c.getUTCMonth()+1),o(c.getUTCDate()),o(c.getUTCHours()),o(c.getUTCMinutes()),o(c.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+a+" time is not supported yet"),this._encodeStr(t,"octstr")},b.prototype._encodeNull=function(){return this._createEncoderBuffer("")},b.prototype._encodeInt=function(e,a){if("string"==typeof e){if(!a)return this.reporter.error("String int or enum given, but no values map");if(!a.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=a[e]}if("number"!=typeof e&&!f.isBuffer(e)){var t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=new f(t)}if(f.isBuffer(e)){var c=e.length;0===e.length&&c++;var d=new f(c);return e.copy(d),0===e.length&&(d[0]=0),this._createEncoderBuffer(d)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);c=1;for(var r=e;r>=256;r>>=8)c++;for(r=(d=new Array(c)).length-1;r>=0;r--)d[r]=255&e,e>>=8;return 128&d[0]&&d.unshift(0),this._createEncoderBuffer(new f(d))},b.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},b.prototype._use=function(e,a){return"function"==typeof e&&(e=e(a)),e._getEncoder("der").tree},b.prototype._skipDefault=function(e,a,t){var c,f=this._baseState;if(null===f.default)return!1;var d=e.join();if(void 0===f.defaultBuffer&&(f.defaultBuffer=this._encodeValue(f.default,a,t).join()),d.length!==f.defaultBuffer.length)return!1;for(c=0;c{var c=a;c.der=t(70082),c.pem=t(90735)},90735:(e,a,t)=>{var c=t(56698),f=t(70082);function d(e){f.call(this,e),this.enc="pem"}c(d,f),e.exports=d,d.prototype.encode=function(e,a){for(var t=f.prototype.encode.call(this,e).toString("base64"),c=["-----BEGIN "+a.label+"-----"],d=0;d=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},94148:(e,a,t)=>{"use strict";function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(e,a){for(var t=0;t1?t-1:0),f=1;f1?t-1:0),f=1;f1?t-1:0),f=1;f1?t-1:0),f=1;f{"use strict";function c(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);a&&(c=c.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var a=1;ae.length)&&(t=e.length),e.substring(t-a.length,t)===a}var x="",y="",A="",v="",w={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(e){var a=Object.keys(e),t=Object.create(Object.getPrototypeOf(e));return a.forEach((function(a){t[a]=e[a]})),Object.defineProperty(t,"message",{value:e.message}),t}function I(e){return p(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var E=function(e,a){!function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&l(e,a)}(E,e);var t,c,r,b,o=(t=E,c=s(),function(){var e,a=u(t);if(c){var f=u(this).constructor;e=Reflect.construct(a,arguments,f)}else e=a.apply(this,arguments);return n(this,e)});function E(e){var a;if(function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this,E),"object"!==h(e)||null===e)throw new g("options","Object",e);var t=e.message,c=e.operator,f=e.stackStartFn,d=e.actual,r=e.expected,b=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=t)a=o.call(this,String(t));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(x="",y="",v="",A=""):(x="",y="",v="",A="")),"object"===h(d)&&null!==d&&"object"===h(r)&&null!==r&&"stack"in d&&d instanceof Error&&"stack"in r&&r instanceof Error&&(d=_(d),r=_(r)),"deepStrictEqual"===c||"strictEqual"===c)a=o.call(this,function(e,a,t){var c="",f="",d=0,r="",n=!1,i=I(e),b=i.split("\n"),o=I(a).split("\n"),s=0,l="";if("strictEqual"===t&&"object"===h(e)&&"object"===h(a)&&null!==e&&null!==a&&(t="strictEqualObject"),1===b.length&&1===o.length&&b[0]!==o[0]){var u=b[0].length+o[0].length;if(u<=10){if(!("object"===h(e)&&null!==e||"object"===h(a)&&null!==a||0===e&&0===a))return"".concat(w[t],"\n\n")+"".concat(b[0]," !== ").concat(o[0],"\n")}else if("strictEqualObject"!==t&&u<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;b[0][s]===o[0][s];)s++;s>2&&(l="\n ".concat(function(e,a){if(a=Math.floor(a),0==e.length||0==a)return"";var t=e.length*a;for(a=Math.floor(Math.log(a)/Math.log(2));a;)e+=e,a--;return e+e.substring(0,t-e.length)}(" ",s),"^"),s=0)}}for(var p=b[b.length-1],g=o[o.length-1];p===g&&(s++<2?r="\n ".concat(p).concat(r):c=p,b.pop(),o.pop(),0!==b.length&&0!==o.length);)p=b[b.length-1],g=o[o.length-1];var _=Math.max(b.length,o.length);if(0===_){var E=i.split("\n");if(E.length>30)for(E[26]="".concat(x,"...").concat(v);E.length>27;)E.pop();return"".concat(w.notIdentical,"\n\n").concat(E.join("\n"),"\n")}s>3&&(r="\n".concat(x,"...").concat(v).concat(r),n=!0),""!==c&&(r="\n ".concat(c).concat(r),c="");var C=0,M=w[t]+"\n".concat(y,"+ actual").concat(v," ").concat(A,"- expected").concat(v),B=" ".concat(x,"...").concat(v," Lines skipped");for(s=0;s<_;s++){var L=s-d;if(b.length1&&s>2&&(L>4?(f+="\n".concat(x,"...").concat(v),n=!0):L>3&&(f+="\n ".concat(o[s-2]),C++),f+="\n ".concat(o[s-1]),C++),d=s,c+="\n".concat(A,"-").concat(v," ").concat(o[s]),C++;else if(o.length1&&s>2&&(L>4?(f+="\n".concat(x,"...").concat(v),n=!0):L>3&&(f+="\n ".concat(b[s-2]),C++),f+="\n ".concat(b[s-1]),C++),d=s,f+="\n".concat(y,"+").concat(v," ").concat(b[s]),C++;else{var S=o[s],k=b[s],N=k!==S&&(!m(k,",")||k.slice(0,-1)!==S);N&&m(S,",")&&S.slice(0,-1)===k&&(N=!1,k+=","),N?(L>1&&s>2&&(L>4?(f+="\n".concat(x,"...").concat(v),n=!0):L>3&&(f+="\n ".concat(b[s-2]),C++),f+="\n ".concat(b[s-1]),C++),d=s,f+="\n".concat(y,"+").concat(v," ").concat(k),c+="\n".concat(A,"-").concat(v," ").concat(S),C+=2):(f+=c,c="",1!==L&&0!==s||(f+="\n ".concat(k),C++))}if(C>20&&s<_-2)return"".concat(M).concat(B,"\n").concat(f,"\n").concat(x,"...").concat(v).concat(c,"\n")+"".concat(x,"...").concat(v)}return"".concat(M).concat(n?B:"","\n").concat(f).concat(c).concat(r).concat(l)}(d,r,c));else if("notDeepStrictEqual"===c||"notStrictEqual"===c){var s=w[c],l=I(d).split("\n");if("notStrictEqual"===c&&"object"===h(d)&&null!==d&&(s=w.notStrictEqualObject),l.length>30)for(l[26]="".concat(x,"...").concat(v);l.length>27;)l.pop();a=1===l.length?o.call(this,"".concat(s," ").concat(l[0])):o.call(this,"".concat(s,"\n\n").concat(l.join("\n"),"\n"))}else{var u=I(d),p="",C=w[c];"notDeepEqual"===c||"notEqual"===c?(u="".concat(w[c],"\n\n").concat(u)).length>1024&&(u="".concat(u.slice(0,1021),"...")):(p="".concat(I(r)),u.length>512&&(u="".concat(u.slice(0,509),"...")),p.length>512&&(p="".concat(p.slice(0,509),"...")),"deepEqual"===c||"equal"===c?u="".concat(C,"\n\n").concat(u,"\n\nshould equal\n\n"):p=" ".concat(c," ").concat(p)),a=o.call(this,"".concat(u).concat(p))}return Error.stackTraceLimit=b,a.generatedMessage=!t,Object.defineProperty(i(a),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),a.code="ERR_ASSERTION",a.actual=d,a.expected=r,a.operator=c,Error.captureStackTrace&&Error.captureStackTrace(i(a),f),a.stack,a.name="AssertionError",n(a)}return r=E,(b=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:a,value:function(e,a){return p(this,f(f({},a),{},{customInspect:!1,depth:0}))}}])&&d(r.prototype,b),Object.defineProperty(r,"prototype",{writable:!1}),E}(b(Error),p.custom);e.exports=E},69597:(e,a,t)=>{"use strict";function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(e,a){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,a){return e.__proto__=a,e},f(e,a)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var r,n,i={};function b(e,a,t){t||(t=Error);var r=function(t){!function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&f(e,a)}(o,t);var r,n,i,b=(n=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=d(n);if(i){var t=d(this).constructor;e=Reflect.construct(a,arguments,t)}else e=a.apply(this,arguments);return function(e,a){if(a&&("object"===c(a)||"function"==typeof a))return a;if(void 0!==a)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function o(t,c,f){var d;return function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this,o),d=b.call(this,function(e,t,c){return"string"==typeof a?a:a(e,t,c)}(t,c,f)),d.code=e,d}return r=o,Object.defineProperty(r,"prototype",{writable:!1}),r}(t);i[e]=r}function o(e,a){if(Array.isArray(e)){var t=e.length;return e=e.map((function(e){return String(e)})),t>2?"one of ".concat(a," ").concat(e.slice(0,t-1).join(", "),", or ")+e[t-1]:2===t?"one of ".concat(a," ").concat(e[0]," or ").concat(e[1]):"of ".concat(a," ").concat(e[0])}return"of ".concat(a," ").concat(String(e))}b("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),b("ERR_INVALID_ARG_TYPE",(function(e,a,f){var d,n,i,b,s;if(void 0===r&&(r=t(94148)),r("string"==typeof e,"'name' must be a string"),"string"==typeof a&&(n="not ",a.substr(0,4)===n)?(d="must not be",a=a.replace(/^not /,"")):d="must be",function(e,a,t){return(void 0===t||t>e.length)&&(t=e.length),e.substring(t-9,t)===a}(e," argument"))i="The ".concat(e," ").concat(d," ").concat(o(a,"type"));else{var l=("number"!=typeof s&&(s=0),s+1>(b=e).length||-1===b.indexOf(".",s)?"argument":"property");i='The "'.concat(e,'" ').concat(l," ").concat(d," ").concat(o(a,"type"))}return i+". Received type ".concat(c(f))}),TypeError),b("ERR_INVALID_ARG_VALUE",(function(e,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===n&&(n=t(40537));var f=n.inspect(a);return f.length>128&&(f="".concat(f.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(c,". Received ").concat(f)}),TypeError,RangeError),b("ERR_INVALID_RETURN_VALUE",(function(e,a,t){var f;return f=t&&t.constructor&&t.constructor.name?"instance of ".concat(t.constructor.name):"type ".concat(c(t)),"Expected ".concat(e,' to be returned from the "').concat(a,'"')+" function but got ".concat(f,".")}),TypeError),b("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,a=new Array(e),c=0;c0,"At least one arg needs to be specified");var f="The ",d=a.length;switch(a=a.map((function(e){return'"'.concat(e,'"')})),d){case 1:f+="".concat(a[0]," argument");break;case 2:f+="".concat(a[0]," and ").concat(a[1]," arguments");break;default:f+=a.slice(0,d-1).join(", "),f+=", and ".concat(a[d-1]," arguments")}return"".concat(f," must be specified")}),TypeError),e.exports.codes=i},82299:(e,a,t)=>{"use strict";function c(e,a){return function(e){if(Array.isArray(e))return e}(e)||function(e,a){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var c,f,d,r,n=[],i=!0,b=!1;try{if(d=(t=t.call(e)).next,0===a){if(Object(t)!==t)return;i=!1}else for(;!(i=(c=d.call(t)).done)&&(n.push(c.value),n.length!==a);i=!0);}catch(e){b=!0,f=e}finally{try{if(!i&&null!=t.return&&(r=t.return(),Object(r)!==r))return}finally{if(b)throw f}}return n}}(e,a)||function(e,a){if(e){if("string"==typeof e)return f(e,a);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,a):void 0}}(e,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,a){(null==a||a>e.length)&&(a=e.length);for(var t=0,c=new Array(a);t10)return!0;for(var a=0;a57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function P(e){return Object.keys(e).filter(N).concat(o(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function R(e,a){if(e===a)return 0;for(var t=e.length,c=a.length,f=0,d=Math.min(t,c);f{const c=t(36209),f=t(10943),d=t(51847),r=t(86679),n=t(65435),i=255===new Uint8Array(Uint16Array.of(255).buffer)[0];function b(e){switch(e){case"ascii":return c;case"base64":return f;case"hex":return d;case"utf8":case"utf-8":case void 0:return r;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n;default:throw new Error(`Unknown encoding: ${e}`)}}function o(e){return e instanceof Uint8Array}function s(e,a,t){return"string"==typeof e?function(e,a){const t=b(a),c=new Uint8Array(t.byteLength(e));return t.write(c,e,0,c.byteLength),c}(e,a):Array.isArray(e)?function(e){const a=new Uint8Array(e.length);return a.set(e),a}(e):ArrayBuffer.isView(e)?function(e){const a=new Uint8Array(e.byteLength);return a.set(e),a}(e):function(e,a,t){return new Uint8Array(e,a,t)}(e,a,t)}function l(e,a,t,c,f){if(0===e.byteLength)return-1;if("string"==typeof t?(c=t,t=0):void 0===t?t=f?0:e.length-1:t<0&&(t+=e.byteLength),t>=e.byteLength){if(f)return-1;t=e.byteLength-1}else if(t<0){if(!f)return-1;t=0}if("string"==typeof a)a=s(a,c);else if("number"==typeof a)return a&=255,f?e.indexOf(a,t):e.lastIndexOf(a,t);if(0===a.byteLength)return-1;if(f){let c=-1;for(let f=t;fe.byteLength&&(t=e.byteLength-a.byteLength);for(let c=t;c>=0;c--){let t=!0;for(let f=0;ff)return 1}return e.byteLength>a.byteLength?1:e.byteLengthe+a.byteLength),0));const t=new Uint8Array(a);let c=0;for(const a of e){if(c+a.byteLength>t.byteLength){const e=a.subarray(0,t.byteLength-c);return t.set(e,c),t}t.set(a,c),c+=a.byteLength}return t},copy:function(e,a,t=0,c=0,f=e.byteLength){if(f>0&&f=e.byteLength)throw new RangeError("sourceStart is out of range");if(f<0)throw new RangeError("sourceEnd is out of range");t>=a.byteLength&&(t=a.byteLength),f>e.byteLength&&(f=e.byteLength),a.byteLength-t=f||c<=t?"":(t<0&&(t=0),c>f&&(c=f),(0!==t||c{function a(e){return e.length}e.exports={byteLength:a,toString:function(e){const a=e.byteLength;let t="";for(let c=0;c{const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256);for(let e=0;e<64;e++)t[a.charCodeAt(e)]=e;function c(e){let a=e.length;return 61===e.charCodeAt(a-1)&&a--,a>1&&61===e.charCodeAt(a-1)&&a--,3*a>>>2}t[45]=62,t[95]=63,e.exports={byteLength:c,toString:function(e){const t=e.byteLength;let c="";for(let f=0;f>2]+a[(3&e[f])<<4|e[f+1]>>4]+a[(15&e[f+1])<<2|e[f+2]>>6]+a[63&e[f+2]];return t%3==2?c=c.substring(0,c.length-1)+"=":t%3==1&&(c=c.substring(0,c.length-2)+"=="),c},write:function(e,a,f=0,d=c(a)){const r=Math.min(d,e.byteLength-f);for(let c=0,f=0;f>4,e[f++]=(15&r)<<4|n>>2,e[f++]=(3&n)<<6|63&i}return r}}},51847:e=>{function a(e){return e.length>>>1}function t(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:void 0}e.exports={byteLength:a,toString:function(e){const a=e.byteLength;e=new DataView(e.buffer,e.byteOffset,a);let t="",c=0;for(let f=a-a%4;c{function a(e){return 2*e.length}e.exports={byteLength:a,toString:function(e){const a=e.byteLength;let t="";for(let c=0;c>8,r=f%256;e[c+2*a]=r,e[c+2*a+1]=d}return d}}},86679:e=>{function a(e){let a=0;for(let t=0,c=e.length;t=55296&&f<=56319&&t+1=56320&&c<=57343){a+=4,t++;continue}}a+=f<=127?1:f<=2047?2:3}return a}let t,c;if("undefined"!=typeof TextDecoder){const e=new TextDecoder;t=function(a){return e.decode(a)}}else t=function(e){const a=e.byteLength;let t="",c=0;for(;c0){let a=0;for(;a>c,c-=6;c>=0;)e[n++]=128|a>>c&63,c-=6;r+=a>=65536?2:1}return d};e.exports={byteLength:a,toString:t,write:c}},67526:(e,a)=>{"use strict";a.byteLength=function(e){var a=n(e),t=a[0],c=a[1];return 3*(t+c)/4-c},a.toByteArray=function(e){var a,t,d=n(e),r=d[0],i=d[1],b=new f(function(e,a,t){return 3*(a+t)/4-t}(0,r,i)),o=0,s=i>0?r-4:r;for(t=0;t>16&255,b[o++]=a>>8&255,b[o++]=255&a;return 2===i&&(a=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,b[o++]=255&a),1===i&&(a=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,b[o++]=a>>8&255,b[o++]=255&a),b},a.fromByteArray=function(e){for(var a,c=e.length,f=c%3,d=[],r=16383,n=0,b=c-f;nb?b:n+r));return 1===f?(a=e[c-1],d.push(t[a>>2]+t[a<<4&63]+"==")):2===f&&(a=(e[c-2]<<8)+e[c-1],d.push(t[a>>10]+t[a>>4&63]+t[a<<2&63]+"=")),d.join("")};for(var t=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0;r<64;++r)t[r]=d[r],c[d.charCodeAt(r)]=r;function n(e){var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=a),[t,t===a?0:4-t%4]}function i(e,a,c){for(var f,d,r=[],n=a;n>18&63]+t[d>>12&63]+t[d>>6&63]+t[63&d]);return r.join("")}c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},92096:(e,a,t)=>{var c;e=t.nmd(e);var f=function(e){"use strict";var a=1e7,t=9007199254740992,c=l(t),d="0123456789abcdefghijklmnopqrstuvwxyz",r="function"==typeof BigInt;function n(e,a,t,c){return void 0===e?n[0]:void 0===a||10==+a&&!t?Z(e):q(e,a,t,c)}function i(e,a){this.value=e,this.sign=a,this.isSmall=!1}function b(e){this.value=e,this.sign=e<0,this.isSmall=!0}function o(e){this.value=e}function s(e){return-t0?Math.floor(e):Math.ceil(e)}function m(e,t){var c,f,d=e.length,r=t.length,n=new Array(d),i=0,b=a;for(f=0;f=b?1:0,n[f]=c-i*b;for(;f0&&n.push(i),n}function x(e,a){return e.length>=a.length?m(e,a):m(a,e)}function y(e,t){var c,f,d=e.length,r=new Array(d),n=a;for(f=0;f0;)r[f++]=t%n,t=Math.floor(t/n);return r}function A(e,t){var c,f,d=e.length,r=t.length,n=new Array(d),i=0,b=a;for(c=0;c0;)r[f++]=i%n,i=Math.floor(i/n);return r}function I(e,a){for(var t=[];a-- >0;)t.push(0);return t.concat(e)}function E(e,a){var t=Math.max(e.length,a.length);if(t<=30)return w(e,a);t=Math.ceil(t/2);var c=e.slice(t),f=e.slice(0,t),d=a.slice(t),r=a.slice(0,t),n=E(f,r),i=E(c,d),b=E(x(f,c),x(r,d)),o=x(x(n,I(A(A(b,n),i),t)),I(i,2*t));return h(o),o}function C(e,t,c){return new i(e=0;--c)d=(r=d*b+e[c])-(f=g(r/t))*t,i[c]=0|f;return[i,0|d]}function L(e,t){var c,f=Z(t);if(r)return[new o(e.value/f.value),new o(e.value%f.value)];var d,s=e.value,m=f.value;if(0===m)throw new Error("Cannot divide by zero");if(e.isSmall)return f.isSmall?[new b(g(s/m)),new b(s%m)]:[n[0],e];if(f.isSmall){if(1===m)return[e,n[0]];if(-1==m)return[e.negate(),n[0]];var x=Math.abs(m);if(x=0;f--){for(c=l-1,x[f+s]!==g&&(c=Math.floor((x[f+s]*l+x[f+s-1])/g)),d=0,r=0,i=y.length,n=0;nb&&(d=(d+1)*l),c=Math.ceil(d/r);do{if(S(n=_(t,c),s)<=0)break;c--}while(c);o.push(c),s=A(s,n)}return o.reverse(),[u(o),u(s)]}(s,m),d=c[0];var w=e.sign!==f.sign,I=c[1],E=e.sign;return"number"==typeof d?(w&&(d=-d),d=new b(d)):d=new i(d,w),"number"==typeof I?(E&&(I=-I),I=new b(I)):I=new i(I,E),[d,I]}function S(e,a){if(e.length!==a.length)return e.length>a.length?1:-1;for(var t=e.length-1;t>=0;t--)if(e[t]!==a[t])return e[t]>a[t]?1:-1;return 0}function k(e){var a=e.abs();return!a.isUnit()&&(!!(a.equals(2)||a.equals(3)||a.equals(5))||!(a.isEven()||a.isDivisibleBy(3)||a.isDivisibleBy(5))&&(!!a.lesser(49)||void 0))}function N(e,a){for(var t,c,d,r=e.prev(),n=r,i=0;n.isEven();)n=n.divide(2),i++;e:for(c=0;c=0?c=A(e,a):(c=A(a,e),t=!t),"number"==typeof(c=u(c))?(t&&(c=-c),new b(c)):new i(c,t)}(t,c,this.sign)},i.prototype.minus=i.prototype.subtract,b.prototype.subtract=function(e){var a=Z(e),t=this.value;if(t<0!==a.sign)return this.add(a.negate());var c=a.value;return a.isSmall?new b(t-c):v(c,Math.abs(t),t>=0)},b.prototype.minus=b.prototype.subtract,o.prototype.subtract=function(e){return new o(this.value-Z(e).value)},o.prototype.minus=o.prototype.subtract,i.prototype.negate=function(){return new i(this.value,!this.sign)},b.prototype.negate=function(){var e=this.sign,a=new b(-this.value);return a.sign=!e,a},o.prototype.negate=function(){return new o(-this.value)},i.prototype.abs=function(){return new i(this.value,!1)},b.prototype.abs=function(){return new b(Math.abs(this.value))},o.prototype.abs=function(){return new o(this.value>=0?this.value:-this.value)},i.prototype.multiply=function(e){var t,c,f,d=Z(e),r=this.value,b=d.value,o=this.sign!==d.sign;if(d.isSmall){if(0===b)return n[0];if(1===b)return this;if(-1===b)return this.negate();if((t=Math.abs(b))0?E(r,b):w(r,b),o)},i.prototype.times=i.prototype.multiply,b.prototype._multiplyBySmall=function(e){return s(e.value*this.value)?new b(e.value*this.value):C(Math.abs(e.value),l(Math.abs(this.value)),this.sign!==e.sign)},i.prototype._multiplyBySmall=function(e){return 0===e.value?n[0]:1===e.value?this:-1===e.value?this.negate():C(Math.abs(e.value),this.value,this.sign!==e.sign)},b.prototype.multiply=function(e){return Z(e)._multiplyBySmall(this)},b.prototype.times=b.prototype.multiply,o.prototype.multiply=function(e){return new o(this.value*Z(e).value)},o.prototype.times=o.prototype.multiply,i.prototype.square=function(){return new i(M(this.value),!1)},b.prototype.square=function(){var e=this.value*this.value;return s(e)?new b(e):new i(M(l(Math.abs(this.value))),!1)},o.prototype.square=function(e){return new o(this.value*this.value)},i.prototype.divmod=function(e){var a=L(this,e);return{quotient:a[0],remainder:a[1]}},o.prototype.divmod=b.prototype.divmod=i.prototype.divmod,i.prototype.divide=function(e){return L(this,e)[0]},o.prototype.over=o.prototype.divide=function(e){return new o(this.value/Z(e).value)},b.prototype.over=b.prototype.divide=i.prototype.over=i.prototype.divide,i.prototype.mod=function(e){return L(this,e)[1]},o.prototype.mod=o.prototype.remainder=function(e){return new o(this.value%Z(e).value)},b.prototype.remainder=b.prototype.mod=i.prototype.remainder=i.prototype.mod,i.prototype.pow=function(e){var a,t,c,f=Z(e),d=this.value,r=f.value;if(0===r)return n[1];if(0===d)return n[0];if(1===d)return n[1];if(-1===d)return f.isEven()?n[1]:n[-1];if(f.sign)return n[0];if(!f.isSmall)throw new Error("The exponent "+f.toString()+" is too large.");if(this.isSmall&&s(a=Math.pow(d,r)))return new b(g(a));for(t=this,c=n[1];!0&r&&(c=c.times(t),--r),0!==r;)r/=2,t=t.square();return c},b.prototype.pow=i.prototype.pow,o.prototype.pow=function(e){var a=Z(e),t=this.value,c=a.value,f=BigInt(0),d=BigInt(1),r=BigInt(2);if(c===f)return n[1];if(t===f)return n[0];if(t===d)return n[1];if(t===BigInt(-1))return a.isEven()?n[1]:n[-1];if(a.isNegative())return new o(f);for(var i=this,b=n[1];(c&d)===d&&(b=b.times(i),--c),c!==f;)c/=r,i=i.square();return b},i.prototype.modPow=function(e,a){if(e=Z(e),(a=Z(a)).isZero())throw new Error("Cannot take modPow with modulus 0");var t=n[1],c=this.mod(a);for(e.isNegative()&&(e=e.multiply(n[-1]),c=c.modInv(a));e.isPositive();){if(c.isZero())return n[0];e.isOdd()&&(t=t.multiply(c).mod(a)),e=e.divide(2),c=c.square().mod(a)}return t},o.prototype.modPow=b.prototype.modPow=i.prototype.modPow,i.prototype.compareAbs=function(e){var a=Z(e),t=this.value,c=a.value;return a.isSmall?1:S(t,c)},b.prototype.compareAbs=function(e){var a=Z(e),t=Math.abs(this.value),c=a.value;return a.isSmall?t===(c=Math.abs(c))?0:t>c?1:-1:-1},o.prototype.compareAbs=function(e){var a=this.value,t=Z(e).value;return(a=a>=0?a:-a)===(t=t>=0?t:-t)?0:a>t?1:-1},i.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var a=Z(e),t=this.value,c=a.value;return this.sign!==a.sign?a.sign?1:-1:a.isSmall?this.sign?-1:1:S(t,c)*(this.sign?-1:1)},i.prototype.compareTo=i.prototype.compare,b.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var a=Z(e),t=this.value,c=a.value;return a.isSmall?t==c?0:t>c?1:-1:t<0!==a.sign?t<0?-1:1:t<0?1:-1},b.prototype.compareTo=b.prototype.compare,o.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var a=this.value,t=Z(e).value;return a===t?0:a>t?1:-1},o.prototype.compareTo=o.prototype.compare,i.prototype.equals=function(e){return 0===this.compare(e)},o.prototype.eq=o.prototype.equals=b.prototype.eq=b.prototype.equals=i.prototype.eq=i.prototype.equals,i.prototype.notEquals=function(e){return 0!==this.compare(e)},o.prototype.neq=o.prototype.notEquals=b.prototype.neq=b.prototype.notEquals=i.prototype.neq=i.prototype.notEquals,i.prototype.greater=function(e){return this.compare(e)>0},o.prototype.gt=o.prototype.greater=b.prototype.gt=b.prototype.greater=i.prototype.gt=i.prototype.greater,i.prototype.lesser=function(e){return this.compare(e)<0},o.prototype.lt=o.prototype.lesser=b.prototype.lt=b.prototype.lesser=i.prototype.lt=i.prototype.lesser,i.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},o.prototype.geq=o.prototype.greaterOrEquals=b.prototype.geq=b.prototype.greaterOrEquals=i.prototype.geq=i.prototype.greaterOrEquals,i.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},o.prototype.leq=o.prototype.lesserOrEquals=b.prototype.leq=b.prototype.lesserOrEquals=i.prototype.leq=i.prototype.lesserOrEquals,i.prototype.isEven=function(){return!(1&this.value[0])},b.prototype.isEven=function(){return!(1&this.value)},o.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},i.prototype.isOdd=function(){return!(1&~this.value[0])},b.prototype.isOdd=function(){return!(1&~this.value)},o.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},i.prototype.isPositive=function(){return!this.sign},b.prototype.isPositive=function(){return this.value>0},o.prototype.isPositive=b.prototype.isPositive,i.prototype.isNegative=function(){return this.sign},b.prototype.isNegative=function(){return this.value<0},o.prototype.isNegative=b.prototype.isNegative,i.prototype.isUnit=function(){return!1},b.prototype.isUnit=function(){return 1===Math.abs(this.value)},o.prototype.isUnit=function(){return this.abs().value===BigInt(1)},i.prototype.isZero=function(){return!1},b.prototype.isZero=function(){return 0===this.value},o.prototype.isZero=function(){return this.value===BigInt(0)},i.prototype.isDivisibleBy=function(e){var a=Z(e);return!a.isZero()&&(!!a.isUnit()||(0===a.compareAbs(2)?this.isEven():this.mod(a).isZero()))},o.prototype.isDivisibleBy=b.prototype.isDivisibleBy=i.prototype.isDivisibleBy,i.prototype.isPrime=function(a){var t=k(this);if(t!==e)return t;var c=this.abs(),d=c.bitLength();if(d<=64)return N(c,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var r=Math.log(2)*d.toJSNumber(),n=Math.ceil(!0===a?2*Math.pow(r,2):r),i=[],b=0;b-t?new b(e-1):new i(c,!0)},o.prototype.prev=function(){return new o(this.value-BigInt(1))};for(var P=[1];2*P[P.length-1]<=a;)P.push(2*P[P.length-1]);var R=P.length,O=P[R-1];function D(e){return Math.abs(e)<=a}function T(e,a,t){a=Z(a);for(var c=e.isNegative(),d=a.isNegative(),r=c?e.not():e,n=d?a.not():a,i=0,b=0,o=null,s=null,l=[];!r.isZero()||!n.isZero();)i=(o=L(r,O))[1].toJSNumber(),c&&(i=O-1-i),b=(s=L(n,O))[1].toJSNumber(),d&&(b=O-1-b),r=o[0],n=s[0],l.push(t(i,b));for(var u=0!==t(c?1:0,d?1:0)?f(-1):f(0),h=l.length-1;h>=0;h-=1)u=u.multiply(O).add(f(l[h]));return u}i.prototype.shiftLeft=function(e){var a=Z(e).toJSNumber();if(!D(a))throw new Error(String(a)+" is too large for shifting.");if(a<0)return this.shiftRight(-a);var t=this;if(t.isZero())return t;for(;a>=R;)t=t.multiply(O),a-=R-1;return t.multiply(P[a])},o.prototype.shiftLeft=b.prototype.shiftLeft=i.prototype.shiftLeft,i.prototype.shiftRight=function(e){var a,t=Z(e).toJSNumber();if(!D(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftLeft(-t);for(var c=this;t>=R;){if(c.isZero()||c.isNegative()&&c.isUnit())return c;c=(a=L(c,O))[1].isNegative()?a[0].prev():a[0],t-=R-1}return(a=L(c,P[t]))[1].isNegative()?a[0].prev():a[0]},o.prototype.shiftRight=b.prototype.shiftRight=i.prototype.shiftRight,i.prototype.not=function(){return this.negate().prev()},o.prototype.not=b.prototype.not=i.prototype.not,i.prototype.and=function(e){return T(this,e,(function(e,a){return e&a}))},o.prototype.and=b.prototype.and=i.prototype.and,i.prototype.or=function(e){return T(this,e,(function(e,a){return e|a}))},o.prototype.or=b.prototype.or=i.prototype.or,i.prototype.xor=function(e){return T(this,e,(function(e,a){return e^a}))},o.prototype.xor=b.prototype.xor=i.prototype.xor;var F=1<<30;function Q(e){var t=e.value,c="number"==typeof t?t|F:"bigint"==typeof t?t|BigInt(F):t[0]+t[1]*a|1073758208;return c&-c}function U(e,a){if(a.compareTo(e)<=0){var t=U(e,a.square(a)),c=t.p,d=t.e,r=c.multiply(a);return r.compareTo(e)<=0?{p:r,e:2*d+1}:{p:c,e:2*d}}return{p:f(1),e:0}}function j(e,a){return e=Z(e),a=Z(a),e.greater(a)?e:a}function H(e,a){return e=Z(e),a=Z(a),e.lesser(a)?e:a}function $(e,a){if(e=Z(e).abs(),a=Z(a).abs(),e.equals(a))return e;if(e.isZero())return a;if(a.isZero())return e;for(var t,c,f=n[1];e.isEven()&&a.isEven();)t=H(Q(e),Q(a)),e=e.divide(t),a=a.divide(t),f=f.multiply(t);for(;e.isEven();)e=e.divide(Q(e));do{for(;a.isEven();)a=a.divide(Q(a));e.greater(a)&&(c=a,a=e,e=c),a=a.subtract(e)}while(!a.isZero());return f.isUnit()?e:e.multiply(f)}i.prototype.bitLength=function(){var e=this;return e.compareTo(f(0))<0&&(e=e.negate().subtract(f(1))),0===e.compareTo(f(0))?f(0):f(U(e,f(2)).e).add(f(1))},o.prototype.bitLength=b.prototype.bitLength=i.prototype.bitLength;var q=function(e,a,t,c){t=t||d,e=String(e),c||(e=e.toLowerCase(),t=t.toLowerCase());var f,r=e.length,n=Math.abs(a),i={};for(f=0;f=n){if("1"===s&&1===n)continue;throw new Error(s+" is not a valid digit in base "+a+".")}a=Z(a);var b=[],o="-"===e[0];for(f=o?1:0;f"!==e[f]&&f=0;c--)f=f.add(e[c].times(d)),d=d.times(a);return t?f.negate():f}function z(e,a){if((a=f(a)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(a.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var t=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return t.unshift([1]),{value:[].concat.apply([],t),isNegative:!1}}var c=!1;if(e.isNegative()&&a.isPositive()&&(c=!0,e=e.abs()),a.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:c};for(var d,r=[],n=e;n.isNegative()||n.compareAbs(a)>=0;){d=n.divmod(a),n=d.quotient;var i=d.remainder;i.isNegative()&&(i=a.minus(i).abs(),n=n.next()),r.push(i.toJSNumber())}return r.push(n.toJSNumber()),{value:r.reverse(),isNegative:c}}function K(e,a,t){var c=z(e,a);return(c.isNegative?"-":"")+c.value.map((function(e){return function(e,a){return e<(a=a||d).length?a[e]:"<"+e+">"}(e,t)})).join("")}function V(e){if(s(+e)){var a=+e;if(a===g(a))return r?new o(BigInt(a)):new b(a);throw new Error("Invalid integer: "+e)}var t="-"===e[0];t&&(e=e.slice(1));var c=e.split(/e/i);if(c.length>2)throw new Error("Invalid integer: "+c.join("e"));if(2===c.length){var f=c[1];if("+"===f[0]&&(f=f.slice(1)),(f=+f)!==g(f)||!s(f))throw new Error("Invalid integer: "+f+" is not a valid exponent.");var d=c[0],n=d.indexOf(".");if(n>=0&&(f-=d.length-n-1,d=d.slice(0,n)+d.slice(n+1)),f<0)throw new Error("Cannot include negative exponent part for integers");e=d+=new Array(f+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(r)return new o(BigInt(t?"-"+e:e));for(var l=[],u=e.length,p=u-7;u>0;)l.push(+e.slice(p,u)),(p-=7)<0&&(p=0),u-=7;return h(l),new i(l,t)}function Z(e){return"number"==typeof e?function(e){if(r)return new o(BigInt(e));if(s(e)){if(e!==g(e))throw new Error(e+" is not an integer.");return new b(e)}return V(e.toString())}(e):"string"==typeof e?V(e):"bigint"==typeof e?new o(e):e}i.prototype.toArray=function(e){return z(this,e)},b.prototype.toArray=function(e){return z(this,e)},o.prototype.toArray=function(e){return z(this,e)},i.prototype.toString=function(a,t){if(a===e&&(a=10),10!==a||t)return K(this,a,t);for(var c,f=this.value,d=f.length,r=String(f[--d]);--d>=0;)c=String(f[d]),r+="0000000".slice(c.length)+c;return(this.sign?"-":"")+r},b.prototype.toString=function(a,t){return a===e&&(a=10),10!=a||t?K(this,a,t):String(this.value)},o.prototype.toString=b.prototype.toString,o.prototype.toJSON=i.prototype.toJSON=b.prototype.toJSON=function(){return this.toString()},i.prototype.valueOf=function(){return parseInt(this.toString(),10)},i.prototype.toJSNumber=i.prototype.valueOf,b.prototype.valueOf=function(){return this.value},b.prototype.toJSNumber=b.prototype.valueOf,o.prototype.valueOf=o.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var J=0;J<1e3;J++)n[J]=Z(J),J>0&&(n[-J]=Z(-J));return n.one=n[1],n.zero=n[0],n.minusOne=n[-1],n.max=j,n.min=H,n.gcd=$,n.lcm=function(e,a){return e=Z(e).abs(),a=Z(a).abs(),e.divide($(e,a)).multiply(a)},n.isInstance=function(e){return e instanceof i||e instanceof b||e instanceof o},n.randBetween=function(e,t,c){e=Z(e),t=Z(t);var f=c||Math.random,d=H(e,t),r=j(e,t).subtract(d).add(1);if(r.isSmall)return d.add(Math.floor(f()*r));for(var i=z(r,a).value,b=[],o=!0,s=0;s{e.exports=t(85702)(t(86989))},4315:(e,a,t)=>{var c=t(48287).Buffer;const f=t(28399).Transform;e.exports=class extends f{constructor(e,a){super(a),this._engine=e,this._finalized=!1}_transform(e,a,t){let c=null;try{this.update(e,a)}catch(e){c=e}t(c)}_flush(e){let a=null;try{this.push(this.digest())}catch(e){a=e}e(a)}update(e,a){if(!c.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return c.isBuffer(e)||(e=c.from(e,a)),this._engine.update(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;let a=this._engine.digest();return void 0!==e&&(a=a.toString(e)),a}}},85702:(e,a,t)=>{const c=t(4315);e.exports=e=>(a,t)=>{const f=(a=>{switch("string"==typeof a?a.toLowerCase():a){case"blake224":return e.Blake224;case"blake256":return e.Blake256;case"blake384":return e.Blake384;case"blake512":return e.Blake512;default:throw new Error("Invald algorithm: "+a)}})(a);return new c(new f,t)}},34588:(e,a,t)=>{var c=t(48287).Buffer;class f{_lengthCarry(e){for(let a=0;a=a.length;){for(let c=this._blockOffset;c{var c=t(48287).Buffer;const f=t(23287),d=c.from([0]),r=c.from([128]);e.exports=class extends f{constructor(){super(),this._h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],this._zo=d,this._oo=r}digest(){this._padding();const e=c.alloc(28);for(let a=0;a<7;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},23287:(e,a,t)=>{var c=t(48287).Buffer;const f=t(34588),d=c.from([1]),r=c.from([129]),n=(e,a)=>(e<<32-a|e>>>a)>>>0;function i(e,a,t,c,d,r,i,b){const o=f.sigma,s=f.u256;e[c]=e[c]+((a[o[t][b]]^s[o[t][b+1]])>>>0)+e[d]>>>0,e[i]=n(e[i]^e[c],16),e[r]=e[r]+e[i]>>>0,e[d]=n(e[d]^e[r],12),e[c]=e[c]+((a[o[t][b+1]]^s[o[t][b]])>>>0)+e[d]>>>0,e[i]=n(e[i]^e[c],8),e[r]=e[r]+e[i]>>>0,e[d]=n(e[d]^e[r],7)}e.exports=class extends f{constructor(){super(),this._h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this._s=[0,0,0,0],this._block=c.alloc(64),this._blockOffset=0,this._length=[0,0],this._nullt=!1,this._zo=d,this._oo=r}_compress(){const e=f.u256,a=new Array(16),t=new Array(16);let c;for(c=0;c<16;++c)t[c]=this._block.readUInt32BE(4*c);for(c=0;c<8;++c)a[c]=this._h[c]>>>0;for(c=8;c<12;++c)a[c]=(this._s[c-8]^e[c-8])>>>0;for(c=12;c<16;++c)a[c]=e[c-8];for(this._nullt||(a[12]=(a[12]^this._length[0])>>>0,a[13]=(a[13]^this._length[0])>>>0,a[14]=(a[14]^this._length[1])>>>0,a[15]=(a[15]^this._length[1])>>>0),c=0;c<14;++c)i(a,t,c,0,4,8,12,0),i(a,t,c,1,5,9,13,2),i(a,t,c,2,6,10,14,4),i(a,t,c,3,7,11,15,6),i(a,t,c,0,5,10,15,8),i(a,t,c,1,6,11,12,10),i(a,t,c,2,7,8,13,12),i(a,t,c,3,4,9,14,14);for(c=0;c<16;++c)this._h[c%8]=(this._h[c%8]^a[c])>>>0;for(c=0;c<8;++c)this._h[c]=(this._h[c]^this._s[c%4])>>>0}_padding(){let e=this._length[0]+8*this._blockOffset,a=this._length[1];e>=4294967296&&(e-=4294967296,a+=1);const t=c.alloc(8);t.writeUInt32BE(a,0),t.writeUInt32BE(e,4),55===this._blockOffset?(this._length[0]-=8,this.update(this._oo)):(this._blockOffset<55?(0===this._blockOffset&&(this._nullt=!0),this._length[0]-=8*(55-this._blockOffset),this.update(f.padding.slice(0,55-this._blockOffset))):(this._length[0]-=8*(64-this._blockOffset),this.update(f.padding.slice(0,64-this._blockOffset)),this._length[0]-=440,this.update(f.padding.slice(1,56)),this._nullt=!0),this.update(this._zo),this._length[0]-=8),this._length[0]-=64,this.update(t)}digest(){this._padding();const e=c.alloc(32);for(let a=0;a<8;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},399:(e,a,t)=>{var c=t(48287).Buffer;const f=t(61070),d=c.from([0]),r=c.from([128]);e.exports=class extends f{constructor(){super(),this._h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428],this._zo=d,this._oo=r}digest(){this._padding();const e=c.alloc(48);for(let a=0;a<12;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},61070:(e,a,t)=>{var c=t(48287).Buffer;const f=t(34588),d=c.from([1]),r=c.from([129]);function n(e,a,t,c){let f=e[2*a]^e[2*t],d=e[2*a+1]^e[2*t+1];c>=32&&(d^=f,f^=d,d^=f,c-=32),0===c?(e[2*a]=f>>>0,e[2*a+1]=d>>>0):(e[2*a]=(f>>>c|d<<32-c)>>>0,e[2*a+1]=(d>>>c|f<<32-c)>>>0)}function i(e,a,t,c,d,r,i,b){const o=f.sigma,s=f.u512;let l;l=e[2*c+1]+((a[2*o[t][b]+1]^s[2*o[t][b+1]+1])>>>0)+e[2*d+1],e[2*c]=e[2*c]+((a[2*o[t][b]]^s[2*o[t][b+1]])>>>0)+e[2*d]+~~(l/4294967296)>>>0,e[2*c+1]=l>>>0,n(e,i,c,32),l=e[2*r+1]+e[2*i+1],e[2*r]=e[2*r]+e[2*i]+~~(l/4294967296)>>>0,e[2*r+1]=l>>>0,n(e,d,r,25),l=e[2*c+1]+((a[2*o[t][b+1]+1]^s[2*o[t][b]+1])>>>0)+e[2*d+1],e[2*c]=e[2*c]+((a[2*o[t][b+1]]^s[2*o[t][b]])>>>0)+e[2*d]+~~(l/4294967296)>>>0,e[2*c+1]=l>>>0,n(e,i,c,16),l=e[2*r+1]+e[2*i+1],e[2*r]=e[2*r]+e[2*i]+~~(l/4294967296)>>>0,e[2*r+1]=l>>>0,n(e,d,r,11)}e.exports=class extends f{constructor(){super(),this._h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this._s=[0,0,0,0,0,0,0,0],this._block=c.alloc(128),this._blockOffset=0,this._length=[0,0,0,0],this._nullt=!1,this._zo=d,this._oo=r}_compress(){const e=f.u512,a=new Array(32),t=new Array(32);let c;for(c=0;c<32;++c)t[c]=this._block.readUInt32BE(4*c);for(c=0;c<16;++c)a[c]=this._h[c]>>>0;for(c=16;c<24;++c)a[c]=(this._s[c-16]^e[c-16])>>>0;for(c=24;c<32;++c)a[c]=e[c-16];for(this._nullt||(a[24]=(a[24]^this._length[1])>>>0,a[25]=(a[25]^this._length[0])>>>0,a[26]=(a[26]^this._length[1])>>>0,a[27]=(a[27]^this._length[0])>>>0,a[28]=(a[28]^this._length[3])>>>0,a[29]=(a[29]^this._length[2])>>>0,a[30]=(a[30]^this._length[3])>>>0,a[31]=(a[31]^this._length[2])>>>0),c=0;c<16;++c)i(a,t,c,0,4,8,12,0),i(a,t,c,1,5,9,13,2),i(a,t,c,2,6,10,14,4),i(a,t,c,3,7,11,15,6),i(a,t,c,0,5,10,15,8),i(a,t,c,1,6,11,12,10),i(a,t,c,2,7,8,13,12),i(a,t,c,3,4,9,14,14);for(c=0;c<16;++c)this._h[c%8*2]=(this._h[c%8*2]^a[2*c])>>>0,this._h[c%8*2+1]=(this._h[c%8*2+1]^a[2*c+1])>>>0;for(c=0;c<8;++c)this._h[2*c]=(this._h[2*c]^this._s[c%4*2])>>>0,this._h[2*c+1]=(this._h[2*c+1]^this._s[c%4*2+1])>>>0}_padding(){const e=this._length.slice();e[0]+=8*this._blockOffset,this._lengthCarry(e);const a=c.alloc(16);for(let t=0;t<4;++t)a.writeUInt32BE(e[3-t],4*t);111===this._blockOffset?(this._length[0]-=8,this.update(this._oo)):(this._blockOffset<111?(0===this._blockOffset&&(this._nullt=!0),this._length[0]-=8*(111-this._blockOffset),this.update(f.padding.slice(0,111-this._blockOffset))):(this._length[0]-=8*(128-this._blockOffset),this.update(f.padding.slice(0,128-this._blockOffset)),this._length[0]-=888,this.update(f.padding.slice(1,112)),this._nullt=!0),this.update(this._zo),this._length[0]-=8),this._length[0]-=128,this.update(a)}digest(){this._padding();const e=c.alloc(64);for(let a=0;a<16;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},86989:(e,a,t)=>{e.exports={Blake224:t(48746),Blake256:t(23287),Blake384:t(399),Blake512:t(61070)}},91892:e=>{var a,t,c=(()=>{for(var e=new Uint8Array(128),a=0;a<64;a++)e[a<26?a+65:a<52?a+71:a<62?a-4:4*a-205]=a;return a=>{for(var t=a.length,c=new Uint8Array(3*(t-("="==a[t-1])-("="==a[t-2]))/4|0),f=0,d=0;f>4,c[d++]=n<<4|i>>2,c[d++]=i<<6|b}return c}})(),f=(a={"wasm-binary:./blake2b.wat"(e,a){a.exports=c("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMKvz8EwAIAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAQgA3AzggAEIANwNAIABCADcDSCAAQgA3A1AgAEIANwNYIABCADcDYCAAQgA3A2ggAEIANwNwIABCADcDeCAAQoiS853/zPmE6gBBACkDAIU3A4ABIABCu86qptjQ67O7f0EIKQMAhTcDiAEgAEKr8NP0r+68tzxBECkDAIU3A5ABIABC8e30+KWn/aelf0EYKQMAhTcDmAEgAELRhZrv+s+Uh9EAQSApAwCFNwOgASAAQp/Y+dnCkdqCm39BKCkDAIU3A6gBIABC6/qG2r+19sEfQTApAwCFNwOwASAAQvnC+JuRo7Pw2wBBOCkDAIU3A7gBIABCADcDwAEgAEIANwPIASAAQgA3A9ABC20BA38gAEHAAWohAyAAQcgBaiEEIAQpAwCnIQUCQANAIAEgAkYNASAFQYABRgRAIAMgAykDACAFrXw3AwBBACEFIAAQAwsgACAFaiABLQAAOgAAIAVBAWohBSABQQFqIQEMAAsLIAQgBa03AwALYQEDfyAAQcABaiEBIABByAFqIQIgASABKQMAIAIpAwB8NwMAIABCfzcD0AEgAikDAKchAwJAA0AgA0GAAUYNASAAIANqQQA6AAAgA0EBaiEDDAALCyACIAOtNwMAIAAQAwuqOwIgfgl/IABBgAFqISEgAEGIAWohIiAAQZABaiEjIABBmAFqISQgAEGgAWohJSAAQagBaiEmIABBsAFqIScgAEG4AWohKCAhKQMAIQEgIikDACECICMpAwAhAyAkKQMAIQQgJSkDACEFICYpAwAhBiAnKQMAIQcgKCkDACEIQoiS853/zPmE6gAhCUK7zqqm2NDrs7t/IQpCq/DT9K/uvLc8IQtC8e30+KWn/aelfyEMQtGFmu/6z5SH0QAhDUKf2PnZwpHagpt/IQ5C6/qG2r+19sEfIQ9C+cL4m5Gjs/DbACEQIAApAwAhESAAKQMIIRIgACkDECETIAApAxghFCAAKQMgIRUgACkDKCEWIAApAzAhFyAAKQM4IRggACkDQCEZIAApA0ghGiAAKQNQIRsgACkDWCEcIAApA2AhHSAAKQNoIR4gACkDcCEfIAApA3ghICANIAApA8ABhSENIA8gACkD0AGFIQ8gASAFIBF8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSASfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgE3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBR8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAVfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBd8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAYfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgGXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBp8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAbfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgHHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIB18fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAefHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgH3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFICB8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAffHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgG3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBV8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAZfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHICB8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAefHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggF3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBJ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAdfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgEXx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBN8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAcfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGHx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBZ8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAUfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHHx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBl8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAdfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgEXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBZ8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByATfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggIHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIB58fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAbfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgH3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBR8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAXfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBJ8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAafHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFXx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBh8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAafHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFHx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBJ8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAefHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHXx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBx8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAffHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgE3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBd8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAWfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgG3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBV8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCARfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgIHx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBl8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAafHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEXx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBZ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAYfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgE3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBV8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAbfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggIHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIB98fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiASfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgHHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB18fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAXfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBR8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAefHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgE3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIB18fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAXfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgG3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBF8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAcfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggGXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBR8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAVfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBh8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAWfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggIHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB98fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSASfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgGnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB18fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAWfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgEnx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGICB8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAffHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBV8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAbfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBh8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAXfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBp8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCATfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGXx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBx8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAefHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgHHx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBh8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAffHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBJ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAUfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBZ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiARfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgIHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBV8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAZfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggF3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBN8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAbfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgF3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFICB8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAffHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGnx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBx8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAUfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggEXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBl8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAdfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgE3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIB58fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAYfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggEnx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBV8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAbfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBt8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSATfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgGXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBV8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAYfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgF3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBJ8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAWfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgIHx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBx8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAafHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgH3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBR8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAdfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgHnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBF8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgISAhKQMAIAEgCYWFNwMAICIgIikDACACIAqFhTcDACAjICMpAwAgAyALhYU3AwAgJCAkKQMAIAQgDIWFNwMAICUgJSkDACAFIA2FhTcDACAmICYpAwAgBiAOhYU3AwAgJyAnKQMAIAcgD4WFNwMAICggKCkDACAIIBCFhTcDAAs=")}},function(){return t||(0,a[Object.keys(a)[0]])((t={exports:{}}).exports,t),t.exports})(),d=WebAssembly.compile(f);e.exports=async e=>(await WebAssembly.instantiate(await d,e)).exports},51685:(e,a,t)=>{var c=t(86889),f=t(35682),d=null,r="undefined"!=typeof WebAssembly&&t(91892)().then((e=>{d=e})),n=64,i=[];e.exports=p;var b=e.exports.BYTES_MIN=16,o=e.exports.BYTES_MAX=64,s=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),l=e.exports.KEYBYTES_MAX=64,u=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),h=e.exports.PERSONALBYTES=16;function p(e,a,t,f,r){if(!(this instanceof p))return new p(e,a,t,f,r);if(!d)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");e||(e=32),!0!==r&&(c(e>=b,"digestLength must be at least "+b+", was given "+e),c(e<=o,"digestLength must be at most "+o+", was given "+e),null!=a&&(c(a instanceof Uint8Array,"key must be Uint8Array or Buffer"),c(a.length>=s,"key must be at least "+s+", was given "+a.length),c(a.length<=l,"key must be at least "+l+", was given "+a.length)),null!=t&&(c(t instanceof Uint8Array,"salt must be Uint8Array or Buffer"),c(t.length===u,"salt must be exactly "+u+", was given "+t.length)),null!=f&&(c(f instanceof Uint8Array,"personal must be Uint8Array or Buffer"),c(f.length===h,"personal must be exactly "+h+", was given "+f.length))),i.length||(i.push(n),n+=216),this.digestLength=e,this.finalized=!1,this.pointer=i.pop(),this._memory=new Uint8Array(d.memory.buffer),this._memory.fill(0,0,64),this._memory[0]=this.digestLength,this._memory[1]=a?a.length:0,this._memory[2]=1,this._memory[3]=1,t&&this._memory.set(t,32),f&&this._memory.set(f,48),this.pointer+216>this._memory.length&&this._realloc(this.pointer+216),d.blake2b_init(this.pointer,this.digestLength),a&&(this.update(a),this._memory.fill(0,n,n+a.length),this._memory[this.pointer+200]=128)}function g(){}p.prototype._realloc=function(e){d.memory.grow(Math.max(0,Math.ceil(Math.abs(e-this._memory.length)/65536))),this._memory=new Uint8Array(d.memory.buffer)},p.prototype.update=function(e){return c(!1===this.finalized,"Hash instance finalized"),c(e instanceof Uint8Array,"input must be Uint8Array or Buffer"),n+e.length>this._memory.length&&this._realloc(n+e.length),this._memory.set(e,n),d.blake2b_update(this.pointer,n,n+e.length),this},p.prototype.digest=function(e){if(c(!1===this.finalized,"Hash instance finalized"),this.finalized=!0,i.push(this.pointer),d.blake2b_final(this.pointer),!e||"binary"===e)return this._memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if("string"==typeof e)return f.toString(this._memory,e,this.pointer+128,this.pointer+128+this.digestLength);c(e instanceof Uint8Array&&e.length>=this.digestLength,"input must be Uint8Array or Buffer");for(var a=0;ae()),e):e(new Error("WebAssembly not supported"))},p.prototype.ready=p.ready,p.prototype.getPartialHash=function(){return this._memory.slice(this.pointer,this.pointer+216)},p.prototype.setPartialHash=function(e){this._memory.set(e,this.pointer)}},72206:(e,a,t)=>{var c=t(86889),f=t(51685);function d(e,a,t){var c=e[a]+e[t],f=e[a+1]+e[t+1];c>=4294967296&&f++,e[a]=c,e[a+1]=f}function r(e,a,t,c){var f=e[a]+t;t<0&&(f+=4294967296);var d=e[a+1]+c;f>=4294967296&&d++,e[a]=f,e[a+1]=d}function n(e,a){return e[a]^e[a+1]<<8^e[a+2]<<16^e[a+3]<<24}function i(e,a,t,c,f,n){var i=l[f],b=l[f+1],o=l[n],u=l[n+1];d(s,e,a),r(s,e,i,b);var h=s[c]^s[e],p=s[c+1]^s[e+1];s[c]=p,s[c+1]=h,d(s,t,c),h=s[a]^s[t],p=s[a+1]^s[t+1],s[a]=h>>>24^p<<8,s[a+1]=p>>>24^h<<8,d(s,e,a),r(s,e,o,u),h=s[c]^s[e],p=s[c+1]^s[e+1],s[c]=h>>>16^p<<16,s[c+1]=p>>>16^h<<16,d(s,t,c),h=s[a]^s[t],p=s[a+1]^s[t+1],s[a]=p>>>31^h<<1,s[a+1]=h>>>31^p<<1}var b=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),o=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),s=new Uint32Array(32),l=new Uint32Array(32);function u(e,a){var t=0;for(t=0;t<16;t++)s[t]=e.h[t],s[t+16]=b[t];for(s[24]=s[24]^e.t,s[25]=s[25]^e.t/4294967296,a&&(s[28]=~s[28],s[29]=~s[29]),t=0;t<32;t++)l[t]=n(e.b,4*t);for(t=0;t<12;t++)i(0,8,16,24,o[16*t+0],o[16*t+1]),i(2,10,18,26,o[16*t+2],o[16*t+3]),i(4,12,20,28,o[16*t+4],o[16*t+5]),i(6,14,22,30,o[16*t+6],o[16*t+7]),i(0,10,20,30,o[16*t+8],o[16*t+9]),i(2,12,22,24,o[16*t+10],o[16*t+11]),i(4,14,16,26,o[16*t+12],o[16*t+13]),i(6,8,18,28,o[16*t+14],o[16*t+15]);for(t=0;t<16;t++)e.h[t]=e.h[t]^s[t]^s[t+16]}var h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function p(e,a,t,c){h.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=e,h[0]=e,a&&(h[1]=a.length),h[2]=1,h[3]=1,t&&h.set(t,32),c&&h.set(c,48);for(var f=0;f<16;f++)this.h[f]=b[f]^n(h,4*f);a&&(g(this,a),this.c=128)}function g(e,a){for(var t=0;t=this.outlen,"out must have at least outlen bytes of space"),function(e,a){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;u(e,!0);for(var t=0;t>2]>>8*(3&t)}(this,a),"hex"===e?function(e){for(var a="",t=0;t=x,"outlen must be at least "+x+", was given "+e),c(e<=y,"outlen must be at most "+y+", was given "+e),null!=a&&(c(a instanceof Uint8Array,"key must be Uint8Array or Buffer"),c(a.length>=A,"key must be at least "+A+", was given "+a.length),c(a.length<=v,"key must be at most "+v+", was given "+a.length)),null!=t&&(c(t instanceof Uint8Array,"salt must be Uint8Array or Buffer"),c(t.length===w,"salt must be exactly "+w+", was given "+t.length)),null!=f&&(c(f instanceof Uint8Array,"personal must be Uint8Array or Buffer"),c(f.length===_,"personal must be exactly "+_+", was given "+f.length))),new m(e,a,t,f)},e.exports.ready=function(e){f.ready((function(){e()}))},e.exports.WASM_SUPPORTED=f.SUPPORTED,e.exports.WASM_LOADED=!1;var x=e.exports.BYTES_MIN=16,y=e.exports.BYTES_MAX=64,A=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),v=e.exports.KEYBYTES_MAX=64,w=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),_=e.exports.PERSONALBYTES=16;f.ready((function(a){a||(e.exports.WASM_LOADED=!0,e.exports=f)}))},39404:function(e,a,t){!function(e,a){"use strict";function c(e,a){if(!e)throw new Error(a||"Assertion failed")}function f(e,a){e.super_=a;var t=function(){};t.prototype=a.prototype,e.prototype=new t,e.prototype.constructor=e}function d(e,a,t){if(d.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==a&&"be"!==a||(t=a,a=10),this._init(e||0,a||10,t||"be"))}var r;"object"==typeof e?e.exports=d:a.BN=d,d.BN=d,d.wordSize=26;try{r="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(47790).Buffer}catch(e){}function n(e,a){var t=e.charCodeAt(a);return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:void c(!1,"Invalid character in "+e)}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,f){for(var d=0,r=0,n=Math.min(e.length,t),i=a;i=49?b-49+10:b>=17?b-17+10:b,c(b>=0&&r0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this._strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this._strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{d.prototype[Symbol.for("nodejs.util.inspect.custom")]=s}catch(e){d.prototype.inspect=s}else d.prototype.inspect=s;function s(){return(this.red?""}var l=["","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"],u=[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],h=[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];function p(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t._strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215,(f+=2)>=26&&(f-=26,r--),t=0!==d||r!==this.length-1?l[6-i.length]+i+t:i+t}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=u[e],o=h[e];t="";var s=this.clone();for(s.negative=0;!s.isZero();){var p=s.modrn(o).toString(e);t=(s=s.idivn(o)).isZero()?p+t:l[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16,2)},r&&(d.prototype.toBuffer=function(e,a){return this.toArrayLike(r,e,a)}),d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){this._strip();var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0");var r=function(e,a){return e.allocUnsafe?e.allocUnsafe(a):new e(a)}(e,d);return this["_toArrayLike"+("le"===a?"LE":"BE")](r,f),r},d.prototype._toArrayLikeLE=function(e,a){for(var t=0,c=0,f=0,d=0;f>8&255),t>16&255),6===d?(t>24&255),c=0,d=0):(c=r>>>24,d+=2)}if(t=0&&(e[t--]=r>>8&255),t>=0&&(e[t--]=r>>16&255),6===d?(t>=0&&(e[t--]=r>>24&255),c=0,d=0):(c=r>>>24,d+=2)}if(t>=0)for(e[t--]=c;t>=0;)e[t--]=0},Math.clz32?d.prototype._countBits=function(e){return 32-Math.clz32(e)}:d.prototype._countBits=function(e){var a=e,t=0;return a>=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this._strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function m(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t._strip()}function x(e,a,t){return m(e,a,t)}function y(e,a){this.x=e,this.y=a}Math.imul||(g=p),d.prototype.mulTo=function(e,a){var t=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,a):t<63?p(this,e,a):t<1024?m(this,e,a):x(this,e,a)},y.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},y.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,t+=d/67108864|0,t+=r>>>26,this.words[f]=67108863&r}return 0!==t&&(this.words[f]=t,this.length++),a?this.ineg():this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f&1}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this._strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this._strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n._strip(),c._strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modrn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modrn=function(e){var a=e<0;a&&(e=-e),c(e<=67108863);for(var t=(1<<26)%e,f=0,d=this.length-1;d>=0;d--)f=(t*f+(0|this.words[d]))%e;return a?-f:f},d.prototype.modn=function(e){return this.modrn(e)},d.prototype.idivn=function(e){var a=e<0;a&&(e=-e),c(e<=67108863);for(var t=0,f=this.length-1;f>=0;f--){var d=(0|this.words[f])+67108864*t;this.words[f]=d/e|0,t=d%e}return this._strip(),a?this.ineg():this},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this._strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new C(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function v(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}v.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},v.prototype.split=function(e,a){e.iushrn(this.n,0,a)},v.prototype.imulK=function(e){return e.imul(this.k)},f(w,v),w.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(A[e])return A[e];var a;if("k256"===e)a=new w;else if("p224"===e)a=new _;else if("p192"===e)a=new I;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new E}return A[e]=a,a},C.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(o(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},C.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},C.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},C.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},C.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},C.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},C.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},C.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},C.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new M(e)},f(M,C),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},M.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},M.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},15037:(e,a,t)=>{var c;function f(e){this.rand=e}if(e.exports=function(e){return c||(c=new f(null)),c.generate(e)},e.exports.Rand=f,f.prototype.generate=function(e){return this._rand(e)},f.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var a=new Uint8Array(e),t=0;t{var c=t(92861).Buffer;function f(e){c.isBuffer(e)||(e=c.from(e));for(var a=e.length/4|0,t=new Array(a),f=0;f>>24]^o[h>>>16&255]^s[p>>>8&255]^l[255&g]^a[m++],r=b[h>>>24]^o[p>>>16&255]^s[g>>>8&255]^l[255&u]^a[m++],n=b[p>>>24]^o[g>>>16&255]^s[u>>>8&255]^l[255&h]^a[m++],i=b[g>>>24]^o[u>>>16&255]^s[h>>>8&255]^l[255&p]^a[m++],u=d,h=r,p=n,g=i;return d=(c[u>>>24]<<24|c[h>>>16&255]<<16|c[p>>>8&255]<<8|c[255&g])^a[m++],r=(c[h>>>24]<<24|c[p>>>16&255]<<16|c[g>>>8&255]<<8|c[255&u])^a[m++],n=(c[p>>>24]<<24|c[g>>>16&255]<<16|c[u>>>8&255]<<8|c[255&h])^a[m++],i=(c[g>>>24]<<24|c[u>>>16&255]<<16|c[h>>>8&255]<<8|c[255&p])^a[m++],[d>>>=0,r>>>=0,n>>>=0,i>>>=0]}var n=[0,1,2,4,8,16,32,64,128,27,54],i=function(){for(var e=new Array(256),a=0;a<256;a++)e[a]=a<128?a<<1:a<<1^283;for(var t=[],c=[],f=[[],[],[],[]],d=[[],[],[],[]],r=0,n=0,i=0;i<256;++i){var b=n^n<<1^n<<2^n<<3^n<<4;b=b>>>8^255&b^99,t[r]=b,c[b]=r;var o=e[r],s=e[o],l=e[s],u=257*e[b]^16843008*b;f[0][r]=u<<24|u>>>8,f[1][r]=u<<16|u>>>16,f[2][r]=u<<8|u>>>24,f[3][r]=u,u=16843009*l^65537*s^257*o^16843008*r,d[0][b]=u<<24|u>>>8,d[1][b]=u<<16|u>>>16,d[2][b]=u<<8|u>>>24,d[3][b]=u,0===r?r=n=1:(r=o^e[e[e[l^o]]],n^=e[e[n]])}return{SBOX:t,INV_SBOX:c,SUB_MIX:f,INV_SUB_MIX:d}}();function b(e){this._key=f(e),this._reset()}b.blockSize=16,b.keySize=32,b.prototype.blockSize=b.blockSize,b.prototype.keySize=b.keySize,b.prototype._reset=function(){for(var e=this._key,a=e.length,t=a+6,c=4*(t+1),f=[],d=0;d>>24,r=i.SBOX[r>>>24]<<24|i.SBOX[r>>>16&255]<<16|i.SBOX[r>>>8&255]<<8|i.SBOX[255&r],r^=n[d/a|0]<<24):a>6&&d%a==4&&(r=i.SBOX[r>>>24]<<24|i.SBOX[r>>>16&255]<<16|i.SBOX[r>>>8&255]<<8|i.SBOX[255&r]),f[d]=f[d-a]^r}for(var b=[],o=0;o>>24]]^i.INV_SUB_MIX[1][i.SBOX[l>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[l>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[255&l]]}this._nRounds=t,this._keySchedule=f,this._invKeySchedule=b},b.prototype.encryptBlockRaw=function(e){return r(e=f(e),this._keySchedule,i.SUB_MIX,i.SBOX,this._nRounds)},b.prototype.encryptBlock=function(e){var a=this.encryptBlockRaw(e),t=c.allocUnsafe(16);return t.writeUInt32BE(a[0],0),t.writeUInt32BE(a[1],4),t.writeUInt32BE(a[2],8),t.writeUInt32BE(a[3],12),t},b.prototype.decryptBlock=function(e){var a=(e=f(e))[1];e[1]=e[3],e[3]=a;var t=r(e,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX,this._nRounds),d=c.allocUnsafe(16);return d.writeUInt32BE(t[0],0),d.writeUInt32BE(t[3],4),d.writeUInt32BE(t[2],8),d.writeUInt32BE(t[1],12),d},b.prototype.scrub=function(){d(this._keySchedule),d(this._invKeySchedule),d(this._key)},e.exports.AES=b},92356:(e,a,t)=>{var c=t(50462),f=t(92861).Buffer,d=t(56168),r=t(56698),n=t(25892),i=t(30295),b=t(45122);function o(e,a,t,r){d.call(this);var i=f.alloc(4,0);this._cipher=new c.AES(a);var o=this._cipher.encryptBlock(i);this._ghash=new n(o),t=function(e,a,t){if(12===a.length)return e._finID=f.concat([a,f.from([0,0,0,1])]),f.concat([a,f.from([0,0,0,2])]);var c=new n(t),d=a.length,r=d%16;c.update(a),r&&(r=16-r,c.update(f.alloc(r,0))),c.update(f.alloc(8,0));var i=8*d,o=f.alloc(8);o.writeUIntBE(i,0,8),c.update(o),e._finID=c.state;var s=f.from(e._finID);return b(s),s}(this,t,o),this._prev=f.from(t),this._cache=f.allocUnsafe(0),this._secCache=f.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}r(o,d),o.prototype._update=function(e){if(!this._called&&this._alen){var a=16-this._alen%16;a<16&&(a=f.alloc(a,0),this._ghash.update(a))}this._called=!0;var t=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(t),this._len+=e.length,t},o.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=i(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,a){var t=0;e.length!==a.length&&t++;for(var c=Math.min(e.length,a.length),f=0;f{var c=t(25799),f=t(36171),d=t(3219);a.createCipher=a.Cipher=c.createCipher,a.createCipheriv=a.Cipheriv=c.createCipheriv,a.createDecipher=a.Decipher=f.createDecipher,a.createDecipheriv=a.Decipheriv=f.createDecipheriv,a.listCiphers=a.getCiphers=function(){return Object.keys(d)}},36171:(e,a,t)=>{var c=t(92356),f=t(92861).Buffer,d=t(530),r=t(50650),n=t(56168),i=t(50462),b=t(68078);function o(e,a,t){n.call(this),this._cache=new s,this._last=void 0,this._cipher=new i.AES(a),this._prev=f.from(t),this._mode=e,this._autopadding=!0}function s(){this.cache=f.allocUnsafe(0)}function l(e,a,t){var n=d[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=f.from(t)),"GCM"!==n.mode&&t.length!==n.iv)throw new TypeError("invalid iv length "+t.length);if("string"==typeof a&&(a=f.from(a)),a.length!==n.key/8)throw new TypeError("invalid key length "+a.length);return"stream"===n.type?new r(n.module,a,t,!0):"auth"===n.type?new c(n.module,a,t,!0):new o(n.module,a,t)}t(56698)(o,n),o.prototype._update=function(e){var a,t;this._cache.add(e);for(var c=[];a=this._cache.get(this._autopadding);)t=this._mode.decrypt(this,a),c.push(t);return f.concat(c)},o.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var a=e[15];if(a<1||a>16)throw new Error("unable to decrypt data");for(var t=-1;++t16)return a=this.cache.slice(0,16),this.cache=this.cache.slice(16),a}else if(this.cache.length>=16)return a=this.cache.slice(0,16),this.cache=this.cache.slice(16),a;return null},s.prototype.flush=function(){if(this.cache.length)return this.cache},a.createDecipher=function(e,a){var t=d[e.toLowerCase()];if(!t)throw new TypeError("invalid suite type");var c=b(a,!1,t.key,t.iv);return l(e,c.key,c.iv)},a.createDecipheriv=l},25799:(e,a,t)=>{var c=t(530),f=t(92356),d=t(92861).Buffer,r=t(50650),n=t(56168),i=t(50462),b=t(68078);function o(e,a,t){n.call(this),this._cache=new l,this._cipher=new i.AES(a),this._prev=d.from(t),this._mode=e,this._autopadding=!0}t(56698)(o,n),o.prototype._update=function(e){var a,t;this._cache.add(e);for(var c=[];a=this._cache.get();)t=this._mode.encrypt(this,a),c.push(t);return d.concat(c)};var s=d.alloc(16,16);function l(){this.cache=d.allocUnsafe(0)}function u(e,a,t){var n=c[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof a&&(a=d.from(a)),a.length!==n.key/8)throw new TypeError("invalid key length "+a.length);if("string"==typeof t&&(t=d.from(t)),"GCM"!==n.mode&&t.length!==n.iv)throw new TypeError("invalid iv length "+t.length);return"stream"===n.type?new r(n.module,a,t):"auth"===n.type?new f(n.module,a,t):new o(n.module,a,t)}o.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(s))throw this._cipher.scrub(),new Error("data not multiple of block length")},o.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=d.concat([this.cache,e])},l.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,a=d.allocUnsafe(e),t=-1;++t{var c=t(92861).Buffer,f=c.alloc(16,0);function d(e){var a=c.allocUnsafe(16);return a.writeUInt32BE(e[0]>>>0,0),a.writeUInt32BE(e[1]>>>0,4),a.writeUInt32BE(e[2]>>>0,8),a.writeUInt32BE(e[3]>>>0,12),a}function r(e){this.h=e,this.state=c.alloc(16,0),this.cache=c.allocUnsafe(0)}r.prototype.ghash=function(e){for(var a=-1;++a0;a--)c[a]=c[a]>>>1|(1&c[a-1])<<31;c[0]=c[0]>>>1,t&&(c[0]=c[0]^225<<24)}this.state=d(f)},r.prototype.update=function(e){var a;for(this.cache=c.concat([this.cache,e]);this.cache.length>=16;)a=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(a)},r.prototype.final=function(e,a){return this.cache.length&&this.ghash(c.concat([this.cache,f],16)),this.ghash(d([0,e,0,a])),this.state},e.exports=r},45122:e=>{e.exports=function(e){for(var a,t=e.length;t--;){if(255!==(a=e.readUInt8(t))){a++,e.writeUInt8(a,t);break}e.writeUInt8(0,t)}}},92884:(e,a,t)=>{var c=t(30295);a.encrypt=function(e,a){var t=c(a,e._prev);return e._prev=e._cipher.encryptBlock(t),e._prev},a.decrypt=function(e,a){var t=e._prev;e._prev=a;var f=e._cipher.decryptBlock(a);return c(f,t)}},46383:(e,a,t)=>{var c=t(92861).Buffer,f=t(30295);function d(e,a,t){var d=a.length,r=f(a,e._cache);return e._cache=e._cache.slice(d),e._prev=c.concat([e._prev,t?a:r]),r}a.encrypt=function(e,a,t){for(var f,r=c.allocUnsafe(0);a.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=c.allocUnsafe(0)),!(e._cache.length<=a.length)){r=c.concat([r,d(e,a,t)]);break}f=e._cache.length,r=c.concat([r,d(e,a.slice(0,f),t)]),a=a.slice(f)}return r}},55264:(e,a,t)=>{var c=t(92861).Buffer;function f(e,a,t){for(var c,f,r=-1,n=0;++r<8;)c=a&1<<7-r?128:0,n+=(128&(f=e._cipher.encryptBlock(e._prev)[0]^c))>>r%8,e._prev=d(e._prev,t?c:f);return n}function d(e,a){var t=e.length,f=-1,d=c.allocUnsafe(e.length);for(e=c.concat([e,c.from([a])]);++f>7;return d}a.encrypt=function(e,a,t){for(var d=a.length,r=c.allocUnsafe(d),n=-1;++n{var c=t(92861).Buffer;function f(e,a,t){var f=e._cipher.encryptBlock(e._prev)[0]^a;return e._prev=c.concat([e._prev.slice(1),c.from([t?a:f])]),f}a.encrypt=function(e,a,t){for(var d=a.length,r=c.allocUnsafe(d),n=-1;++n{var c=t(30295),f=t(92861).Buffer,d=t(45122);function r(e){var a=e._cipher.encryptBlockRaw(e._prev);return d(e._prev),a}a.encrypt=function(e,a){var t=Math.ceil(a.length/16),d=e._cache.length;e._cache=f.concat([e._cache,f.allocUnsafe(16*t)]);for(var n=0;n{a.encrypt=function(e,a){return e._cipher.encryptBlock(a)},a.decrypt=function(e,a){return e._cipher.decryptBlock(a)}},530:(e,a,t)=>{var c={ECB:t(52632),CBC:t(92884),CFB:t(46383),CFB8:t(86975),CFB1:t(55264),OFB:t(46843),CTR:t(63053),GCM:t(63053)},f=t(3219);for(var d in f)f[d].module=c[f[d].mode];e.exports=f},46843:(e,a,t)=>{var c=t(48287).Buffer,f=t(30295);function d(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}a.encrypt=function(e,a){for(;e._cache.length{var c=t(50462),f=t(92861).Buffer,d=t(56168);function r(e,a,t,r){d.call(this),this._cipher=new c.AES(a),this._prev=f.from(t),this._cache=f.allocUnsafe(0),this._secCache=f.allocUnsafe(0),this._decrypt=r,this._mode=e}t(56698)(r,d),r.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},r.prototype._final=function(){this._cipher.scrub()},e.exports=r},30125:(e,a,t)=>{var c=t(84050),f=t(1241),d=t(530),r=t(32438),n=t(68078);function i(e,a,t){if(e=e.toLowerCase(),d[e])return f.createCipheriv(e,a,t);if(r[e])return new c({key:a,iv:t,mode:e});throw new TypeError("invalid suite type")}function b(e,a,t){if(e=e.toLowerCase(),d[e])return f.createDecipheriv(e,a,t);if(r[e])return new c({key:a,iv:t,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}a.createCipher=a.Cipher=function(e,a){var t,c;if(e=e.toLowerCase(),d[e])t=d[e].key,c=d[e].iv;else{if(!r[e])throw new TypeError("invalid suite type");t=8*r[e].key,c=r[e].iv}var f=n(a,!1,t,c);return i(e,f.key,f.iv)},a.createCipheriv=a.Cipheriv=i,a.createDecipher=a.Decipher=function(e,a){var t,c;if(e=e.toLowerCase(),d[e])t=d[e].key,c=d[e].iv;else{if(!r[e])throw new TypeError("invalid suite type");t=8*r[e].key,c=r[e].iv}var f=n(a,!1,t,c);return b(e,f.key,f.iv)},a.createDecipheriv=a.Decipheriv=b,a.listCiphers=a.getCiphers=function(){return Object.keys(r).concat(f.getCiphers())}},84050:(e,a,t)=>{var c=t(56168),f=t(29560),d=t(56698),r=t(92861).Buffer,n={"des-ede3-cbc":f.CBC.instantiate(f.EDE),"des-ede3":f.EDE,"des-ede-cbc":f.CBC.instantiate(f.EDE),"des-ede":f.EDE,"des-cbc":f.CBC.instantiate(f.DES),"des-ecb":f.DES};function i(e){c.call(this);var a,t=e.mode.toLowerCase(),f=n[t];a=e.decrypt?"decrypt":"encrypt";var d=e.key;r.isBuffer(d)||(d=r.from(d)),"des-ede"!==t&&"des-ede-cbc"!==t||(d=r.concat([d,d.slice(0,8)]));var i=e.iv;r.isBuffer(i)||(i=r.from(i)),this._des=f.create({key:d,iv:i,type:a})}n.des=n["des-cbc"],n.des3=n["des-ede3-cbc"],e.exports=i,d(i,c),i.prototype._update=function(e){return r.from(this._des.update(e))},i.prototype._final=function(){return r.from(this._des.final())}},32438:(e,a)=>{a["des-ecb"]={key:8,iv:0},a["des-cbc"]=a.des={key:8,iv:8},a["des-ede3-cbc"]=a.des3={key:24,iv:8},a["des-ede3"]={key:24,iv:0},a["des-ede-cbc"]={key:16,iv:8},a["des-ede"]={key:16,iv:0}},67332:(e,a,t)=>{var c=t(48287).Buffer,f=t(39404),d=t(53209);function r(e){var a,t=e.modulus.byteLength();do{a=new f(d(t))}while(a.cmp(e.modulus)>=0||!a.umod(e.prime1)||!a.umod(e.prime2));return a}function n(e,a){var t=function(e){var a=r(e);return{blinder:a.toRed(f.mont(e.modulus)).redPow(new f(e.publicExponent)).fromRed(),unblinder:a.invm(e.modulus)}}(a),d=a.modulus.byteLength(),n=new f(e).mul(t.blinder).umod(a.modulus),i=n.toRed(f.mont(a.prime1)),b=n.toRed(f.mont(a.prime2)),o=a.coefficient,s=a.prime1,l=a.prime2,u=i.redPow(a.exponent1).fromRed(),h=b.redPow(a.exponent2).fromRed(),p=u.isub(h).imul(o).umod(s).imul(l);return h.iadd(p).imul(t.unblinder).umod(a.modulus).toArrayLike(c,"be",d)}n.getr=r,e.exports=n},55715:(e,a,t)=>{"use strict";e.exports=t(62951)},20:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=t(47108),d=t(46737),r=t(56698),n=t(35359),i=t(74847),b=t(62951);function o(e){d.Writable.call(this);var a=b[e];if(!a)throw new Error("Unknown message digest");this._hashType=a.hash,this._hash=f(a.hash),this._tag=a.id,this._signType=a.sign}function s(e){d.Writable.call(this);var a=b[e];if(!a)throw new Error("Unknown message digest");this._hash=f(a.hash),this._tag=a.id,this._signType=a.sign}function l(e){return new o(e)}function u(e){return new s(e)}Object.keys(b).forEach((function(e){b[e].id=c.from(b[e].id,"hex"),b[e.toLowerCase()]=b[e]})),r(o,d.Writable),o.prototype._write=function(e,a,t){this._hash.update(e),t()},o.prototype.update=function(e,a){return this._hash.update("string"==typeof e?c.from(e,a):e),this},o.prototype.sign=function(e,a){this.end();var t=this._hash.digest(),c=n(t,e,this._hashType,this._signType,this._tag);return a?c.toString(a):c},r(s,d.Writable),s.prototype._write=function(e,a,t){this._hash.update(e),t()},s.prototype.update=function(e,a){return this._hash.update("string"==typeof e?c.from(e,a):e),this},s.prototype.verify=function(e,a,t){var f="string"==typeof a?c.from(a,t):a;this.end();var d=this._hash.digest();return i(f,d,e,this._signType,this._tag)},e.exports={Sign:l,Verify:u,createSign:l,createVerify:u}},35359:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=t(83507),d=t(67332),r=t(86729).ec,n=t(39404),i=t(78170),b=t(64589);function o(e,a,t,d){if((e=c.from(e.toArray())).length0&&t.ishrn(c),t}function l(e,a,t){var d,r;do{for(d=c.alloc(0);8*d.length{"use strict";var c=t(92861).Buffer,f=t(39404),d=t(86729).ec,r=t(78170),n=t(64589);function i(e,a){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(a)>=0)throw new Error("invalid sig")}e.exports=function(e,a,t,b,o){var s=r(t);if("ec"===s.type){if("ecdsa"!==b&&"ecdsa/rsa"!==b)throw new Error("wrong public key type");return function(e,a,t){var c=n[t.data.algorithm.curve.join(".")];if(!c)throw new Error("unknown curve "+t.data.algorithm.curve.join("."));var f=new d(c),r=t.data.subjectPrivateKey.data;return f.verify(a,e,r)}(e,a,s)}if("dsa"===s.type){if("dsa"!==b)throw new Error("wrong public key type");return function(e,a,t){var c=t.data.p,d=t.data.q,n=t.data.g,b=t.data.pub_key,o=r.signature.decode(e,"der"),s=o.s,l=o.r;i(s,d),i(l,d);var u=f.mont(c),h=s.invm(d);return 0===n.toRed(u).redPow(new f(a).mul(h).mod(d)).fromRed().mul(b.toRed(u).redPow(l.mul(h).mod(d)).fromRed()).mod(c).mod(d).cmp(l)}(e,a,s)}if("rsa"!==b&&"ecdsa/rsa"!==b)throw new Error("wrong public key type");a=c.concat([o,a]);for(var l=s.modulus.byteLength(),u=[1],h=0;a.length+u.length+2{var a={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==a.call(e)}},26248:(e,a,t)=>{"use strict";var c=t(33225),f=Object.keys||function(e){var a=[];for(var t in e)a.push(t);return a};e.exports=s;var d=Object.create(t(15622));d.inherits=t(56698);var r=t(30206),n=t(7314);d.inherits(s,r);for(var i=f(n.prototype),b=0;b{"use strict";e.exports=d;var c=t(81816),f=Object.create(t(15622));function d(e){if(!(this instanceof d))return new d(e);c.call(this,e)}f.inherits=t(56698),f.inherits(d,c),d.prototype._transform=function(e,a,t){t(null,e)}},30206:(e,a,t)=>{"use strict";var c=t(33225);e.exports=x;var f,d=t(32240);x.ReadableState=m,t(37007).EventEmitter;var r=function(e,a){return e.listeners(a).length},n=t(5567),i=t(24116).Buffer,b=(void 0!==t.g?t.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},o=Object.create(t(15622));o.inherits=t(56698);var s=t(92668),l=void 0;l=s&&s.debuglog?s.debuglog("stream"):function(){};var u,h=t(20672),p=t(36278);o.inherits(x,n);var g=["error","close","destroy","pause","resume"];function m(e,a){e=e||{};var c=a instanceof(f=f||t(26248));this.objectMode=!!e.objectMode,c&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var d=e.highWaterMark,r=e.readableHighWaterMark,n=this.objectMode?16:16384;this.highWaterMark=d||0===d?d:c&&(r||0===r)?r:n,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=t(6427).I),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function x(e){if(f=f||t(26248),!(this instanceof x))return new x(e);this._readableState=new m(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),n.call(this)}function y(e,a,t,c,f){var d,r=e._readableState;return null===a?(r.reading=!1,function(e,a){if(!a.ended){if(a.decoder){var t=a.decoder.end();t&&t.length&&(a.buffer.push(t),a.length+=a.objectMode?1:t.length)}a.ended=!0,_(e)}}(e,r)):(f||(d=function(e,a){var t,c;return c=a,i.isBuffer(c)||c instanceof b||"string"==typeof a||void 0===a||e.objectMode||(t=new TypeError("Invalid non-string/buffer chunk")),t}(r,a)),d?e.emit("error",d):r.objectMode||a&&a.length>0?("string"==typeof a||r.objectMode||Object.getPrototypeOf(a)===i.prototype||(a=function(e){return i.from(e)}(a)),c?r.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):A(e,r,a,!0):r.ended?e.emit("error",new Error("stream.push() after EOF")):(r.reading=!1,r.decoder&&!t?(a=r.decoder.write(a),r.objectMode||0!==a.length?A(e,r,a,!1):E(e,r)):A(e,r,a,!1))):c||(r.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.lengtha.highWaterMark&&(a.highWaterMark=function(e){return e>=v?e=v:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=a.length?e:a.ended?a.length:(a.needReadable=!0,0))}function _(e){var a=e._readableState;a.needReadable=!1,a.emittedReadable||(l("emitReadable",a.flowing),a.emittedReadable=!0,a.sync?c.nextTick(I,e):I(e))}function I(e){l("emit readable"),e.emit("readable"),L(e)}function E(e,a){a.readingMore||(a.readingMore=!0,c.nextTick(C,e,a))}function C(e,a){for(var t=a.length;!a.reading&&!a.flowing&&!a.ended&&a.length=a.length?(t=a.decoder?a.buffer.join(""):1===a.buffer.length?a.buffer.head.data:a.buffer.concat(a.length),a.buffer.clear()):t=function(e,a,t){var c;return ed.length?d.length:e;if(r===d.length?f+=d:f+=d.slice(0,e),0==(e-=r)){r===d.length?(++c,t.next?a.head=t.next:a.head=a.tail=null):(a.head=t,t.data=d.slice(r));break}++c}return a.length-=c,f}(e,a):function(e,a){var t=i.allocUnsafe(e),c=a.head,f=1;for(c.data.copy(t),e-=c.data.length;c=c.next;){var d=c.data,r=e>d.length?d.length:e;if(d.copy(t,t.length-e,0,r),0==(e-=r)){r===d.length?(++f,c.next?a.head=c.next:a.head=a.tail=null):(a.head=c,c.data=d.slice(r));break}++f}return a.length-=f,t}(e,a),c}(e,a.buffer,a.decoder),t);var t}function k(e){var a=e._readableState;if(a.length>0)throw new Error('"endReadable()" called on non-empty stream');a.endEmitted||(a.ended=!0,c.nextTick(N,a,e))}function N(e,a){e.endEmitted||0!==e.length||(e.endEmitted=!0,a.readable=!1,a.emit("end"))}function P(e,a){for(var t=0,c=e.length;t=a.highWaterMark||a.ended))return l("read: emitReadable",a.length,a.ended),0===a.length&&a.ended?k(this):_(this),null;if(0===(e=w(e,a))&&a.ended)return 0===a.length&&k(this),null;var c,f=a.needReadable;return l("need readable",f),(0===a.length||a.length-e0?S(e,a):null)?(a.needReadable=!0,e=0):a.length-=e,0===a.length&&(a.ended||(a.needReadable=!0),t!==e&&a.ended&&k(this)),null!==c&&this.emit("data",c),c},x.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(e,a){var t=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1,l("pipe count=%d opts=%j",f.pipesCount,a);var n=a&&!1===a.end||e===process.stdout||e===process.stderr?m:i;function i(){l("onend"),e.end()}f.endEmitted?c.nextTick(n):t.once("end",n),e.on("unpipe",(function a(c,d){l("onunpipe"),c===t&&d&&!1===d.hasUnpiped&&(d.hasUnpiped=!0,l("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",b),e.removeListener("error",h),e.removeListener("unpipe",a),t.removeListener("end",i),t.removeListener("end",m),t.removeListener("data",u),o=!0,!f.awaitDrain||e._writableState&&!e._writableState.needDrain||b())}));var b=function(e){return function(){var a=e._readableState;l("pipeOnDrain",a.awaitDrain),a.awaitDrain&&a.awaitDrain--,0===a.awaitDrain&&r(e,"data")&&(a.flowing=!0,L(e))}}(t);e.on("drain",b);var o=!1,s=!1;function u(a){l("ondata"),s=!1,!1!==e.write(a)||s||((1===f.pipesCount&&f.pipes===e||f.pipesCount>1&&-1!==P(f.pipes,e))&&!o&&(l("false write response, pause",f.awaitDrain),f.awaitDrain++,s=!0),t.pause())}function h(a){l("onerror",a),m(),e.removeListener("error",h),0===r(e,"error")&&e.emit("error",a)}function p(){e.removeListener("finish",g),m()}function g(){l("onfinish"),e.removeListener("close",p),m()}function m(){l("unpipe"),t.unpipe(e)}return t.on("data",u),function(e,a,t){if("function"==typeof e.prependListener)return e.prependListener(a,t);e._events&&e._events[a]?d(e._events[a])?e._events[a].unshift(t):e._events[a]=[t,e._events[a]]:e.on(a,t)}(e,"error",h),e.once("close",p),e.once("finish",g),e.emit("pipe",t),f.flowing||(l("pipe resume"),t.resume()),e},x.prototype.unpipe=function(e){var a=this._readableState,t={hasUnpiped:!1};if(0===a.pipesCount)return this;if(1===a.pipesCount)return e&&e!==a.pipes||(e||(e=a.pipes),a.pipes=null,a.pipesCount=0,a.flowing=!1,e&&e.emit("unpipe",this,t)),this;if(!e){var c=a.pipes,f=a.pipesCount;a.pipes=null,a.pipesCount=0,a.flowing=!1;for(var d=0;d{"use strict";e.exports=r;var c=t(26248),f=Object.create(t(15622));function d(e,a){var t=this._transformState;t.transforming=!1;var c=t.writecb;if(!c)return this.emit("error",new Error("write callback called multiple times"));t.writechunk=null,t.writecb=null,null!=a&&this.push(a),c(e);var f=this._readableState;f.reading=!1,(f.needReadable||f.length{"use strict";var c=t(33225);function f(e){var a=this;this.next=null,this.entry=null,this.finish=function(){!function(e,a){var t=e.entry;for(e.entry=null;t;){var c=t.callback;a.pendingcb--,c(undefined),t=t.next}a.corkedRequestsFree.next=e}(a,e)}}e.exports=g;var d,r=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:c.nextTick;g.WritableState=p;var n=Object.create(t(15622));n.inherits=t(56698);var i,b={deprecate:t(94643)},o=t(5567),s=t(24116).Buffer,l=(void 0!==t.g?t.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},u=t(36278);function h(){}function p(e,a){d=d||t(26248),e=e||{};var n=a instanceof d;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,b=e.writableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(b||0===b)?b:o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,a){var t=e._writableState,f=t.sync,d=t.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(t),a)!function(e,a,t,f,d){--a.pendingcb,t?(c.nextTick(d,f),c.nextTick(w,e,a),e._writableState.errorEmitted=!0,e.emit("error",f)):(d(f),e._writableState.errorEmitted=!0,e.emit("error",f),w(e,a))}(e,t,f,a,d);else{var n=A(t);n||t.corked||t.bufferProcessing||!t.bufferedRequest||y(e,t),f?r(x,e,t,n,d):x(e,t,n,d)}}(a,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new f(this)}function g(e){if(d=d||t(26248),!(i.call(g,this)||this instanceof d))return new g(e);this._writableState=new p(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function m(e,a,t,c,f,d,r){a.writelen=c,a.writecb=r,a.writing=!0,a.sync=!0,t?e._writev(f,a.onwrite):e._write(f,d,a.onwrite),a.sync=!1}function x(e,a,t,c){t||function(e,a){0===a.length&&a.needDrain&&(a.needDrain=!1,e.emit("drain"))}(e,a),a.pendingcb--,c(),w(e,a)}function y(e,a){a.bufferProcessing=!0;var t=a.bufferedRequest;if(e._writev&&t&&t.next){var c=a.bufferedRequestCount,d=new Array(c),r=a.corkedRequestsFree;r.entry=t;for(var n=0,i=!0;t;)d[n]=t,t.isBuf||(i=!1),t=t.next,n+=1;d.allBuffers=i,m(e,a,!0,a.length,d,"",r.finish),a.pendingcb++,a.lastBufferedRequest=null,r.next?(a.corkedRequestsFree=r.next,r.next=null):a.corkedRequestsFree=new f(a),a.bufferedRequestCount=0}else{for(;t;){var b=t.chunk,o=t.encoding,s=t.callback;if(m(e,a,!1,a.objectMode?1:b.length,b,o,s),t=t.next,a.bufferedRequestCount--,a.writing)break}null===t&&(a.lastBufferedRequest=null)}a.bufferedRequest=t,a.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,a){e._final((function(t){a.pendingcb--,t&&e.emit("error",t),a.prefinished=!0,e.emit("prefinish"),w(e,a)}))}function w(e,a){var t=A(a);return t&&(function(e,a){a.prefinished||a.finalCalled||("function"==typeof e._final?(a.pendingcb++,a.finalCalled=!0,c.nextTick(v,e,a)):(a.prefinished=!0,e.emit("prefinish")))}(e,a),0===a.pendingcb&&(a.finished=!0,e.emit("finish"))),t}n.inherits(g,o),p.prototype.getBuffer=function(){for(var e=this.bufferedRequest,a=[];e;)a.push(e),e=e.next;return a},function(){try{Object.defineProperty(p.prototype,"buffer",{get:b.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===g&&e&&e._writableState instanceof p}})):i=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,a,t){var f,d=this._writableState,r=!1,n=!d.objectMode&&(f=e,s.isBuffer(f)||f instanceof l);return n&&!s.isBuffer(e)&&(e=function(e){return s.from(e)}(e)),"function"==typeof a&&(t=a,a=null),n?a="buffer":a||(a=d.defaultEncoding),"function"!=typeof t&&(t=h),d.ended?function(e,a){var t=new Error("write after end");e.emit("error",t),c.nextTick(a,t)}(this,t):(n||function(e,a,t,f){var d=!0,r=!1;return null===t?r=new TypeError("May not write null values to stream"):"string"==typeof t||void 0===t||a.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r&&(e.emit("error",r),c.nextTick(f,r),d=!1),d}(this,d,e,t))&&(d.pendingcb++,r=function(e,a,t,c,f,d){if(!t){var r=function(e,a,t){return e.objectMode||!1===e.decodeStrings||"string"!=typeof a||(a=s.from(a,t)),a}(a,c,f);c!==r&&(t=!0,f="buffer",c=r)}var n=a.objectMode?1:c.length;a.length+=n;var i=a.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,a,t){t(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,a,t){var f=this._writableState;"function"==typeof e?(t=e,e=null,a=null):"function"==typeof a&&(t=a,a=null),null!=e&&this.write(e,a),f.corked&&(f.corked=1,this.uncork()),f.ending||function(e,a,t){a.ending=!0,w(e,a),t&&(a.finished?c.nextTick(t):e.once("finish",t)),a.ended=!0,e.writable=!1}(this,f,t)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=u.destroy,g.prototype._undestroy=u.undestroy,g.prototype._destroy=function(e,a){this.end(),a(e)}},20672:(e,a,t)=>{"use strict";var c=t(24116).Buffer,f=t(21638);e.exports=function(){function e(){!function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var a={data:e,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length},e.prototype.unshift=function(e){var a={data:e,next:this.head};0===this.length&&(this.tail=a),this.head=a,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var a=this.head,t=""+a.data;a=a.next;)t+=e+a.data;return t},e.prototype.concat=function(e){if(0===this.length)return c.alloc(0);for(var a,t,f=c.allocUnsafe(e>>>0),d=this.head,r=0;d;)a=f,t=r,d.data.copy(a,t),r+=d.data.length,d=d.next;return f},e}(),f&&f.inspect&&f.inspect.custom&&(e.exports.prototype[f.inspect.custom]=function(){var e=f.inspect({length:this.length});return this.constructor.name+" "+e})},36278:(e,a,t)=>{"use strict";var c=t(33225);function f(e,a){e.emit("error",a)}e.exports={destroy:function(e,a){var t=this,d=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return d||r?(a?a(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,c.nextTick(f,this,e)):c.nextTick(f,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?t._writableState?t._writableState.errorEmitted||(t._writableState.errorEmitted=!0,c.nextTick(f,t,e)):c.nextTick(f,t,e):a&&a(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},5567:(e,a,t)=>{e.exports=t(37007).EventEmitter},24116:(e,a,t)=>{var c=t(48287),f=c.Buffer;function d(e,a){for(var t in e)a[t]=e[t]}function r(e,a,t){return f(e,a,t)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?e.exports=c:(d(c,a),a.Buffer=r),d(f,r),r.from=function(e,a,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return f(e,a,t)},r.alloc=function(e,a,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var c=f(e);return void 0!==a?"string"==typeof t?c.fill(a,t):c.fill(a):c.fill(0),c},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return f(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return c.SlowBuffer(e)}},46737:(e,a,t)=>{(a=e.exports=t(30206)).Stream=a,a.Readable=a,a.Writable=t(7314),a.Duplex=t(26248),a.Transform=t(81816),a.PassThrough=t(75242)},6427:(e,a,t)=>{"use strict";var c=t(88393).Buffer,f=c.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function d(e){var a;switch(this.encoding=function(e){var a=function(e){if(!e)return"utf8";for(var a;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(a)return;e=(""+e).toLowerCase(),a=!0}}(e);if("string"!=typeof a&&(c.isEncoding===f||!f(e)))throw new Error("Unknown encoding: "+e);return a||e}(e),this.encoding){case"utf16le":this.text=i,this.end=b,a=4;break;case"utf8":this.fillLast=n,a=4;break;case"base64":this.text=o,this.end=s,a=3;break;default:return this.write=l,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=c.allocUnsafe(a)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function n(e){var a=this.lastTotal-this.lastNeed,t=function(e,a){if(128!=(192&a[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&a.length>1){if(128!=(192&a[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&a.length>2&&128!=(192&a[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==t?t:this.lastNeed<=e.length?(e.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,a,0,e.length),void(this.lastNeed-=e.length))}function i(e,a){if((e.length-a)%2==0){var t=e.toString("utf16le",a);if(t){var c=t.charCodeAt(t.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",a,e.length-1)}function b(e){var a=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,t)}return a}function o(e,a){var t=(e.length-a)%3;return 0===t?e.toString("base64",a):(this.lastNeed=3-t,this.lastTotal=3,1===t?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",a,e.length-t))}function s(e){var a=e&&e.length?this.write(e):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function l(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}a.I=d,d.prototype.write=function(e){if(0===e.length)return"";var a,t;if(this.lastNeed){if(void 0===(a=this.fillLast(e)))return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t=0?(f>0&&(e.lastNeed=f-1),f):--c=0?(f>0&&(e.lastNeed=f-2),f):--c=0?(f>0&&(2===f?f=0:e.lastNeed=f-3),f):0}(this,e,a);if(!this.lastNeed)return e.toString("utf8",a);this.lastTotal=t;var c=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,c),e.toString("utf8",a,c)},d.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},88393:(e,a,t)=>{var c=t(48287),f=c.Buffer;function d(e,a){for(var t in e)a[t]=e[t]}function r(e,a,t){return f(e,a,t)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?e.exports=c:(d(c,a),a.Buffer=r),d(f,r),r.from=function(e,a,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return f(e,a,t)},r.alloc=function(e,a,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var c=f(e);return void 0!==a?"string"==typeof t?c.fill(a,t):c.fill(a):c.fill(0),c},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return f(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return c.SlowBuffer(e)}},5974:(e,a,t)=>{"use strict";var c=t(48287).Buffer,f=t(94148),d=t(44442),r=t(58411),n=t(71447),i=t(19681);for(var b in i)a[b]=i[b];function o(e){if("number"!=typeof e||ea.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}a.NONE=0,a.DEFLATE=1,a.INFLATE=2,a.GZIP=3,a.GUNZIP=4,a.DEFLATERAW=5,a.INFLATERAW=6,a.UNZIP=7,o.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,f(this.init_done,"close before init"),f(this.mode<=a.UNZIP),this.mode===a.DEFLATE||this.mode===a.GZIP||this.mode===a.DEFLATERAW?r.deflateEnd(this.strm):this.mode!==a.INFLATE&&this.mode!==a.GUNZIP&&this.mode!==a.INFLATERAW&&this.mode!==a.UNZIP||n.inflateEnd(this.strm),this.mode=a.NONE,this.dictionary=null)},o.prototype.write=function(e,a,t,c,f,d,r){return this._write(!0,e,a,t,c,f,d,r)},o.prototype.writeSync=function(e,a,t,c,f,d,r){return this._write(!1,e,a,t,c,f,d,r)},o.prototype._write=function(e,t,d,r,n,i,b,o){if(f.equal(arguments.length,8),f(this.init_done,"write before init"),f(this.mode!==a.NONE,"already finalized"),f.equal(!1,this.write_in_progress,"write already in progress"),f.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,f.equal(!1,void 0===t,"must provide flush value"),this.write_in_progress=!0,t!==a.Z_NO_FLUSH&&t!==a.Z_PARTIAL_FLUSH&&t!==a.Z_SYNC_FLUSH&&t!==a.Z_FULL_FLUSH&&t!==a.Z_FINISH&&t!==a.Z_BLOCK)throw new Error("Invalid flush value");if(null==d&&(d=c.alloc(0),n=0,r=0),this.strm.avail_in=n,this.strm.input=d,this.strm.next_in=r,this.strm.avail_out=o,this.strm.output=i,this.strm.next_out=b,this.flush=t,!e)return this._process(),this._checkError()?this._afterSync():void 0;var s=this;return process.nextTick((function(){s._process(),s._after()})),this},o.prototype._afterSync=function(){var e=this.strm.avail_out,a=this.strm.avail_in;return this.write_in_progress=!1,[a,e]},o.prototype._process=function(){var e=null;switch(this.mode){case a.DEFLATE:case a.GZIP:case a.DEFLATERAW:this.err=r.deflate(this.strm,this.flush);break;case a.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=a.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=a.GUNZIP):this.mode=a.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case a.INFLATE:case a.GUNZIP:case a.INFLATERAW:for(this.err=n.inflate(this.strm,this.flush),this.err===a.Z_NEED_DICT&&this.dictionary&&(this.err=n.inflateSetDictionary(this.strm,this.dictionary),this.err===a.Z_OK?this.err=n.inflate(this.strm,this.flush):this.err===a.Z_DATA_ERROR&&(this.err=a.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===a.GUNZIP&&this.err===a.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=n.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},o.prototype._checkError=function(){switch(this.err){case a.Z_OK:case a.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===a.Z_FINISH)return this._error("unexpected end of file"),!1;break;case a.Z_STREAM_END:break;case a.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},o.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,a=this.strm.avail_in;this.write_in_progress=!1,this.callback(a,e),this.pending_close&&this.close()}},o.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},o.prototype.init=function(e,t,c,d,r){f(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),f(e>=8&&e<=15,"invalid windowBits"),f(t>=-1&&t<=9,"invalid compression level"),f(c>=1&&c<=9,"invalid memlevel"),f(d===a.Z_FILTERED||d===a.Z_HUFFMAN_ONLY||d===a.Z_RLE||d===a.Z_FIXED||d===a.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(t,e,c,d,r),this._setDictionary()},o.prototype.params=function(){throw new Error("deflateParams Not supported")},o.prototype.reset=function(){this._reset(),this._setDictionary()},o.prototype._init=function(e,t,c,f,i){switch(this.level=e,this.windowBits=t,this.memLevel=c,this.strategy=f,this.flush=a.Z_NO_FLUSH,this.err=a.Z_OK,this.mode!==a.GZIP&&this.mode!==a.GUNZIP||(this.windowBits+=16),this.mode===a.UNZIP&&(this.windowBits+=32),this.mode!==a.DEFLATERAW&&this.mode!==a.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new d,this.mode){case a.DEFLATE:case a.GZIP:case a.DEFLATERAW:this.err=r.deflateInit2(this.strm,this.level,a.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case a.INFLATE:case a.GUNZIP:case a.INFLATERAW:case a.UNZIP:this.err=n.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==a.Z_OK&&this._error("Init error"),this.dictionary=i,this.write_in_progress=!1,this.init_done=!0},o.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=a.Z_OK,this.mode){case a.DEFLATE:case a.DEFLATERAW:this.err=r.deflateSetDictionary(this.strm,this.dictionary)}this.err!==a.Z_OK&&this._error("Failed to set dictionary")}},o.prototype._reset=function(){switch(this.err=a.Z_OK,this.mode){case a.DEFLATE:case a.DEFLATERAW:case a.GZIP:this.err=r.deflateReset(this.strm);break;case a.INFLATE:case a.INFLATERAW:case a.GUNZIP:this.err=n.inflateReset(this.strm)}this.err!==a.Z_OK&&this._error("Failed to reset stream")},a.Zlib=o},78559:(e,a,t)=>{"use strict";var c=t(48287).Buffer,f=t(88310).Transform,d=t(5974),r=t(40537),n=t(94148).ok,i=t(48287).kMaxLength,b="Cannot create final Buffer. It would be larger than 0x"+i.toString(16)+" bytes";d.Z_MIN_WINDOWBITS=8,d.Z_MAX_WINDOWBITS=15,d.Z_DEFAULT_WINDOWBITS=15,d.Z_MIN_CHUNK=64,d.Z_MAX_CHUNK=1/0,d.Z_DEFAULT_CHUNK=16384,d.Z_MIN_MEMLEVEL=1,d.Z_MAX_MEMLEVEL=9,d.Z_DEFAULT_MEMLEVEL=8,d.Z_MIN_LEVEL=-1,d.Z_MAX_LEVEL=9,d.Z_DEFAULT_LEVEL=d.Z_DEFAULT_COMPRESSION;for(var o=Object.keys(d),s=0;s=i?r=new RangeError(b):a=c.concat(f,d),f=[],e.close(),t(r,a)}e.on("error",(function(a){e.removeListener("end",n),e.removeListener("readable",r),t(a)})),e.on("end",n),e.end(a),r()}function x(e,a){if("string"==typeof a&&(a=c.from(a)),!c.isBuffer(a))throw new TypeError("Not a string or buffer");var t=e._finishFlushFlag;return e._processChunk(a,t)}function y(e){if(!(this instanceof y))return new y(e);M.call(this,e,d.DEFLATE)}function A(e){if(!(this instanceof A))return new A(e);M.call(this,e,d.INFLATE)}function v(e){if(!(this instanceof v))return new v(e);M.call(this,e,d.GZIP)}function w(e){if(!(this instanceof w))return new w(e);M.call(this,e,d.GUNZIP)}function _(e){if(!(this instanceof _))return new _(e);M.call(this,e,d.DEFLATERAW)}function I(e){if(!(this instanceof I))return new I(e);M.call(this,e,d.INFLATERAW)}function E(e){if(!(this instanceof E))return new E(e);M.call(this,e,d.UNZIP)}function C(e){return e===d.Z_NO_FLUSH||e===d.Z_PARTIAL_FLUSH||e===d.Z_SYNC_FLUSH||e===d.Z_FULL_FLUSH||e===d.Z_FINISH||e===d.Z_BLOCK}function M(e,t){var r=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||a.Z_DEFAULT_CHUNK,f.call(this,e),e.flush&&!C(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!C(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||d.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:d.Z_FINISH,e.chunkSize&&(e.chunkSizea.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitsa.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levela.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevela.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=a.Z_FILTERED&&e.strategy!=a.Z_HUFFMAN_ONLY&&e.strategy!=a.Z_RLE&&e.strategy!=a.Z_FIXED&&e.strategy!=a.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!c.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new d.Zlib(t);var n=this;this._hadError=!1,this._handle.onerror=function(e,t){B(n),n._hadError=!0;var c=new Error(e);c.errno=t,c.code=a.codes[t],n.emit("error",c)};var i=a.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(i=e.level);var b=a.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(b=e.strategy),this._handle.init(e.windowBits||a.Z_DEFAULT_WINDOWBITS,i,e.memLevel||a.Z_DEFAULT_MEMLEVEL,b,e.dictionary),this._buffer=c.allocUnsafe(this._chunkSize),this._offset=0,this._level=i,this._strategy=b,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!r._handle},configurable:!0,enumerable:!0})}function B(e,a){a&&process.nextTick(a),e._handle&&(e._handle.close(),e._handle=null)}function L(e){e.emit("close")}Object.defineProperty(a,"codes",{enumerable:!0,value:Object.freeze(u),writable:!1}),a.Deflate=y,a.Inflate=A,a.Gzip=v,a.Gunzip=w,a.DeflateRaw=_,a.InflateRaw=I,a.Unzip=E,a.createDeflate=function(e){return new y(e)},a.createInflate=function(e){return new A(e)},a.createDeflateRaw=function(e){return new _(e)},a.createInflateRaw=function(e){return new I(e)},a.createGzip=function(e){return new v(e)},a.createGunzip=function(e){return new w(e)},a.createUnzip=function(e){return new E(e)},a.deflate=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new y(a),e,t)},a.deflateSync=function(e,a){return x(new y(a),e)},a.gzip=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new v(a),e,t)},a.gzipSync=function(e,a){return x(new v(a),e)},a.deflateRaw=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new _(a),e,t)},a.deflateRawSync=function(e,a){return x(new _(a),e)},a.unzip=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new E(a),e,t)},a.unzipSync=function(e,a){return x(new E(a),e)},a.inflate=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new A(a),e,t)},a.inflateSync=function(e,a){return x(new A(a),e)},a.gunzip=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new w(a),e,t)},a.gunzipSync=function(e,a){return x(new w(a),e)},a.inflateRaw=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new I(a),e,t)},a.inflateRawSync=function(e,a){return x(new I(a),e)},r.inherits(M,f),M.prototype.params=function(e,t,c){if(ea.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=a.Z_FILTERED&&t!=a.Z_HUFFMAN_ONLY&&t!=a.Z_RLE&&t!=a.Z_FIXED&&t!=a.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var f=this;this.flush(d.Z_SYNC_FLUSH,(function(){n(f._handle,"zlib binding closed"),f._handle.params(e,t),f._hadError||(f._level=e,f._strategy=t,c&&c())}))}else process.nextTick(c)},M.prototype.reset=function(){return n(this._handle,"zlib binding closed"),this._handle.reset()},M.prototype._flush=function(e){this._transform(c.alloc(0),"",e)},M.prototype.flush=function(e,a){var t=this,f=this._writableState;("function"==typeof e||void 0===e&&!a)&&(a=e,e=d.Z_FULL_FLUSH),f.ended?a&&process.nextTick(a):f.ending?a&&this.once("end",a):f.needDrain?a&&this.once("drain",(function(){return t.flush(e,a)})):(this._flushFlag=e,this.write(c.alloc(0),"",a))},M.prototype.close=function(e){B(this,e),process.nextTick(L,this)},M.prototype._transform=function(e,a,t){var f,r=this._writableState,n=(r.ending||r.ended)&&(!e||r.length===e.length);return null===e||c.isBuffer(e)?this._handle?(n?f=this._finishFlushFlag:(f=this._flushFlag,e.length>=r.length&&(this._flushFlag=this._opts.flush||d.Z_NO_FLUSH)),void this._processChunk(e,f,t)):t(new Error("zlib binding closed")):t(new Error("invalid input"))},M.prototype._processChunk=function(e,a,t){var f=e&&e.length,d=this._chunkSize-this._offset,r=0,o=this,s="function"==typeof t;if(!s){var l,u=[],h=0;this.on("error",(function(e){l=e})),n(this._handle,"zlib binding closed");do{var p=this._handle.writeSync(a,e,r,f,this._buffer,this._offset,d)}while(!this._hadError&&x(p[0],p[1]));if(this._hadError)throw l;if(h>=i)throw B(this),new RangeError(b);var g=c.concat(u,h);return B(this),g}n(this._handle,"zlib binding closed");var m=this._handle.write(a,e,r,f,this._buffer,this._offset,d);function x(i,b){if(this&&(this.buffer=null,this.callback=null),!o._hadError){var l=d-b;if(n(l>=0,"have should not go down"),l>0){var p=o._buffer.slice(o._offset,o._offset+l);o._offset+=l,s?o.push(p):(u.push(p),h+=p.length)}if((0===b||o._offset>=o._chunkSize)&&(d=o._chunkSize,o._offset=0,o._buffer=c.allocUnsafe(o._chunkSize)),0===b){if(r+=f-i,f=i,!s)return!0;var g=o._handle.write(a,e,r,f,o._buffer,o._offset,o._chunkSize);return g.callback=x,void(g.buffer=e)}if(!s)return!1;t()}}m.buffer=e,m.callback=x},r.inherits(y,M),r.inherits(A,M),r.inherits(v,M),r.inherits(w,M),r.inherits(_,M),r.inherits(I,M),r.inherits(E,M)},30295:(e,a,t)=>{var c=t(48287).Buffer;e.exports=function(e,a){for(var t=Math.min(e.length,a.length),f=new c(t),d=0;d{"use strict";const c=t(67526),f=t(251),d="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=i,a.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},a.INSPECT_MAX_BYTES=50;const r=2147483647;function n(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');const a=new Uint8Array(e);return Object.setPrototypeOf(a,i.prototype),a}function i(e,a,t){if("number"==typeof e){if("string"==typeof a)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return b(e,a,t)}function b(e,a,t){if("string"==typeof e)return function(e,a){if("string"==typeof a&&""!==a||(a="utf8"),!i.isEncoding(a))throw new TypeError("Unknown encoding: "+a);const t=0|p(e,a);let c=n(t);const f=c.write(e,a);return f!==t&&(c=c.slice(0,f)),c}(e,a);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const a=new Uint8Array(e);return u(a.buffer,a.byteOffset,a.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return u(e,a,t);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return u(e,a,t);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const c=e.valueOf&&e.valueOf();if(null!=c&&c!==e)return i.from(c,a,t);const f=function(e){if(i.isBuffer(e)){const a=0|h(e.length),t=n(a);return 0===t.length||e.copy(t,0,0,a),t}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?n(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(f)return f;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),a,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return o(e),n(e<0?0:0|h(e))}function l(e){const a=e.length<0?0:0|h(e.length),t=n(a);for(let c=0;c=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function p(e,a){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const t=e.length,c=arguments.length>2&&!0===arguments[2];if(!c&&0===t)return 0;let f=!1;for(;;)switch(a){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return K(e).length;default:if(f)return c?-1:z(e).length;a=(""+a).toLowerCase(),f=!0}}function g(e,a,t){let c=!1;if((void 0===a||a<0)&&(a=0),a>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(a>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,a,t);case"utf8":case"utf-8":return C(this,a,t);case"ascii":return B(this,a,t);case"latin1":case"binary":return L(this,a,t);case"base64":return E(this,a,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,a,t);default:if(c)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),c=!0}}function m(e,a,t){const c=e[a];e[a]=e[t],e[t]=c}function x(e,a,t,c,f){if(0===e.length)return-1;if("string"==typeof t?(c=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),J(t=+t)&&(t=f?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(f)return-1;t=e.length-1}else if(t<0){if(!f)return-1;t=0}if("string"==typeof a&&(a=i.from(a,c)),i.isBuffer(a))return 0===a.length?-1:y(e,a,t,c,f);if("number"==typeof a)return a&=255,"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(e,a,t):Uint8Array.prototype.lastIndexOf.call(e,a,t):y(e,[a],t,c,f);throw new TypeError("val must be string, number or Buffer")}function y(e,a,t,c,f){let d,r=1,n=e.length,i=a.length;if(void 0!==c&&("ucs2"===(c=String(c).toLowerCase())||"ucs-2"===c||"utf16le"===c||"utf-16le"===c)){if(e.length<2||a.length<2)return-1;r=2,n/=2,i/=2,t/=2}function b(e,a){return 1===r?e[a]:e.readUInt16BE(a*r)}if(f){let c=-1;for(d=t;dn&&(t=n-i),d=t;d>=0;d--){let t=!0;for(let c=0;cf&&(c=f):c=f;const d=a.length;let r;for(c>d/2&&(c=d/2),r=0;r>8,f=t%256,d.push(f),d.push(c);return d}(a,e.length-t),e,t,c)}function E(e,a,t){return 0===a&&t===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(a,t))}function C(e,a,t){t=Math.min(e.length,t);const c=[];let f=a;for(;f239?4:a>223?3:a>191?2:1;if(f+r<=t){let t,c,n,i;switch(r){case 1:a<128&&(d=a);break;case 2:t=e[f+1],128==(192&t)&&(i=(31&a)<<6|63&t,i>127&&(d=i));break;case 3:t=e[f+1],c=e[f+2],128==(192&t)&&128==(192&c)&&(i=(15&a)<<12|(63&t)<<6|63&c,i>2047&&(i<55296||i>57343)&&(d=i));break;case 4:t=e[f+1],c=e[f+2],n=e[f+3],128==(192&t)&&128==(192&c)&&128==(192&n)&&(i=(15&a)<<18|(63&t)<<12|(63&c)<<6|63&n,i>65535&&i<1114112&&(d=i))}}null===d?(d=65533,r=1):d>65535&&(d-=65536,c.push(d>>>10&1023|55296),d=56320|1023&d),c.push(d),f+=r}return function(e){const a=e.length;if(a<=M)return String.fromCharCode.apply(String,e);let t="",c=0;for(;cc.length?(i.isBuffer(a)||(a=i.from(a)),a.copy(c,f)):Uint8Array.prototype.set.call(c,a,f);else{if(!i.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(c,f)}f+=a.length}return c},i.byteLength=p,i.prototype._isBuffer=!0,i.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let a=0;at&&(e+=" ... "),""},d&&(i.prototype[d]=i.prototype.inspect),i.prototype.compare=function(e,a,t,c,f){if(Z(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===a&&(a=0),void 0===t&&(t=e?e.length:0),void 0===c&&(c=0),void 0===f&&(f=this.length),a<0||t>e.length||c<0||f>this.length)throw new RangeError("out of range index");if(c>=f&&a>=t)return 0;if(c>=f)return-1;if(a>=t)return 1;if(this===e)return 0;let d=(f>>>=0)-(c>>>=0),r=(t>>>=0)-(a>>>=0);const n=Math.min(d,r),b=this.slice(c,f),o=e.slice(a,t);for(let e=0;e>>=0,isFinite(t)?(t>>>=0,void 0===c&&(c="utf8")):(c=t,t=void 0)}const f=this.length-a;if((void 0===t||t>f)&&(t=f),e.length>0&&(t<0||a<0)||a>this.length)throw new RangeError("Attempt to write outside buffer bounds");c||(c="utf8");let d=!1;for(;;)switch(c){case"hex":return A(this,e,a,t);case"utf8":case"utf-8":return v(this,e,a,t);case"ascii":case"latin1":case"binary":return w(this,e,a,t);case"base64":return _(this,e,a,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,a,t);default:if(d)throw new TypeError("Unknown encoding: "+c);c=(""+c).toLowerCase(),d=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const M=4096;function B(e,a,t){let c="";t=Math.min(e.length,t);for(let f=a;fc)&&(t=c);let f="";for(let c=a;ct)throw new RangeError("Trying to access beyond buffer length")}function P(e,a,t,c,f,d){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>f||ae.length)throw new RangeError("Index out of range")}function R(e,a,t,c,f){H(a,c,f,e,t,7);let d=Number(a&BigInt(4294967295));e[t++]=d,d>>=8,e[t++]=d,d>>=8,e[t++]=d,d>>=8,e[t++]=d;let r=Number(a>>BigInt(32)&BigInt(4294967295));return e[t++]=r,r>>=8,e[t++]=r,r>>=8,e[t++]=r,r>>=8,e[t++]=r,t}function O(e,a,t,c,f){H(a,c,f,e,t,7);let d=Number(a&BigInt(4294967295));e[t+7]=d,d>>=8,e[t+6]=d,d>>=8,e[t+5]=d,d>>=8,e[t+4]=d;let r=Number(a>>BigInt(32)&BigInt(4294967295));return e[t+3]=r,r>>=8,e[t+2]=r,r>>=8,e[t+1]=r,r>>=8,e[t]=r,t+8}function D(e,a,t,c,f,d){if(t+c>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function T(e,a,t,c,d){return a=+a,t>>>=0,d||D(e,0,t,4),f.write(e,a,t,c,23,4),t+4}function F(e,a,t,c,d){return a=+a,t>>>=0,d||D(e,0,t,8),f.write(e,a,t,c,52,8),t+8}i.prototype.slice=function(e,a){const t=this.length;(e=~~e)<0?(e+=t)<0&&(e=0):e>t&&(e=t),(a=void 0===a?t:~~a)<0?(a+=t)<0&&(a=0):a>t&&(a=t),a>>=0,a>>>=0,t||N(e,a,this.length);let c=this[e],f=1,d=0;for(;++d>>=0,a>>>=0,t||N(e,a,this.length);let c=this[e+--a],f=1;for(;a>0&&(f*=256);)c+=this[e+--a]*f;return c},i.prototype.readUint8=i.prototype.readUInt8=function(e,a){return e>>>=0,a||N(e,1,this.length),this[e]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(e,a){return e>>>=0,a||N(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(e,a){return e>>>=0,a||N(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(e,a){return e>>>=0,a||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(e,a){return e>>>=0,a||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readBigUInt64LE=Y((function(e){$(e>>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=a+256*this[++e]+65536*this[++e]+this[++e]*2**24,f=this[++e]+256*this[++e]+65536*this[++e]+t*2**24;return BigInt(c)+(BigInt(f)<>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=a*2**24+65536*this[++e]+256*this[++e]+this[++e],f=this[++e]*2**24+65536*this[++e]+256*this[++e]+t;return(BigInt(c)<>>=0,a>>>=0,t||N(e,a,this.length);let c=this[e],f=1,d=0;for(;++d=f&&(c-=Math.pow(2,8*a)),c},i.prototype.readIntBE=function(e,a,t){e>>>=0,a>>>=0,t||N(e,a,this.length);let c=a,f=1,d=this[e+--c];for(;c>0&&(f*=256);)d+=this[e+--c]*f;return f*=128,d>=f&&(d-=Math.pow(2,8*a)),d},i.prototype.readInt8=function(e,a){return e>>>=0,a||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,a){e>>>=0,a||N(e,2,this.length);const t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt16BE=function(e,a){e>>>=0,a||N(e,2,this.length);const t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt32LE=function(e,a){return e>>>=0,a||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,a){return e>>>=0,a||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readBigInt64LE=Y((function(e){$(e>>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=this[e+4]+256*this[e+5]+65536*this[e+6]+(t<<24);return(BigInt(c)<>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=(a<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(c)<>>=0,a||N(e,4,this.length),f.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,a){return e>>>=0,a||N(e,4,this.length),f.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,a){return e>>>=0,a||N(e,8,this.length),f.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,a){return e>>>=0,a||N(e,8,this.length),f.read(this,e,!1,52,8)},i.prototype.writeUintLE=i.prototype.writeUIntLE=function(e,a,t,c){e=+e,a>>>=0,t>>>=0,c||P(this,e,a,t,Math.pow(2,8*t)-1,0);let f=1,d=0;for(this[a]=255&e;++d>>=0,t>>>=0,c||P(this,e,a,t,Math.pow(2,8*t)-1,0);let f=t-1,d=1;for(this[a+f]=255&e;--f>=0&&(d*=256);)this[a+f]=e/d&255;return a+t},i.prototype.writeUint8=i.prototype.writeUInt8=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,1,255,0),this[a]=255&e,a+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,65535,0),this[a]=255&e,this[a+1]=e>>>8,a+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,65535,0),this[a]=e>>>8,this[a+1]=255&e,a+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,4294967295,0),this[a+3]=e>>>24,this[a+2]=e>>>16,this[a+1]=e>>>8,this[a]=255&e,a+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,4294967295,0),this[a]=e>>>24,this[a+1]=e>>>16,this[a+2]=e>>>8,this[a+3]=255&e,a+4},i.prototype.writeBigUInt64LE=Y((function(e,a=0){return R(this,e,a,BigInt(0),BigInt("0xffffffffffffffff"))})),i.prototype.writeBigUInt64BE=Y((function(e,a=0){return O(this,e,a,BigInt(0),BigInt("0xffffffffffffffff"))})),i.prototype.writeIntLE=function(e,a,t,c){if(e=+e,a>>>=0,!c){const c=Math.pow(2,8*t-1);P(this,e,a,t,c-1,-c)}let f=0,d=1,r=0;for(this[a]=255&e;++f>>=0,!c){const c=Math.pow(2,8*t-1);P(this,e,a,t,c-1,-c)}let f=t-1,d=1,r=0;for(this[a+f]=255&e;--f>=0&&(d*=256);)e<0&&0===r&&0!==this[a+f+1]&&(r=1),this[a+f]=(e/d|0)-r&255;return a+t},i.prototype.writeInt8=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,1,127,-128),e<0&&(e=255+e+1),this[a]=255&e,a+1},i.prototype.writeInt16LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,32767,-32768),this[a]=255&e,this[a+1]=e>>>8,a+2},i.prototype.writeInt16BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,32767,-32768),this[a]=e>>>8,this[a+1]=255&e,a+2},i.prototype.writeInt32LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,2147483647,-2147483648),this[a]=255&e,this[a+1]=e>>>8,this[a+2]=e>>>16,this[a+3]=e>>>24,a+4},i.prototype.writeInt32BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[a]=e>>>24,this[a+1]=e>>>16,this[a+2]=e>>>8,this[a+3]=255&e,a+4},i.prototype.writeBigInt64LE=Y((function(e,a=0){return R(this,e,a,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),i.prototype.writeBigInt64BE=Y((function(e,a=0){return O(this,e,a,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),i.prototype.writeFloatLE=function(e,a,t){return T(this,e,a,!0,t)},i.prototype.writeFloatBE=function(e,a,t){return T(this,e,a,!1,t)},i.prototype.writeDoubleLE=function(e,a,t){return F(this,e,a,!0,t)},i.prototype.writeDoubleBE=function(e,a,t){return F(this,e,a,!1,t)},i.prototype.copy=function(e,a,t,c){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(t||(t=0),c||0===c||(c=this.length),a>=e.length&&(a=e.length),a||(a=0),c>0&&c=this.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("sourceEnd out of bounds");c>this.length&&(c=this.length),e.length-a>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(f=a;f=c+4;t-=3)a=`_${e.slice(t-3,t)}${a}`;return`${e.slice(0,t)}${a}`}function H(e,a,t,c,f,d){if(e>t||e3?0===a||a===BigInt(0)?`>= 0${c} and < 2${c} ** ${8*(d+1)}${c}`:`>= -(2${c} ** ${8*(d+1)-1}${c}) and < 2 ** ${8*(d+1)-1}${c}`:`>= ${a}${c} and <= ${t}${c}`,new Q.ERR_OUT_OF_RANGE("value",f,e)}!function(e,a,t){$(a,"offset"),void 0!==e[a]&&void 0!==e[a+t]||q(a,e.length-(t+1))}(c,f,d)}function $(e,a){if("number"!=typeof e)throw new Q.ERR_INVALID_ARG_TYPE(a,"number",e)}function q(e,a,t){if(Math.floor(e)!==e)throw $(e,t),new Q.ERR_OUT_OF_RANGE(t||"offset","an integer",e);if(a<0)throw new Q.ERR_BUFFER_OUT_OF_BOUNDS;throw new Q.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${a}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,a){return`The "${e}" argument must be of type number. Received type ${typeof a}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,a,t){let c=`The value of "${e}" is out of range.`,f=t;return Number.isInteger(t)&&Math.abs(t)>2**32?f=j(String(t)):"bigint"==typeof t&&(f=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(f=j(f)),f+="n"),c+=` It must be ${a}. Received ${f}`,c}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function z(e,a){let t;a=a||1/0;const c=e.length;let f=null;const d=[];for(let r=0;r55295&&t<57344){if(!f){if(t>56319){(a-=3)>-1&&d.push(239,191,189);continue}if(r+1===c){(a-=3)>-1&&d.push(239,191,189);continue}f=t;continue}if(t<56320){(a-=3)>-1&&d.push(239,191,189),f=t;continue}t=65536+(f-55296<<10|t-56320)}else f&&(a-=3)>-1&&d.push(239,191,189);if(f=null,t<128){if((a-=1)<0)break;d.push(t)}else if(t<2048){if((a-=2)<0)break;d.push(t>>6|192,63&t|128)}else if(t<65536){if((a-=3)<0)break;d.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((a-=4)<0)break;d.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return d}function K(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,a,t,c){let f;for(f=0;f=a.length||f>=e.length);++f)a[f+t]=e[f];return f}function Z(e,a){return e instanceof a||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===a.name}function J(e){return e!=e}const W=function(){const e="0123456789abcdef",a=new Array(256);for(let t=0;t<16;++t){const c=16*t;for(let f=0;f<16;++f)a[c+f]=e[t]+e[f]}return a}();function Y(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},86866:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},38075:(e,a,t)=>{"use strict";var c=t(70453),f=t(10487),d=f(c("String.prototype.indexOf"));e.exports=function(e,a){var t=c(e,!!a);return"function"==typeof t&&d(e,".prototype.")>-1?f(t):t}},10487:(e,a,t)=>{"use strict";var c=t(66743),f=t(70453),d=t(96897),r=t(69675),n=f("%Function.prototype.apply%"),i=f("%Function.prototype.call%"),b=f("%Reflect.apply%",!0)||c.call(i,n),o=t(30655),s=f("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new r("a function is required");var a=b(c,i,arguments);return d(a,1+s(0,e.length-(arguments.length-1)),!0)};var l=function(){return b(c,n,arguments)};o?o(e.exports,"apply",{value:l}):e.exports.apply=l},56168:(e,a,t)=>{var c=t(92861).Buffer,f=t(88310).Transform,d=t(83141).I;function r(e){f.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}t(56698)(r,f),r.prototype.update=function(e,a,t){"string"==typeof e&&(e=c.from(e,a));var f=this._update(e);return this.hashMode?this:(t&&(f=this._toString(f,t)),f)},r.prototype.setAutoPadding=function(){},r.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},r.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},r.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},r.prototype._transform=function(e,a,t){var c;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){c=e}finally{t(c)}},r.prototype._flush=function(e){var a;try{this.push(this.__final())}catch(e){a=e}e(a)},r.prototype._finalOrDigest=function(e){var a=this.__final()||c.alloc(0);return e&&(a=this._toString(a,e,!0)),a},r.prototype._toString=function(e,a,t){if(this._decoder||(this._decoder=new d(a),this._encoding=a),this._encoding!==a)throw new Error("can't switch encodings");var c=this._decoder.write(e);return t&&(c+=this._decoder.end()),c},e.exports=r},15622:(e,a,t)=>{function c(e){return Object.prototype.toString.call(e)}a.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===c(e)},a.isBoolean=function(e){return"boolean"==typeof e},a.isNull=function(e){return null===e},a.isNullOrUndefined=function(e){return null==e},a.isNumber=function(e){return"number"==typeof e},a.isString=function(e){return"string"==typeof e},a.isSymbol=function(e){return"symbol"==typeof e},a.isUndefined=function(e){return void 0===e},a.isRegExp=function(e){return"[object RegExp]"===c(e)},a.isObject=function(e){return"object"==typeof e&&null!==e},a.isDate=function(e){return"[object Date]"===c(e)},a.isError=function(e){return"[object Error]"===c(e)||e instanceof Error},a.isFunction=function(e){return"function"==typeof e},a.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},a.isBuffer=t(48287).Buffer.isBuffer},61324:(e,a,t)=>{var c=t(48287).Buffer,f=t(86729),d=t(92801);e.exports=function(e){return new n(e)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function n(e){this.curveType=r[e],this.curveType||(this.curveType={name:e}),this.curve=new f.ec(this.curveType.name),this.keys=void 0}function i(e,a,t){Array.isArray(e)||(e=e.toArray());var f=new c(e);if(t&&f.length=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},47108:(e,a,t)=>{"use strict";var c=t(56698),f=t(88276),d=t(66011),r=t(62802),n=t(56168);function i(e){n.call(this,"digest"),this._hash=e}c(i,n),i.prototype._update=function(e){this._hash.update(e)},i.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new f:"rmd160"===e||"ripemd160"===e?new d:new i(r(e))}},20320:(e,a,t)=>{var c=t(88276);e.exports=function(e){return(new c).update(e).digest()}},83507:(e,a,t)=>{"use strict";var c=t(56698),f=t(41800),d=t(56168),r=t(92861).Buffer,n=t(20320),i=t(66011),b=t(62802),o=r.alloc(128);function s(e,a){d.call(this,"digest"),"string"==typeof a&&(a=r.from(a));var t="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=a,a.length>t?a=("rmd160"===e?new i:b(e)).update(a).digest():a.length{"use strict";var c=t(56698),f=t(92861).Buffer,d=t(56168),r=f.alloc(128),n=64;function i(e,a){d.call(this,"digest"),"string"==typeof a&&(a=f.from(a)),this._alg=e,this._key=a,a.length>n?a=e(a):a.length{var c="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==t.g&&t.g,f=function(){function e(){this.fetch=!1,this.DOMException=c.DOMException}return e.prototype=c,new e}();!function(e){!function(a){var t=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==t&&t,c="URLSearchParams"in t,f="Symbol"in t&&"iterator"in Symbol,d="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),r="FormData"in t,n="ArrayBuffer"in t;if(n)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function s(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var a={next:function(){var a=e.shift();return{done:void 0===a,value:a}}};return f&&(a[Symbol.iterator]=function(){return a}),a}function u(e){this.map={},e instanceof u?e.forEach((function(e,a){this.append(a,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(a){this.append(a,e[a])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(a,t){e.onload=function(){a(e.result)},e.onerror=function(){t(e.error)}}))}function g(e){var a=new FileReader,t=p(a);return a.readAsArrayBuffer(e),t}function m(e){if(e.slice)return e.slice(0);var a=new Uint8Array(e.byteLength);return a.set(new Uint8Array(e)),a.buffer}function x(){return this.bodyUsed=!1,this._initBody=function(e){var a;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:d&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:c&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():n&&d&&(a=e)&&DataView.prototype.isPrototypeOf(a)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n&&(ArrayBuffer.prototype.isPrototypeOf(e)||b(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):c&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},d&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,a,t,c=h(this);if(c)return c;if(this._bodyBlob)return e=this._bodyBlob,t=p(a=new FileReader),a.readAsText(e),t;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var a=new Uint8Array(e),t=new Array(a.length),c=0;c-1?c:t),this.mode=a.mode||this.mode||null,this.signal=a.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&f)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(f),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==a.cache&&"no-cache"!==a.cache)){var d=/([?&])_=[^&]*/;d.test(this.url)?this.url=this.url.replace(d,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function v(e){var a=new FormData;return e.trim().split("&").forEach((function(e){if(e){var t=e.split("="),c=t.shift().replace(/\+/g," "),f=t.join("=").replace(/\+/g," ");a.append(decodeURIComponent(c),decodeURIComponent(f))}})),a}function w(e,a){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');a||(a={}),this.type="default",this.status=void 0===a.status?200:a.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===a.statusText?"":""+a.statusText,this.headers=new u(a.headers),this.url=a.url||"",this._initBody(e)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})},x.call(A.prototype),x.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var _=[301,302,303,307,308];w.redirect=function(e,a){if(-1===_.indexOf(a))throw new RangeError("Invalid status code");return new w(null,{status:a,headers:{location:e}})},a.DOMException=t.DOMException;try{new a.DOMException}catch(e){a.DOMException=function(e,a){this.message=e,this.name=a;var t=Error(e);this.stack=t.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function I(e,c){return new Promise((function(f,r){var i=new A(e,c);if(i.signal&&i.signal.aborted)return r(new a.DOMException("Aborted","AbortError"));var b=new XMLHttpRequest;function o(){b.abort()}b.onload=function(){var e,a,t={status:b.status,statusText:b.statusText,headers:(e=b.getAllResponseHeaders()||"",a=new u,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var t=e.split(":"),c=t.shift().trim();if(c){var f=t.join(":").trim();a.append(c,f)}})),a)};t.url="responseURL"in b?b.responseURL:t.headers.get("X-Request-URL");var c="response"in b?b.response:b.responseText;setTimeout((function(){f(new w(c,t))}),0)},b.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},b.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},b.onabort=function(){setTimeout((function(){r(new a.DOMException("Aborted","AbortError"))}),0)},b.open(i.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(a){return e}}(i.url),!0),"include"===i.credentials?b.withCredentials=!0:"omit"===i.credentials&&(b.withCredentials=!1),"responseType"in b&&(d?b.responseType="blob":n&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(b.responseType="arraybuffer")),!c||"object"!=typeof c.headers||c.headers instanceof u?i.headers.forEach((function(e,a){b.setRequestHeader(a,e)})):Object.getOwnPropertyNames(c.headers).forEach((function(e){b.setRequestHeader(e,s(c.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",o),b.onreadystatechange=function(){4===b.readyState&&i.signal.removeEventListener("abort",o)}),b.send(void 0===i._bodyInit?null:i._bodyInit)}))}I.polyfill=!0,t.fetch||(t.fetch=I,t.Headers=u,t.Request=A,t.Response=w),a.Headers=u,a.Request=A,a.Response=w,a.fetch=I}({})}(f),f.fetch.ponyfill=!0,delete f.fetch.polyfill;var d=c.fetch?c:f;(a=d.fetch).default=d.fetch,a.fetch=d.fetch,a.Headers=d.Headers,a.Request=d.Request,a.Response=d.Response,e.exports=a},91565:(e,a,t)=>{"use strict";a.randomBytes=a.rng=a.pseudoRandomBytes=a.prng=t(53209),a.createHash=a.Hash=t(47108),a.createHmac=a.Hmac=t(83507);var c=t(55715),f=Object.keys(c),d=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(f);a.getHashes=function(){return d};var r=t(78396);a.pbkdf2=r.pbkdf2,a.pbkdf2Sync=r.pbkdf2Sync;var n=t(30125);a.Cipher=n.Cipher,a.createCipher=n.createCipher,a.Cipheriv=n.Cipheriv,a.createCipheriv=n.createCipheriv,a.Decipher=n.Decipher,a.createDecipher=n.createDecipher,a.Decipheriv=n.Decipheriv,a.createDecipheriv=n.createDecipheriv,a.getCiphers=n.getCiphers,a.listCiphers=n.listCiphers;var i=t(15380);a.DiffieHellmanGroup=i.DiffieHellmanGroup,a.createDiffieHellmanGroup=i.createDiffieHellmanGroup,a.getDiffieHellman=i.getDiffieHellman,a.createDiffieHellman=i.createDiffieHellman,a.DiffieHellman=i.DiffieHellman;var b=t(20);a.createSign=b.createSign,a.Sign=b.Sign,a.createVerify=b.createVerify,a.Verify=b.Verify,a.createECDH=t(61324);var o=t(97168);a.publicEncrypt=o.publicEncrypt,a.privateEncrypt=o.privateEncrypt,a.publicDecrypt=o.publicDecrypt,a.privateDecrypt=o.privateDecrypt;var s=t(76983);a.randomFill=s.randomFill,a.randomFillSync=s.randomFillSync,a.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},a.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},17833:(e,a,t)=>{a.formatArgs=function(a){if(a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const t="color: "+this.color;a.splice(1,0,t,"color: inherit");let c=0,f=0;a[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(c++,"%c"===e&&(f=c))})),a.splice(f,0,t)},a.save=function(e){try{e?a.storage.setItem("debug",e):a.storage.removeItem("debug")}catch(e){}},a.load=function(){let e;try{e=a.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},a.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},a.storage=function(){try{return localStorage}catch(e){}}(),a.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],a.log=console.debug||console.log||(()=>{}),e.exports=t(40736)(a);const{formatters:c}=e.exports;c.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},40736:(e,a,t)=>{e.exports=function(e){function a(e){let t,f,d,r=null;function n(...e){if(!n.enabled)return;const c=n,f=Number(new Date),d=f-(t||f);c.diff=d,c.prev=t,c.curr=f,t=f,e[0]=a.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let r=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,f)=>{if("%%"===t)return"%";r++;const d=a.formatters[f];if("function"==typeof d){const a=e[r];t=d.call(c,a),e.splice(r,1),r--}return t})),a.formatArgs.call(c,e),(c.log||a.log).apply(c,e)}return n.namespace=e,n.useColors=a.useColors(),n.color=a.selectColor(e),n.extend=c,n.destroy=a.destroy,Object.defineProperty(n,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==r?r:(f!==a.namespaces&&(f=a.namespaces,d=a.enabled(e)),d),set:e=>{r=e}}),"function"==typeof a.init&&a.init(n),n}function c(e,t){const c=a(this.namespace+(void 0===t?":":t)+e);return c.log=this.log,c}function f(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return a.debug=a,a.default=a,a.coerce=function(e){return e instanceof Error?e.stack||e.message:e},a.disable=function(){const e=[...a.names.map(f),...a.skips.map(f).map((e=>"-"+e))].join(",");return a.enable(""),e},a.enable=function(e){let t;a.save(e),a.namespaces=e,a.names=[],a.skips=[];const c=("string"==typeof e?e:"").split(/[\s,]+/),f=c.length;for(t=0;t{a[t]=e[t]})),a.names=[],a.skips=[],a.formatters={},a.selectColor=function(e){let t=0;for(let a=0;a{"use strict";var c=t(30655),f=t(58068),d=t(69675),r=t(75795);e.exports=function(e,a,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new d("`obj` must be an object or a function`");if("string"!=typeof a&&"symbol"!=typeof a)throw new d("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new d("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new d("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new d("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new d("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,b=arguments.length>5?arguments[5]:null,o=arguments.length>6&&arguments[6],s=!!r&&r(e,a);if(c)c(e,a,{configurable:null===b&&s?s.configurable:!b,enumerable:null===n&&s?s.enumerable:!n,value:t,writable:null===i&&s?s.writable:!i});else{if(!o&&(n||i||b))throw new f("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[a]=t}}},38452:(e,a,t)=>{"use strict";var c=t(1189),f="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),d=Object.prototype.toString,r=Array.prototype.concat,n=t(30041),i=t(30592)(),b=function(e,a,t,c){if(a in e)if(!0===c){if(e[a]===t)return}else if("function"!=typeof(f=c)||"[object Function]"!==d.call(f)||!c())return;var f;i?n(e,a,t,!0):n(e,a,t)},o=function(e,a){var t=arguments.length>2?arguments[2]:{},d=c(a);f&&(d=r.call(d,Object.getOwnPropertySymbols(a)));for(var n=0;n{"use strict";a.utils=t(87626),a.Cipher=t(82808),a.DES=t(82211),a.CBC=t(3389),a.EDE=t(65279)},3389:(e,a,t)=>{"use strict";var c=t(43349),f=t(56698),d={};function r(e){c.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var a=0;a{"use strict";var c=t(43349);function f(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}e.exports=f,f.prototype._init=function(){},f.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},f.prototype._buffer=function(e,a){for(var t=Math.min(this.buffer.length-this.bufferOff,e.length-a),c=0;c0;c--)a+=this._buffer(e,a),t+=this._flushBuffer(f,t);return a+=this._buffer(e,a),f},f.prototype.final=function(e){var a,t;return e&&(a=this.update(e)),t="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),a?a.concat(t):t},f.prototype._pad=function(e,a){if(0===a)return!1;for(;a{"use strict";var c=t(43349),f=t(56698),d=t(87626),r=t(82808);function n(){this.tmp=new Array(2),this.keys=null}function i(e){r.call(this,e);var a=new n;this._desState=a,this.deriveKeys(a,e.key)}f(i,r),e.exports=i,i.create=function(e){return new i(e)};var b=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];i.prototype.deriveKeys=function(e,a){e.keys=new Array(32),c.equal(a.length,this.blockSize,"Invalid key length");var t=d.readUInt32BE(a,0),f=d.readUInt32BE(a,4);d.pc1(t,f,e.tmp,0),t=e.tmp[0],f=e.tmp[1];for(var r=0;r>>1];t=d.r28shl(t,n),f=d.r28shl(f,n),d.pc2(t,f,e.keys,r)}},i.prototype._update=function(e,a,t,c){var f=this._desState,r=d.readUInt32BE(e,a),n=d.readUInt32BE(e,a+4);d.ip(r,n,f.tmp,0),r=f.tmp[0],n=f.tmp[1],"encrypt"===this.type?this._encrypt(f,r,n,f.tmp,0):this._decrypt(f,r,n,f.tmp,0),r=f.tmp[0],n=f.tmp[1],d.writeUInt32BE(t,r,c),d.writeUInt32BE(t,n,c+4)},i.prototype._pad=function(e,a){if(!1===this.padding)return!1;for(var t=e.length-a,c=a;c>>0,r=l}d.rip(n,r,c,f)},i.prototype._decrypt=function(e,a,t,c,f){for(var r=t,n=a,i=e.keys.length-2;i>=0;i-=2){var b=e.keys[i],o=e.keys[i+1];d.expand(r,e.tmp,0),b^=e.tmp[0],o^=e.tmp[1];var s=d.substitute(b,o),l=r;r=(n^d.permute(s))>>>0,n=l}d.rip(r,n,c,f)}},65279:(e,a,t)=>{"use strict";var c=t(43349),f=t(56698),d=t(82808),r=t(82211);function n(e,a){c.equal(a.length,24,"Invalid key length");var t=a.slice(0,8),f=a.slice(8,16),d=a.slice(16,24);this.ciphers="encrypt"===e?[r.create({type:"encrypt",key:t}),r.create({type:"decrypt",key:f}),r.create({type:"encrypt",key:d})]:[r.create({type:"decrypt",key:d}),r.create({type:"encrypt",key:f}),r.create({type:"decrypt",key:t})]}function i(e){d.call(this,e);var a=new n(this.type,this.options.key);this._edeState=a}f(i,d),e.exports=i,i.create=function(e){return new i(e)},i.prototype._update=function(e,a,t,c){var f=this._edeState;f.ciphers[0]._update(e,a,t,c),f.ciphers[1]._update(t,c,t,c),f.ciphers[2]._update(t,c,t,c)},i.prototype._pad=r.prototype._pad,i.prototype._unpad=r.prototype._unpad},87626:(e,a)=>{"use strict";a.readUInt32BE=function(e,a){return(e[0+a]<<24|e[1+a]<<16|e[2+a]<<8|e[3+a])>>>0},a.writeUInt32BE=function(e,a,t){e[0+t]=a>>>24,e[1+t]=a>>>16&255,e[2+t]=a>>>8&255,e[3+t]=255&a},a.ip=function(e,a,t,c){for(var f=0,d=0,r=6;r>=0;r-=2){for(var n=0;n<=24;n+=8)f<<=1,f|=a>>>n+r&1;for(n=0;n<=24;n+=8)f<<=1,f|=e>>>n+r&1}for(r=6;r>=0;r-=2){for(n=1;n<=25;n+=8)d<<=1,d|=a>>>n+r&1;for(n=1;n<=25;n+=8)d<<=1,d|=e>>>n+r&1}t[c+0]=f>>>0,t[c+1]=d>>>0},a.rip=function(e,a,t,c){for(var f=0,d=0,r=0;r<4;r++)for(var n=24;n>=0;n-=8)f<<=1,f|=a>>>n+r&1,f<<=1,f|=e>>>n+r&1;for(r=4;r<8;r++)for(n=24;n>=0;n-=8)d<<=1,d|=a>>>n+r&1,d<<=1,d|=e>>>n+r&1;t[c+0]=f>>>0,t[c+1]=d>>>0},a.pc1=function(e,a,t,c){for(var f=0,d=0,r=7;r>=5;r--){for(var n=0;n<=24;n+=8)f<<=1,f|=a>>n+r&1;for(n=0;n<=24;n+=8)f<<=1,f|=e>>n+r&1}for(n=0;n<=24;n+=8)f<<=1,f|=a>>n+r&1;for(r=1;r<=3;r++){for(n=0;n<=24;n+=8)d<<=1,d|=a>>n+r&1;for(n=0;n<=24;n+=8)d<<=1,d|=e>>n+r&1}for(n=0;n<=24;n+=8)d<<=1,d|=e>>n+r&1;t[c+0]=f>>>0,t[c+1]=d>>>0},a.r28shl=function(e,a){return e<>>28-a};var t=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];a.pc2=function(e,a,c,f){for(var d=0,r=0,n=t.length>>>1,i=0;i>>t[i]&1;for(i=n;i>>t[i]&1;c[f+0]=d>>>0,c[f+1]=r>>>0},a.expand=function(e,a,t){var c=0,f=0;c=(1&e)<<5|e>>>27;for(var d=23;d>=15;d-=4)c<<=6,c|=e>>>d&63;for(d=11;d>=3;d-=4)f|=e>>>d&63,f<<=6;f|=(31&e)<<1|e>>>31,a[t+0]=c>>>0,a[t+1]=f>>>0};var c=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];a.substitute=function(e,a){for(var t=0,f=0;f<4;f++)t<<=4,t|=c[64*f+(e>>>18-6*f&63)];for(f=0;f<4;f++)t<<=4,t|=c[256+64*f+(a>>>18-6*f&63)];return t>>>0};var f=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];a.permute=function(e){for(var a=0,t=0;t>>f[t]&1;return a>>>0},a.padSplit=function(e,a,t){for(var c=e.toString(2);c.length{var c=t(48287).Buffer,f=t(4934),d=t(23241),r=t(14910),n={binary:!0,hex:!0,base64:!0};a.DiffieHellmanGroup=a.createDiffieHellmanGroup=a.getDiffieHellman=function(e){var a=new c(d[e].prime,"hex"),t=new c(d[e].gen,"hex");return new r(a,t)},a.createDiffieHellman=a.DiffieHellman=function e(a,t,d,i){return c.isBuffer(t)||void 0===n[t]?e(a,"binary",t,d):(t=t||"binary",i=i||"binary",d=d||new c([2]),c.isBuffer(d)||(d=new c(d,i)),"number"==typeof a?new r(f(a,d),d,!0):(c.isBuffer(a)||(a=new c(a,t)),new r(a,d,!0)))}},14910:(e,a,t)=>{var c=t(48287).Buffer,f=t(66473),d=new(t(52244)),r=new f(24),n=new f(11),i=new f(10),b=new f(3),o=new f(7),s=t(4934),l=t(53209);function u(e,a){return a=a||"utf8",c.isBuffer(e)||(e=new c(e,a)),this._pub=new f(e),this}function h(e,a){return a=a||"utf8",c.isBuffer(e)||(e=new c(e,a)),this._priv=new f(e),this}e.exports=g;var p={};function g(e,a,t){this.setGenerator(a),this.__prime=new f(e),this._prime=f.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,t?(this.setPublicKey=u,this.setPrivateKey=h):this._primeCode=8}function m(e,a){var t=new c(e.toArray());return a?t.toString(a):t}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,a){var t=a.toString("hex"),c=[t,e.toString(16)].join("_");if(c in p)return p[c];var f,l=0;if(e.isEven()||!s.simpleSieve||!s.fermatTest(e)||!d.test(e))return l+=1,l+="02"===t||"05"===t?8:4,p[c]=l,l;switch(d.test(e.shrn(1))||(l+=2),t){case"02":e.mod(r).cmp(n)&&(l+=8);break;case"05":(f=e.mod(i)).cmp(b)&&f.cmp(o)&&(l+=8);break;default:l+=4}return p[c]=l,l}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new f(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(e){var a=(e=(e=new f(e)).toRed(this._prime)).redPow(this._priv).fromRed(),t=new c(a.toArray()),d=this.getPrime();if(t.length{var c=t(53209);e.exports=x,x.simpleSieve=g,x.fermatTest=m;var f=t(66473),d=new f(24),r=new(t(52244)),n=new f(1),i=new f(2),b=new f(5),o=(new f(16),new f(8),new f(10)),s=new f(3),l=(new f(7),new f(11)),u=new f(4),h=(new f(12),null);function p(){if(null!==h)return h;var e=[];e[0]=2;for(var a=1,t=3;t<1048576;t+=2){for(var c=Math.ceil(Math.sqrt(t)),f=0;fe;)t.ishrn(1);if(t.isEven()&&t.iadd(n),t.testn(1)||t.iadd(i),a.cmp(i)){if(!a.cmp(b))for(;t.mod(o).cmp(s);)t.iadd(u)}else for(;t.mod(d).cmp(l);)t.iadd(u);if(g(h=t.shrn(1))&&g(t)&&m(h)&&m(t)&&r.test(h)&&r.test(t))return t}}},66473:function(e,a,t){!function(e,a){"use strict";function c(e,a){if(!e)throw new Error(a||"Assertion failed")}function f(e,a){e.super_=a;var t=function(){};t.prototype=a.prototype,e.prototype=new t,e.prototype.constructor=e}function d(e,a,t){if(d.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==a&&"be"!==a||(t=a,a=10),this._init(e||0,a||10,t||"be"))}var r;"object"==typeof e?e.exports=d:a.BN=d,d.BN=d,d.wordSize=26;try{r="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(66089).Buffer}catch(e){}function n(e,a){var t=e.charCodeAt(a);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},86729:(e,a,t)=>{"use strict";var c=a;c.version=t(1636).rE,c.utils=t(47011),c.rand=t(15037),c.curve=t(894),c.curves=t(60480),c.ec=t(57447),c.eddsa=t(8650)},36677:(e,a,t)=>{"use strict";var c=t(28490),f=t(47011),d=f.getNAF,r=f.getJSF,n=f.assert;function i(e,a){this.type=e,this.p=new c(a.p,16),this.red=a.prime?c.red(a.prime):c.mont(this.p),this.zero=new c(0).toRed(this.red),this.one=new c(1).toRed(this.red),this.two=new c(2).toRed(this.red),this.n=a.n&&new c(a.n,16),this.g=a.g&&this.pointFromJSON(a.g,a.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))}function b(e,a){this.curve=e,this.type=a,this.precomputed=null}e.exports=i,i.prototype.point=function(){throw new Error("Not implemented")},i.prototype.validate=function(){throw new Error("Not implemented")},i.prototype._fixedNafMul=function(e,a){n(e.precomputed);var t=e._getDoubles(),c=d(a,1,this._bitLength),f=(1<=r;o--)i=(i<<1)+c[o];b.push(i)}for(var s=this.jpoint(null,null,null),l=this.jpoint(null,null,null),u=f;u>0;u--){for(r=0;r=0;b--){for(var o=0;b>=0&&0===r[b];b--)o++;if(b>=0&&o++,i=i.dblp(o),b<0)break;var s=r[b];n(0!==s),i="affine"===e.type?s>0?i.mixedAdd(f[s-1>>1]):i.mixedAdd(f[-s-1>>1].neg()):s>0?i.add(f[s-1>>1]):i.add(f[-s-1>>1].neg())}return"affine"===e.type?i.toP():i},i.prototype._wnafMulAdd=function(e,a,t,c,f){var n,i,b,o=this._wnafT1,s=this._wnafT2,l=this._wnafT3,u=0;for(n=0;n=1;n-=2){var p=n-1,g=n;if(1===o[p]&&1===o[g]){var m=[a[p],null,null,a[g]];0===a[p].y.cmp(a[g].y)?(m[1]=a[p].add(a[g]),m[2]=a[p].toJ().mixedAdd(a[g].neg())):0===a[p].y.cmp(a[g].y.redNeg())?(m[1]=a[p].toJ().mixedAdd(a[g]),m[2]=a[p].add(a[g].neg())):(m[1]=a[p].toJ().mixedAdd(a[g]),m[2]=a[p].toJ().mixedAdd(a[g].neg()));var x=[-3,-1,-5,-7,0,7,5,1,3],y=r(t[p],t[g]);for(u=Math.max(y[0].length,u),l[p]=new Array(u),l[g]=new Array(u),i=0;i=0;n--){for(var I=0;n>=0;){var E=!0;for(i=0;i=0&&I++,w=w.dblp(I),n<0)break;for(i=0;i0?b=s[i][C-1>>1]:C<0&&(b=s[i][-C-1>>1].neg()),w="affine"===b.type?w.mixedAdd(b):w.add(b))}}for(n=0;n=Math.ceil((e.bitLength()+1)/a.step)},b.prototype._getDoubles=function(e,a){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var t=[this],c=this,f=0;f{"use strict";var c=t(47011),f=t(28490),d=t(56698),r=t(36677),n=c.assert;function i(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,r.call(this,"edwards",e),this.a=new f(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new f(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new f(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),n(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function b(e,a,t,c,d){r.BasePoint.call(this,e,"projective"),null===a&&null===t&&null===c?(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 f(a,16),this.y=new f(t,16),this.z=c?new f(c,16):this.curve.one,this.t=d&&new f(d,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()))))}d(i,r),e.exports=i,i.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},i.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},i.prototype.jpoint=function(e,a,t,c){return this.point(e,a,t,c)},i.prototype.pointFromX=function(e,a){(e=new f(e,16)).red||(e=e.toRed(this.red));var t=e.redSqr(),c=this.c2.redSub(this.a.redMul(t)),d=this.one.redSub(this.c2.redMul(this.d).redMul(t)),r=c.redMul(d.redInvm()),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(a&&!i||!a&&i)&&(n=n.redNeg()),this.point(e,n)},i.prototype.pointFromY=function(e,a){(e=new f(e,16)).red||(e=e.toRed(this.red));var t=e.redSqr(),c=t.redSub(this.c2),d=t.redMul(this.d).redMul(this.c2).redSub(this.a),r=c.redMul(d.redInvm());if(0===r.cmp(this.zero)){if(a)throw new Error("invalid point");return this.point(this.zero,e)}var n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");return n.fromRed().isOdd()!==a&&(n=n.redNeg()),this.point(n,e)},i.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var a=e.x.redSqr(),t=e.y.redSqr(),c=a.redMul(this.a).redAdd(t),f=this.c2.redMul(this.one.redAdd(this.d.redMul(a).redMul(t)));return 0===c.cmp(f)},d(b,r.BasePoint),i.prototype.pointFromJSON=function(e){return b.fromJSON(this,e)},i.prototype.point=function(e,a,t,c){return new b(this,e,a,t,c)},b.fromJSON=function(e,a){return new b(e,a[0],a[1],a[2])},b.prototype.inspect=function(){return this.isInfinity()?"":""},b.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},b.prototype._extDbl=function(){var e=this.x.redSqr(),a=this.y.redSqr(),t=this.z.redSqr();t=t.redIAdd(t);var c=this.curve._mulA(e),f=this.x.redAdd(this.y).redSqr().redISub(e).redISub(a),d=c.redAdd(a),r=d.redSub(t),n=c.redSub(a),i=f.redMul(r),b=d.redMul(n),o=f.redMul(n),s=r.redMul(d);return this.curve.point(i,b,s,o)},b.prototype._projDbl=function(){var e,a,t,c,f,d,r=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),i=this.y.redSqr();if(this.curve.twisted){var b=(c=this.curve._mulA(n)).redAdd(i);this.zOne?(e=r.redSub(n).redSub(i).redMul(b.redSub(this.curve.two)),a=b.redMul(c.redSub(i)),t=b.redSqr().redSub(b).redSub(b)):(f=this.z.redSqr(),d=b.redSub(f).redISub(f),e=r.redSub(n).redISub(i).redMul(d),a=b.redMul(c.redSub(i)),t=b.redMul(d))}else c=n.redAdd(i),f=this.curve._mulC(this.z).redSqr(),d=c.redSub(f).redSub(f),e=this.curve._mulC(r.redISub(c)).redMul(d),a=this.curve._mulC(c).redMul(n.redISub(i)),t=c.redMul(d);return this.curve.point(e,a,t)},b.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},b.prototype._extAdd=function(e){var a=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),t=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),c=this.t.redMul(this.curve.dd).redMul(e.t),f=this.z.redMul(e.z.redAdd(e.z)),d=t.redSub(a),r=f.redSub(c),n=f.redAdd(c),i=t.redAdd(a),b=d.redMul(r),o=n.redMul(i),s=d.redMul(i),l=r.redMul(n);return this.curve.point(b,o,l,s)},b.prototype._projAdd=function(e){var a,t,c=this.z.redMul(e.z),f=c.redSqr(),d=this.x.redMul(e.x),r=this.y.redMul(e.y),n=this.curve.d.redMul(d).redMul(r),i=f.redSub(n),b=f.redAdd(n),o=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(d).redISub(r),s=c.redMul(i).redMul(o);return this.curve.twisted?(a=c.redMul(b).redMul(r.redSub(this.curve._mulA(d))),t=i.redMul(b)):(a=c.redMul(b).redMul(r.redSub(d)),t=this.curve._mulC(i).redMul(b)),this.curve.point(s,a,t)},b.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},b.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},b.prototype.mulAdd=function(e,a,t){return this.curve._wnafMulAdd(1,[this,a],[e,t],2,!1)},b.prototype.jmulAdd=function(e,a,t){return this.curve._wnafMulAdd(1,[this,a],[e,t],2,!0)},b.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},b.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},b.prototype.getX=function(){return this.normalize(),this.x.fromRed()},b.prototype.getY=function(){return this.normalize(),this.y.fromRed()},b.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},b.prototype.eqXToP=function(e){var a=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(a))return!0;for(var t=e.clone(),c=this.curve.redN.redMul(this.z);;){if(t.iadd(this.curve.n),t.cmp(this.curve.p)>=0)return!1;if(a.redIAdd(c),0===this.x.cmp(a))return!0}},b.prototype.toP=b.prototype.normalize,b.prototype.mixedAdd=b.prototype.add},894:(e,a,t)=>{"use strict";var c=a;c.base=t(36677),c.short=t(39188),c.mont=t(30370),c.edwards=t(31298)},30370:(e,a,t)=>{"use strict";var c=t(28490),f=t(56698),d=t(36677),r=t(47011);function n(e){d.call(this,"mont",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.b,16).toRed(this.red),this.i4=new c(4).toRed(this.red).redInvm(),this.two=new c(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(e,a,t){d.BasePoint.call(this,e,"projective"),null===a&&null===t?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new c(a,16),this.z=new c(t,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}f(n,d),e.exports=n,n.prototype.validate=function(e){var a=e.normalize().x,t=a.redSqr(),c=t.redMul(a).redAdd(t.redMul(this.a)).redAdd(a);return 0===c.redSqrt().redSqr().cmp(c)},f(i,d.BasePoint),n.prototype.decodePoint=function(e,a){return this.point(r.toArray(e,a),1)},n.prototype.point=function(e,a){return new i(this,e,a)},n.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},i.prototype.precompute=function(){},i.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},i.fromJSON=function(e,a){return new i(e,a[0],a[1]||e.one)},i.prototype.inspect=function(){return this.isInfinity()?"":""},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),a=this.x.redSub(this.z).redSqr(),t=e.redSub(a),c=e.redMul(a),f=t.redMul(a.redAdd(this.curve.a24.redMul(t)));return this.curve.point(c,f)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(e,a){var t=this.x.redAdd(this.z),c=this.x.redSub(this.z),f=e.x.redAdd(e.z),d=e.x.redSub(e.z).redMul(t),r=f.redMul(c),n=a.z.redMul(d.redAdd(r).redSqr()),i=a.x.redMul(d.redISub(r).redSqr());return this.curve.point(n,i)},i.prototype.mul=function(e){for(var a=e.clone(),t=this,c=this.curve.point(null,null),f=[];0!==a.cmpn(0);a.iushrn(1))f.push(a.andln(1));for(var d=f.length-1;d>=0;d--)0===f[d]?(t=t.diffAdd(c,this),c=c.dbl()):(c=t.diffAdd(c,this),t=t.dbl());return c},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},39188:(e,a,t)=>{"use strict";var c=t(47011),f=t(28490),d=t(56698),r=t(36677),n=c.assert;function i(e){r.call(this,"short",e),this.a=new f(e.a,16).toRed(this.red),this.b=new f(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function b(e,a,t,c){r.BasePoint.call(this,e,"affine"),null===a&&null===t?(this.x=null,this.y=null,this.inf=!0):(this.x=new f(a,16),this.y=new f(t,16),c&&(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)}function o(e,a,t,c){r.BasePoint.call(this,e,"jacobian"),null===a&&null===t&&null===c?(this.x=this.curve.one,this.y=this.curve.one,this.z=new f(0)):(this.x=new f(a,16),this.y=new f(t,16),this.z=new f(c,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}d(i,r),e.exports=i,i.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var a,t;if(e.beta)a=new f(e.beta,16).toRed(this.red);else{var c=this._getEndoRoots(this.p);a=(a=c[0].cmp(c[1])<0?c[0]:c[1]).toRed(this.red)}if(e.lambda)t=new f(e.lambda,16);else{var d=this._getEndoRoots(this.n);0===this.g.mul(d[0]).x.cmp(this.g.x.redMul(a))?t=d[0]:(t=d[1],n(0===this.g.mul(t).x.cmp(this.g.x.redMul(a))))}return{beta:a,lambda:t,basis:e.basis?e.basis.map((function(e){return{a:new f(e.a,16),b:new f(e.b,16)}})):this._getEndoBasis(t)}}},i.prototype._getEndoRoots=function(e){var a=e===this.p?this.red:f.mont(e),t=new f(2).toRed(a).redInvm(),c=t.redNeg(),d=new f(3).toRed(a).redNeg().redSqrt().redMul(t);return[c.redAdd(d).fromRed(),c.redSub(d).fromRed()]},i.prototype._getEndoBasis=function(e){for(var a,t,c,d,r,n,i,b,o,s=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,u=this.n.clone(),h=new f(1),p=new f(0),g=new f(0),m=new f(1),x=0;0!==l.cmpn(0);){var y=u.div(l);b=u.sub(y.mul(l)),o=g.sub(y.mul(h));var A=m.sub(y.mul(p));if(!c&&b.cmp(s)<0)a=i.neg(),t=h,c=b.neg(),d=o;else if(c&&2==++x)break;i=b,u=l,l=b,g=h,h=o,m=p,p=A}r=b.neg(),n=o;var v=c.sqr().add(d.sqr());return r.sqr().add(n.sqr()).cmp(v)>=0&&(r=a,n=t),c.negative&&(c=c.neg(),d=d.neg()),r.negative&&(r=r.neg(),n=n.neg()),[{a:c,b:d},{a:r,b:n}]},i.prototype._endoSplit=function(e){var a=this.endo.basis,t=a[0],c=a[1],f=c.b.mul(e).divRound(this.n),d=t.b.neg().mul(e).divRound(this.n),r=f.mul(t.a),n=d.mul(c.a),i=f.mul(t.b),b=d.mul(c.b);return{k1:e.sub(r).sub(n),k2:i.add(b).neg()}},i.prototype.pointFromX=function(e,a){(e=new f(e,16)).red||(e=e.toRed(this.red));var t=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),c=t.redSqrt();if(0!==c.redSqr().redSub(t).cmp(this.zero))throw new Error("invalid point");var d=c.fromRed().isOdd();return(a&&!d||!a&&d)&&(c=c.redNeg()),this.point(e,c)},i.prototype.validate=function(e){if(e.inf)return!0;var a=e.x,t=e.y,c=this.a.redMul(a),f=a.redSqr().redMul(a).redIAdd(c).redIAdd(this.b);return 0===t.redSqr().redISub(f).cmpn(0)},i.prototype._endoWnafMulAdd=function(e,a,t){for(var c=this._endoWnafT1,f=this._endoWnafT2,d=0;d":""},b.prototype.isInfinity=function(){return this.inf},b.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(0===this.x.cmp(e.x))return this.curve.point(null,null);var a=this.y.redSub(e.y);0!==a.cmpn(0)&&(a=a.redMul(this.x.redSub(e.x).redInvm()));var t=a.redSqr().redISub(this.x).redISub(e.x),c=a.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,c)},b.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var a=this.curve.a,t=this.x.redSqr(),c=e.redInvm(),f=t.redAdd(t).redIAdd(t).redIAdd(a).redMul(c),d=f.redSqr().redISub(this.x.redAdd(this.x)),r=f.redMul(this.x.redSub(d)).redISub(this.y);return this.curve.point(d,r)},b.prototype.getX=function(){return this.x.fromRed()},b.prototype.getY=function(){return this.y.fromRed()},b.prototype.mul=function(e){return e=new f(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)},b.prototype.mulAdd=function(e,a,t){var c=[this,a],f=[e,t];return this.curve.endo?this.curve._endoWnafMulAdd(c,f):this.curve._wnafMulAdd(1,c,f,2)},b.prototype.jmulAdd=function(e,a,t){var c=[this,a],f=[e,t];return this.curve.endo?this.curve._endoWnafMulAdd(c,f,!0):this.curve._wnafMulAdd(1,c,f,2,!0)},b.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},b.prototype.neg=function(e){if(this.inf)return this;var a=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var t=this.precomputed,c=function(e){return e.neg()};a.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(c)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(c)}}}return a},b.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},d(o,r.BasePoint),i.prototype.jpoint=function(e,a,t){return new o(this,e,a,t)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),a=e.redSqr(),t=this.x.redMul(a),c=this.y.redMul(a).redMul(e);return this.curve.point(t,c)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var a=e.z.redSqr(),t=this.z.redSqr(),c=this.x.redMul(a),f=e.x.redMul(t),d=this.y.redMul(a.redMul(e.z)),r=e.y.redMul(t.redMul(this.z)),n=c.redSub(f),i=d.redSub(r);if(0===n.cmpn(0))return 0!==i.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var b=n.redSqr(),o=b.redMul(n),s=c.redMul(b),l=i.redSqr().redIAdd(o).redISub(s).redISub(s),u=i.redMul(s.redISub(l)).redISub(d.redMul(o)),h=this.z.redMul(e.z).redMul(n);return this.curve.jpoint(l,u,h)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var a=this.z.redSqr(),t=this.x,c=e.x.redMul(a),f=this.y,d=e.y.redMul(a).redMul(this.z),r=t.redSub(c),n=f.redSub(d);if(0===r.cmpn(0))return 0!==n.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var i=r.redSqr(),b=i.redMul(r),o=t.redMul(i),s=n.redSqr().redIAdd(b).redISub(o).redISub(o),l=n.redMul(o.redISub(s)).redISub(f.redMul(b)),u=this.z.redMul(r);return this.curve.jpoint(s,l,u)},o.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var a;if(this.curve.zeroA||this.curve.threeA){var t=this;for(a=0;a=0)return!1;if(t.redIAdd(f),0===this.x.cmp(t))return!0}},o.prototype.inspect=function(){return this.isInfinity()?"":""},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},60480:(e,a,t)=>{"use strict";var c,f=a,d=t(77952),r=t(894),n=t(47011).assert;function i(e){"short"===e.type?this.curve=new r.short(e):"edwards"===e.type?this.curve=new r.edwards(e):this.curve=new r.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function b(e,a){Object.defineProperty(f,e,{configurable:!0,enumerable:!0,get:function(){var t=new i(a);return Object.defineProperty(f,e,{configurable:!0,enumerable:!0,value:t}),t}})}f.PresetCurve=i,b("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:d.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),b("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:d.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),b("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:d.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),b("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:d.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"]}),b("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:d.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"]}),b("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:d.sha256,gRed:!1,g:["9"]}),b("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:d.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{c=t(74011)}catch(e){c=void 0}b("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:d.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",c]})},57447:(e,a,t)=>{"use strict";var c=t(28490),f=t(32723),d=t(47011),r=t(60480),n=t(15037),i=d.assert,b=t(61200),o=t(28545);function s(e){if(!(this instanceof s))return new s(e);"string"==typeof e&&(i(Object.prototype.hasOwnProperty.call(r,e),"Unknown curve "+e),e=r[e]),e instanceof r.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=s,s.prototype.keyPair=function(e){return new b(this,e)},s.prototype.keyFromPrivate=function(e,a){return b.fromPrivate(this,e,a)},s.prototype.keyFromPublic=function(e,a){return b.fromPublic(this,e,a)},s.prototype.genKeyPair=function(e){e||(e={});for(var a=new f({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||n(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),t=this.n.byteLength(),d=this.n.sub(new c(2));;){var r=new c(a.generate(t));if(!(r.cmp(d)>0))return r.iaddn(1),this.keyFromPrivate(r)}},s.prototype._truncateToN=function(e,a){var t=8*e.byteLength()-this.n.bitLength();return t>0&&(e=e.ushrn(t)),!a&&e.cmp(this.n)>=0?e.sub(this.n):e},s.prototype.sign=function(e,a,t,d){"object"==typeof t&&(d=t,t=null),d||(d={}),a=this.keyFromPrivate(a,t),e=this._truncateToN(new c(e,16));for(var r=this.n.byteLength(),n=a.getPrivate().toArray("be",r),i=e.toArray("be",r),b=new f({hash:this.hash,entropy:n,nonce:i,pers:d.pers,persEnc:d.persEnc||"utf8"}),s=this.n.sub(new c(1)),l=0;;l++){var u=d.k?d.k(l):new c(b.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(s)>=0)){var h=this.g.mul(u);if(!h.isInfinity()){var p=h.getX(),g=p.umod(this.n);if(0!==g.cmpn(0)){var m=u.invm(this.n).mul(g.mul(a.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var x=(h.getY().isOdd()?1:0)|(0!==p.cmp(g)?2:0);return d.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),x^=1),new o({r:g,s:m,recoveryParam:x})}}}}}},s.prototype.verify=function(e,a,t,f){e=this._truncateToN(new c(e,16)),t=this.keyFromPublic(t,f);var d=(a=new o(a,"hex")).r,r=a.s;if(d.cmpn(1)<0||d.cmp(this.n)>=0)return!1;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;var n,i=r.invm(this.n),b=i.mul(e).umod(this.n),s=i.mul(d).umod(this.n);return this.curve._maxwellTrick?!(n=this.g.jmulAdd(b,t.getPublic(),s)).isInfinity()&&n.eqXToP(d):!(n=this.g.mulAdd(b,t.getPublic(),s)).isInfinity()&&0===n.getX().umod(this.n).cmp(d)},s.prototype.recoverPubKey=function(e,a,t,f){i((3&t)===t,"The recovery param is more than two bits"),a=new o(a,f);var d=this.n,r=new c(e),n=a.r,b=a.s,s=1&t,l=t>>1;if(n.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");n=l?this.curve.pointFromX(n.add(this.curve.n),s):this.curve.pointFromX(n,s);var u=a.r.invm(d),h=d.sub(r).mul(u).umod(d),p=b.mul(u).umod(d);return this.g.mulAdd(h,n,p)},s.prototype.getKeyRecoveryParam=function(e,a,t,c){if(null!==(a=new o(a,c)).recoveryParam)return a.recoveryParam;for(var f=0;f<4;f++){var d;try{d=this.recoverPubKey(e,a,f)}catch(e){continue}if(d.eq(t))return f}throw new Error("Unable to find valid recovery factor")}},61200:(e,a,t)=>{"use strict";var c=t(28490),f=t(47011).assert;function d(e,a){this.ec=e,this.priv=null,this.pub=null,a.priv&&this._importPrivate(a.priv,a.privEnc),a.pub&&this._importPublic(a.pub,a.pubEnc)}e.exports=d,d.fromPublic=function(e,a,t){return a instanceof d?a:new d(e,{pub:a,pubEnc:t})},d.fromPrivate=function(e,a,t){return a instanceof d?a:new d(e,{priv:a,privEnc:t})},d.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"}},d.prototype.getPublic=function(e,a){return"string"==typeof e&&(a=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),a?this.pub.encode(a,e):this.pub},d.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},d.prototype._importPrivate=function(e,a){this.priv=new c(e,a||16),this.priv=this.priv.umod(this.ec.curve.n)},d.prototype._importPublic=function(e,a){if(e.x||e.y)return"mont"===this.ec.curve.type?f(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||f(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,a)},d.prototype.derive=function(e){return e.validate()||f(e.validate(),"public point not validated"),e.mul(this.priv).getX()},d.prototype.sign=function(e,a,t){return this.ec.sign(e,this,a,t)},d.prototype.verify=function(e,a){return this.ec.verify(e,a,this)},d.prototype.inspect=function(){return""}},28545:(e,a,t)=>{"use strict";var c=t(28490),f=t(47011),d=f.assert;function r(e,a){if(e instanceof r)return e;this._importDER(e,a)||(d(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function n(){this.place=0}function i(e,a){var t=e[a.place++];if(!(128&t))return t;var c=15&t;if(0===c||c>4)return!1;if(0===e[a.place])return!1;for(var f=0,d=0,r=a.place;d>>=0;return!(f<=127)&&(a.place=r,f)}function b(e){for(var a=0,t=e.length-1;!e[a]&&!(128&e[a+1])&&a>>3);for(e.push(128|t);--t;)e.push(a>>>(t<<3)&255);e.push(a)}}e.exports=r,r.prototype._importDER=function(e,a){e=f.toArray(e,a);var t=new n;if(48!==e[t.place++])return!1;var d=i(e,t);if(!1===d)return!1;if(d+t.place!==e.length)return!1;if(2!==e[t.place++])return!1;var r=i(e,t);if(!1===r)return!1;if(128&e[t.place])return!1;var b=e.slice(t.place,r+t.place);if(t.place+=r,2!==e[t.place++])return!1;var o=i(e,t);if(!1===o)return!1;if(e.length!==o+t.place)return!1;if(128&e[t.place])return!1;var s=e.slice(t.place,o+t.place);if(0===b[0]){if(!(128&b[1]))return!1;b=b.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new c(b),this.s=new c(s),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var a=this.r.toArray(),t=this.s.toArray();for(128&a[0]&&(a=[0].concat(a)),128&t[0]&&(t=[0].concat(t)),a=b(a),t=b(t);!(t[0]||128&t[1]);)t=t.slice(1);var c=[2];o(c,a.length),(c=c.concat(a)).push(2),o(c,t.length);var d=c.concat(t),r=[48];return o(r,d.length),r=r.concat(d),f.encode(r,e)}},8650:(e,a,t)=>{"use strict";var c=t(77952),f=t(60480),d=t(47011),r=d.assert,n=d.parseBytes,i=t(46661),b=t(90220);function o(e){if(r("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof o))return new o(e);e=f[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=c.sha512}e.exports=o,o.prototype.sign=function(e,a){e=n(e);var t=this.keyFromSecret(a),c=this.hashInt(t.messagePrefix(),e),f=this.g.mul(c),d=this.encodePoint(f),r=this.hashInt(d,t.pubBytes(),e).mul(t.priv()),i=c.add(r).umod(this.curve.n);return this.makeSignature({R:f,S:i,Rencoded:d})},o.prototype.verify=function(e,a,t){if(e=n(e),(a=this.makeSignature(a)).S().gte(a.eddsa.curve.n)||a.S().isNeg())return!1;var c=this.keyFromPublic(t),f=this.hashInt(a.Rencoded(),c.pubBytes(),e),d=this.g.mul(a.S());return a.R().add(c.pub().mul(f)).eq(d)},o.prototype.hashInt=function(){for(var e=this.hash(),a=0;a{"use strict";var c=t(47011),f=c.assert,d=c.parseBytes,r=c.cachedProperty;function n(e,a){this.eddsa=e,this._secret=d(a.secret),e.isPoint(a.pub)?this._pub=a.pub:this._pubBytes=d(a.pub)}n.fromPublic=function(e,a){return a instanceof n?a:new n(e,{pub:a})},n.fromSecret=function(e,a){return a instanceof n?a:new n(e,{secret:a})},n.prototype.secret=function(){return this._secret},r(n,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),r(n,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),r(n,"privBytes",(function(){var e=this.eddsa,a=this.hash(),t=e.encodingLength-1,c=a.slice(0,e.encodingLength);return c[0]&=248,c[t]&=127,c[t]|=64,c})),r(n,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),r(n,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),r(n,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),n.prototype.sign=function(e){return f(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},n.prototype.verify=function(e,a){return this.eddsa.verify(e,a,this)},n.prototype.getSecret=function(e){return f(this._secret,"KeyPair is public only"),c.encode(this.secret(),e)},n.prototype.getPublic=function(e){return c.encode(this.pubBytes(),e)},e.exports=n},90220:(e,a,t)=>{"use strict";var c=t(28490),f=t(47011),d=f.assert,r=f.cachedProperty,n=f.parseBytes;function i(e,a){this.eddsa=e,"object"!=typeof a&&(a=n(a)),Array.isArray(a)&&(d(a.length===2*e.encodingLength,"Signature has invalid size"),a={R:a.slice(0,e.encodingLength),S:a.slice(e.encodingLength)}),d(a.R&&a.S,"Signature without R or S"),e.isPoint(a.R)&&(this._R=a.R),a.S instanceof c&&(this._S=a.S),this._Rencoded=Array.isArray(a.R)?a.R:a.Rencoded,this._Sencoded=Array.isArray(a.S)?a.S:a.Sencoded}r(i,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),r(i,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),r(i,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),r(i,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),i.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},i.prototype.toHex=function(){return f.encode(this.toBytes(),"hex").toUpperCase()},e.exports=i},74011:e=>{e.exports={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"]]}}},47011:(e,a,t)=>{"use strict";var c=a,f=t(28490),d=t(43349),r=t(64367);c.assert=d,c.toArray=r.toArray,c.zero2=r.zero2,c.toHex=r.toHex,c.encode=r.encode,c.getNAF=function(e,a,t){var c,f=new Array(Math.max(e.bitLength(),t)+1);for(c=0;c(d>>1)-1?(d>>1)-i:i,r.isubn(n)):n=0,f[c]=n,r.iushrn(1)}return f},c.getJSF=function(e,a){var t=[[],[]];e=e.clone(),a=a.clone();for(var c,f=0,d=0;e.cmpn(-f)>0||a.cmpn(-d)>0;){var r,n,i=e.andln(3)+f&3,b=a.andln(3)+d&3;3===i&&(i=-1),3===b&&(b=-1),r=1&i?3!=(c=e.andln(7)+f&7)&&5!==c||2!==b?i:-i:0,t[0].push(r),n=1&b?3!=(c=a.andln(7)+d&7)&&5!==c||2!==i?b:-b:0,t[1].push(n),2*f===r+1&&(f=1-f),2*d===n+1&&(d=1-d),e.iushrn(1),a.iushrn(1)}return t},c.cachedProperty=function(e,a,t){var c="_"+a;e.prototype[a]=function(){return void 0!==this[c]?this[c]:this[c]=t.call(this)}},c.parseBytes=function(e){return"string"==typeof e?c.toArray(e,"hex"):e},c.intFromLE=function(e){return new f(e,"hex","le")}},28490:function(e,a,t){!function(e,a){"use strict";function c(e,a){if(!e)throw new Error(a||"Assertion failed")}function f(e,a){e.super_=a;var t=function(){};t.prototype=a.prototype,e.prototype=new t,e.prototype.constructor=e}function d(e,a,t){if(d.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==a&&"be"!==a||(t=a,a=10),this._init(e||0,a||10,t||"be"))}var r;"object"==typeof e?e.exports=d:a.BN=d,d.BN=d,d.wordSize=26;try{r="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(79368).Buffer}catch(e){}function n(e,a){var t=e.charCodeAt(a);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},30655:(e,a,t)=>{"use strict";var c=t(70453)("%Object.defineProperty%",!0)||!1;if(c)try{c({},"a",{value:1})}catch(e){c=!1}e.exports=c},41237:e=>{"use strict";e.exports=EvalError},69383:e=>{"use strict";e.exports=Error},79290:e=>{"use strict";e.exports=RangeError},79538:e=>{"use strict";e.exports=ReferenceError},58068:e=>{"use strict";e.exports=SyntaxError},69675:e=>{"use strict";e.exports=TypeError},35345:e=>{"use strict";e.exports=URIError},9723:(e,a,t)=>{"use strict";t.d(a,{AF:()=>r,B3:()=>d,JY:()=>n});var c=t(67418),f=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));class d{constructor({provider:e,onProgress:a,concurrencySize:t=10,batchSize:c=10,shouldRetry:f=!0,retryMax:d=5,retryOn:r=500}){this.provider=e,this.onProgress=a,this.concurrencySize=t,this.batchSize=c,this.shouldRetry=f,this.retryMax=d,this.retryOn=r}getBlock(e){return f(this,null,(function*(){const a=yield this.provider.getBlock(e);if(!a)throw new Error(`No block for ${e}`);return a}))}createBatchRequest(e){return e.map(((e,a)=>f(this,null,(function*(){return yield(0,c.yy)(20*a),(()=>f(this,null,(function*(){let a,t=0;for(;!this.shouldRetry&&0===t||this.shouldRetry&&tthis.getBlock(e))))}catch(e){t++,a=e,yield(0,c.yy)(this.retryOn)}throw a})))()}))))}getBatchBlocks(e){return f(this,null,(function*(){let a=0;const t=[];for(const f of(0,c.iv)(e,this.concurrencySize*this.batchSize)){const d=(yield Promise.all(this.createBatchRequest((0,c.iv)(f,this.batchSize)))).flat();t.push(...d),a+=f.length,"function"==typeof this.onProgress&&this.onProgress({percentage:a/e.length,currentIndex:a,totalIndex:e.length})}return t}))}}class r{constructor({provider:e,onProgress:a,concurrencySize:t=10,batchSize:c=10,shouldRetry:f=!0,retryMax:d=5,retryOn:r=500}){this.provider=e,this.onProgress=a,this.concurrencySize=t,this.batchSize=c,this.shouldRetry=f,this.retryMax=d,this.retryOn=r}getTransaction(e){return f(this,null,(function*(){const a=yield this.provider.getTransaction(e);if(!a)throw new Error(`No transaction for ${e}`);return a}))}createBatchRequest(e){return e.map(((e,a)=>f(this,null,(function*(){return yield(0,c.yy)(20*a),(()=>f(this,null,(function*(){let a,t=0;for(;!this.shouldRetry&&0===t||this.shouldRetry&&tthis.getTransaction(e))))}catch(e){t++,a=e,yield(0,c.yy)(this.retryOn)}throw a})))()}))))}getBatchTransactions(e){return f(this,null,(function*(){let a=0;const t=[];for(const f of(0,c.iv)(e,this.concurrencySize*this.batchSize)){const d=(yield Promise.all(this.createBatchRequest((0,c.iv)(f,this.batchSize)))).flat();t.push(...d),a+=f.length,"function"==typeof this.onProgress&&this.onProgress({percentage:a/e.length,currentIndex:a,totalIndex:e.length})}return t}))}}class n{constructor({provider:e,contract:a,onProgress:t,concurrencySize:c=10,blocksPerRequest:f=2e3,shouldRetry:d=!0,retryMax:r=5,retryOn:n=500}){this.provider=e,this.contract=a,this.onProgress=t,this.concurrencySize=c,this.blocksPerRequest=f,this.shouldRetry=d,this.retryMax=r,this.retryOn=n}getPastEvents(e){return f(this,arguments,(function*({fromBlock:e,toBlock:a,type:t}){let f,d=0;for(;!this.shouldRetry&&0===d||this.shouldRetry&&df(this,null,(function*(){return yield(0,c.yy)(20*a),this.getPastEvents(e)}))))}getBatchEvents(e){return f(this,arguments,(function*({fromBlock:e,toBlock:a,type:t="*"}){a||(a=yield this.provider.getBlockNumber());const f=[];for(let c=e;ca?a:c+this.blocksPerRequest-1;f.push({fromBlock:c,toBlock:e,type:t})}const d=[],r=(0,c.iv)(f,this.concurrencySize);let n=0;for(const e of r){n++;const a=(yield Promise.all(this.createBatchRequest(e))).flat();d.push(...a),"function"==typeof this.onProgress&&this.onProgress({percentage:n/r.length,type:t,fromBlock:e[0].fromBlock,toBlock:e[e.length-1].toBlock,count:a.length})}return d}))}}},7240:(e,a,t)=>{"use strict";t.d(a,{Hr:()=>r,dA:()=>n,qO:()=>i});var c=t(67418),f=t(85111),d=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));function r(e){return d(this,arguments,(function*({nullifier:e,secret:a}){const t=new Uint8Array([...(0,c.EI)(e),...(0,c.EI)(a)]),d=(0,c.$W)((0,c.Ju)(t),62),r=BigInt(yield(0,f.UB)(t)),n=(0,c.$W)(r),i=BigInt(yield(0,f.UB)((0,c.EI)(e)));return{preimage:t,noteHex:d,commitment:r,commitmentHex:n,nullifierHash:i,nullifierHex:(0,c.$W)(i)}}))}class n{constructor({currency:e,amount:a,netId:t,nullifier:c,secret:f,note:d,noteHex:r,invoice:n,commitmentHex:i,nullifierHex:b}){this.currency=e,this.amount=a,this.netId=t,this.nullifier=c,this.secret=f,this.note=d,this.noteHex=r,this.invoice=n,this.commitmentHex=i,this.nullifierHex=b}toString(){return JSON.stringify({currency:this.currency,amount:this.amount,netId:this.netId,nullifier:this.nullifier,secret:this.secret,note:this.note,noteHex:this.noteHex,invoice:this.invoice,commitmentHex:this.commitmentHex,nullifierHex:this.nullifierHex},null,2)}static createNote(e){return d(this,arguments,(function*({currency:e,amount:a,netId:t,nullifier:f,secret:d}){f||(f=(0,c.ib)(31)),d||(d=(0,c.ib)(31));const i=yield r({nullifier:f,secret:d});return new n({currency:e.toLowerCase(),amount:a,netId:t,note:`tornado-${e.toLowerCase()}-${a}-${t}-${i.noteHex}`,noteHex:i.noteHex,invoice:`tornadoInvoice-${e.toLowerCase()}-${a}-${t}-${i.commitmentHex}`,nullifier:f,secret:d,commitmentHex:i.commitmentHex,nullifierHex:i.nullifierHex})}))}static parseNote(e){return d(this,null,(function*(){const a=new RegExp("tornado-(?\\w+)-(?[\\d.]+)-(?\\d+)-0x(?[0-9a-fA-F]{124})","g").exec(e);if(!a)throw new Error("The note has invalid format");const t=null==a?void 0:a.groups,f=t.currency.toLowerCase(),d=t.amount,i=Number(t.netId),b=(0,c.jm)("0x"+t.note),o=BigInt((0,c.ae)(b.slice(0,31)).toString()),s=BigInt((0,c.ae)(b.slice(31,62)).toString()),l=yield r({nullifier:o,secret:s}),u=`tornadoInvoice-${f}-${d}-${i}-${l.commitmentHex}`;return new n({currency:f,amount:d,netId:i,note:e,noteHex:l.noteHex,invoice:u,nullifier:o,secret:s,commitmentHex:l.commitmentHex,nullifierHex:l.nullifierHex})}))}}class i{constructor(e){const a=new RegExp("tornadoInvoice-(?\\w+)-(?[\\d.]+)-(?\\d+)-0x(?[0-9a-fA-F]{64})","g").exec(e);if(!a)throw new Error("The note has invalid format");const t=null==a?void 0:a.groups,c=t.currency.toLowerCase(),f=t.amount,d=Number(t.netId);this.currency=c,this.amount=f,this.netId=d,this.commitment="0x"+t.commitment,this.invoice=e}toString(){return JSON.stringify({currency:this.currency,amount:this.amount,netId:this.netId,commitment:this.commitment,invoice:this.invoice},null,2)}}},33298:(e,a,t)=>{"use strict";t.d(a,{Ad:()=>b,Fr:()=>n,ol:()=>i});var c=t(51594),f=t(20415),d=t(30031),r=t(67418);function n({nonce:e,ephemPublicKey:a,ciphertext:t}){const c=(0,r.$W)((0,r.My)((0,r.Kp)(e)),24),f=(0,r.$W)((0,r.My)((0,r.Kp)(a)),32),d=(0,r.My)((0,r.Kp)(t)),n=(0,r.Id)((0,r.aT)(c),(0,r.aT)(f),(0,r.aT)(d));return(0,r.My)(n)}function i(e){const a=(0,r.aT)(e),t=(0,r.if)(a.slice(0,24)),c=(0,r.if)(a.slice(24,56)),f=(0,r.if)(a.slice(56));return{messageBuff:(0,r.My)(a),version:"x25519-xsalsa20-poly1305",nonce:t,ephemPublicKey:c,ciphertext:f}}class b{constructor({netId:e,blockNumber:a,recoveryKey:t,Echoer:d}){t||(t=(0,r.My)(r.Et.getRandomValues(new Uint8Array(32))).slice(2)),this.netId=Math.floor(Number(e)),this.blockNumber=a,this.recoveryKey=t,this.recoveryAddress=(0,f.K)("0x"+t),this.recoveryPublicKey=(0,c.getEncryptionPublicKey)(t),this.Echoer=d}static getWalletPublicKey(e){let{privateKey:a}=e;return a.startsWith("0x")&&(a=a.replace("0x","")),(0,c.getEncryptionPublicKey)(a)}getEncryptedAccount(e){const a=(0,c.encrypt)({publicKey:e,data:this.recoveryKey,version:"x25519-xsalsa20-poly1305"});return{encryptedData:a,data:n(a)}}decryptAccountsWithWallet(e,a){let{privateKey:t}=e;t.startsWith("0x")&&(t=t.replace("0x",""));const f=[];for(const e of a)try{const a=i(e.encryptedAccount),d=(0,c.decrypt)({encryptedData:a,privateKey:t});f.push(new b({netId:this.netId,blockNumber:e.blockNumber,recoveryKey:d,Echoer:this.Echoer}))}catch(e){continue}return f}decryptNotes(e){const a=[];for(const t of e)try{const e=i(t.encryptedNote),[f,r]=(0,c.decrypt)({encryptedData:e,privateKey:this.recoveryKey}).split("-");a.push({blockNumber:t.blockNumber,address:(0,d.b)(f),noteHex:r})}catch(e){continue}return a}encryptNote({address:e,noteHex:a}){return n((0,c.encrypt)({publicKey:this.recoveryPublicKey,data:`${e}-${a}`,version:"x25519-xsalsa20-poly1305"}))}}},71304:(e,a,t)=>{"use strict";t.d(a,{EU:()=>k,GS:()=>B,JJ:()=>S,Lx:()=>I,O_:()=>L,cE:()=>P,e0:()=>M,oW:()=>E,uw:()=>C});var c=t(30031),f=t(64563),d=t(99770),r=t(52049),n=t(9723),i=t(68434),b=t(59499),o=t(57194),s=Object.defineProperty,l=Object.defineProperties,u=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,p=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,x=Reflect.get,y=(e,a,t)=>a in e?s(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,A=(e,a)=>{for(var t in a||(a={}))g.call(a,t)&&y(e,t,a[t]);if(h)for(var t of h(a))m.call(a,t)&&y(e,t,a[t]);return e},v=(e,a)=>l(e,u(a)),w=(e,a,t)=>x(p(e),t,a),_=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const I="deposit",E="withdrawal";class C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,type:d="",deployedBlock:r=0,fetchDataOptions:i,tovarishClient:b}){this.netId=e,this.provider=a,this.graphApi=t,this.subgraphName=c,this.fetchDataOptions=i,this.contract=f,this.type=d,this.deployedBlock=r,this.batchEventsService=new n.JY({provider:a,contract:f,onProgress:this.updateEventProgress}),this.tovarishClient=b}getInstanceName(){return""}getType(){return this.type||""}getTovarishType(){return String(this.getType()||"").toLowerCase()}getGraphMethod(){return""}getGraphParams(){return{graphApi:this.graphApi||"",subgraphName:this.subgraphName||"",fetchDataOptions:this.fetchDataOptions,onProgress:this.updateGraphProgress}}updateEventProgress({percentage:e,type:a,fromBlock:t,toBlock:c,count:f}){}updateBlockProgress({percentage:e,currentIndex:a,totalIndex:t}){}updateTransactionProgress({percentage:e,currentIndex:a,totalIndex:t}){}updateGraphProgress({type:e,fromBlock:a,toBlock:t,count:c}){}formatEvents(e){return _(this,null,(function*(){return yield new Promise((a=>a(e)))}))}getEventsFromDB(){return _(this,null,(function*(){return{events:[],lastBlock:0}}))}getEventsFromCache(){return _(this,null,(function*(){return{events:[],lastBlock:0,fromCache:!0}}))}getSavedEvents(){return _(this,null,(function*(){let e=yield this.getEventsFromDB();return e.lastBlock||(e=yield this.getEventsFromCache()),e}))}getEventsFromGraph(e){return _(this,arguments,(function*({fromBlock:e,methodName:a=""}){if(!this.graphApi||!this.subgraphName)return{events:[],lastBlock:e};const{events:t,lastSyncBlock:c}=yield r[a||this.getGraphMethod()](A({fromBlock:e},this.getGraphParams()));return{events:t,lastBlock:c}}))}getEventsFromRpc(e){return _(this,arguments,(function*({fromBlock:e,toBlock:a}){try{return a||(a=yield this.provider.getBlockNumber()),e>=a?{events:[],lastBlock:a}:(this.updateEventProgress({percentage:0,type:this.getType()}),{events:yield this.formatEvents(yield this.batchEventsService.getBatchEvents({fromBlock:e,toBlock:a,type:this.getType()})),lastBlock:a})}catch(a){return console.log(a),{events:[],lastBlock:e}}}))}getLatestEvents(e){return _(this,arguments,(function*({fromBlock:e}){var a;if((null==(a=this.tovarishClient)?void 0:a.selectedRelayer)&&![I,E].includes(this.type.toLowerCase())){const{events:a,lastSyncBlock:t}=yield this.tovarishClient.getEvents({type:this.getTovarishType(),fromBlock:e});return{events:a,lastBlock:t}}const t=yield this.getEventsFromGraph({fromBlock:e}),c=t.lastBlock&&t.lastBlock>=e?t.lastBlock:e,f=yield this.getEventsFromRpc({fromBlock:c});return{events:[...t.events,...f.events],lastBlock:f.lastBlock}}))}validateEvents({events:e,lastBlock:a}){}saveEvents(e){return _(this,arguments,(function*({events:e,lastBlock:a}){}))}updateEvents(){return _(this,null,(function*(){var e;const a=yield this.getSavedEvents();let t=this.deployedBlock;a&&a.lastBlock&&(t=a.lastBlock+1);const c=yield this.getLatestEvents({fromBlock:t}),f=new Set,d=[...a.events,...c.events].sort(((e,a)=>e.blockNumber===a.blockNumber?e.logIndex-a.logIndex:e.blockNumber-a.blockNumber)).filter((({transactionHash:e,logIndex:a})=>{const t=`${e}_${a}`,c=f.has(t);return f.add(t),!c})),r=c.lastBlock||(null==(e=d[d.length-1])?void 0:e.blockNumber);return this.validateEvents({events:d,lastBlock:r}),(a.fromCache||c.events.length)&&(yield this.saveEvents({events:d,lastBlock:r})),{events:d,lastBlock:r}}))}}class M extends C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,Tornado:f,type:d,amount:r,currency:i,deployedBlock:b,fetchDataOptions:o,tovarishClient:s}){super({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,type:d,deployedBlock:b,fetchDataOptions:o,tovarishClient:s}),this.amount=r,this.currency=i,this.batchTransactionService=new n.AF({provider:a,onProgress:this.updateTransactionProgress}),this.batchBlockService=new n.B3({provider:a,onProgress:this.updateBlockProgress})}getInstanceName(){return`${this.getType().toLowerCase()}s_${this.netId}_${this.currency}_${this.amount}`}getGraphMethod(){return`getAll${this.getType()}s`}getGraphParams(){return{graphApi:this.graphApi||"",subgraphName:this.subgraphName||"",amount:this.amount,currency:this.currency,fetchDataOptions:this.fetchDataOptions,onProgress:this.updateGraphProgress}}formatEvents(e){return _(this,null,(function*(){if(this.getType().toLowerCase()===I){const a=e.map((({blockNumber:e,index:a,transactionHash:t,args:c})=>{const{commitment:f,leafIndex:d,timestamp:r}=c;return{blockNumber:e,logIndex:a,transactionHash:t,commitment:f,leafIndex:Number(d),timestamp:Number(r)}})),t=yield this.batchTransactionService.getBatchTransactions([...new Set(a.map((({transactionHash:e})=>e)))]);return a.map((e=>{const{from:a}=t.find((({hash:a})=>a===e.transactionHash));return v(A({},e),{from:a})}))}{const a=e.map((({blockNumber:e,index:a,transactionHash:t,args:f})=>{const{nullifierHash:d,to:r,fee:n}=f;return{blockNumber:e,logIndex:a,transactionHash:t,nullifierHash:String(d),to:(0,c.b)(r),fee:String(n)}})),t=yield this.batchBlockService.getBatchBlocks([...new Set(a.map((({blockNumber:e})=>e)))]);return a.map((e=>{const{timestamp:a}=t.find((({number:a})=>a===e.blockNumber));return v(A({},e),{timestamp:a})}))}}))}validateEvents({events:e}){if(e.length&&this.getType().toLowerCase()===I){const a=e[e.length-1];if(a.leafIndex!==e.length-1){const t=`Deposit events invalid wants ${e.length-1} leafIndex have ${a.leafIndex}`;throw new Error(t)}}}getLatestEvents(e){return _(this,arguments,(function*({fromBlock:e}){var a;if(null==(a=this.tovarishClient)?void 0:a.selectedRelayer){const{events:a,lastSyncBlock:t}=yield this.tovarishClient.getEvents({type:this.getTovarishType(),currency:this.currency,amount:this.amount,fromBlock:e});return{events:a,lastBlock:t}}return w(M.prototype,this,"getLatestEvents").call(this,{fromBlock:e})}))}}class B extends C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,Echoer:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:n}){super({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:n})}getInstanceName(){return`echo_${this.netId}`}getType(){return"Echo"}getGraphMethod(){return"getAllGraphEchoEvents"}formatEvents(e){return _(this,null,(function*(){return e.map((({blockNumber:e,index:a,transactionHash:t,args:c})=>{const{who:f,data:d}=c;if(f&&d)return v(A({},{blockNumber:e,logIndex:a,transactionHash:t}),{address:f,encryptedAccount:d})})).filter((e=>e))}))}getEventsFromGraph(e){return _(this,arguments,(function*({fromBlock:e}){return!this.graphApi||this.graphApi.includes("api.thegraph.com")?{events:[],lastBlock:e}:w(B.prototype,this,"getEventsFromGraph").call(this,{fromBlock:e})}))}}class L extends C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,Router:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:n}){super({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:n})}getInstanceName(){return`encrypted_notes_${this.netId}`}getType(){return"EncryptedNote"}getTovarishType(){return"encrypted_notes"}getGraphMethod(){return"getAllEncryptedNotes"}formatEvents(e){return _(this,null,(function*(){return e.map((({blockNumber:e,index:a,transactionHash:t,args:c})=>{const{encryptedNote:f}=c;if(f&&"0x"!==f)return v(A({},{blockNumber:e,logIndex:a,transactionHash:t}),{encryptedNote:f})})).filter((e=>e))}))}}class S extends C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,Governance:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:i}){super({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,deployedBlock:d,fetchDataOptions:r,tovarishClient:i}),this.batchTransactionService=new n.AF({provider:a,onProgress:this.updateTransactionProgress})}getInstanceName(){return`governance_${this.netId}`}getType(){return"*"}getTovarishType(){return"governance"}getGraphMethod(){return"getAllGovernanceEvents"}formatEvents(e){return _(this,null,(function*(){const a=[],t=[],c=[],f=[];if(e.forEach((({blockNumber:e,index:d,transactionHash:r,args:n,eventName:i})=>{const b={blockNumber:e,logIndex:d,transactionHash:r,event:i};if("ProposalCreated"===i){const{id:e,proposer:t,target:c,startTime:f,endTime:d,description:r}=n;a.push(v(A({},b),{id:Number(e),proposer:t,target:c,startTime:Number(f),endTime:Number(d),description:r}))}if("Voted"===i){const{proposalId:e,voter:a,support:c,votes:f}=n;t.push(v(A({},b),{proposalId:Number(e),voter:a,support:c,votes:f,from:"",input:""}))}if("Delegated"===i){const{account:e,to:a}=n;c.push(v(A({},b),{account:e,delegateTo:a}))}if("Undelegated"===i){const{account:e,from:a}=n;f.push(v(A({},b),{account:e,delegateFrom:a}))}})),t.length){this.updateTransactionProgress({percentage:0});const e=yield this.batchTransactionService.getBatchTransactions([...new Set(t.map((({transactionHash:e})=>e)))]);t.forEach(((a,c)=>{let{data:f,from:d}=e.find((e=>e.hash===a.transactionHash));(!f||f.length>2048)&&(f=""),t[c].from=d,t[c].input=f}))}return[...a,...t,...c,...f]}))}getEventsFromGraph(e){return _(this,arguments,(function*({fromBlock:e}){return this.graphApi&&this.subgraphName&&!this.graphApi.includes("api.thegraph.com")?w(S.prototype,this,"getEventsFromGraph").call(this,{fromBlock:e}):{events:[],lastBlock:e}}))}}function k(e,a){return _(this,null,(function*(){yield Promise.all(a.filter((e=>e.tovarishHost)).map((a=>_(this,null,(function*(){var t;try{a.tovarishNetworks=yield(0,i.Fd)(a.tovarishHost,v(A({},e.fetchDataOptions),{headers:{"Content-Type":"application/json"},timeout:6e4,maxRetry:(null==(t=e.fetchDataOptions)?void 0:t.torPort)?2:0}))}catch(e){a.tovarishNetworks=[]}})))))}))}const N=[{ensName:"tornadowithdraw.eth",relayerAddress:"0x40c3d1656a26C9266f4A10fed0D87EFf79F54E64",hostnames:{},tovarishHost:"tornadowithdraw.com",tovarishNetworks:b.Af}];class P extends C{constructor({netId:e,provider:a,graphApi:t,subgraphName:c,RelayerRegistry:f,Aggregator:d,relayerEnsSubdomains:r,deployedBlock:n,fetchDataOptions:i,tovarishClient:b}){super({netId:e,provider:a,graphApi:t,subgraphName:c,contract:f,deployedBlock:n,fetchDataOptions:i,tovarishClient:b}),this.Aggregator=d,this.relayerEnsSubdomains=r,this.updateInterval=86400}getInstanceName(){return`registered_${this.netId}`}getType(){return"RelayerRegistered"}getTovarishType(){return"registered"}getGraphMethod(){return"getAllRegisters"}formatEvents(e){return _(this,null,(function*(){return e.map((({blockNumber:e,index:a,transactionHash:t,args:c})=>v(A({},{blockNumber:e,logIndex:a,transactionHash:t}),{ensName:c.ensName,relayerAddress:c.relayerAddress})))}))}getRelayersFromDB(){return _(this,null,(function*(){return{lastBlock:0,timestamp:0,relayers:[]}}))}getRelayersFromCache(){return _(this,null,(function*(){return{lastBlock:0,timestamp:0,relayers:[],fromCache:!0}}))}getSavedRelayers(){return _(this,null,(function*(){let e=yield this.getRelayersFromDB();return e&&e.relayers.length||(e=yield this.getRelayersFromCache()),e}))}getLatestRelayers(){return _(this,null,(function*(){const{events:e,lastBlock:a}=yield this.updateEvents(),t=Object.values(this.relayerEnsSubdomains),c=new Set,r=e.filter((({ensName:e})=>!c.has(e)&&(c.add(e),!0))),n=r.map((e=>(0,f.kM)(e.ensName))),[i,b]=yield Promise.all([this.Aggregator.relayersData.staticCall(n,t.concat("tovarish-relayer")),this.provider.getBlock(a).then((e=>Number(null==e?void 0:e.timestamp)))]),s=i.map((({owner:e,balance:a,records:t,isRegistered:c},f)=>{const{ensName:n,relayerAddress:i}=r[f];let b;const s=t.reduce(((e,a,c)=>{if(a){if(c===t.length-1)return b=a,e;e[Number(Object.keys(this.relayerEnsSubdomains)[c])]=a}return e}),{}),l=!i||i===e,u=a>=o.pO;if(Object.keys(s).length&&l&&c&&u)return{ensName:n,relayerAddress:i,isRegistered:c,owner:e,stakeBalance:(0,d.ck)(a),hostnames:s,tovarishHost:b}})).filter((e=>e));yield k(this,s);const l=[...N,...s];return{lastBlock:a,timestamp:b,relayers:[...l.filter((e=>e.tovarishHost)),...l.filter((e=>!e.tovarishHost))]}}))}saveRelayers(e){return _(this,arguments,(function*({lastBlock:e,timestamp:a,relayers:t}){}))}updateRelayers(){return _(this,null,(function*(){let{lastBlock:e,timestamp:a,relayers:t,fromCache:c}=yield this.getSavedRelayers(),f=null!=c&&c;return(!t.length||a+this.updateInterval{"use strict";t.d(a,{Fb:()=>r,Oz:()=>i,f8:()=>b,w8:()=>n});var c=t(18995),f=t(71304),d=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));function r(e){return d(this,arguments,(function*({idb:e,instanceName:a,events:t,lastBlock:c}){try{yield e.createMultipleTransactions({data:t,storeName:a}),yield e.putItem({data:{blockNumber:c,name:a},storeName:"lastEvents"})}catch(e){console.log("Method saveDBEvents has error"),console.log(e)}}))}function n(e){return d(this,arguments,(function*({idb:e,instanceName:a}){try{const t=yield e.getItem({storeName:"lastEvents",key:a});return(null==t?void 0:t.blockNumber)?{events:yield e.getAll({storeName:a}),lastBlock:t.blockNumber}:{events:[],lastBlock:0}}catch(e){return console.log("Method loadDBEvents has error"),console.log(e),{events:[],lastBlock:0}}}))}function i(e){return d(this,arguments,(function*({staticUrl:e,instanceName:a,deployedBlock:t,zipDigest:f}){var d;try{const r=`${a}.json`.toLowerCase(),n=yield(0,c._6)({staticUrl:e,zipName:r,zipDigest:f});if(!Array.isArray(n)){const a=`Invalid events from ${e}/${r}`;throw new Error(a)}return{events:n,lastBlock:(null==(d=n[n.length-1])?void 0:d.blockNumber)||t,fromCache:!0}}catch(e){return console.log("Method loadRemoteEvents has error"),console.log(e),{events:[],lastBlock:t,fromCache:!0}}}))}class b extends f.e0{constructor(e){super(e),this.staticUrl=e.staticUrl,this.idb=e.idb}getEventsFromDB(){return d(this,null,(function*(){return yield n({idb:this.idb,instanceName:this.getInstanceName()})}))}getEventsFromCache(){return d(this,null,(function*(){return yield i({staticUrl:this.staticUrl,instanceName:this.getInstanceName(),deployedBlock:this.deployedBlock,zipDigest:this.zipDigest})}))}saveEvents(e){return d(this,arguments,(function*({events:e,lastBlock:a}){yield r({idb:this.idb,instanceName:this.getInstanceName(),events:e,lastBlock:a})}))}}},94513:(e,a,t)=>{"use strict";t.r(a),t.d(a,{BaseEchoService:()=>d.GS,BaseEncryptedNotesService:()=>d.O_,BaseEventsService:()=>d.uw,BaseGovernanceService:()=>d.JJ,BaseRegistryService:()=>d.cE,BaseTornadoService:()=>d.e0,DBTornadoService:()=>r.f8,DEPOSIT:()=>d.Lx,WITHDRAWAL:()=>d.oW,getTovarishNetworks:()=>d.EU,loadDBEvents:()=>r.w8,loadRemoteEvents:()=>r.Oz,saveDBEvents:()=>r.Fb});var c=t(61060),f={};for(const e in c)"default"!==e&&(f[e]=()=>c[e]);t.d(a,f);var d=t(71304),r=t(12591)},61060:()=>{},37182:(e,a,t)=>{"use strict";t.d(a,{N:()=>d,o:()=>r});var c=t(99770),f=t(79453);function d(e,a,t=18){const c=BigInt(10**Number(t));return BigInt(e)*c/BigInt(a)}class r{constructor(e){e&&(this.ovmGasPriceOracle=e)}fetchL1OptimismFee(e){return this.ovmGasPriceOracle?(e||(e={type:0,gasLimit:1e6,nonce:1024,data:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",gasPrice:(0,c.XS)("1","gwei"),to:"0x1111111111111111111111111111111111111111"}),this.ovmGasPriceOracle.getL1Fee.staticCall(f.Z.from(e).unsignedSerialized)):new Promise((e=>e(BigInt(0))))}defaultEthRefund(e,a){return(e?BigInt(e):(0,c.XS)("30","gwei"))*BigInt(a||1e6)}calculateTokenAmount(e,a,t){return d(e,a,t)}calculateRelayerFee({gasPrice:e,gasLimit:a=6e5,l1Fee:t=0,denomination:c,ethRefund:f=BigInt(0),tokenPriceInWei:r,tokenDecimals:n=18,relayerFeePercent:i=.33,isEth:b=!0,premiumPercent:o=20}){const s=BigInt(e)*BigInt(a)+BigInt(t),l=BigInt(c)*BigInt(Math.floor(1e4*i))/BigInt(1e6);return b?(s+l)*BigInt(o?100+o:100)/BigInt(100):(d(s+BigInt(f),r,n)+l)*BigInt(o?100+o:100)/BigInt(100)}}},52049:(e,a,t)=>{"use strict";t.r(a),t.d(a,{GET_DEPOSITS:()=>i,GET_ECHO_EVENTS:()=>s,GET_ENCRYPTED_NOTES:()=>l,GET_GOVERNANCE_APY:()=>h,GET_GOVERNANCE_EVENTS:()=>u,GET_NOTE_ACCOUNTS:()=>o,GET_REGISTERED:()=>n,GET_STATISTIC:()=>d,GET_WITHDRAWALS:()=>b,_META:()=>r,getAllDeposits:()=>P,getAllEncryptedNotes:()=>U,getAllGovernanceEvents:()=>H,getAllGraphEchoEvents:()=>F,getAllRegisters:()=>k,getAllWithdrawals:()=>O,getDeposits:()=>N,getEncryptedNotes:()=>Q,getGovernanceEvents:()=>j,getGraphEchoEvents:()=>T,getMeta:()=>L,getNoteAccounts:()=>D,getRegisters:()=>S,getStatistic:()=>B,getWithdrawals:()=>R,queryGraph:()=>M});var c=t(30031),f=t(68434);const d="\n query getStatistic($currency: String!, $amount: String!, $first: Int, $orderBy: BigInt, $orderDirection: String) {\n deposits(first: $first, orderBy: $orderBy, orderDirection: $orderDirection, where: { currency: $currency, amount: $amount }) {\n index\n timestamp\n blockNumber\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",r="\n query getMeta {\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",n="\n query getRegistered($first: Int, $fromBlock: Int) {\n relayers(first: $first, orderBy: blockRegistration, orderDirection: asc, where: {\n blockRegistration_gte: $fromBlock\n }) {\n id\n address\n ensName\n blockRegistration\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",i="\n query getDeposits($currency: String!, $amount: String!, $first: Int, $fromBlock: Int) {\n deposits(first: $first, orderBy: index, orderDirection: asc, where: { \n amount: $amount,\n currency: $currency,\n blockNumber_gte: $fromBlock\n }) {\n id\n blockNumber\n commitment\n index\n timestamp\n from\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",b="\n query getWithdrawals($currency: String!, $amount: String!, $first: Int, $fromBlock: Int!) {\n withdrawals(first: $first, orderBy: blockNumber, orderDirection: asc, where: { \n currency: $currency,\n amount: $amount,\n blockNumber_gte: $fromBlock\n }) {\n id\n blockNumber\n nullifier\n to\n fee\n timestamp\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",o="\n query getNoteAccount($address: String!) {\n noteAccounts(where: { address: $address }) {\n id\n index\n address\n encryptedAccount\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",s="\n query getNoteAccounts($first: Int, $fromBlock: Int) {\n noteAccounts(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n id\n blockNumber\n address\n encryptedAccount\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",l="\n query getEncryptedNotes($first: Int, $fromBlock: Int) {\n encryptedNotes(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n blockNumber\n index\n transactionHash\n encryptedNote\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",u="\n query getGovernanceEvents($first: Int, $fromBlock: Int) {\n proposals(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n blockNumber\n logIndex\n transactionHash\n proposalId\n proposer\n target\n startTime\n endTime\n description\n }\n votes(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n blockNumber\n logIndex\n transactionHash\n proposalId\n voter\n support\n votes\n from\n input\n }\n delegates(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n blockNumber\n logIndex\n transactionHash\n account\n delegateTo\n }\n undelegates(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $fromBlock }) {\n blockNumber\n logIndex\n transactionHash\n account\n delegateFrom\n }\n _meta {\n block {\n number\n }\n hasIndexingErrors\n }\n }\n",h="\n stakeDailyBurns(first: 30, orderBy: date, orderDirection: desc) {\n id\n date\n dailyAmountBurned\n }\n";var p=Object.defineProperty,g=Object.defineProperties,m=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,v=(e,a,t)=>a in e?p(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,w=(e,a)=>{for(var t in a||(a={}))y.call(a,t)&&v(e,t,a[t]);if(x)for(var t of x(a))A.call(a,t)&&v(e,t,a[t]);return e},_=(e,a)=>g(e,m(a)),I=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const E=e=>!Array.isArray(e)||!e.length,C=1e3;function M(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,query:t,variables:c,fetchDataOptions:d}){var r;const n=`${e}/subgraphs/name/${a}`,{data:i,errors:b}=yield(0,f.Fd)(n,_(w({},d),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:t,variables:c})}));if(b)throw new Error(JSON.stringify(b));if(null==(r=null==i?void 0:i._meta)?void 0:r.hasIndexingErrors)throw new Error("Subgraph has indexing errors");return i}))}function B(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,currency:t,amount:c,fetchDataOptions:f}){try{const{deposits:r,_meta:{block:{number:n}}}=yield M({graphApi:e,subgraphName:a,query:d,variables:{currency:t,first:10,orderBy:"index",orderDirection:"desc",amount:c},fetchDataOptions:f}),i=r.map((e=>({timestamp:Number(e.timestamp),leafIndex:Number(e.index),blockNumber:Number(e.blockNumber)}))).reverse(),[b]=i.slice(-1);return{events:i,lastSyncBlock:b&&b.blockNumber>=n?b.blockNumber+1:n}}catch(e){return console.log("Error from getStatistic query"),console.log(e),{events:[],lastSyncBlock:null}}}))}function L(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,fetchDataOptions:t}){try{const{_meta:{block:{number:c},hasIndexingErrors:f}}=yield M({graphApi:e,subgraphName:a,query:r,fetchDataOptions:t});return{lastSyncBlock:c,hasIndexingErrors:f}}catch(e){return console.log("Error from getMeta query"),console.log(e),{lastSyncBlock:null,hasIndexingErrors:null}}}))}function S({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c}){return M({graphApi:e,subgraphName:a,query:n,variables:{first:C,fromBlock:t},fetchDataOptions:c})}function k(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f,onProgress:d}){try{const r=[];let n=t;for(;;){let{relayers:c,_meta:{block:{number:i}}}=yield S({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f});if(n=i,E(c))break;const[b]=c,[o]=c.slice(-1);if("function"==typeof d&&d({type:"Registers",fromBlock:Number(b.blockRegistration),toBlock:Number(o.blockRegistration),count:c.length}),c.length<900){r.push(...c);break}c=c.filter((({blockRegistration:e})=>e!==o.blockRegistration)),t=Number(o.blockRegistration),r.push(...c)}return r.length?{events:r.map((({id:e,address:a,ensName:t,blockRegistration:f})=>{const[d,r]=e.split("-");return{blockNumber:Number(f),logIndex:Number(r),transactionHash:d,ensName:t,relayerAddress:(0,c.b)(a)}})),lastSyncBlock:n}:{events:[],lastSyncBlock:n}}catch(e){return console.log("Error from getAllRegisters query"),console.log(e),{events:[],lastSyncBlock:t}}}))}function N({graphApi:e,subgraphName:a,currency:t,amount:c,fromBlock:f,fetchDataOptions:d}){return M({graphApi:e,subgraphName:a,query:i,variables:{currency:t,amount:c,first:C,fromBlock:f},fetchDataOptions:d})}function P(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,currency:t,amount:f,fromBlock:d,fetchDataOptions:r,onProgress:n}){try{const i=[];let b=d;for(;;){let{deposits:c,_meta:{block:{number:o}}}=yield N({graphApi:e,subgraphName:a,currency:t,amount:f,fromBlock:d,fetchDataOptions:r});if(b=o,E(c))break;const[s]=c,[l]=c.slice(-1);if("function"==typeof n&&n({type:"Deposits",fromBlock:Number(s.blockNumber),toBlock:Number(l.blockNumber),count:c.length}),c.length<900){i.push(...c);break}c=c.filter((({blockNumber:e})=>e!==l.blockNumber)),d=Number(l.blockNumber),i.push(...c)}if(!i.length)return{events:[],lastSyncBlock:b};const o=i.map((({id:e,blockNumber:a,commitment:t,index:f,timestamp:d,from:r})=>{const[n,i]=e.split("-");return{blockNumber:Number(a),logIndex:Number(i),transactionHash:n,commitment:t,leafIndex:Number(f),timestamp:Number(d),from:(0,c.b)(r)}})),[s]=o.slice(-1);return{events:o,lastSyncBlock:s&&s.blockNumber>=b?s.blockNumber+1:b}}catch(e){return console.log("Error from getAllDeposits query"),console.log(e),{events:[],lastSyncBlock:d}}}))}function R({graphApi:e,subgraphName:a,currency:t,amount:c,fromBlock:f,fetchDataOptions:d}){return M({graphApi:e,subgraphName:a,query:b,variables:{currency:t,amount:c,first:C,fromBlock:f},fetchDataOptions:d})}function O(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,currency:t,amount:f,fromBlock:d,fetchDataOptions:r,onProgress:n}){try{const i=[];let b=d;for(;;){let{withdrawals:c,_meta:{block:{number:o}}}=yield R({graphApi:e,subgraphName:a,currency:t,amount:f,fromBlock:d,fetchDataOptions:r});if(b=o,E(c))break;const[s]=c,[l]=c.slice(-1);if("function"==typeof n&&n({type:"Withdrawals",fromBlock:Number(s.blockNumber),toBlock:Number(l.blockNumber),count:c.length}),c.length<900){i.push(...c);break}c=c.filter((({blockNumber:e})=>e!==l.blockNumber)),d=Number(l.blockNumber),i.push(...c)}if(!i.length)return{events:[],lastSyncBlock:b};const o=i.map((({id:e,blockNumber:a,nullifier:t,to:f,fee:d,timestamp:r})=>{const[n,i]=e.split("-");return{blockNumber:Number(a),logIndex:Number(i),transactionHash:n,nullifierHash:t,to:(0,c.b)(f),fee:d,timestamp:Number(r)}})),[s]=o.slice(-1);return{events:o,lastSyncBlock:s&&s.blockNumber>=b?s.blockNumber+1:b}}catch(e){return console.log("Error from getAllWithdrawals query"),console.log(e),{events:[],lastSyncBlock:d}}}))}function D(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,address:t,fetchDataOptions:c}){try{const{noteAccounts:f,_meta:{block:{number:d}}}=yield M({graphApi:e,subgraphName:a,query:o,variables:{address:t.toLowerCase()},fetchDataOptions:c});return{events:f,lastSyncBlock:d}}catch(e){return console.log("Error from getNoteAccounts query"),console.log(e),{events:[],lastSyncBlock:null}}}))}function T({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c}){return M({graphApi:e,subgraphName:a,query:s,variables:{first:C,fromBlock:t},fetchDataOptions:c})}function F(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f,onProgress:d}){try{const r=[];let n=t;for(;;){let{noteAccounts:c,_meta:{block:{number:i}}}=yield T({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f});if(n=i,E(c))break;const[b]=c,[o]=c.slice(-1);if("function"==typeof d&&d({type:"EchoEvents",fromBlock:Number(b.blockNumber),toBlock:Number(o.blockNumber),count:c.length}),c.length<900){r.push(...c);break}c=c.filter((({blockNumber:e})=>e!==o.blockNumber)),t=Number(o.blockNumber),r.push(...c)}if(!r.length)return{events:[],lastSyncBlock:n};const i=r.map((e=>{const[a,t]=e.id.split("-");return{blockNumber:Number(e.blockNumber),logIndex:Number(t),transactionHash:a,address:(0,c.b)(e.address),encryptedAccount:e.encryptedAccount}})),[b]=i.slice(-1);return{events:i,lastSyncBlock:b&&b.blockNumber>=n?b.blockNumber+1:n}}catch(e){return console.log("Error from getAllGraphEchoEvents query"),console.log(e),{events:[],lastSyncBlock:t}}}))}function Q({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c}){return M({graphApi:e,subgraphName:a,query:l,variables:{first:C,fromBlock:t},fetchDataOptions:c})}function U(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c,onProgress:f}){try{const d=[];let r=t;for(;;){let{encryptedNotes:n,_meta:{block:{number:i}}}=yield Q({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c});if(r=i,E(n))break;const[b]=n,[o]=n.slice(-1);if("function"==typeof f&&f({type:"EncryptedNotes",fromBlock:Number(b.blockNumber),toBlock:Number(o.blockNumber),count:n.length}),n.length<900){d.push(...n);break}n=n.filter((({blockNumber:e})=>e!==o.blockNumber)),t=Number(o.blockNumber),d.push(...n)}if(!d.length)return{events:[],lastSyncBlock:r};const n=d.map((e=>({blockNumber:Number(e.blockNumber),logIndex:Number(e.index),transactionHash:e.transactionHash,encryptedNote:e.encryptedNote}))),[i]=n.slice(-1);return{events:n,lastSyncBlock:i&&i.blockNumber>=r?i.blockNumber+1:r}}catch(e){return console.log("Error from getAllEncryptedNotes query"),console.log(e),{events:[],lastSyncBlock:t}}}))}function j({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:c}){return M({graphApi:e,subgraphName:a,query:u,variables:{first:C,fromBlock:t},fetchDataOptions:c})}function H(e){return I(this,arguments,(function*({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f,onProgress:d}){try{const r=[];let n=t;for(;;){const{proposals:i,votes:b,delegates:o,undelegates:s,_meta:{block:{number:l}}}=yield j({graphApi:e,subgraphName:a,fromBlock:t,fetchDataOptions:f});n=l;const u=i.length+b.length+o.length+s.length;if(0===u)break;const h=i.map((({blockNumber:e,logIndex:a,transactionHash:t,proposalId:f,proposer:d,target:r,startTime:n,endTime:i,description:b})=>({blockNumber:Number(e),logIndex:Number(a),transactionHash:t,event:"ProposalCreated",id:Number(f),proposer:(0,c.b)(d),target:(0,c.b)(r),startTime:Number(n),endTime:Number(i),description:b}))),p=b.map((({blockNumber:e,logIndex:a,transactionHash:t,proposalId:f,voter:d,support:r,votes:n,from:i,input:b})=>((!b||b.length>2048)&&(b=""),{blockNumber:Number(e),logIndex:Number(a),transactionHash:t,event:"Voted",proposalId:Number(f),voter:(0,c.b)(d),support:r,votes:n,from:(0,c.b)(i),input:b}))),g=o.map((({blockNumber:e,logIndex:a,transactionHash:t,account:f,delegateTo:d})=>({blockNumber:Number(e),logIndex:Number(a),transactionHash:t,event:"Delegated",account:(0,c.b)(f),delegateTo:(0,c.b)(d)}))),m=s.map((({blockNumber:e,logIndex:a,transactionHash:t,account:f,delegateFrom:d})=>({blockNumber:Number(e),logIndex:Number(a),transactionHash:t,event:"Undelegated",account:(0,c.b)(f),delegateFrom:(0,c.b)(d)})));let x=[...h,...p,...g,...m].sort(((e,a)=>e.blockNumber===a.blockNumber?e.logIndex-a.logIndex:e.blockNumber-a.blockNumber));if(u<900){r.push(...x);break}const[y]=x,[A]=x.slice(-1);"function"==typeof d&&d({type:"Governance Events",fromBlock:Number(y.blockNumber),toBlock:Number(A.blockNumber),count:u}),x=x.filter((({blockNumber:e})=>e!==A.blockNumber)),t=Number(A.blockNumber),r.push(...x)}const[i]=r.slice(-1);return{events:r,lastSyncBlock:i&&i.blockNumber>=n?i.blockNumber+1:n}}catch(e){return console.log("Error from getAllGovernance query"),console.log(e),{events:[],lastSyncBlock:t}}}))}},83968:(e,a,t)=>{"use strict";t.d(a,{Fl:()=>P,mc:()=>R,W7:()=>O});const c=(e,a)=>a.some((a=>e instanceof a));let f,d;const r=new WeakMap,n=new WeakMap,i=new WeakMap;let b={get(e,a,t){if(e instanceof IDBTransaction){if("done"===a)return r.get(e);if("store"===a)return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return l(e[a])},set:(e,a,t)=>(e[a]=t,!0),has:(e,a)=>e instanceof IDBTransaction&&("done"===a||"store"===a)||a in e};function o(e){b=e(b)}function s(e){return"function"==typeof e?(a=e,(d||(d=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(a)?function(...e){return a.apply(u(this),e),l(this.request)}:function(...e){return l(a.apply(u(this),e))}):(e instanceof IDBTransaction&&function(e){if(r.has(e))return;const a=new Promise(((a,t)=>{const c=()=>{e.removeEventListener("complete",f),e.removeEventListener("error",d),e.removeEventListener("abort",d)},f=()=>{a(),c()},d=()=>{t(e.error||new DOMException("AbortError","AbortError")),c()};e.addEventListener("complete",f),e.addEventListener("error",d),e.addEventListener("abort",d)}));r.set(e,a)}(e),c(e,f||(f=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,b):e);var a}function l(e){if(e instanceof IDBRequest)return function(e){const a=new Promise(((a,t)=>{const c=()=>{e.removeEventListener("success",f),e.removeEventListener("error",d)},f=()=>{a(l(e.result)),c()},d=()=>{t(e.error),c()};e.addEventListener("success",f),e.addEventListener("error",d)}));return i.set(a,e),a}(e);if(n.has(e))return n.get(e);const a=s(e);return a!==e&&(n.set(e,a),i.set(a,e)),a}const u=e=>i.get(e),h=["get","getKey","getAll","getAllKeys","count"],p=["put","add","delete","clear"],g=new Map;function m(e,a){if(!(e instanceof IDBDatabase)||a in e||"string"!=typeof a)return;if(g.get(a))return g.get(a);const t=a.replace(/FromIndex$/,""),c=a!==t,f=p.includes(t);if(!(t in(c?IDBIndex:IDBObjectStore).prototype)||!f&&!h.includes(t))return;const d=async function(e,...a){const d=this.transaction(e,f?"readwrite":"readonly");let r=d.store;return c&&(r=r.index(a.shift())),(await Promise.all([r[t](...a),f&&d.done]))[0]};return g.set(a,d),d}o((e=>({...e,get:(a,t,c)=>m(a,t)||e.get(a,t,c),has:(a,t)=>!!m(a,t)||e.has(a,t)})));const x=["continue","continuePrimaryKey","advance"],y={},A=new WeakMap,v=new WeakMap,w={get(e,a){if(!x.includes(a))return e[a];let t=y[a];return t||(t=y[a]=function(...e){A.set(this,v.get(this)[a](...e))}),t}};async function*_(...e){let a=this;if(a instanceof IDBCursor||(a=await a.openCursor(...e)),!a)return;const t=new Proxy(a,w);for(v.set(t,a),i.set(t,u(a));a;)yield t,a=await(A.get(t)||a.continue()),A.delete(t)}function I(e,a){return a===Symbol.asyncIterator&&c(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===a&&c(e,[IDBIndex,IDBObjectStore])}o((e=>({...e,get:(a,t,c)=>I(a,t)?_:e.get(a,t,c),has:(a,t)=>I(a,t)||e.has(a,t)})));var E=t(59499),C=Object.defineProperty,M=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable,S=(e,a,t)=>a in e?C(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,k=(e,a)=>{for(var t in a||(a={}))B.call(a,t)&&S(e,t,a[t]);if(M)for(var t of M(a))L.call(a,t)&&S(e,t,a[t]);return e},N=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const P="A mutation operation was attempted on a database that did not allow mutations.";class R{constructor({dbName:e,stores:a}){this.dbExists=!1,this.isBlocked=!1,this.options={upgrade(e){Object.values(e.objectStoreNames).forEach((a=>{e.deleteObjectStore(a)})),[{name:"keyval"},...a||[]].forEach((({name:a,keyPath:t,indexes:c})=>{const f=e.createObjectStore(a,{keyPath:t,autoIncrement:!0});Array.isArray(c)&&c.forEach((({name:e,unique:a=!1})=>{f.createIndex(e,e,{unique:a})}))}))}},this.dbName=e,this.dbVersion=34}initDB(){return N(this,null,(function*(){try{if(this.dbExists||this.isBlocked)return;this.db=yield function(e,a,{blocked:t,upgrade:c,blocking:f,terminated:d}={}){const r=indexedDB.open(e,a),n=l(r);return c&&r.addEventListener("upgradeneeded",(e=>{c(l(r.result),e.oldVersion,e.newVersion,l(r.transaction),e)})),t&&r.addEventListener("blocked",(e=>t(e.oldVersion,e.newVersion,e))),n.then((e=>{d&&e.addEventListener("close",(()=>d())),f&&e.addEventListener("versionchange",(e=>f(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),n}(this.dbName,this.dbVersion,this.options),this.db.addEventListener("onupgradeneeded",(()=>N(this,null,(function*(){yield this._removeExist()})))),this.dbExists=!0}catch(e){if(e.message.includes(P))return console.log("This browser does not support IndexedDB!"),void(this.isBlocked=!0);if(e.message.includes("less than the existing version"))return console.log(`Upgrading DB ${this.dbName} to ${this.dbVersion}`),void(yield this._removeExist());console.error(`Method initDB has error: ${e.message}`)}}))}_removeExist(){return N(this,null,(function*(){yield function(e,{blocked:a}={}){const t=indexedDB.deleteDatabase(e);return a&&t.addEventListener("blocked",(e=>a(e.oldVersion,e))),l(t).then((()=>{}))}(this.dbName),this.dbExists=!1,yield this.initDB()}))}getFromIndex(e){return N(this,arguments,(function*({storeName:e,indexName:a,key:t}){if(yield this.initDB(),this.db)try{return yield this.db.getFromIndex(e,a,t)}catch(e){throw new Error(`Method getFromIndex has error: ${e.message}`)}}))}getAllFromIndex(e){return N(this,arguments,(function*({storeName:e,indexName:a,key:t,count:c}){if(yield this.initDB(),!this.db)return[];try{return yield this.db.getAllFromIndex(e,a,t,c)}catch(e){throw new Error(`Method getAllFromIndex has error: ${e.message}`)}}))}getItem(e){return N(this,arguments,(function*({storeName:e,key:a}){if(yield this.initDB(),this.db)try{const t=this.db.transaction(e).objectStore(e);return yield t.get(a)}catch(e){throw new Error(`Method getItem has error: ${e.message}`)}}))}addItem(e){return N(this,arguments,(function*({storeName:e,data:a,key:t=""}){if(yield this.initDB(),this.db)try{const c=this.db.transaction(e,"readwrite");(yield c.objectStore(e).get(t))||(yield c.objectStore(e).add(a))}catch(e){throw new Error(`Method addItem has error: ${e.message}`)}}))}putItem(e){return N(this,arguments,(function*({storeName:e,data:a,key:t}){if(yield this.initDB(),this.db)try{const c=this.db.transaction(e,"readwrite");yield c.objectStore(e).put(a,t)}catch(e){throw new Error(`Method putItem has error: ${e.message}`)}}))}deleteItem(e){return N(this,arguments,(function*({storeName:e,key:a}){if(yield this.initDB(),this.db)try{const t=this.db.transaction(e,"readwrite");yield t.objectStore(e).delete(a)}catch(e){throw new Error(`Method deleteItem has error: ${e.message}`)}}))}getAll(e){return N(this,arguments,(function*({storeName:e}){if(yield this.initDB(),!this.db)return[];try{const a=this.db.transaction(e,"readonly");return yield a.objectStore(e).getAll()}catch(e){throw new Error(`Method getAll has error: ${e.message}`)}}))}getValue(e){return this.getItem({storeName:"keyval",key:e})}setValue(e,a){return this.putItem({storeName:"keyval",key:e,data:a})}delValue(e){return this.deleteItem({storeName:"keyval",key:e})}clearStore(e){return N(this,arguments,(function*({storeName:e,mode:a="readwrite"}){if(yield this.initDB(),this.db)try{const t=this.db.transaction(e,a);yield t.objectStore(e).clear()}catch(e){throw new Error(`Method clearStore has error: ${e.message}`)}}))}createTransactions(e){return N(this,arguments,(function*({storeName:e,data:a,mode:t="readwrite"}){if(yield this.initDB(),this.db)try{const c=this.db.transaction(e,t);yield c.objectStore(e).add(a),yield c.done}catch(e){throw new Error(`Method createTransactions has error: ${e.message}`)}}))}createMultipleTransactions(e){return N(this,arguments,(function*({storeName:e,data:a,index:t,mode:c="readwrite"}){if(yield this.initDB(),this.db)try{const f=this.db.transaction(e,c);for(const e of a)e&&(yield f.store.put(k(k({},e),t)))}catch(e){throw new Error(`Method createMultipleTransactions has error: ${e.message}`)}}))}}function O(e){return N(this,null,(function*(){if(!e){const e=new R({dbName:"tornado-core"});return yield e.initDB(),e}const a=[{name:"transactionHash",unique:!1},{name:"commitment",unique:!0}],t=[{name:"nullifierHash",unique:!0}],c=(0,E.zj)(e),{tokens:f,nativeCurrency:d}=c,r=[{name:"encrypted_events",keyPath:"transactionHash"},{name:"lastEvents",keyPath:"name",indexes:[{name:"name",unique:!1}]}];e===E.zr.MAINNET&&r.push({name:"register_events",keyPath:"ensName"}),Object.entries(f).forEach((([c,{instanceAddress:f}])=>{Object.keys(f).forEach((f=>{d===c&&r.push({name:`stringify_bloom_${e}_${c}_${f}`,keyPath:"hashBloom"}),r.push({name:`deposits_${e}_${c}_${f}`,keyPath:"leafIndex",indexes:a},{name:`withdrawals_${e}_${c}_${f}`,keyPath:"blockNumber",indexes:t},{name:`stringify_tree_${e}_${c}_${f}`,keyPath:"hashTree"})}))}));const n=new R({dbName:`tornado_core_${e}`,stores:r});return yield n.initDB(),n}))}},5217:(e,a,t)=>{"use strict";t.d(a,{s:()=>i});var c=t(47882),f=t(41217),d=t(67418),r=t(22901),n=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));class i{constructor({netId:e,amount:a,currency:t,Tornado:c,commitmentHex:f,merkleTreeHeight:d=20,emptyElement:r="21663839004416932945382355908790599225266501822907911457504978515578255421292",merkleWorkerPath:n}){const i=`${e}_${t}_${a}`;this.currency=t,this.amount=a,this.netId=Number(e),this.Tornado=c,this.instanceName=i,this.commitmentHex=f,this.merkleTreeHeight=d,this.emptyElement=r,this.merkleWorkerPath=n}createTree(e){return n(this,null,(function*(){const{hash:a}=yield r.f.getHash();if(this.merkleWorkerPath){console.log("Using merkleWorker\n");try{if(d.Ll){const t=new Promise(((a,t)=>{const f=new c.Worker(this.merkleWorkerPath,{workerData:{merkleTreeHeight:this.merkleTreeHeight,elements:e,zeroElement:this.emptyElement}});f.on("message",a),f.on("error",t),f.on("exit",(e=>{0!==e&&t(new Error(`Worker stopped with exit code ${e}`))}))}));return f.MerkleTree.deserialize(JSON.parse(yield t),a)}{const t=new Promise(((a,t)=>{const c=new Worker(this.merkleWorkerPath);c.onmessage=e=>{a(e.data)},c.onerror=e=>{t(e)},c.postMessage({merkleTreeHeight:this.merkleTreeHeight,elements:e,zeroElement:this.emptyElement})}));return f.MerkleTree.deserialize(JSON.parse(yield t),a)}}catch(e){console.log("merkleWorker failed, falling back to synchronous merkle tree"),console.log(e)}}return new f.MerkleTree(this.merkleTreeHeight,e,{zeroElement:this.emptyElement,hashFunction:a})}))}createPartialTree(e){return n(this,arguments,(function*({edge:e,elements:a}){const{hash:t}=yield r.f.getHash();if(this.merkleWorkerPath){console.log("Using merkleWorker\n");try{if(d.Ll){const d=new Promise(((t,f)=>{const d=new c.Worker(this.merkleWorkerPath,{workerData:{merkleTreeHeight:this.merkleTreeHeight,edge:e,elements:a,zeroElement:this.emptyElement}});d.on("message",t),d.on("error",f),d.on("exit",(e=>{0!==e&&f(new Error(`Worker stopped with exit code ${e}`))}))}));return f.PartialMerkleTree.deserialize(JSON.parse(yield d),t)}{const c=new Promise(((t,c)=>{const f=new Worker(this.merkleWorkerPath);f.onmessage=e=>{t(e.data)},f.onerror=e=>{c(e)},f.postMessage({merkleTreeHeight:this.merkleTreeHeight,edge:e,elements:a,zeroElement:this.emptyElement})}));return f.PartialMerkleTree.deserialize(JSON.parse(yield c),t)}}catch(e){console.log("merkleWorker failed, falling back to synchronous merkle tree"),console.log(e)}}return new f.PartialMerkleTree(this.merkleTreeHeight,e,a,{zeroElement:this.emptyElement,hashFunction:t})}))}verifyTree(e){return n(this,null,(function*(){console.log(`\nCreating deposit tree for ${this.netId} ${this.amount} ${this.currency.toUpperCase()} would take a while\n`),console.time("Created tree in");const a=yield this.createTree(e.map((({commitment:e})=>e)));if(console.timeEnd("Created tree in"),console.log(""),!(yield this.Tornado.isKnownRoot((0,d.$W)(BigInt(a.root))))){const e=`Deposit Event ${this.netId} ${this.amount} ${this.currency} is invalid`;throw new Error(e)}return a}))}}},22901:(e,a,t)=>{"use strict";t.d(a,{f:()=>r,p:()=>d});var c=t(90294),f=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));class d{constructor(){this.mimcPromise=this.initMimc()}initMimc(){return f(this,null,(function*(){this.sponge=yield(0,c.HI)(),this.hash=(e,a)=>{var t,c;return null==(c=this.sponge)?void 0:c.F.toString(null==(t=this.sponge)?void 0:t.multiHash([BigInt(e),BigInt(a)]))}}))}getHash(){return f(this,null,(function*(){return yield this.mimcPromise,{sponge:this.sponge,hash:this.hash}}))}}const r=new d},48486:(e,a,t)=>{"use strict";t.d(a,{C:()=>f});var c=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));function f(e,a){return c(this,null,(function*(){const t=a.map((e=>{var a,t,c;return{target:(null==(a=e.contract)?void 0:a.target)||e.address,callData:((null==(t=e.contract)?void 0:t.interface)||e.interface).encodeFunctionData(e.name,e.params),allowFailure:null!=(c=e.allowFailure)&&c}}));return(yield e.aggregate3.staticCall(t)).map(((e,t)=>{var c;const f=(null==(c=a[t].contract)?void 0:c.interface)||a[t].interface,[d,r]=e,n=d&&r&&"0x"!==r?f.decodeFunctionResult(a[t].name,r):null;return n?1===n.length?n[0]:n:null}))}))}},59499:(e,a,t)=>{"use strict";t.d(a,{AE:()=>u,Af:()=>s,RY:()=>h,Zh:()=>x,cX:()=>l,h9:()=>g,o2:()=>y,oY:()=>m,sb:()=>o,zj:()=>p,zr:()=>b});var c=Object.defineProperty,f=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,n=(e,a,t)=>a in e?c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,i=(e,a)=>{for(var t in a||(a={}))d.call(a,t)&&n(e,t,a[t]);if(f)for(var t of f(a))r.call(a,t)&&n(e,t,a[t]);return e},b=(e=>(e[e.MAINNET=1]="MAINNET",e[e.BSC=56]="BSC",e[e.POLYGON=137]="POLYGON",e[e.OPTIMISM=10]="OPTIMISM",e[e.ARBITRUM=42161]="ARBITRUM",e[e.GNOSIS=100]="GNOSIS",e[e.AVALANCHE=43114]="AVALANCHE",e[e.SEPOLIA=11155111]="SEPOLIA",e))(b||{});const o={1:{rpcCallRetryAttempt:15,gasPrices:{instant:80,fast:50,standard:25,low:8},nativeCurrency:"eth",currencyName:"ETH",explorerUrl:"https://etherscan.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Ethereum Mainnet",deployedBlock:9116966,rpcUrls:{mevblockerRPC:{name:"MevblockerRPC",url:"https://rpc.mevblocker.io"},keydonix:{name:"keydonix",url:"https://ethereum.keydonix.com/v1/mainnet"},SecureRpc:{name:"SecureRpc",url:"https://api.securerpc.com/v1"},stackup:{name:"Stackup RPC",url:"https://public.stackup.sh/api/v1/node/ethereum-mainnet"},oneRPC:{name:"1RPC",url:"https://1rpc.io/eth"}},multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0xd90e2f925DA726b50C4Ed8D0Fb90Ad053324F31b",echoContract:"0x9B27DD5Bb15d42DC224FCD0B7caEbBe16161Df42",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornContract:"0x77777FeDdddFfC19Ff86DB637967013e6C6A116C",governanceContract:"0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce",stakingRewardsContract:"0x5B3f656C80E8ddb9ec01Dd9018815576E9238c29",registryContract:"0x58E8dCC13BE9780fC42E8723D8EaD4CF46943dF2",aggregatorContract:"0xE8F47A78A6D52D317D0D2FFFac56739fE14D1b49",reverseRecordsContract:"0x3671aE578E63FdF66ad4F3E12CC0c0d71Ac7510C",tornadoSubgraph:"tornadocash/mainnet-tornado-subgraph",registrySubgraph:"tornadocash/tornado-relayer-registry",governanceSubgraph:"tornadocash/tornado-governance",subgraphs:{},tokens:{eth:{instanceAddress:{.1:"0x12D66f87A04A9E220743712cE6d9bB1B5616B8Fc",1:"0x47CE0C6eD5B0Ce3d3A51fdb1C52DC66a7c3c2936",10:"0x910Cbd523D972eb0a6f4cAe4618aD62622b39DbF",100:"0xA160cdAB225685dA1d56aa342Ad8841c3b53f291"},symbol:"ETH",decimals:18},dai:{instanceAddress:{100:"0xD4B88Df4D29F5CedD6857912842cff3b20C8Cfa3",1e3:"0xFD8610d20aA15b7B2E3Be39B396a1bC3516c7144",1e4:"0x07687e702b410Fa43f4cB4Af7FA097918ffD2730",1e5:"0x23773E65ed146A459791799d01336DB287f25334"},tokenAddress:"0x6B175474E89094C44Da98b954EedeAC495271d0F",tokenGasLimit:7e4,symbol:"DAI",decimals:18,gasLimit:7e5},cdai:{instanceAddress:{5e3:"0x22aaA7720ddd5388A3c0A3333430953C68f1849b",5e4:"0x03893a7c7463AE47D46bc7f091665f1893656003",5e5:"0x2717c5e28cf931547B621a5dddb772Ab6A35B701",5e6:"0xD21be7248e0197Ee08E0c20D4a96DEBdaC3D20Af"},tokenAddress:"0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643",tokenGasLimit:2e5,symbol:"cDAI",decimals:8,gasLimit:7e5},usdc:{instanceAddress:{100:"0xd96f2B1c14Db8458374d9Aca76E26c3D18364307",1e3:"0x4736dCf1b7A3d580672CcE6E7c65cd5cc9cFBa9D"},tokenAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",tokenGasLimit:7e4,symbol:"USDC",decimals:6,gasLimit:7e5},usdt:{instanceAddress:{100:"0x169AD27A470D064DEDE56a2D3ff727986b15D52B",1e3:"0x0836222F2B2B24A3F36f98668Ed8F0B38D1a872f"},tokenAddress:"0xdAC17F958D2ee523a2206206994597C13D831ec7",tokenGasLimit:7e4,symbol:"USDT",decimals:6,gasLimit:7e5},wbtc:{instanceAddress:{.1:"0x178169B423a011fff22B9e3F3abeA13414dDD0F1",1:"0x610B717796ad172B316836AC95a2ffad065CeaB4",10:"0xbB93e510BbCD0B7beb5A853875f9eC60275CF498"},tokenAddress:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",tokenGasLimit:7e4,symbol:"WBTC",decimals:8,gasLimit:7e5}},disabledTokens:["cdai","usdt","usdc"],relayerEnsSubdomain:"mainnet-tornado",pollInterval:15,constants:{GOVERNANCE_BLOCK:11474695,NOTE_ACCOUNT_BLOCK:11842486,ENCRYPTED_NOTES_BLOCK:12143762,REGISTRY_BLOCK:14173129,MINING_BLOCK_TIME:15}},56:{rpcCallRetryAttempt:15,gasPrices:{instant:5,fast:5,standard:5,low:5},nativeCurrency:"bnb",currencyName:"BNB",explorerUrl:"https://bscscan.com",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Binance Smart Chain",deployedBlock:8158799,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornadoSubgraph:"tornadocash/bsc-tornado-subgraph",subgraphs:{},rpcUrls:{bnbchain:{name:"BNB Chain",url:"https://bsc-dataseed.bnbchain.org"},ninicoin:{name:"ninicoin",url:"https://bsc-dataseed1.ninicoin.io"},nodereal:{name:"NodeReal",url:"https://binance.nodereal.io"},stackup:{name:"Stackup RPC",url:"https://public.stackup.sh/api/v1/node/bsc-mainnet"},oneRPC:{name:"1RPC",url:"https://1rpc.io/bnb"}},tokens:{bnb:{instanceAddress:{.1:"0x84443CFd09A48AF6eF360C6976C5392aC5023a1F",1:"0xd47438C816c9E7f2E2888E060936a499Af9582b3",10:"0x330bdFADE01eE9bF63C209Ee33102DD334618e0a",100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD"},symbol:"BNB",decimals:18}},relayerEnsSubdomain:"bsc-tornado",pollInterval:10,constants:{NOTE_ACCOUNT_BLOCK:8159269,ENCRYPTED_NOTES_BLOCK:8159269}},137:{rpcCallRetryAttempt:15,gasPrices:{instant:100,fast:75,standard:50,low:30},nativeCurrency:"matic",currencyName:"MATIC",explorerUrl:"https://polygonscan.com",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Polygon (Matic) Network",deployedBlock:16257962,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornadoSubgraph:"tornadocash/matic-tornado-subgraph",subgraphs:{},rpcUrls:{oneRpc:{name:"1RPC",url:"https://1rpc.io/matic"},stackup:{name:"Stackup RPC",url:"https://public.stackup.sh/api/v1/node/polygon-mainnet"}},tokens:{matic:{instanceAddress:{100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD",1e3:"0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178",1e4:"0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040",1e5:"0xa5C2254e4253490C54cef0a4347fddb8f75A4998"},symbol:"MATIC",decimals:18}},relayerEnsSubdomain:"polygon-tornado",pollInterval:10,constants:{NOTE_ACCOUNT_BLOCK:16257996,ENCRYPTED_NOTES_BLOCK:16257996}},10:{rpcCallRetryAttempt:15,gasPrices:{instant:.001,fast:.001,standard:.001,low:.001},nativeCurrency:"eth",currencyName:"ETH",explorerUrl:"https://optimistic.etherscan.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Optimism",deployedBlock:2243689,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",ovmGasPriceOracleContract:"0x420000000000000000000000000000000000000F",tornadoSubgraph:"tornadocash/optimism-tornado-subgraph",subgraphs:{},rpcUrls:{optimism:{name:"Optimism",url:"https://mainnet.optimism.io"},stackup:{name:"Stackup RPC",url:"https://public.stackup.sh/api/v1/node/optimism-mainnet"},oneRpc:{name:"1RPC",url:"https://1rpc.io/op"}},tokens:{eth:{instanceAddress:{.1:"0x84443CFd09A48AF6eF360C6976C5392aC5023a1F",1:"0xd47438C816c9E7f2E2888E060936a499Af9582b3",10:"0x330bdFADE01eE9bF63C209Ee33102DD334618e0a",100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD"},symbol:"ETH",decimals:18}},relayerEnsSubdomain:"optimism-tornado",pollInterval:15,constants:{NOTE_ACCOUNT_BLOCK:2243694,ENCRYPTED_NOTES_BLOCK:2243694}},42161:{rpcCallRetryAttempt:15,gasPrices:{instant:4,fast:3,standard:2.52,low:2.29},nativeCurrency:"eth",currencyName:"ETH",explorerUrl:"https://arbiscan.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Arbitrum One",deployedBlock:3430648,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornadoSubgraph:"tornadocash/arbitrum-tornado-subgraph",subgraphs:{},rpcUrls:{Arbitrum:{name:"Arbitrum RPC",url:"https://arb1.arbitrum.io/rpc"},stackup:{name:"Stackup RPC",url:"https://public.stackup.sh/api/v1/node/arbitrum-one"},oneRpc:{name:"1rpc",url:"https://1rpc.io/arb"}},tokens:{eth:{instanceAddress:{.1:"0x84443CFd09A48AF6eF360C6976C5392aC5023a1F",1:"0xd47438C816c9E7f2E2888E060936a499Af9582b3",10:"0x330bdFADE01eE9bF63C209Ee33102DD334618e0a",100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD"},symbol:"ETH",decimals:18}},relayerEnsSubdomain:"arbitrum-tornado",pollInterval:15,constants:{NOTE_ACCOUNT_BLOCK:3430605,ENCRYPTED_NOTES_BLOCK:3430605}},100:{rpcCallRetryAttempt:15,gasPrices:{instant:6,fast:5,standard:4,low:1},nativeCurrency:"xdai",currencyName:"xDAI",explorerUrl:"https://gnosisscan.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Gnosis Chain",deployedBlock:17754561,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornadoSubgraph:"tornadocash/xdai-tornado-subgraph",subgraphs:{},rpcUrls:{gnosis:{name:"Gnosis",url:"https://rpc.gnosischain.com"},blockPi:{name:"BlockPi",url:"https://gnosis.blockpi.network/v1/rpc/public"},oneRpc:{name:"1rpc",url:"https://1rpc.io/gnosis"}},tokens:{xdai:{instanceAddress:{100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD",1e3:"0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178",1e4:"0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040",1e5:"0xa5C2254e4253490C54cef0a4347fddb8f75A4998"},symbol:"xDAI",decimals:18}},relayerEnsSubdomain:"gnosis-tornado",pollInterval:15,constants:{NOTE_ACCOUNT_BLOCK:17754564,ENCRYPTED_NOTES_BLOCK:17754564}},43114:{rpcCallRetryAttempt:15,gasPrices:{instant:225,fast:35,standard:25,low:25},nativeCurrency:"avax",currencyName:"AVAX",explorerUrl:"https://snowtrace.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Avalanche Mainnet",deployedBlock:4429818,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x0D5550d52428E7e3175bfc9550207e4ad3859b17",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",offchainOracleContract:"0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8",tornadoSubgraph:"tornadocash/avalanche-tornado-subgraph",subgraphs:{},rpcUrls:{publicRpc:{name:"Avalanche RPC",url:"https://api.avax.network/ext/bc/C/rpc"},oneRPC:{name:"OneRPC",url:"https://1rpc.io/avax/c"}},tokens:{avax:{instanceAddress:{10:"0x330bdFADE01eE9bF63C209Ee33102DD334618e0a",100:"0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD",500:"0xaf8d1839c3c67cf571aa74B5c12398d4901147B3"},symbol:"AVAX",decimals:18}},relayerEnsSubdomain:"avalanche-tornado",pollInterval:10,constants:{NOTE_ACCOUNT_BLOCK:4429813,ENCRYPTED_NOTES_BLOCK:4429813}},11155111:{rpcCallRetryAttempt:15,gasPrices:{instant:2,fast:2,standard:2,low:2},nativeCurrency:"eth",currencyName:"SepoliaETH",explorerUrl:"https://sepolia.etherscan.io",merkleTreeHeight:20,emptyElement:"21663839004416932945382355908790599225266501822907911457504978515578255421292",networkName:"Ethereum Sepolia",deployedBlock:5594395,multicallContract:"0xcA11bde05977b3631167028862bE2a173976CA11",routerContract:"0x1572AFE6949fdF51Cb3E0856216670ae9Ee160Ee",echoContract:"0xa75BF2815618872f155b7C4B0C81bF990f5245E4",tornContract:"0x3AE6667167C0f44394106E197904519D808323cA",governanceContract:"0xe5324cD7602eeb387418e594B87aCADee08aeCAD",stakingRewardsContract:"0x6d0018890751Efd31feb8166711B16732E2b496b",registryContract:"0x1428e5d2356b13778A13108b10c440C83011dfB8",aggregatorContract:"0x4088712AC9fad39ea133cdb9130E465d235e9642",reverseRecordsContract:"0xEc29700C0283e5Be64AcdFe8077d6cC95dE23C23",tornadoSubgraph:"tornadocash/sepolia-tornado-subgraph",subgraphs:{},rpcUrls:{sepolia:{name:"Sepolia RPC",url:"https://rpc.sepolia.org"},stackup:{name:"Stackup",url:"https://public.stackup.sh/api/v1/node/ethereum-sepolia"},onerpc:{name:"1rpc",url:"https://1rpc.io/sepolia"},ethpandaops:{name:"ethpandaops",url:"https://rpc.sepolia.ethpandaops.io"}},tokens:{eth:{instanceAddress:{.1:"0x8C4A04d872a6C1BE37964A21ba3a138525dFF50b",1:"0x8cc930096B4Df705A007c4A039BDFA1320Ed2508",10:"0x8D10d506D29Fc62ABb8A290B99F66dB27Fc43585",100:"0x44c5C92ed73dB43888210264f0C8b36Fd68D8379"},symbol:"ETH",decimals:18},dai:{instanceAddress:{100:"0x6921fd1a97441dd603a997ED6DDF388658daf754",1e3:"0x50a637770F5d161999420F7d70d888DE47207145",1e4:"0xecD649870407cD43923A816Cc6334a5bdf113621",1e5:"0x73B4BD04bF83206B6e979BE2507098F92EDf4F90"},tokenAddress:"0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357",tokenGasLimit:7e4,symbol:"DAI",decimals:18,gasLimit:7e5}},relayerEnsSubdomain:"sepolia-tornado",pollInterval:15,constants:{GOVERNANCE_BLOCK:5594395,NOTE_ACCOUNT_BLOCK:5594395,ENCRYPTED_NOTES_BLOCK:5594395,MINING_BLOCK_TIME:15}}},s=Object.values(b).filter((e=>"number"==typeof e));let l={};function u(e){s.push(...Object.keys(e).map((e=>Number(e))).filter((e=>!s.includes(e)))),l=i(i({},l),e)}function h(){const e=i(i({},o),l);return s.reduce(((a,t)=>(a[t]=e[t],a)),{})}function p(e){const a=h()[e];if(!a)throw new Error(`No config found for network ${e}!`);return a}function g(e){const{tokens:a,disabledTokens:t}=e;return Object.keys(a).filter((e=>!(null==t?void 0:t.includes(e))))}function m(e){const{tokens:a,disabledTokens:t}=e;return Object.entries(a).reduce(((e,[a,c])=>((null==t?void 0:t.includes(a))||(e[a]=c),e)),{})}function x(e,a){const{tokens:t,disabledTokens:c}=e;for(const[e,{instanceAddress:f}]of Object.entries(t))if(!(null==c?void 0:c.includes(e)))for(const[t,c]of Object.entries(f))if(c===a)return{amount:t,currency:e}}function y(){const e=h();return s.reduce(((a,t)=>(a[t]=e[t].relayerEnsSubdomain,a)),{})}},85111:(e,a,t)=>{"use strict";t.d(a,{Hr:()=>d,NO:()=>r,UB:()=>n});var c=t(90294),f=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));class d{constructor(){this.pedersenPromise=this.initPedersen()}initPedersen(){return f(this,null,(function*(){this.pedersenHash=yield(0,c.vu)(),this.babyJub=this.pedersenHash.babyJub}))}unpackPoint(e){return f(this,null,(function*(){var a,t;return yield this.pedersenPromise,null==(t=this.babyJub)?void 0:t.unpackPoint(null==(a=this.pedersenHash)?void 0:a.hash(e))}))}toStringBuffer(e){var a;return null==(a=this.babyJub)?void 0:a.F.toString(e)}}const r=new d;function n(e){return f(this,null,(function*(){const[a]=yield r.unpackPoint(e);return r.toStringBuffer(a)}))}},34525:(e,a,t)=>{"use strict";t.d(a,{T:()=>d});var c=t(99770),f=t(48486);class d{constructor(e,a,t){this.provider=e,this.multicall=a,this.oracle=t}fetchPrices(e){return a=this,t=function*(){return this.oracle?(yield(0,f.C)(this.multicall,e.map((({tokenAddress:e})=>({contract:this.oracle,name:"getRateToEth",params:[e,!0]}))))).map(((a,t)=>a*BigInt(10**e[t].decimals)/BigInt(10**18))):new Promise((a=>a(e.map((()=>(0,c.g5)("0.0001"))))))},new Promise(((e,c)=>{var f=e=>{try{r(t.next(e))}catch(e){c(e)}},d=e=>{try{r(t.throw(e))}catch(e){c(e)}},r=a=>a.done?e(a.value):Promise.resolve(a.value).then(f,d);r((t=t.apply(a,null)).next())}));var a,t}}},68434:(e,a,t)=>{"use strict";t.d(a,{D2:()=>of,Vr:()=>bf,Gd:()=>nf,nA:()=>rf,mJ:()=>Yc,hd:()=>Xc,Fd:()=>af,uY:()=>tf,WU:()=>ef,sO:()=>cf,MF:()=>ff,zr:()=>df});var c=t(74945),f=t.n(c),d=t(36212),r=t(57339),n=t(88081),i=t(87303);function b(e){return async function(e,a){(0,r.vA)(null==a||!a.cancelled,"request cancelled before sending","CANCELLED");const t=e.url.split(":")[0].toLowerCase();(0,r.vA)("http"===t||"https"===t,`unsupported protocol ${t}`,"UNSUPPORTED_OPERATION",{info:{protocol:t},operation:"request"}),(0,r.vA)("https"===t||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let c=null;const f=new AbortController,d=setTimeout((()=>{c=(0,r.xz)("request timeout","TIMEOUT"),f.abort()}),e.timeout);a&&a.addListener((()=>{c=(0,r.xz)("request cancelled","CANCELLED"),f.abort()}));const n={method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:f.signal};let i;try{i=await fetch(e.url,n)}catch(e){if(clearTimeout(d),c)throw c;throw e}clearTimeout(d);const b={};i.headers.forEach(((e,a)=>{b[a.toLowerCase()]=e}));const o=await i.arrayBuffer(),s=null==o?null:new Uint8Array(o);return{statusCode:i.status,statusMessage:i.statusText,headers:b,body:s}}}b();let o=b();const s=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),l=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let u=!1;async function h(e,a){try{const a=e.match(s);if(!a)throw new Error("invalid data");return new v(200,"OK",{"content-type":a[1]||"text/plain"},a[2]?function(e){e=atob(e);const a=new Uint8Array(e.length);for(let t=0;tString.fromCharCode(parseInt(a,16)))))))}catch(a){return new v(599,"BAD REQUEST (invalid data: URI)",{},null,new A(e))}var t}function p(e){return async function(a,t){try{const t=a.match(l);if(!t)throw new Error("invalid link");return new A(`${e}${t[2]}`)}catch(e){return new v(599,"BAD REQUEST (invalid IPFS URI)",{},null,new A(a))}}}const g={data:h,ipfs:p("https://gateway.ipfs.io/ipfs/")},m=new WeakMap;class x{#e;#a;constructor(e){this.#e=[],this.#a=!1,m.set(e,(()=>{if(!this.#a){this.#a=!0;for(const e of this.#e)setTimeout((()=>{e()}),0);this.#e=[]}}))}addListener(e){(0,r.vA)(!this.#a,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#e.push(e)}get cancelled(){return this.#a}checkSignal(){(0,r.vA)(!this.cancelled,"cancelled","CANCELLED",{})}}function y(e){if(null==e)throw new Error("missing signal; should not happen");return e.checkSignal(),e}class A{#t;#c;#f;#d;#r;#n;#i;#b;#o;#s;#l;#u;#h;#p;#g;get url(){return this.#n}set url(e){this.#n=String(e)}get body(){return null==this.#i?null:new Uint8Array(this.#i)}set body(e){if(null==e)this.#i=void 0,this.#b=void 0;else if("string"==typeof e)this.#i=(0,i.YW)(e),this.#b="text/plain";else if(e instanceof Uint8Array)this.#i=e,this.#b="application/octet-stream";else{if("object"!=typeof e)throw new Error("invalid body");this.#i=(0,i.YW)(JSON.stringify(e)),this.#b="application/json"}}hasBody(){return null!=this.#i}get method(){return this.#d?this.#d:this.hasBody()?"POST":"GET"}set method(e){null==e&&(e=""),this.#d=String(e).toUpperCase()}get headers(){const e=Object.assign({},this.#f);return this.#o&&(e.authorization=`Basic ${function(e){const a=(0,d.q5)(e);let t="";for(let e=0;e{if(t=0,"timeout must be non-zero","timeout",e),this.#r=e}get preflightFunc(){return this.#s||null}set preflightFunc(e){this.#s=e}get processFunc(){return this.#l||null}set processFunc(e){this.#l=e}get retryFunc(){return this.#u||null}set retryFunc(e){this.#u=e}get getUrlFunc(){return this.#g||o}set getUrlFunc(e){this.#g=e}constructor(e){this.#n=String(e),this.#t=!1,this.#c=!0,this.#f={},this.#d="",this.#r=3e5,this.#p={slotInterval:250,maxAttempts:12},this.#g=null}toString(){return``}setThrottleParams(e){null!=e.slotInterval&&(this.#p.slotInterval=e.slotInterval),null!=e.maxAttempts&&(this.#p.maxAttempts=e.maxAttempts)}async#m(e,a,t,c,f){if(e>=this.#p.maxAttempts)return f.makeServerError("exceeded maximum retry limit");(0,r.vA)(w()<=a,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:c}),t>0&&await function(e){return new Promise((a=>setTimeout(a,e)))}(t);let d=this.clone();const n=(d.url.split(":")[0]||"").toLowerCase();if(n in g){const e=await g[n](d.url,y(c.#h));if(e instanceof v){let a=e;if(this.processFunc){y(c.#h);try{a=await this.processFunc(d,a)}catch(e){null!=e.throttle&&"number"==typeof e.stall||a.makeServerError("error in post-processing function",e).assertOk()}}return a}d=e}this.preflightFunc&&(d=await this.preflightFunc(d));const i=await this.getUrlFunc(d,y(c.#h));let b=new v(i.statusCode,i.statusMessage,i.headers,i.body,c);if(301===b.statusCode||302===b.statusCode){try{const t=b.headers.location||"";return d.redirect(t).#m(e+1,a,0,c,b)}catch(e){}return b}if(429===b.statusCode&&(null==this.retryFunc||await this.retryFunc(d,b,e))){const t=b.headers["retry-after"];let f=this.#p.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return"string"==typeof t&&t.match(/^[1-9][0-9]*$/)&&(f=parseInt(t)),d.clone().#m(e+1,a,f,c,b)}if(this.processFunc){y(c.#h);try{b=await this.processFunc(d,b)}catch(t){null!=t.throttle&&"number"==typeof t.stall||b.makeServerError("error in post-processing function",t).assertOk();let f=this.#p.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return t.stall>=0&&(f=t.stall),d.clone().#m(e+1,a,f,c,b)}}return b}send(){return(0,r.vA)(null==this.#h,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#h=new x(this),this.#m(0,w()+this.timeout,0,this,new v(0,"",{},null,this))}cancel(){(0,r.vA)(null!=this.#h,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=m.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const a=this.url.split(":")[0].toLowerCase(),t=e.split(":")[0].toLowerCase();(0,r.vA)("GET"===this.method&&("https"!==a||"http"!==t)&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const c=new A(e);return c.method="GET",c.allowGzip=this.allowGzip,c.timeout=this.timeout,c.#f=Object.assign({},this.#f),this.#i&&(c.#i=new Uint8Array(this.#i)),c.#b=this.#b,c}clone(){const e=new A(this.url);return e.#d=this.#d,this.#i&&(e.#i=this.#i),e.#b=this.#b,e.#f=Object.assign({},this.#f),e.#o=this.#o,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#s=this.#s,e.#l=this.#l,e.#u=this.#u,e.#p=Object.assign({},this.#p),e.#g=this.#g,e}static lockConfig(){u=!0}static getGateway(e){return g[e.toLowerCase()]||null}static registerGateway(e,a){if("http"===(e=e.toLowerCase())||"https"===e)throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(u)throw new Error("gateways locked");g[e]=a}static registerGetUrl(e){if(u)throw new Error("gateways locked");o=e}static createGetUrlFunc(e){return b()}static createDataGateway(){return h}static createIpfsGatewayFunc(e){return p(e)}}class v{#x;#y;#f;#i;#A;#v;toString(){return``}get statusCode(){return this.#x}get statusMessage(){return this.#y}get headers(){return Object.assign({},this.#f)}get body(){return null==this.#i?null:new Uint8Array(this.#i)}get bodyText(){try{return null==this.#i?"":(0,i._v)(this.#i)}catch(e){(0,r.vA)(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(e){(0,r.vA)(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,a=Object.keys(e);let t=0;return{next:()=>{if(t(e[a.toLowerCase()]=String(t[a]),e)),{}),this.#i=null==c?null:new Uint8Array(c),this.#A=f||null,this.#v={message:""}}makeServerError(e,a){let t;t=e?`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:`CLIENT ESCALATED SERVER ERROR (${e=`${this.statusCode} ${this.statusMessage}`})`;const c=new v(599,t,this.headers,this.body,this.#A||void 0);return c.#v={message:e,error:a},c}throwThrottleError(e,a){null==a?a=-1:(0,r.MR)(Number.isInteger(a)&&a>=0,"invalid stall timeout","stall",a);const t=new Error(e||"throttling requests");throw(0,n.n)(t,{stall:a,throttle:!0}),t}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return null!=this.#i}get request(){return this.#A}ok(){return""===this.#v.message&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:a}=this.#v;""===e&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let t=null;this.request&&(t=this.request.url);let c=null;try{this.#i&&(c=(0,i._v)(this.#i))}catch(e){}(0,r.vA)(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:a,info:{requestUrl:t,responseBody:c,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function w(){return(new Date).getTime()}var _=t(35273),I=t(30031),E=t(41442),C=t(15539),M=t(27033),B=t(38264);const L=new Uint8Array(32);L.fill(0);const S=BigInt(-1),k=BigInt(0),N=BigInt(1),P=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),R=(0,M.up)(N,32),O=(0,M.up)(k,32),D={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},T=["name","version","chainId","verifyingContract","salt"];function F(e){return function(a){return(0,r.MR)("string"==typeof a,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,a),a}}const Q={name:F("name"),version:F("version"),chainId:function(e){const a=(0,M.Ab)(e,"domain.chainId");return(0,r.MR)(a>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(a)?Number(a):(0,M.nD)(a)},verifyingContract:function(e){try{return(0,I.b)(e).toLowerCase()}catch(e){}(0,r.MR)(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const a=(0,d.q5)(e,"domain.salt");return(0,r.MR)(32===a.length,'invalid domain value "salt"',"domain.salt",e),(0,d.c$)(a)}};function U(e){{const a=e.match(/^(u?)int(\d+)$/);if(a){const t=""===a[1],c=parseInt(a[2]);(0,r.MR)(c%8==0&&0!==c&&c<=256&&a[2]===String(c),"invalid numeric width","type",e);const f=(0,M.dK)(P,t?c-1:c),d=t?(f+N)*S:k;return function(a){const c=(0,M.Ab)(a,"value");return(0,r.MR)(c>=d&&c<=f,`value out-of-bounds for ${e}`,"value",c),(0,M.up)(t?(0,M.JJ)(c,256):c,32)}}}{const a=e.match(/^bytes(\d+)$/);if(a){const t=parseInt(a[1]);return(0,r.MR)(0!==t&&t<=32&&a[1]===String(t),"invalid bytes width","type",e),function(a){const c=(0,d.q5)(a);return(0,r.MR)(c.length===t,`invalid length for ${e}`,"value",a),function(e){const a=(0,d.q5)(e),t=a.length%32;return t?(0,d.xW)([a,L.slice(t)]):(0,d.c$)(a)}(a)}}}switch(e){case"address":return function(e){return(0,d.nx)((0,I.b)(e),32)};case"bool":return function(e){return e?R:O};case"bytes":return function(e){return(0,C.S)(e)};case"string":return function(e){return(0,B.id)(e)}}return null}function j(e,a){return`${e}(${a.map((({name:e,type:a})=>a+" "+e)).join(",")})`}function H(e){const a=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return a?{base:a[1],index:a[2]+a[4],array:{base:a[1],prefix:a[1]+a[2],count:a[5]?parseInt(a[5]):-1}}:{base:e}}class ${primaryType;#w;get types(){return JSON.parse(this.#w)}#_;#I;constructor(e){this.#_=new Map,this.#I=new Map;const a=new Map,t=new Map,c=new Map,f={};Object.keys(e).forEach((d=>{f[d]=e[d].map((({name:a,type:t})=>{let{base:c,index:f}=H(t);return"int"!==c||e.int||(c="int256"),"uint"!==c||e.uint||(c="uint256"),{name:a,type:c+(f||"")}})),a.set(d,new Set),t.set(d,[]),c.set(d,new Set)})),this.#w=JSON.stringify(f);for(const c in f){const d=new Set;for(const n of f[c]){(0,r.MR)(!d.has(n.name),`duplicate variable name ${JSON.stringify(n.name)} in ${JSON.stringify(c)}`,"types",e),d.add(n.name);const f=H(n.type).base;(0,r.MR)(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",e),U(f)||((0,r.MR)(t.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),t.get(f).push(c),a.get(c).add(f))}}const d=Array.from(t.keys()).filter((e=>0===t.get(e).length));(0,r.MR)(0!==d.length,"missing primary type","types",e),(0,r.MR)(1===d.length,`ambiguous primary types or unused types: ${d.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,n.n)(this,{primaryType:d[0]}),function f(d,n){(0,r.MR)(!n.has(d),`circular type reference to ${JSON.stringify(d)}`,"types",e),n.add(d);for(const e of a.get(d))if(t.has(e)){f(e,n);for(const a of n)c.get(a).add(e)}n.delete(d)}(this.primaryType,new Set);for(const[e,a]of c){const t=Array.from(a);t.sort(),this.#_.set(e,j(e,f[e])+t.map((e=>j(e,f[e]))).join(""))}}getEncoder(e){let a=this.#I.get(e);return a||(a=this.#E(e),this.#I.set(e,a)),a}#E(e){{const a=U(e);if(a)return a}const a=H(e).array;if(a){const e=a.prefix,t=this.getEncoder(e);return c=>{(0,r.MR)(-1===a.count||a.count===c.length,`array length mismatch; expected length ${a.count}`,"value",c);let f=c.map(t);return this.#_.has(e)&&(f=f.map(C.S)),(0,C.S)((0,d.xW)(f))}}const t=this.types[e];if(t){const a=(0,B.id)(this.#_.get(e));return e=>{const c=t.map((({name:a,type:t})=>{const c=this.getEncoder(t)(e[a]);return this.#_.has(t)?(0,C.S)(c):c}));return c.unshift(a),(0,d.xW)(c)}}(0,r.MR)(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const a=this.#_.get(e);return(0,r.MR)(a,`unknown type: ${JSON.stringify(e)}`,"name",e),a}encodeData(e,a){return this.getEncoder(e)(a)}hashStruct(e,a){return(0,C.S)(this.encodeData(e,a))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,a,t){if(U(e))return t(e,a);const c=H(e).array;if(c)return(0,r.MR)(-1===c.count||c.count===a.length,`array length mismatch; expected length ${c.count}`,"value",a),a.map((e=>this._visit(c.prefix,e,t)));const f=this.types[e];if(f)return f.reduce(((e,{name:c,type:f})=>(e[c]=this._visit(f,a[c],t),e)),{});(0,r.MR)(!1,`unknown type: ${e}`,"type",e)}visit(e,a){return this._visit(this.primaryType,e,a)}static from(e){return new $(e)}static getPrimaryType(e){return $.from(e).primaryType}static hashStruct(e,a,t){return $.from(a).hashStruct(e,t)}static hashDomain(e){const a=[];for(const t in e){if(null==e[t])continue;const c=D[t];(0,r.MR)(c,`invalid typed-data domain key: ${JSON.stringify(t)}`,"domain",e),a.push({name:t,type:c})}return a.sort(((e,a)=>T.indexOf(e.name)-T.indexOf(a.name))),$.hashStruct("EIP712Domain",{EIP712Domain:a},e)}static encode(e,a,t){return(0,d.xW)(["0x1901",$.hashDomain(e),$.from(a).hash(t)])}static hash(e,a,t){return(0,C.S)($.encode(e,a,t))}static async resolveNames(e,a,t,c){e=Object.assign({},e);for(const a in e)null==e[a]&&delete e[a];const f={};e.verifyingContract&&!(0,d.Lo)(e.verifyingContract,20)&&(f[e.verifyingContract]="0x");const r=$.from(a);r.visit(t,((e,a)=>("address"!==e||(0,d.Lo)(a,20)||(f[a]="0x"),a)));for(const e in f)f[e]=await c(e);return e.verifyingContract&&f[e.verifyingContract]&&(e.verifyingContract=f[e.verifyingContract]),{domain:e,value:t=r.visit(t,((e,a)=>"address"===e&&f[a]?f[a]:a))}}static getPayload(e,a,t){$.hashDomain(e);const c={},f=[];T.forEach((a=>{const t=e[a];null!=t&&(c[a]=Q[a](t),f.push({name:a,type:D[a]}))}));const n=$.from(a);a=n.types;const i=Object.assign({},a);return(0,r.MR)(null==i.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",a),i.EIP712Domain=f,n.encode(t),{types:i,domain:c,primaryType:n.primaryType,message:n.visit(t,((e,a)=>{if(e.match(/^bytes(\d*)/))return(0,d.c$)((0,d.q5)(a));if(e.match(/^u?int/))return(0,M.Ab)(a).toString();switch(e){case"address":return a.toLowerCase();case"bool":return!!a;case"string":return(0,r.MR)("string"==typeof a,"invalid string","value",a),a}(0,r.MR)(!1,"unsupported type","type",e)}))}}}var q=t(8177),G=t(98982),z=t(24391),K=t(64563),V=t(79453),Z=t(99381);const J="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let W=null;function Y(e){if(null==W){W={};for(let e=0;e<58;e++)W[J[e]]=BigInt(e)}const a=W[e];return(0,r.MR)(null!=a,"invalid base58 value","letter",e),a}const X=BigInt(0),ee=BigInt(58);function ae(e){const a=(0,d.q5)(e);let t=(0,M.Dg)(a),c="";for(;t;)c=J[Number(t%ee)]+c,t/=ee;for(let e=0;e{try{return await this.#M.supportsInterface("0x9061b923")}catch(e){if((0,r.bJ)(e,"CALL_EXCEPTION"))return!1;throw this.#C=null,e}})()),await this.#C}async#B(e,a){a=(a||[]).slice();const t=this.#M.interface;a.unshift((0,K.kM)(this.name));let c=null;await this.supportsWildcard()&&(c=t.getFunction(e),(0,r.vA)(c,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),a=[(0,K.Wh)(this.name,255),t.encodeFunctionData(c,a)],e="resolve(bytes,bytes)"),a.push({enableCcipRead:!0});try{const f=await this.#M[e](...a);return c?t.decodeFunctionResult(c,f)[0]:f}catch(e){if(!(0,r.bJ)(e,"CALL_EXCEPTION"))throw e}return null}async getAddress(e){if(null==e&&(e=60),60===e)try{const e=await this.#B("addr(bytes32)");return null==e||e===G.j?null:e}catch(e){if((0,r.bJ)(e,"CALL_EXCEPTION"))return null;throw e}if(e>=0&&e<2147483648){let a=e+2147483648;const t=await this.#B("addr(bytes32,uint)",[a]);if((0,d.Lo)(t,20))return(0,I.b)(t)}let a=null;for(const t of this.provider.plugins)if(t instanceof ce&&t.supportsCoinType(e)){a=t;break}if(null==a)return null;const t=await this.#B("addr(bytes32,uint)",[e]);if(null==t||"0x"===t)return null;const c=await a.decodeAddress(e,t);if(null!=c)return c;(0,r.vA)(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:t}})}async getText(e){const a=await this.#B("text(bytes32,string)",[e]);return null==a||"0x"===a?null:a}async getContentHash(){const e=await this.#B("contenthash(bytes32)");if(null==e||"0x"===e)return null;const a=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(a){const e="e3010170"===a[1]?"ipfs":"ipns",t=parseInt(a[4],16);if(a[5].length===2*t)return`${e}://${ae("0x"+a[2])}`}const t=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(t&&64===t[1].length)return`bzz://${t[1]}`;(0,r.vA)(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const a=await this.getText("avatar");if(null==a)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:a});for(let t=0;t{if(a&&null==t)return null;if(!Array.isArray(t))throw new Error("not an array");return t.map((a=>e(a)))}}function le(e,a){return t=>{const c={};for(const f in e){let d=f;if(a&&f in a&&!(d in t))for(const e of a[f])if(e in t){d=e;break}try{const a=e[f](t[d]);void 0!==a&&(c[f]=a)}catch(e){const a=e instanceof Error?e.message:"not-an-error";(0,r.vA)(!1,`invalid value for value.${f} (${a})`,"BAD_DATA",{value:t})}}return c}}function ue(e){return(0,r.MR)((0,d.Lo)(e,!0),"invalid data","value",e),e}function he(e){return(0,r.MR)((0,d.Lo)(e,32),"invalid hash","value",e),e}const pe=le({address:I.b,blockHash:he,blockNumber:M.WZ,data:ue,index:M.WZ,removed:oe((function(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}(0,r.MR)(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}),!1),topics:se(he),transactionHash:he,transactionIndex:M.WZ},{index:["logIndex"]}),ge=le({hash:oe(he),parentHash:he,parentBeaconBlockRoot:oe(he,null),number:M.WZ,timestamp:M.WZ,nonce:oe(ue),difficulty:M.Ab,gasLimit:M.Ab,gasUsed:M.Ab,stateRoot:oe(he,null),receiptsRoot:oe(he,null),blobGasUsed:oe(M.Ab,null),excessBlobGas:oe(M.Ab,null),miner:oe(I.b),prevRandao:oe(he,null),extraData:ue,baseFeePerGas:oe(M.Ab)},{prevRandao:["mixHash"]}),me=le({transactionIndex:M.WZ,blockNumber:M.WZ,transactionHash:he,address:I.b,topics:se(he),data:ue,index:M.WZ,blockHash:he},{index:["logIndex"]}),xe=le({to:oe(I.b,null),from:oe(I.b,null),contractAddress:oe(I.b,null),index:M.WZ,root:oe(d.c$),gasUsed:M.Ab,blobGasUsed:oe(M.Ab,null),logsBloom:oe(ue),blockHash:he,hash:he,logs:se((function(e){return me(e)})),blockNumber:M.WZ,cumulativeGasUsed:M.Ab,effectiveGasPrice:oe(M.Ab),blobGasPrice:oe(M.Ab,null),status:oe(M.WZ),type:oe(M.WZ,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function ye(e){e.to&&(0,M.Ab)(e.to)===be&&(e.to="0x0000000000000000000000000000000000000000");const a=le({hash:he,index:oe(M.WZ,void 0),type:e=>"0x"===e||null==e?0:(0,M.WZ)(e),accessList:oe(q.$,null),blobVersionedHashes:oe(se(he,!0),null),blockHash:oe(he,null),blockNumber:oe(M.WZ,null),transactionIndex:oe(M.WZ,null),from:I.b,gasPrice:oe(M.Ab),maxPriorityFeePerGas:oe(M.Ab),maxFeePerGas:oe(M.Ab),maxFeePerBlobGas:oe(M.Ab,null),gasLimit:M.Ab,to:oe(I.b,null),value:M.Ab,nonce:M.WZ,data:ue,creates:oe(I.b,null),chainId:oe(M.Ab,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(e);if(null==a.to&&null==a.creates&&(a.creates=function(e){const a=(0,I.b)(e.from);let t=(0,M.Ab)(e.nonce,"tx.nonce").toString(16);return t="0"===t?"0x":t.length%2?"0x0"+t:"0x"+t,(0,I.b)((0,d.ZG)((0,C.S)((0,ne.R)([a,t])),12))}(a)),1!==e.type&&2!==e.type||null!=e.accessList||(a.accessList=[]),e.signature?a.signature=ie.t.from(e.signature):a.signature=ie.t.from(e),null==a.chainId){const e=a.signature.legacyChainId;null!=e&&(a.chainId=e)}return a.blockHash&&(0,M.Ab)(a.blockHash)===be&&(a.blockHash=null),a}class Ae{name;constructor(e){(0,n.n)(this,{name:e})}clone(){return new Ae(this.name)}}class ve extends Ae{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,a){null==e&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);const t={effectiveBlock:e};function c(e,c){let f=(a||{})[e];null==f&&(f=c),(0,r.MR)("number"==typeof f,`invalud value for ${e}`,"costs",a),t[e]=f}c("txBase",21e3),c("txCreate",32e3),c("txDataZero",4),c("txDataNonzero",16),c("txAccessListStorageKey",1900),c("txAccessListAddress",2400),(0,n.n)(this,t)}clone(){return new ve(this.effectiveBlock,this)}}class we extends Ae{address;targetNetwork;constructor(e,a){super("org.ethers.plugins.network.Ens"),(0,n.n)(this,{address:e||"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",targetNetwork:null==a?1:a})}clone(){return new we(this.address,this.targetNetwork)}}class _e extends Ae{#n;#S;get url(){return this.#n}get processFunc(){return this.#S}constructor(e,a){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#n=e,this.#S=a}clone(){return this}}const Ie=new Map;class Ee{#k;#N;#P;constructor(e,a){this.#k=e,this.#N=(0,M.Ab)(a),this.#P=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#k}set name(e){this.#k=e}get chainId(){return this.#N}set chainId(e){this.#N=(0,M.Ab)(e,"chainId")}matches(e){if(null==e)return!1;if("string"==typeof e){try{return this.chainId===(0,M.Ab)(e)}catch(e){}return this.name===e}if("number"==typeof e||"bigint"==typeof e){try{return this.chainId===(0,M.Ab)(e)}catch(e){}return!1}if("object"==typeof e){if(null!=e.chainId){try{return this.chainId===(0,M.Ab)(e.chainId)}catch(e){}return!1}return null!=e.name&&this.name===e.name}return!1}get plugins(){return Array.from(this.#P.values())}attachPlugin(e){if(this.#P.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#P.set(e.name,e.clone()),this}getPlugin(e){return this.#P.get(e)||null}getPlugins(e){return this.plugins.filter((a=>a.name.split("#")[0]===e))}clone(){const e=new Ee(this.name,this.chainId);return this.plugins.forEach((a=>{e.attachPlugin(a.clone())})),e}computeIntrinsicGas(e){const a=this.getPlugin("org.ethers.plugins.network.GasCost")||new ve;let t=a.txBase;if(null==e.to&&(t+=a.txCreate),e.data)for(let c=2;c{c.attachPlugin(e)})),c};Ee.register(e,c),Ee.register(a,c),t.altNames&&t.altNames.forEach((e=>{Ee.register(e,c)}))}Be||(Be=!0,e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",11155111,{ensNetwork:11155111}),e("holesky",17e3,{ensNetwork:17e3}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("arbitrum-sepolia",421614,{}),e("base",8453,{ensNetwork:1}),e("base-goerli",84531,{}),e("base-sepolia",84532,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("linea-sepolia",59141,{}),e("matic",137,{ensNetwork:1,plugins:[Me("https://gasstation.polygon.technology/v2")]}),e("matic-amoy",80002,{}),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[Me("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[]}),e("optimism-goerli",420,{}),e("optimism-sepolia",11155420,{}),e("xdai",100,{ensNetwork:1}))}(),null==e)return Ee.from("mainnet");if("number"==typeof e&&(e=BigInt(e)),"string"==typeof e||"bigint"==typeof e){const a=Ie.get(e);if(a)return a();if("bigint"==typeof e)return new Ee("unknown",e);(0,r.MR)(!1,"unknown network","network",e)}if("function"==typeof e.clone)return e.clone();if("object"==typeof e){(0,r.MR)("string"==typeof e.name&&"number"==typeof e.chainId,"invalid network object name or chainId","network",e);const a=new Ee(e.name,e.chainId);return(e.ensAddress||null!=e.ensNetwork)&&a.attachPlugin(new we(e.ensAddress,e.ensNetwork)),a}(0,r.MR)(!1,"invalid network","network",e)}static register(e,a){"number"==typeof e&&(e=BigInt(e));const t=Ie.get(e);t&&(0,r.MR)(!1,`conflicting network for ${JSON.stringify(t.name)}`,"nameOrChainId",e),Ie.set(e,a)}}function Ce(e,a){const t=String(e);if(!t.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${e}`);const c=t.split(".");if(1===c.length&&c.push(""),2!==c.length)throw new Error(`invalid gwei value: ${e}`);for(;c[1].length9){let e=BigInt(c[1].substring(0,9));c[1].substring(9).match(/^0+$/)||e++,c[1]=e.toString()}return BigInt(c[0]+c[1])}function Me(e){return new _e(e,(async(e,a,t)=>{let c;t.setHeader("User-Agent","ethers");try{const[a,f]=await Promise.all([t.send(),e()]);c=a;const d=c.bodyJson.standard;return{gasPrice:f.gasPrice,maxFeePerGas:Ce(d.maxFee,9),maxPriorityFeePerGas:Ce(d.maxPriorityFee,9)}}catch(e){(0,r.vA)(!1,`error encountered with polygon gas station (${JSON.stringify(t.url)})`,"SERVER_ERROR",{request:t,response:c,error:e})}}))}let Be=!1;var Le=t(43948);function Se(e){return JSON.parse(JSON.stringify(e))}class ke{#R;#O;#D;#T;constructor(e){this.#R=e,this.#O=null,this.#D=4e3,this.#T=-2}get pollingInterval(){return this.#D}set pollingInterval(e){this.#D=e}async#F(){try{const e=await this.#R.getBlockNumber();if(-2===this.#T)return void(this.#T=e);if(e!==this.#T){for(let a=this.#T+1;a<=e;a++){if(null==this.#O)return;await this.#R.emit("block",a)}this.#T=e}}catch(e){}null!=this.#O&&(this.#O=this.#R._setTimeout(this.#F.bind(this),this.#D))}start(){this.#O||(this.#O=this.#R._setTimeout(this.#F.bind(this),this.#D),this.#F())}stop(){this.#O&&(this.#R._clearTimeout(this.#O),this.#O=null)}pause(e){this.stop(),e&&(this.#T=-2)}resume(){this.start()}}class Ne{#R;#F;#Q;constructor(e){this.#R=e,this.#Q=!1,this.#F=e=>{this._poll(e,this.#R)}}async _poll(e,a){throw new Error("sub-classes must override this")}start(){this.#Q||(this.#Q=!0,this.#F(-2),this.#R.on("block",this.#F))}stop(){this.#Q&&(this.#Q=!1,this.#R.off("block",this.#F))}pause(e){this.stop()}resume(){this.start()}}class Pe extends Ne{#U;#j;constructor(e,a){super(e),this.#U=a,this.#j=-2}pause(e){e&&(this.#j=-2),super.pause(e)}async _poll(e,a){const t=await a.getBlock(this.#U);null!=t&&(-2===this.#j?this.#j=t.number:t.number>this.#j&&(a.emit(this.#U,t.number),this.#j=t.number))}}class Re extends Ne{#H;constructor(e,a){super(e),this.#H=Se(a)}async _poll(e,a){throw new Error("@TODO")}}class Oe extends Ne{#$;constructor(e,a){super(e),this.#$=a}async _poll(e,a){const t=await a.getTransactionReceipt(this.#$);t&&a.emit(this.#$,t)}}class De{#R;#H;#O;#Q;#T;constructor(e,a){this.#R=e,this.#H=Se(a),this.#O=this.#F.bind(this),this.#Q=!1,this.#T=-2}async#F(e){if(-2===this.#T)return;const a=Se(this.#H);a.fromBlock=this.#T+1,a.toBlock=e;const t=await this.#R.getLogs(a);if(0!==t.length)for(const e of t)this.#R.emit(this.#H,e),this.#T=e.blockNumber;else this.#T{this.#T=e})),this.#R.on("block",this.#O))}stop(){this.#Q&&(this.#Q=!1,this.#R.off("block",this.#O))}pause(e){this.stop(),e&&(this.#T=-2)}resume(){this.start()}}const Te=BigInt(2);function Fe(e){return e&&"function"==typeof e.then}function Qe(e,a){return e+":"+JSON.stringify(a,((e,a)=>{if(null==a)return"null";if("bigint"==typeof a)return`bigint:${a.toString()}`;if("string"==typeof a)return a.toLowerCase();if("object"==typeof a&&!Array.isArray(a)){const e=Object.keys(a);return e.sort(),e.reduce(((e,t)=>(e[t]=a[t],e)),{})}return a}))}class Ue{name;constructor(e){(0,n.n)(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function je(e){return(e=Array.from(new Set(e).values())).sort(),e}async function He(e,a){if(null==e)throw new Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),"string"==typeof e)switch(e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:e,tag:e}}if((0,d.Lo)(e,32)){const a=e.toLowerCase();return{type:"transaction",tag:Qe("tx",{hash:a}),hash:a}}if(e.orphan){const a=e;return{type:"orphan",tag:Qe("orphan",a),filter:(t=a,JSON.parse(JSON.stringify(t)))}}var t;if(e.address||e.topics){const t=e,c={topics:(t.topics||[]).map((e=>null==e?null:Array.isArray(e)?je(e.map((e=>e.toLowerCase()))):e.toLowerCase()))};if(t.address){const e=[],f=[],r=t=>{(0,d.Lo)(t)?e.push(t):f.push((async()=>{e.push(await(0,E.tG)(t,a))})())};Array.isArray(t.address)?t.address.forEach(r):r(t.address),f.length&&await Promise.all(f),c.address=je(e.map((e=>e.toLowerCase())))}return{filter:c,tag:Qe("event",c),type:"event"}}(0,r.MR)(!1,"unknown ProviderEvent","event",e)}function $e(){return(new Date).getTime()}const qe={cacheTimeout:250,pollingInterval:4e3};class Ge{#q;#P;#G;#z;#K;#V;#Z;#J;#W;#Y;#X;#ee;constructor(e,a){if(this.#ee=Object.assign({},qe,a||{}),"any"===e)this.#V=!0,this.#K=null;else if(e){const a=Ee.from(e);this.#V=!1,this.#K=Promise.resolve(a),setTimeout((()=>{this.emit("network",a,null)}),0)}else this.#V=!1,this.#K=null;this.#J=-1,this.#Z=new Map,this.#q=new Map,this.#P=new Map,this.#G=null,this.#z=!1,this.#W=1,this.#Y=new Map,this.#X=!1}get pollingInterval(){return this.#ee.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#P.values())}attachPlugin(e){if(this.#P.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#P.set(e.name,e.connect(this)),this}getPlugin(e){return this.#P.get(e)||null}get disableCcipRead(){return this.#X}set disableCcipRead(e){this.#X=!!e}async#ae(e){const a=this.#ee.cacheTimeout;if(a<0)return await this._perform(e);const t=Qe(e.method,e);let c=this.#Z.get(t);return c||(c=this._perform(e),this.#Z.set(t,c),setTimeout((()=>{this.#Z.get(t)===c&&this.#Z.delete(t)}),a)),await c}async ccipReadFetch(e,a,t){if(this.disableCcipRead||0===t.length||null==e.to)return null;const c=e.to.toLowerCase(),f=a.toLowerCase(),d=[];for(let a=0;a=500,`response not found during CCIP fetch: ${s}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:n,errorMessage:s}}),d.push(s)}(0,r.vA)(!1,`error encountered during CCIP fetch: ${d.map((e=>JSON.stringify(e))).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:t,errorMessages:d}})}_wrapBlock(e,a){return new Le.eB(function(e){const a=ge(e);return a.transactions=e.transactions.map((e=>"string"==typeof e?e:ye(e))),a}(e),this)}_wrapLog(e,a){return new Le.tG(function(e){return pe(e)}(e),this)}_wrapTransactionReceipt(e,a){return new Le.z5(function(e){return xe(e)}(e),this)}_wrapTransactionResponse(e,a){return new Le.uI(ye(e),this)}_detectNetwork(){(0,r.vA)(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){(0,r.vA)(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=(0,M.WZ)(await this.#ae({method:"getBlockNumber"}),"%response");return this.#J>=0&&(this.#J=e),e}_getAddress(e){return(0,E.tG)(e,this)}_getBlockTag(e){if(null==e)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}return(0,d.Lo)(e)?(0,d.Lo)(e,32)?e:(0,M.nD)(e):("bigint"==typeof e&&(e=(0,M.WZ)(e,"blockTag")),"number"==typeof e?e>=0?(0,M.nD)(e):this.#J>=0?(0,M.nD)(this.#J+e):this.getBlockNumber().then((a=>(0,M.nD)(a+e))):void(0,r.MR)(!1,"invalid blockTag","blockTag",e))}_getFilter(e){const a=(e.topics||[]).map((e=>null==e?null:Array.isArray(e)?je(e.map((e=>e.toLowerCase()))):e.toLowerCase())),t="blockHash"in e?e.blockHash:void 0,c=(e,c,f)=>{let d;switch(e.length){case 0:break;case 1:d=e[0];break;default:e.sort(),d=e}if(t&&(null!=c||null!=f))throw new Error("invalid filter");const r={};return d&&(r.address=d),a.length&&(r.topics=a),c&&(r.fromBlock=c),f&&(r.toBlock=f),t&&(r.blockHash=t),r};let f,d,r=[];if(e.address)if(Array.isArray(e.address))for(const a of e.address)r.push(this._getAddress(a));else r.push(this._getAddress(e.address));return"fromBlock"in e&&(f=this._getBlockTag(e.fromBlock)),"toBlock"in e&&(d=this._getBlockTag(e.toBlock)),r.filter((e=>"string"!=typeof e)).length||null!=f&&"string"!=typeof f||null!=d&&"string"!=typeof d?Promise.all([Promise.all(r),f,d]).then((e=>c(e[0],e[1],e[2]))):c(r,f,d)}_getTransactionRequest(e){const a=(0,Le.VS)(e),t=[];if(["to","from"].forEach((e=>{if(null==a[e])return;const c=(0,E.tG)(a[e],this);Fe(c)?t.push(async function(){a[e]=await c}()):a[e]=c})),null!=a.blockTag){const e=this._getBlockTag(a.blockTag);Fe(e)?t.push(async function(){a.blockTag=await e}()):a.blockTag=e}return t.length?async function(){return await Promise.all(t),a}():a}async getNetwork(){if(null==this.#K){const e=(async()=>{try{const e=await this._detectNetwork();return this.emit("network",e,null),e}catch(a){throw this.#K===e&&(this.#K=null),a}})();return this.#K=e,(await e).clone()}const e=this.#K,[a,t]=await Promise.all([e,this._detectNetwork()]);return a.chainId!==t.chainId&&(this.#V?(this.emit("network",t,a),this.#K===e&&(this.#K=Promise.resolve(t))):(0,r.vA)(!1,`network changed: ${a.chainId} => ${t.chainId} `,"NETWORK_ERROR",{event:"changed"})),a.clone()}async getFeeData(){const e=await this.getNetwork(),a=async()=>{const{_block:a,gasPrice:t,priorityFee:c}=await(0,n.k)({_block:this.#te("latest",!1),gasPrice:(async()=>{try{const e=await this.#ae({method:"getGasPrice"});return(0,M.Ab)(e,"%response")}catch(e){}return null})(),priorityFee:(async()=>{try{const e=await this.#ae({method:"getPriorityFee"});return(0,M.Ab)(e,"%response")}catch(e){}return null})()});let f=null,d=null;const r=this._wrapBlock(a,e);return r&&r.baseFeePerGas&&(d=null!=c?c:BigInt("1000000000"),f=r.baseFeePerGas*Te+d),new Le.J9(t,f,d)},t=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(t){const e=new A(t.url),c=await t.processFunc(a,this,e);return new Le.J9(c.gasPrice,c.maxFeePerGas,c.maxPriorityFeePerGas)}return await a()}async estimateGas(e){let a=this._getTransactionRequest(e);return Fe(a)&&(a=await a),(0,M.Ab)(await this.#ae({method:"estimateGas",transaction:a}),"%response")}async#ce(e,a,t){(0,r.vA)(t<10,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:a,enableCcipRead:!0})});const c=(0,Le.VS)(e);try{return(0,d.c$)(await this._perform({method:"call",transaction:c,blockTag:a}))}catch(e){if(!this.disableCcipRead&&(0,r.E)(e)&&e.data&&t>=0&&"latest"===a&&null!=c.to&&"0x556f1830"===(0,d.ZG)(e.data,0,4)){const f=e.data,n=await(0,E.tG)(c.to,this);let i;try{i=function(e){const a={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};(0,r.vA)((0,d.pO)(e)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const t=(0,d.ZG)(e,0,32);(0,r.vA)((0,d.ZG)(t,0,12)===(0,d.ZG)(Ye,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),a.sender=(0,d.ZG)(t,12);try{const t=[],c=(0,M.WZ)((0,d.ZG)(e,32,64)),f=(0,M.WZ)((0,d.ZG)(e,c,c+32)),r=(0,d.ZG)(e,c+32);for(let e=0;ea[e])),a}((0,d.ZG)(e.data,4))}catch(e){(0,r.vA)(!1,e.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:c,info:{data:f}})}(0,r.vA)(i.sender.toLowerCase()===n.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:f,reason:"OffchainLookup",transaction:c,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:i.errorArgs}});const b=await this.ccipReadFetch(c,i.calldata,i.urls);(0,r.vA)(null!=b,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:c,info:{data:e.data,errorArgs:i.errorArgs}});const o={to:n,data:(0,d.xW)([i.selector,We([b,i.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:o});try{const e=await this.#ce(o,a,t+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},o),result:e}),e}catch(e){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},o),error:e}),e}}throw e}}async#fe(e){const{value:a}=await(0,n.k)({network:this.getNetwork(),value:e});return a}async call(e){const{tx:a,blockTag:t}=await(0,n.k)({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#fe(this.#ce(a,t,e.enableCcipRead?0:-1))}async#de(e,a,t){let c=this._getAddress(a),f=this._getBlockTag(t);return"string"==typeof c&&"string"==typeof f||([c,f]=await Promise.all([c,f])),await this.#fe(this.#ae(Object.assign(e,{address:c,blockTag:f})))}async getBalance(e,a){return(0,M.Ab)(await this.#de({method:"getBalance"},e,a),"%response")}async getTransactionCount(e,a){return(0,M.WZ)(await this.#de({method:"getTransactionCount"},e,a),"%response")}async getCode(e,a){return(0,d.c$)(await this.#de({method:"getCode"},e,a))}async getStorage(e,a,t){const c=(0,M.Ab)(a,"position");return(0,d.c$)(await this.#de({method:"getStorage",position:c},e,t))}async broadcastTransaction(e){const{blockNumber:a,hash:t,network:c}=await(0,n.k)({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),f=V.Z.from(e);if(f.hash!==t)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(f,c).replaceableTransaction(a)}async#te(e,a){if((0,d.Lo)(e,32))return await this.#ae({method:"getBlock",blockHash:e,includeTransactions:a});let t=this._getBlockTag(e);return"string"!=typeof t&&(t=await t),await this.#ae({method:"getBlock",blockTag:t,includeTransactions:a})}async getBlock(e,a){const{network:t,params:c}=await(0,n.k)({network:this.getNetwork(),params:this.#te(e,!!a)});return null==c?null:this._wrapBlock(c,t)}async getTransaction(e){const{network:a,params:t}=await(0,n.k)({network:this.getNetwork(),params:this.#ae({method:"getTransaction",hash:e})});return null==t?null:this._wrapTransactionResponse(t,a)}async getTransactionReceipt(e){const{network:a,params:t}=await(0,n.k)({network:this.getNetwork(),params:this.#ae({method:"getTransactionReceipt",hash:e})});if(null==t)return null;if(null==t.gasPrice&&null==t.effectiveGasPrice){const a=await this.#ae({method:"getTransaction",hash:e});if(null==a)throw new Error("report this; could not find tx or effectiveGasPrice");t.effectiveGasPrice=a.gasPrice}return this._wrapTransactionReceipt(t,a)}async getTransactionResult(e){const{result:a}=await(0,n.k)({network:this.getNetwork(),result:this.#ae({method:"getTransactionResult",hash:e})});return null==a?null:(0,d.c$)(a)}async getLogs(e){let a=this._getFilter(e);Fe(a)&&(a=await a);const{network:t,params:c}=await(0,n.k)({network:this.getNetwork(),params:this.#ae({method:"getLogs",filter:a})});return c.map((e=>this._wrapLog(e,t)))}_getProvider(e){(0,r.vA)(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await re.fromName(this,e)}async getAvatar(e){const a=await this.getResolver(e);return a?await a.getAvatar():null}async resolveName(e){const a=await this.getResolver(e);return a?await a.getAddress():null}async lookupAddress(e){e=(0,I.b)(e);const a=(0,K.kM)(e.substring(2).toLowerCase()+".addr.reverse");try{const t=await re.getEnsAddress(this),c=new z.NZ(t,["function resolver(bytes32) view returns (address)"],this),f=await c.resolver(a);if(null==f||f===G.j)return null;const d=new z.NZ(f,["function name(bytes32) view returns (string)"],this),r=await d.name(a);return await this.resolveName(r)!==e?null:r}catch(e){if((0,r.bJ)(e,"BAD_DATA")&&"0x"===e.value)return null;if((0,r.bJ)(e,"CALL_EXCEPTION"))return null;throw e}return null}async waitForTransaction(e,a,t){const c=null!=a?a:1;return 0===c?this.getTransactionReceipt(e):new Promise((async(a,f)=>{let d=null;const n=async t=>{try{const f=await this.getTransactionReceipt(e);if(null!=f&&t-f.blockNumber+1>=c)return a(f),void(d&&(clearTimeout(d),d=null))}catch(e){console.log("EEE",e)}this.once("block",n)};null!=t&&(d=setTimeout((()=>{null!=d&&(d=null,this.off("block",n),f((0,r.xz)("timeout","TIMEOUT",{reason:"timeout"})))}),t)),n(await this.getBlockNumber())}))}async waitForBlock(e){(0,r.vA)(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const a=this.#Y.get(e);a&&(a.timer&&clearTimeout(a.timer),this.#Y.delete(e))}_setTimeout(e,a){null==a&&(a=0);const t=this.#W++,c=()=>{this.#Y.delete(t),e()};if(this.paused)this.#Y.set(t,{timer:null,func:c,time:a});else{const e=setTimeout(c,a);this.#Y.set(t,{timer:e,func:c,time:$e()})}return t}_forEachSubscriber(e){for(const a of this.#q.values())e(a.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new Ue(e.type);case"block":{const e=new ke(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new Pe(this,e.type);case"event":return new De(this,e.filter);case"transaction":return new Oe(this,e.hash);case"orphan":return new Re(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,a){for(const t of this.#q.values())if(t.subscriber===e){t.started&&t.subscriber.stop(),t.subscriber=a,t.started&&a.start(),null!=this.#G&&a.pause(this.#G);break}}async#re(e,a){let t=await He(e,this);return"event"===t.type&&a&&a.length>0&&!0===a[0].removed&&(t=await He({orphan:"drop-log",log:a[0]},this)),this.#q.get(t.tag)||null}async#ne(e){const a=await He(e,this),t=a.tag;let c=this.#q.get(t);return c||(c={subscriber:this._getSubscriber(a),tag:t,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#q.set(t,c)),c}async on(e,a){const t=await this.#ne(e);return t.listeners.push({listener:a,once:!1}),t.started||(t.subscriber.start(),t.started=!0,null!=this.#G&&t.subscriber.pause(this.#G)),this}async once(e,a){const t=await this.#ne(e);return t.listeners.push({listener:a,once:!0}),t.started||(t.subscriber.start(),t.started=!0,null!=this.#G&&t.subscriber.pause(this.#G)),this}async emit(e,...a){const t=await this.#re(e,a);if(!t||0===t.listeners.length)return!1;const c=t.listeners.length;return t.listeners=t.listeners.filter((({listener:t,once:c})=>{const f=new Z.z(this,c?null:t,e);try{t.call(this,...a,f)}catch(e){}return!c})),0===t.listeners.length&&(t.started&&t.subscriber.stop(),this.#q.delete(t.tag)),c>0}async listenerCount(e){if(e){const a=await this.#re(e);return a?a.listeners.length:0}let a=0;for(const{listeners:e}of this.#q.values())a+=e.length;return a}async listeners(e){if(e){const a=await this.#re(e);return a?a.listeners.map((({listener:e})=>e)):[]}let a=[];for(const{listeners:e}of this.#q.values())a=a.concat(e.map((({listener:e})=>e)));return a}async off(e,a){const t=await this.#re(e);if(!t)return this;if(a){const e=t.listeners.map((({listener:e})=>e)).indexOf(a);e>=0&&t.listeners.splice(e,1)}return a&&0!==t.listeners.length||(t.started&&t.subscriber.stop(),this.#q.delete(t.tag)),this}async removeAllListeners(e){if(e){const{tag:a,started:t,subscriber:c}=await this.#ne(e);t&&c.stop(),this.#q.delete(a)}else for(const[e,{started:a,subscriber:t}]of this.#q)a&&t.stop(),this.#q.delete(e);return this}async addListener(e,a){return await this.on(e,a)}async removeListener(e,a){return this.off(e,a)}get destroyed(){return this.#z}destroy(){this.removeAllListeners();for(const e of this.#Y.keys())this._clearTimeout(e);this.#z=!0}get paused(){return null!=this.#G}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#J=-1,null!=this.#G){if(this.#G==!!e)return;(0,r.vA)(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber((a=>a.pause(e))),this.#G=!!e;for(const e of this.#Y.values())e.timer&&clearTimeout(e.timer),e.time=$e()-e.time}resume(){if(null!=this.#G){this._forEachSubscriber((e=>e.resume())),this.#G=null;for(const e of this.#Y.values()){let a=e.time;a<0&&(a=0),e.time=$e(),setTimeout(e.func,a)}}}}function ze(e,a){try{const t=Ke(e,a);if(t)return(0,i._v)(t)}catch(e){}return null}function Ke(e,a){if("0x"===e)return null;try{const t=(0,M.WZ)((0,d.ZG)(e,a,a+32)),c=(0,M.WZ)((0,d.ZG)(e,t,t+32));return(0,d.ZG)(e,t+32,t+32+c)}catch(e){}return null}function Ve(e){const a=(0,M.c4)(e);if(a.length>32)throw new Error("internal; should not happen");const t=new Uint8Array(32);return t.set(a,32-a.length),t}function Ze(e){if(e.length%32==0)return e;const a=new Uint8Array(32*Math.ceil(e.length/32));return a.set(e),a}const Je=new Uint8Array([]);function We(e){const a=[];let t=0;for(let c=0;c((0,r.MR)(e.toLowerCase()===a.toLowerCase(),"transaction from mismatch","tx.from",a),e)))}else t.from=e.getAddress();return await(0,n.k)(t)}class aa{provider;constructor(e){(0,n.n)(this,{provider:e||null})}async getNonce(e){return Xe(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await ea(this,e)}async populateTransaction(e){const a=Xe(this,"populateTransaction"),t=await ea(this,e);null==t.nonce&&(t.nonce=await this.getNonce("pending")),null==t.gasLimit&&(t.gasLimit=await this.estimateGas(t));const c=await this.provider.getNetwork();if(null!=t.chainId){const a=(0,M.Ab)(t.chainId);(0,r.MR)(a===c.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else t.chainId=c.chainId;const f=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!f?0!==t.type&&1!==t.type||!f||(0,r.MR)(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e):(0,r.MR)(!1,"eip-1559 transaction do not support gasPrice","tx",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type){const e=await a.getFeeData();(0,r.vA)(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice)}else{const e=await a.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?((0,r.vA)(!f,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):(0,r.vA)(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else 2!==t.type&&3!==t.type||(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return await(0,n.k)(t)}async estimateGas(e){return Xe(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Xe(this,"call").call(await this.populateCall(e))}async resolveName(e){const a=Xe(this,"resolveName");return await a.resolveName(e)}async sendTransaction(e){const a=Xe(this,"sendTransaction"),t=await this.populateTransaction(e);delete t.from;const c=V.Z.from(t);return await a.broadcastTransaction(await this.signTransaction(c))}}class ta extends aa{address;constructor(e,a){super(a),(0,n.n)(this,{address:e})}async getAddress(){return this.address}connect(e){return new ta(this.address,e)}#ie(e,a){(0,r.vA)(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:a})}async signTransaction(e){this.#ie("transactions","signTransaction")}async signMessage(e){this.#ie("messages","signMessage")}async signTypedData(e,a,t){this.#ie("typed-data","signTypedData")}}class ca{#R;#be;#O;#Q;#oe;#se;constructor(e){this.#R=e,this.#be=null,this.#O=this.#F.bind(this),this.#Q=!1,this.#oe=null,this.#se=!1}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,a){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}async#F(e){try{null==this.#be&&(this.#be=this._subscribe(this.#R));let e=null;try{e=await this.#be}catch(e){if(!(0,r.bJ)(e,"UNSUPPORTED_OPERATION")||"eth_newFilter"!==e.operation)throw e}if(null==e)return this.#be=null,void this.#R._recoverSubscriber(this,this._recover(this.#R));const a=await this.#R.getNetwork();if(this.#oe||(this.#oe=a),this.#oe.chainId!==a.chainId)throw new Error("chaid changed");if(this.#se)return;const t=await this.#R.send("eth_getFilterChanges",[e]);await this._emitResults(this.#R,t)}catch(e){console.log("@TODO",e)}this.#R.once("block",this.#O)}#le(){const e=this.#be;e&&(this.#be=null,e.then((e=>{this.#R.destroyed||this.#R.send("eth_uninstallFilter",[e])})))}start(){this.#Q||(this.#Q=!0,this.#F(-2))}stop(){this.#Q&&(this.#Q=!1,this.#se=!0,this.#le(),this.#R.off("block",this.#O))}pause(e){e&&this.#le(),this.#R.off("block",this.#O)}resume(){this.start()}}class fa extends ca{#ue;constructor(e,a){var t;super(e),this.#ue=(t=a,JSON.parse(JSON.stringify(t)))}_recover(e){return new De(e,this.#ue)}async _subscribe(e){return await e.send("eth_newFilter",[this.#ue])}async _emitResults(e,a){for(const t of a)e.emit(this.#ue,e._wrapLog(t,e._network))}}class da extends ca{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,a){for(const t of a)e.emit("pending",t)}}const ra="bigint,boolean,function,number,string,symbol".split(/,/g);function na(e){if(null==e||ra.indexOf(typeof e)>=0)return e;if("function"==typeof e.getAddress)return e;if(Array.isArray(e))return e.map(na);if("object"==typeof e)return Object.keys(e).reduce(((a,t)=>(a[t]=e[t],a)),{});throw new Error(`should not happen: ${e} (${typeof e})`)}function ia(e){return new Promise((a=>{setTimeout(a,e)}))}function ba(e){return e?e.toLowerCase():e}function oa(e){return e&&"number"==typeof e.pollingInterval}const sa={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class la extends aa{address;constructor(e,a){super(e),a=(0,I.b)(a),(0,n.n)(this,{address:a})}connect(e){(0,r.vA)(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const a=na(e),t=[];if(a.from){const c=a.from;t.push((async()=>{const t=await(0,E.tG)(c,this.provider);(0,r.MR)(null!=t&&t.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),a.from=t})())}else a.from=this.address;if(null==a.gasLimit&&t.push((async()=>{a.gasLimit=await this.provider.estimateGas({...a,from:this.address})})()),null!=a.to){const e=a.to;t.push((async()=>{a.to=await(0,E.tG)(e,this.provider)})())}t.length&&await Promise.all(t);const c=this.provider.getRpcTransaction(a);return this.provider.send("eth_sendTransaction",[c])}async sendTransaction(e){const a=await this.provider.getBlockNumber(),t=await this.sendUncheckedTransaction(e);return await new Promise(((e,c)=>{const f=[1e3,100];let d=0;const n=async()=>{try{const c=await this.provider.getTransaction(t);if(null!=c)return void e(c.replaceableTransaction(a))}catch(e){if((0,r.bJ)(e,"CANCELLED")||(0,r.bJ)(e,"BAD_DATA")||(0,r.bJ)(e,"NETWORK_ERROR"))return null==e.info&&(e.info={}),e.info.sendTransactionHash=t,void c(e);if((0,r.bJ)(e,"INVALID_ARGUMENT")&&(d++,null==e.info&&(e.info={}),e.info.sendTransactionHash=t,d>10))return void c(e);this.provider.emit("error",(0,r.xz)("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:e}))}this.provider._setTimeout((()=>{n()}),f.pop()||4e3)};n()}))}async signTransaction(e){const a=na(e);if(a.from){const t=await(0,E.tG)(a.from,this.provider);(0,r.MR)(null!=t&&t.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),a.from=t}else a.from=this.address;const t=this.provider.getRpcTransaction(a);return await this.provider.send("eth_signTransaction",[t])}async signMessage(e){const a="string"==typeof e?(0,i.YW)(e):e;return await this.provider.send("personal_sign",[(0,d.c$)(a),this.address.toLowerCase()])}async signTypedData(e,a,t){const c=na(t),f=await $.resolveNames(e,a,c,(async e=>{const a=await(0,E.tG)(e);return(0,r.MR)(null!=a,"TypedData does not support null address","value",e),a}));return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify($.getPayload(f.domain,a,f.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const a="string"==typeof e?(0,i.YW)(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),(0,d.c$)(a)])}}class ua extends Ge{#ee;#he;#pe;#ge;#me;#oe;#xe;#ye(){if(this.#ge)return;const e=1===this._getOption("batchMaxCount")?0:this._getOption("batchStallTime");this.#ge=setTimeout((()=>{this.#ge=null;const e=this.#pe;for(this.#pe=[];e.length;){const a=[e.shift()];for(;e.length&&a.length!==this.#ee.batchMaxCount;)if(a.push(e.shift()),JSON.stringify(a.map((e=>e.payload))).length>this.#ee.batchMaxSize){e.unshift(a.pop());break}(async()=>{const e=1===a.length?a[0].payload:a.map((e=>e.payload));this.emit("debug",{action:"sendRpcPayload",payload:e});try{const t=await this._send(e);this.emit("debug",{action:"receiveRpcResult",result:t});for(const{resolve:e,reject:c,payload:f}of a){if(this.destroyed){c((0,r.xz)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:f.method}));continue}const a=t.filter((e=>e.id===f.id))[0];if(null!=a)"error"in a?c(this.getRpcError(f,a)):e(a.result);else{const e=(0,r.xz)("missing response for request","BAD_DATA",{value:t,info:{payload:f}});this.emit("error",e),c(e)}}}catch(e){this.emit("debug",{action:"receiveRpcError",error:e});for(const{reject:t}of a)t(e)}})()}}),e)}constructor(e,a){super(e,a),this.#he=1,this.#ee=Object.assign({},sa,a||{}),this.#pe=[],this.#ge=null,this.#oe=null,this.#xe=null;{let e=null;const a=new Promise((a=>{e=a}));this.#me={promise:a,resolve:e}}const t=this._getOption("staticNetwork");"boolean"==typeof t?((0,r.MR)(!t||"any"!==e,"staticNetwork cannot be used on special network 'any'","options",a),t&&null!=e&&(this.#oe=Ee.from(e))):t&&((0,r.MR)(null==e||t.matches(e),"staticNetwork MUST match network object","options",a),this.#oe=t)}_getOption(e){return this.#ee[e]}get _network(){return(0,r.vA)(this.#oe,"network is not available yet","NETWORK_ERROR"),this.#oe}async _perform(e){if("call"===e.method||"estimateGas"===e.method){let a=e.transaction;if(a&&null!=a.type&&(0,M.Ab)(a.type)&&null==a.maxFeePerGas&&null==a.maxPriorityFeePerGas){const t=await this.getFeeData();null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas&&(e=Object.assign({},e,{transaction:Object.assign({},a,{type:void 0})}))}}const a=this.getRpcRequest(e);return null!=a?await this.send(a.method,a.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e){if(!0!==e)return e;if(this.#oe)return this.#oe}return this.#xe?await this.#xe:this.ready?(this.#xe=(async()=>{try{const e=Ee.from((0,M.Ab)(await this.send("eth_chainId",[])));return this.#xe=null,e}catch(e){throw this.#xe=null,e}})(),await this.#xe):(this.#xe=(async()=>{const e={id:this.#he++,method:"eth_chainId",params:[],jsonrpc:"2.0"};let a;this.emit("debug",{action:"sendRpcPayload",payload:e});try{a=(await this._send(e))[0],this.#xe=null}catch(e){throw this.#xe=null,this.emit("debug",{action:"receiveRpcError",error:e}),e}if(this.emit("debug",{action:"receiveRpcResult",result:a}),"result"in a)return Ee.from((0,M.Ab)(a.result));throw this.getRpcError(e,a)})(),await this.#xe)}_start(){null!=this.#me&&null!=this.#me.resolve&&(this.#me.resolve(),this.#me=null,(async()=>{for(;null==this.#oe&&!this.destroyed;)try{this.#oe=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",(0,r.xz)("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await ia(1e3)}this.#ye()})())}async _waitUntilReady(){if(null!=this.#me)return await this.#me.promise}_getSubscriber(e){return"pending"===e.type?new da(this):"event"===e.type?this._getOption("polling")?new De(this,e.filter):new fa(this,e.filter):"orphan"===e.type&&"drop-log"===e.filter.orphan?new Ue("orphan"):super._getSubscriber(e)}get ready(){return null==this.#me}getRpcTransaction(e){const a={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((t=>{if(null==e[t])return;let c=t;"gasLimit"===t&&(c="gas"),a[c]=(0,M.nD)((0,M.Ab)(e[t],`tx.${t}`))})),["from","to","data"].forEach((t=>{null!=e[t]&&(a[t]=(0,d.c$)(e[t]))})),e.accessList&&(a.accessList=(0,q.$)(e.accessList)),e.blobVersionedHashes&&(a.blobVersionedHashes=e.blobVersionedHashes.map((e=>e.toLowerCase()))),a}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[ba(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[ba(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[ba(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[ba(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&null!=e.filter.address&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(ba):e.filter.address=ba(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,a){const{method:t}=e,{error:c}=a;if("eth_estimateGas"===t&&c.message){const a=c.message;if(!a.match(/revert/i)&&a.match(/insufficient funds/i))return(0,r.xz)("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:c}})}if("eth_call"===t||"eth_estimateGas"===t){const a=ga(c),f=_.y.getBuiltinCallException("eth_call"===t?"call":"estimateGas",e.params[0],a?a.data:null);return f.info={error:c,payload:e},f}const f=JSON.stringify(function(e){const a=[];return ma(e,a),a}(c));if("string"==typeof c.message&&c.message.match(/user denied|ethers-user-denied/i)){const a={eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"};return(0,r.xz)("user rejected action","ACTION_REJECTED",{action:a[t]||"unknown",reason:"rejected",info:{payload:e,error:c}})}if("eth_sendRawTransaction"===t||"eth_sendTransaction"===t){const a=e.params[0];if(f.match(/insufficient funds|base fee exceeds gas limit/i))return(0,r.xz)("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:a,info:{error:c}});if(f.match(/nonce/i)&&f.match(/too low/i))return(0,r.xz)("nonce has already been used","NONCE_EXPIRED",{transaction:a,info:{error:c}});if(f.match(/replacement transaction/i)&&f.match(/underpriced/i))return(0,r.xz)("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:a,info:{error:c}});if(f.match(/only replay-protected/i))return(0,r.xz)("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:t,info:{transaction:a,info:{error:c}}})}let d=!!f.match(/the method .* does not exist/i);return d||c&&c.details&&c.details.startsWith("Unauthorized method:")&&(d=!0),d?(0,r.xz)("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:c,payload:e}}):(0,r.xz)("could not coalesce error","UNKNOWN_ERROR",{error:c,payload:e})}send(e,a){if(this.destroyed)return Promise.reject((0,r.xz)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const t=this.#he++,c=new Promise(((c,f)=>{this.#pe.push({resolve:c,reject:f,payload:{method:e,params:a,id:t,jsonrpc:"2.0"}})}));return this.#ye(),c}async getSigner(e){null==e&&(e=0);const a=this.send("eth_accounts",[]);if("number"==typeof e){const t=await a;if(e>=t.length)throw new Error("no such account");return new la(this,t[e])}const{accounts:t}=await(0,n.k)({network:this.getNetwork(),accounts:a});e=(0,I.b)(e);for(const a of t)if((0,I.b)(a)===e)return new la(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map((e=>new la(this,e)))}destroy(){this.#ge&&(clearTimeout(this.#ge),this.#ge=null);for(const{payload:e,reject:a}of this.#pe)a((0,r.xz)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#pe=[],super.destroy()}}class ha extends ua{#Ae;constructor(e,a){super(e,a);let t=this._getOption("pollingInterval");null==t&&(t=sa.pollingInterval),this.#Ae=t}_getSubscriber(e){const a=super._getSubscriber(e);return oa(a)&&(a.pollingInterval=this.#Ae),a}get pollingInterval(){return this.#Ae}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");this.#Ae=e,this._forEachSubscriber((e=>{oa(e)&&(e.pollingInterval=this.#Ae)}))}}class pa extends ha{#ve;constructor(e,a,t){null==e&&(e="http://localhost:8545"),super(a,t),this.#ve="string"==typeof e?new A(e):e.clone()}_getConnection(){return this.#ve.clone()}async send(e,a){return await this._start(),await super.send(e,a)}async _send(e){const a=this._getConnection();a.body=JSON.stringify(e),a.setHeader("content-type","application/json");const t=await a.send();t.assertOk();let c=t.bodyJson;return Array.isArray(c)||(c=[c]),c}}function ga(e){if(null==e)return null;if("string"==typeof e.message&&e.message.match(/revert/i)&&(0,d.Lo)(e.data))return{message:e.message,data:e.data};if("object"==typeof e){for(const a in e){const t=ga(e[a]);if(t)return t}return null}if("string"==typeof e)try{return ga(JSON.parse(e))}catch(e){}return null}function ma(e,a){if(null!=e){if("string"==typeof e.message&&a.push(e.message),"object"==typeof e)for(const t in e)ma(e[t],a);if("string"==typeof e)try{return ma(JSON.parse(e),a)}catch(e){}}}var xa=t(15496);var ya=t(20415);class Aa extends aa{address;#we;constructor(e,a){super(a),(0,r.MR)(e&&"function"==typeof e.sign,"invalid private key","privateKey","[ REDACTED ]"),this.#we=e;const t=(0,ya.K)(this.signingKey.publicKey);(0,n.n)(this,{address:t})}get signingKey(){return this.#we}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new Aa(this.#we,e)}async signTransaction(e){e=(0,Le.VS)(e);const{to:a,from:t}=await(0,n.k)({to:e.to?(0,E.tG)(e.to,this.provider):void 0,from:e.from?(0,E.tG)(e.from,this.provider):void 0});null!=a&&(e.to=a),null!=t&&(e.from=t),null!=e.from&&((0,r.MR)((0,I.b)(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const c=V.Z.from(e);return c.signature=this.signingKey.sign(c.unsignedHash),c.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign(function(e){return"string"==typeof e&&(e=(0,i.YW)(e)),(0,C.S)((0,d.xW)([(0,i.YW)("Ethereum Signed Message:\n"),(0,i.YW)(String(e.length)),e]))}(e)).serialized}async signTypedData(e,a,t){const c=await $.resolveNames(e,a,t,(async e=>{(0,r.vA)(null!=this.provider,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:e}});const a=await this.provider.resolveName(e);return(0,r.vA)(null!=a,"unconfigured ENS name","UNCONFIGURED_NAME",{value:e}),a}));return this.signingKey.sign($.hash(c.domain,a,c.value)).serialized}}var va=t(68650),wa=t(8180);let _a=!1;const Ia=function(e,a,t){return(0,wa.Gz)(e,a).update(t).digest()};let Ea=Ia;function Ca(e,a,t){const c=(0,d.q5)(a,"key"),f=(0,d.q5)(t,"data");return(0,d.c$)(Ea(e,c,f))}Ca._=Ia,Ca.lock=function(){_a=!0},Ca.register=function(e){if(_a)throw new Error("computeHmac is locked");Ea=e},Object.freeze(Ca);var Ma=t(37171),Ba=t(10750);const La=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Sa=Uint8Array.from({length:16},((e,a)=>a));let ka=[Sa],Na=[Sa.map((e=>(9*e+5)%16))];for(let e=0;e<4;e++)for(let a of[ka,Na])a.push(a[e].map((e=>La[e])));const Pa=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),Ra=ka.map(((e,a)=>e.map((e=>Pa[a][e])))),Oa=Na.map(((e,a)=>e.map((e=>Pa[a][e])))),Da=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),Ta=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),Fa=(e,a)=>e<>>32-a;function Qa(e,a,t,c){return 0===e?a^t^c:1===e?a&t|~a&c:2===e?(a|~t)^c:3===e?a&c|t&~c:a^(t|~c)}const Ua=new Uint32Array(16);class ja extends Ma.D{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:t,h3:c,h4:f}=this;return[e,a,t,c,f]}set(e,a,t,c,f){this.h0=0|e,this.h1=0|a,this.h2=0|t,this.h3=0|c,this.h4=0|f}process(e,a){for(let t=0;t<16;t++,a+=4)Ua[t]=e.getUint32(a,!0);let t=0|this.h0,c=t,f=0|this.h1,d=f,r=0|this.h2,n=r,i=0|this.h3,b=i,o=0|this.h4,s=o;for(let e=0;e<5;e++){const a=4-e,l=Da[e],u=Ta[e],h=ka[e],p=Na[e],g=Ra[e],m=Oa[e];for(let a=0;a<16;a++){const c=Fa(t+Qa(e,f,r,i)+Ua[h[a]]+l,g[a])+o|0;t=o,o=i,i=0|Fa(r,10),r=f,f=c}for(let e=0;e<16;e++){const t=Fa(c+Qa(a,d,n,b)+Ua[p[e]]+u,m[e])+s|0;c=s,s=b,b=0|Fa(n,10),n=d,d=t}}this.set(this.h1+r+b|0,this.h2+i+s|0,this.h3+o+c|0,this.h4+t+d|0,this.h0+f+n|0)}roundClean(){Ua.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const Ha=(0,Ba.ld)((()=>new ja));let $a=!1;const qa=function(e){return Ha(e)};let Ga=qa;function za(e){const a=(0,d.q5)(e,"data");return(0,d.c$)(Ga(a))}za._=qa,za.lock=function(){$a=!0},za.register=function(e){if($a)throw new TypeError("ripemd160 is locked");Ga=e},Object.freeze(za);let Ka=!1;const Va=function(e){return new Uint8Array((0,wa.po)(e))};let Za=Va;function Ja(e){return Za(e)}Ja._=Va,Ja.lock=function(){Ka=!0},Ja.register=function(e){if(Ka)throw new Error("randomBytes is locked");Za=e},Object.freeze(Ja);const Wa=/^[a-z]*$/i;function Ya(e,a){let t=97;return e.reduce(((e,c)=>(c===a?t++:c.match(Wa)?e.push(String.fromCharCode(t)+c):(t=97,e.push(c)),e)),[])}class Xa{locale;constructor(e){(0,n.n)(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}class et extends Xa{#_e;#Ie;constructor(e,a,t){super(e),this.#_e=a,this.#Ie=t,this.#Ee=null}get _data(){return this.#_e}_decodeWords(){return e=this.#_e,(0,r.MR)("0"===e[0],"unsupported auwl data","data",e),function(e,a){for(let t=28;t>=0;t--)e=e.split(" !#$%&'()*+,-./<=>?@[]^_`{|}~"[t]).join(a.substring(2*t,2*t+2));const t=[],c=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,((e,a,c,f)=>{if(c)for(let e=parseInt(c);e>=0;e--)t.push(";");else t.push(a.toLowerCase());return""}));if(c)throw new Error(`leftovers: ${JSON.stringify(c)}`);return Ya(Ya(t,";"),":")}(e.substring(59),e.substring(1,59));var e}#Ee;#Ce(){if(null==this.#Ee){const e=this._decodeWords();if((0,B.id)(e.join("\n")+"\n")!==this.#Ie)throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#Ee=e}return this.#Ee}getWord(e){const a=this.#Ce();return(0,r.MR)(e>=0&&eurAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO","0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60")}static wordlist(){return null==at&&(at=new tt),at}}let ct=!1;const ft=function(e,a,t,c,f){return(0,wa.T_)(e,a,t,c,f)};let dt=ft;function rt(e,a,t,c,f){const r=(0,d.q5)(e,"password"),n=(0,d.q5)(a,"salt");return(0,d.c$)(dt(r,n,t,c,f))}function nt(e){return(1<=12&&t.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const c=new Uint8Array(Math.ceil(11*t.length/8));let f=0;for(let e=0;e=0,`invalid mnemonic word at index ${e}`,"mnemonic","[ REDACTED ]");for(let e=0;e<11;e++)d&1<<10-e&&(c[f>>3]|=1<<7-f%8),f++}const n=32*t.length/3,i=nt(t.length/3),b=(0,d.q5)((0,va.s)(c.slice(0,n/8)))[0]&i;return(0,r.MR)(b===(c[c.length-1]&i),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),(0,d.c$)(c.slice(0,n/8))}function bt(e,a){(0,r.MR)(e.length%4==0&&e.length>=16&&e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),null==a&&(a=tt.wordlist());const t=[0];let c=11;for(let a=0;a8?(t[t.length-1]<<=8,t[t.length-1]|=e[a],c-=8):(t[t.length-1]<<=c,t[t.length-1]|=e[a]>>8-c,t.push(e[a]&(1<<8-c)-1&255),c+=3);const f=e.length/4,d=parseInt((0,va.s)(e).substring(2,4),16)&nt(f);return t[t.length-1]<<=f,t[t.length-1]|=d>>8-f,a.join(t.map((e=>a.getWord(e))))}rt._=ft,rt.lock=function(){ct=!0},rt.register=function(e){if(ct)throw new Error("pbkdf2 is locked");dt=e},Object.freeze(rt);const ot={};class st{phrase;password;wordlist;entropy;constructor(e,a,t,c,f){null==c&&(c=""),null==f&&(f=tt.wordlist()),(0,r.gk)(e,ot,"Mnemonic"),(0,n.n)(this,{phrase:t,password:c,wordlist:f,entropy:a})}computeSeed(){const e=(0,i.YW)("mnemonic"+this.password,"NFKD");return rt((0,i.YW)(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,a,t){const c=it(e,t);return e=bt((0,d.q5)(c),t),new st(ot,c,e,a,t)}static fromEntropy(e,a,t){const c=(0,d.q5)(e,"entropy"),f=bt(c,t);return new st(ot,(0,d.c$)(c),f,a,t)}static entropyToPhrase(e,a){return bt((0,d.q5)(e,"entropy"),a)}static phraseToEntropy(e,a){return it(e,a)}static isValidMnemonic(e,a){try{return it(e,a),!0}catch(e){}return!1}}var lt,ut,ht,pt=function(e,a,t,c){if("a"===t&&!c)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof a?e!==a||!c:!a.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?c:"a"===t?c.call(e):c?c.value:a.get(e)},gt=function(e,a,t,c,f){if("m"===c)throw new TypeError("Private method is not writable");if("a"===c&&!f)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof a?e!==a||!f:!a.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===c?f.call(e,t):f?f.value=t:a.set(e,t),t};const mt={16:10,24:12,32:14},xt=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],yt=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],At=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],vt=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],wt=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],_t=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],It=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Et=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],Ct=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],Mt=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Bt=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Lt=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],St=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],kt=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Nt=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Pt(e){const a=[];for(let t=0;t>2,pt(this,ht,"f")[d][e%4]=f[e],pt(this,ut,"f")[a-d][e%4]=f[e];let r,n=0,i=c;for(;i>16&255]<<24^yt[r>>8&255]<<16^yt[255&r]<<8^yt[r>>24&255]^xt[n]<<24,n+=1,8!=c)for(let e=1;e>8&255]<<8^yt[r>>16&255]<<16^yt[r>>24&255]<<24;for(let e=c/2+1;e>2,d=i%4,pt(this,ht,"f")[e][d]=f[b],pt(this,ut,"f")[a-e][d]=f[b++],i++}for(let e=1;e>24&255]^St[r>>16&255]^kt[r>>8&255]^Nt[255&r]}encrypt(e){if(16!=e.length)throw new TypeError("invalid plaintext size (must be 16 bytes)");const a=pt(this,ht,"f").length-1,t=[0,0,0,0];let c=Pt(e);for(let e=0;e<4;e++)c[e]^=pt(this,ht,"f")[0][e];for(let e=1;e>24&255]^wt[c[(a+1)%4]>>16&255]^_t[c[(a+2)%4]>>8&255]^It[255&c[(a+3)%4]]^pt(this,ht,"f")[e][a];c=t.slice()}const f=new Uint8Array(16);let d=0;for(let e=0;e<4;e++)d=pt(this,ht,"f")[a][e],f[4*e]=255&(yt[c[e]>>24&255]^d>>24),f[4*e+1]=255&(yt[c[(e+1)%4]>>16&255]^d>>16),f[4*e+2]=255&(yt[c[(e+2)%4]>>8&255]^d>>8),f[4*e+3]=255&(yt[255&c[(e+3)%4]]^d);return f}decrypt(e){if(16!=e.length)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const a=pt(this,ut,"f").length-1,t=[0,0,0,0];let c=Pt(e);for(let e=0;e<4;e++)c[e]^=pt(this,ut,"f")[0][e];for(let e=1;e>24&255]^Ct[c[(a+3)%4]>>16&255]^Mt[c[(a+2)%4]>>8&255]^Bt[255&c[(a+1)%4]]^pt(this,ut,"f")[e][a];c=t.slice()}const f=new Uint8Array(16);let d=0;for(let e=0;e<4;e++)d=pt(this,ut,"f")[a][e],f[4*e]=255&(At[c[e]>>24&255]^d>>24),f[4*e+1]=255&(At[c[(e+3)%4]>>16&255]^d>>16),f[4*e+2]=255&(At[c[(e+2)%4]>>8&255]^d>>8),f[4*e+3]=255&(At[255&c[(e+1)%4]]^d);return f}}lt=new WeakMap,ut=new WeakMap,ht=new WeakMap;class Ot{constructor(e,a,t){if(t&&!(this instanceof t))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new Rt(a)},name:{enumerable:!0,value:e}})}}var Dt,Tt,Ft=function(e,a,t,c,f){if("m"===c)throw new TypeError("Private method is not writable");if("a"===c&&!f)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof a?e!==a||!f:!a.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===c?f.call(e,t):f?f.value=t:a.set(e,t),t},Qt=function(e,a,t,c){if("a"===t&&!c)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof a?e!==a||!c:!a.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?c:"a"===t?c.call(e):c?c.value:a.get(e)};class Ut extends Ot{constructor(e,a){if(super("ECC",e,Ut),Dt.set(this,void 0),Tt.set(this,void 0),a){if(a.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");Ft(this,Dt,new Uint8Array(a),"f")}else Ft(this,Dt,new Uint8Array(16),"f");Ft(this,Tt,this.iv,"f")}get iv(){return new Uint8Array(Qt(this,Dt,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const a=new Uint8Array(e.length);for(let t=0;tNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let a=15;a>=0;--a)Gt(this,$t,"f")[a]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw new TypeError("invalid counter initial Uint8Array value length");Gt(this,$t,"f").set(e)}increment(){for(let e=15;e>=0;e--){if(255!==Gt(this,$t,"f")[e]){Gt(this,$t,"f")[e]++;break}Gt(this,$t,"f")[e]=0}}encrypt(e){var a,t;const c=new Uint8Array(e);for(let e=0;ee<>>32-a;function Wt(e,a,t,c,f,d){let r=e[a++]^t[c++],n=e[a++]^t[c++],i=e[a++]^t[c++],b=e[a++]^t[c++],o=e[a++]^t[c++],s=e[a++]^t[c++],l=e[a++]^t[c++],u=e[a++]^t[c++],h=e[a++]^t[c++],p=e[a++]^t[c++],g=e[a++]^t[c++],m=e[a++]^t[c++],x=e[a++]^t[c++],y=e[a++]^t[c++],A=e[a++]^t[c++],v=e[a++]^t[c++],w=r,_=n,I=i,E=b,C=o,M=s,B=l,L=u,S=h,k=p,N=g,P=m,R=x,O=y,D=A,T=v;for(let e=0;e<8;e+=2)C^=Jt(w+R|0,7),S^=Jt(C+w|0,9),R^=Jt(S+C|0,13),w^=Jt(R+S|0,18),k^=Jt(M+_|0,7),O^=Jt(k+M|0,9),_^=Jt(O+k|0,13),M^=Jt(_+O|0,18),D^=Jt(N+B|0,7),I^=Jt(D+N|0,9),B^=Jt(I+D|0,13),N^=Jt(B+I|0,18),E^=Jt(T+P|0,7),L^=Jt(E+T|0,9),P^=Jt(L+E|0,13),T^=Jt(P+L|0,18),_^=Jt(w+E|0,7),I^=Jt(_+w|0,9),E^=Jt(I+_|0,13),w^=Jt(E+I|0,18),B^=Jt(M+C|0,7),L^=Jt(B+M|0,9),C^=Jt(L+B|0,13),M^=Jt(C+L|0,18),P^=Jt(N+k|0,7),S^=Jt(P+N|0,9),k^=Jt(S+P|0,13),N^=Jt(k+S|0,18),R^=Jt(T+D|0,7),O^=Jt(R+T|0,9),D^=Jt(O+R|0,13),T^=Jt(D+O|0,18);f[d++]=r+w|0,f[d++]=n+_|0,f[d++]=i+I|0,f[d++]=b+E|0,f[d++]=o+C|0,f[d++]=s+M|0,f[d++]=l+B|0,f[d++]=u+L|0,f[d++]=h+S|0,f[d++]=p+k|0,f[d++]=g+N|0,f[d++]=m+P|0,f[d++]=x+R|0,f[d++]=y+O|0,f[d++]=A+D|0,f[d++]=v+T|0}function Yt(e,a,t,c,f){let d=c+0,r=c+16*f;for(let c=0;c<16;c++)t[r+c]=e[a+16*(2*f-1)+c];for(let c=0;c0&&(r+=16),Wt(t,d,e,a+=16,t,r)}function Xt(e,a,t){const c=(0,Ba.tY)({dkLen:32,asyncTick:10,maxmem:1073742848},t),{N:f,r:d,p:r,dkLen:n,asyncTick:i,maxmem:b,onProgress:o}=c;if((0,Kt.ai)(f),(0,Kt.ai)(d),(0,Kt.ai)(r),(0,Kt.ai)(n),(0,Kt.ai)(i),(0,Kt.ai)(b),void 0!==o&&"function"!=typeof o)throw new Error("progressCb should be function");const s=128*d,l=s/4;if(f<=1||f&f-1||f>=2**(s/8)||f>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(r<0||r>137438953440/s)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(n<0||n>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const u=s*(f+r);if(u>b)throw new Error(`Scrypt: parameters too large, ${u} (128 * r * (N + p)) > ${b} (maxmem)`);const h=(0,Zt.A)(Vt.s,e,a,{c:1,dkLen:s*r}),p=(0,Ba.DH)(h),g=(0,Ba.DH)(new Uint8Array(s*f)),m=(0,Ba.DH)(new Uint8Array(s));let x=()=>{};if(o){const e=2*f*r,a=Math.max(Math.floor(e/1e4),1);let t=0;x=()=>{t++,!o||t%a&&t!==e||o(t/e)}}return{N:f,r:d,p:r,dkLen:n,blockSize32:l,V:g,B32:p,B:h,tmp:m,blockMixCb:x,asyncTick:i}}function ec(e,a,t,c,f){const d=(0,Zt.A)(Vt.s,e,t,{c:1,dkLen:a});return t.fill(0),c.fill(0),f.fill(0),d}let ac=!1,tc=!1;const cc=async function(e,a,t,c,f,d,r){return await async function(e,a,t){const{N:c,r:f,p:d,dkLen:r,blockSize32:n,V:i,B32:b,B:o,tmp:s,blockMixCb:l,asyncTick:u}=Xt(e,a,t);for(let e=0;e{Yt(i,t,i,t+=n,f),l()})),Yt(i,(c-1)*n,b,a,f),l(),await(0,Ba.$h)(c,u,(()=>{const e=b[a+n-16]%c;for(let t=0;t0&&!(c&c-1),"invalid kdf.N","kdf.N",c),(0,r.MR)(f>0&&d>0,"invalid kdf","kdf",a);const n=uc(e,"crypto.kdfparams.dklen:int!");return(0,r.MR)(32===n,"invalid kdf.dklen","kdf.dflen",n),{name:"scrypt",salt:t,N:c,r:f,p:d,dkLen:64}}if("pbkdf2"===a.toLowerCase()){const a=uc(e,"crypto.kdfparams.salt:data!"),t=uc(e,"crypto.kdfparams.prf:string!"),c=t.split("-").pop();(0,r.MR)("sha256"===c||"sha512"===c,"invalid kdf.pdf","kdf.pdf",t);const f=uc(e,"crypto.kdfparams.c:int!"),d=uc(e,"crypto.kdfparams.dklen:int!");return(0,r.MR)(32===d,"invalid kdf.dklen","kdf.dklen",d),{name:"pbkdf2",salt:a,count:f,dkLen:d,algorithm:c}}}(0,r.MR)(!1,"unsupported key-derivation function","kdf",a)}function yc(e){return new Promise((a=>{setTimeout((()=>{a()}),e)}))}function Ac(e){const a=null!=e.salt?(0,d.q5)(e.salt,"options.salt"):Ja(32);let t=1<<17,c=8,f=1;return e.scrypt&&(e.scrypt.N&&(t=e.scrypt.N),e.scrypt.r&&(c=e.scrypt.r),e.scrypt.p&&(f=e.scrypt.p)),(0,r.MR)("number"==typeof t&&t>0&&Number.isSafeInteger(t)&&(BigInt(t)&BigInt(t-1))===BigInt(0),"invalid scrypt N parameter","options.N",t),(0,r.MR)("number"==typeof c&&c>0&&Number.isSafeInteger(c),"invalid scrypt r parameter","options.r",c),(0,r.MR)("number"==typeof f&&f>0&&Number.isSafeInteger(f),"invalid scrypt p parameter","options.p",f),{name:"scrypt",dkLen:32,salt:a,N:t,r:c,p:f}}function vc(e,a,t,c){const f=(0,d.q5)(t.privateKey,"privateKey"),n=null!=c.iv?(0,d.q5)(c.iv,"options.iv"):Ja(16);(0,r.MR)(16===n.length,"invalid options.iv length","options.iv",c.iv);const i=null!=c.uuid?(0,d.q5)(c.uuid,"options.uuid"):Ja(16);(0,r.MR)(16===i.length,"invalid options.uuid length","options.uuid",c.iv);const b=e.slice(0,16),o=e.slice(16,32),s=new zt(b,n),l=(0,d.q5)(s.encrypt(f)),u=(0,C.S)((0,d.xW)([o,l])),h={address:t.address.substring(2).toLowerCase(),id:bc(i),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,d.c$)(n).substring(2)},ciphertext:(0,d.c$)(l).substring(2),kdf:"scrypt",kdfparams:{salt:(0,d.c$)(a.salt).substring(2),n:a.N,dklen:32,p:a.p,r:a.r},mac:u.substring(2)}};if(t.mnemonic){const a=null!=c.client?c.client:`ethers/${hc.r}`,f=t.mnemonic.path||pc,r=t.mnemonic.locale||"en",n=e.slice(32,64),i=(0,d.q5)(t.mnemonic.entropy,"account.mnemonic.entropy"),b=Ja(16),o=new zt(n,b),s=(0,d.q5)(o.encrypt(i)),l=new Date,u="UTC--"+l.getUTCFullYear()+"-"+sc(l.getUTCMonth()+1,2)+"-"+sc(l.getUTCDate(),2)+"T"+sc(l.getUTCHours(),2)+"-"+sc(l.getUTCMinutes(),2)+"-"+sc(l.getUTCSeconds(),2)+".0Z--"+h.address;h["x-ethers"]={client:a,gethFilename:u,path:f,locale:r,mnemonicCounter:(0,d.c$)(b).substring(2),mnemonicCiphertext:(0,d.c$)(s).substring(2),version:"0.1"}}return JSON.stringify(h)}function wc(e,a,t){null==t&&(t={});const c=lc(a),f=Ac(t),r=ic(c,f.salt,f.N,f.r,f.p,64);return vc((0,d.q5)(r),f,e,t)}async function _c(e,a,t){null==t&&(t={});const c=lc(a),f=Ac(t),r=await nc(c,f.salt,f.N,f.r,f.p,64,t.progressCallback);return vc((0,d.q5)(r),f,e,t)}const Ic="m/44'/60'/0'/0/0",Ec=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),Cc=2147483648,Mc=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");function Bc(e,a){let t="";for(;e;)t="0123456789abcdef"[e%16]+t,e=Math.trunc(e/16);for(;t.length<2*a;)t="0"+t;return"0x"+t}function Lc(e){const a=(0,d.q5)(e),t=(0,d.ZG)((0,va.s)((0,va.s)(a)),0,4);return ae((0,d.xW)([a,t]))}const Sc={};function kc(e,a,t,c){const f=new Uint8Array(37);e&Cc?((0,r.vA)(null!=c,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),f.set((0,d.q5)(c),1)):f.set((0,d.q5)(t));for(let a=24;a>=0;a-=8)f[33+(a>>3)]=e>>24-a&255;const n=(0,d.q5)(Ca("sha512",a,f));return{IL:n.slice(0,32),IR:n.slice(32)}}function Nc(e,a){const t=a.split("/");(0,r.MR)(t.length>0,"invalid path","path",a),"m"===t[0]&&((0,r.MR)(0===e.depth,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${e.depth}`,"path",a),t.shift());let c=e;for(let e=0;e=16&&t.length<=64,"invalid seed","seed","[REDACTED]");const c=(0,d.q5)(Ca("sha512",Ec,t)),f=new xa.h((0,d.c$)(c.slice(0,32)));return new Pc(Sc,f,"0x00000000",(0,d.c$)(c.slice(32)),"m",0,0,a,null)}static fromExtendedKey(e){const a=(0,M.c4)(function(e){let a=X;for(let t=0;t16)throw new TypeError("PKCS#7 padding byte out of range");const t=e.length-a;for(let c=0;c{setTimeout((()=>{a()}),e)}))}class Fc extends Aa{constructor(e,a){"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),super("string"==typeof e?new xa.h(e):e,a)}connect(e){return new Fc(this.signingKey,e)}async encrypt(e,a){const t={address:this.address,privateKey:this.privateKey};return await _c(t,e,{progressCallback:a})}encryptSync(e){return wc({address:this.address,privateKey:this.privateKey},e)}static#Le(e){if((0,r.MR)(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&"en"===e.mnemonic.locale){const a=st.fromEntropy(e.mnemonic.entropy),t=Pc.fromMnemonic(a,e.mnemonic.path);if(t.address===e.address&&t.privateKey===e.privateKey)return t;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const a=new Fc(e.privateKey);return(0,r.MR)(a.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),a}static async fromEncryptedJson(e,a,t){let c=null;return gc(e)?c=await async function(e,a,t){const c=JSON.parse(e),f=lc(a),d=xc(c);if("pbkdf2"===d.name){t&&(t(0),await yc(0));const{salt:e,count:a,dkLen:r,algorithm:n}=d,i=rt(f,e,a,r,n);return t&&(t(1),await yc(0)),mc(c,i)}(0,r.vA)("scrypt"===d.name,"cannot be reached","UNKNOWN_ERROR",{params:d});const{salt:n,N:i,r:b,p:o,dkLen:s}=d;return mc(c,await nc(f,n,i,b,o,s,t))}(e,a,t):Oc(e)&&(t&&(t(0),await Tc(0)),c=Dc(e,a),t&&(t(1),await Tc(0))),Fc.#Le(c)}static fromEncryptedJsonSync(e,a){let t=null;return gc(e)?t=function(e,a){const t=JSON.parse(e),c=lc(a),f=xc(t);if("pbkdf2"===f.name){const{salt:e,count:a,dkLen:d,algorithm:r}=f;return mc(t,rt(c,e,a,d,r))}(0,r.vA)("scrypt"===f.name,"cannot be reached","UNKNOWN_ERROR",{params:f});const{salt:d,N:n,r:i,p:b,dkLen:o}=f;return mc(t,ic(c,d,n,i,b,o))}(e,a):Oc(e)?t=Dc(e,a):(0,r.MR)(!1,"invalid JSON wallet","json","[ REDACTED ]"),Fc.#Le(t)}static createRandom(e){const a=Pc.createRandom();return e?a.connect(e):a}static fromPhrase(e,a){const t=Pc.fromPhrase(e);return a?t.connect(a):t}}class Qc extends ha{#A;constructor(e,a,t){const c=Object.assign({},null!=t?t:{},{batchMaxCount:1});(0,r.MR)(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(a,c),this.#A=async(a,t)=>{const c={method:a,params:t};this.emit("debug",{action:"sendEip1193Request",payload:c});try{const a=await e.request(c);return this.emit("debug",{action:"receiveEip1193Result",result:a}),a}catch(e){const a=new Error(e.message);throw a.code=e.code,a.data=e.data,a.payload=c,this.emit("debug",{action:"receiveEip1193Error",error:a}),a}}}async send(e,a){return await this._start(),await super.send(e,a)}async _send(e){(0,r.MR)(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const a=await this.#A(e.method,e.params||[]);return[{id:e.id,result:a}]}catch(a){return[{id:e.id,error:{code:a.code,data:a.data,message:a.message}}]}}getRpcError(e,a){switch((a=JSON.parse(JSON.stringify(a))).error.code||-1){case 4001:a.error.message=`ethers-user-denied: ${a.error.message}`;break;case 4200:a.error.message=`ethers-unsupported: ${a.error.message}`}return super.getRpcError(e,a)}async hasSigner(e){null==e&&(e=0);const a=await this.send("eth_accounts",[]);return"number"==typeof e?a.length>e:(e=e.toLowerCase(),0!==a.filter((a=>a.toLowerCase()===e)).length)}async getSigner(e){if(null==e&&(e=0),!await this.hasSigner(e))try{await this.#A("eth_requestAccounts",[])}catch(e){const a=e.payload;throw this.getRpcError(a,{id:a.id,error:e})}return await super.getSigner(e)}}var Uc=t(67418),jc=Object.defineProperty,Hc=Object.defineProperties,$c=Object.getOwnPropertyDescriptors,qc=Object.getOwnPropertySymbols,Gc=Object.getPrototypeOf,zc=Object.prototype.hasOwnProperty,Kc=Object.prototype.propertyIsEnumerable,Vc=Reflect.get,Zc=(e,a,t)=>a in e?jc(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,Jc=(e,a,t)=>Vc(Gc(e),t,a),Wc=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const Yc="Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0",Xc=f();function ef({fetchUrl:e,proxyUrl:a,torPort:c,retry:f}){const{HttpProxyAgent:d}=t(60513),{HttpsProxyAgent:r}=t(2378),{SocksProxyAgent:n}=t(60290);if(c)return new n(`socks5h://tor${f}@127.0.0.1:${c}`);if(!a)return;const i=e.includes("https://");return a.includes("socks://")||a.includes("socks4://")||a.includes("socks5://")?new n(a):a.includes("http://")||a.includes("https://")?i?new r(a):new d(a):void 0}function af(e){return Wc(this,arguments,(function*(e,a={}){var t,c,f;const d=null!=(t=a.maxRetry)?t:3,r=null!=(c=a.retryOn)?c:500,n=null!=(f=a.userAgent)?f:Yc;let i,b=0;for(a.method||(a.body?a.method="POST":a.method="GET"),a.headers||(a.headers={}),Uc.Ll&&!a.headers["User-Agent"]&&(a.headers["User-Agent"]=n);b{e.abort()}),a.timeout)}!a.agent&&Uc.Ll&&(a.proxy||a.torPort)&&(a.agent=ef({fetchUrl:e,proxyUrl:a.proxy,torPort:a.torPort,retry:b})),a.debug&&"function"==typeof a.debug&&a.debug("request",{url:e,retry:b,errorObject:i,options:a});try{const t=yield Xc(e,{method:a.method,headers:a.headers,body:a.body,redirect:a.redirect,signal:a.signal,agent:a.agent});if(a.debug&&"function"==typeof a.debug&&a.debug("response",t),!t.ok){const a=`Request to ${e} failed with error code ${t.status}:\n`+(yield t.text());throw new Error(a)}if(a.returnResponse)return t;const c=t.headers.get("content-type");return(null==c?void 0:c.includes("application/json"))?yield t.json():(null==c?void 0:c.includes("text"))?yield t.text():t}catch(e){t&&clearTimeout(t),i=e,b++,yield(0,Uc.yy)(r)}finally{t&&clearTimeout(t)}}throw a.debug&&"function"==typeof a.debug&&a.debug("error",i),i}))}const tf=(e={})=>(a,t)=>Wc(void 0,null,(function*(){let c;if(t){const e=new AbortController;c=e.signal,t.addListener((()=>{e.abort()}))}const f=(d=((e,a)=>{for(var t in a||(a={}))zc.call(a,t)&&Zc(e,t,a[t]);if(qc)for(var t of qc(a))Kc.call(a,t)&&Zc(e,t,a[t]);return e})({},e),r={method:a.method||"POST",headers:a.headers,body:a.body||void 0,signal:c,returnResponse:!0},Hc(d,$c(r)));var d,r;const n=yield af(a.url,f),i={};n.headers.forEach(((e,a)=>{i[a.toLowerCase()]=e}));const b=yield n.arrayBuffer(),o=null==b?null:new Uint8Array(b);return{statusCode:n.status,statusMessage:n.statusText,headers:i,body:o}}));function cf(e,a){return Wc(this,null,(function*(){const t=new A(e);t.getUrlFunc=tf(a);const c=yield new pa(t).getNetwork(),f=Number(c.chainId);if((null==a?void 0:a.netId)&&a.netId!==f){const t=`Wrong network for ${e}, wants ${a.netId} got ${f}`;throw new Error(t)}return new pa(t,c,{staticNetwork:c,pollingInterval:(null==a?void 0:a.pollingInterval)||1e3})}))}function ff(e,a,t,c){const{networkName:f,reverseRecordsContract:d,pollInterval:r}=t,n=Boolean(d),i=new A(a);i.getUrlFunc=tf(c);const b=new Ee(f,e);return n&&b.attachPlugin(new we(null,Number(e))),b.attachPlugin(new ve),new pa(i,b,{staticNetwork:b,pollingInterval:(null==c?void 0:c.pollingInterval)||1e3*r})}const df=(e,a)=>Wc(void 0,null,(function*(){const t=e.provider;if(a.from){if(a.from!==e.address){const t=`populateTransaction: signer mismatch for tx, wants ${a.from} have ${e.address}`;throw new Error(t)}}else a.from=e.address;const[c,f]=yield Promise.all([a.maxFeePerGas||a.gasPrice?void 0:t.getFeeData(),a.nonce?void 0:t.getTransactionCount(e.address,"pending")]);if(c&&(c.maxFeePerGas?(a.type||(a.type=2),a.maxFeePerGas=c.maxFeePerGas*(BigInt(1e4)+BigInt(e.gasPriceBump))/BigInt(1e4),a.maxPriorityFeePerGas=c.maxPriorityFeePerGas,delete a.gasPrice):c.gasPrice&&(a.type||(a.type=0),a.gasPrice=c.gasPrice,delete a.maxFeePerGas,delete a.maxPriorityFeePerGas)),f&&(a.nonce=f),!a.gasLimit)try{const c=yield t.estimateGas(a);a.gasLimit=c===BigInt(21e3)?c:c*(BigInt(1e4)+BigInt(e.gasLimitBump))/BigInt(1e4)}catch(t){if(!e.gasFailover)throw t;console.log("populateTransaction: warning gas estimation failed falling back to 3M gas"),a.gasLimit=BigInt("3000000")}return a}));class rf extends Fc{constructor(e,a,{gasPriceBump:t,gasLimitBump:c,gasFailover:f,bumpNonce:d}={}){super(e,a),this.gasPriceBump=null!=t?t:0,this.gasLimitBump=null!=c?c:3e3,this.gasFailover=null!=f&&f,this.bumpNonce=null!=d&&d}static fromMnemonic(e,a,t=0,c){const f=`m/44'/60'/0'/0/${t}`,{privateKey:d}=Pc.fromPhrase(e,void 0,f);return new rf(d,a,c)}populateTransaction(e){return Wc(this,null,(function*(){const a=yield df(this,e);return this.nonce=Number(a.nonce),Jc(rf.prototype,this,"populateTransaction").call(this,a)}))}}class nf extends ta{constructor(e,a,{gasPriceBump:t,gasLimitBump:c,gasFailover:f,bumpNonce:d}={}){super(e,a),this.gasPriceBump=null!=t?t:0,this.gasLimitBump=null!=c?c:3e3,this.gasFailover=null!=f&&f,this.bumpNonce=null!=d&&d}populateTransaction(e){return Wc(this,null,(function*(){const a=yield df(this,e);return this.nonce=Number(a.nonce),Jc(nf.prototype,this,"populateTransaction").call(this,a)}))}}class bf extends la{constructor(e,a,{gasPriceBump:t,gasLimitBump:c,gasFailover:f,bumpNonce:d}={}){super(e,a),this.gasPriceBump=null!=t?t:0,this.gasLimitBump=null!=c?c:3e3,this.gasFailover=null!=f&&f,this.bumpNonce=null!=d&&d}sendUncheckedTransaction(e){return Wc(this,null,(function*(){return Jc(bf.prototype,this,"sendUncheckedTransaction").call(this,yield df(this,e))}))}}class of extends Qc{constructor(e,a,t){super(e,a),this.options=t}getSigner(e){return Wc(this,null,(function*(){var a,t,c,f,d,r,n,i,b,o;const s=(yield Jc(of.prototype,this,"getSigner").call(this,e)).address;return(null==(a=this.options)?void 0:a.netId)&&(null==(t=this.options)?void 0:t.connectWallet)&&Number(yield Jc(of.prototype,this,"send").call(this,"net_version",[]))!==(null==(c=this.options)?void 0:c.netId)&&(yield this.options.connectWallet(null==(f=this.options)?void 0:f.netId)),(null==(d=this.options)?void 0:d.handleNetworkChanges)&&(null==(r=null==window?void 0:window.ethereum)||r.on("chainChanged",this.options.handleNetworkChanges)),(null==(n=this.options)?void 0:n.handleAccountChanges)&&(null==(i=null==window?void 0:window.ethereum)||i.on("accountsChanged",this.options.handleAccountChanges)),(null==(b=this.options)?void 0:b.handleAccountDisconnect)&&(null==(o=null==window?void 0:window.ethereum)||o.on("disconnect",this.options.handleAccountDisconnect)),new bf(this,s,this.options)}))}}},57194:(e,a,t)=>{"use strict";t.d(a,{KN:()=>A,OR:()=>C,Ss:()=>y,XF:()=>I,c$:()=>_,pO:()=>v,sN:()=>E,zy:()=>w});var c=t(99770),f=t(30031),d=t(67418),r=t(59499),n=t(68434),i=t(59511),b=Object.defineProperty,o=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,p=(e,a,t)=>a in e?b(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,g=(e,a)=>{for(var t in a||(a={}))u.call(a,t)&&p(e,t,a[t]);if(l)for(var t of l(a))h.call(a,t)&&p(e,t,a[t]);return e},m=(e,a)=>o(e,s(a)),x=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const y=.1,A=.9,v=(0,c.g5)("500");function w({stakeBalance:e,tornadoServiceFee:a}){if(a=A)return BigInt(0);const t=1-1/(A-y)**2*(a-y)**2;return BigInt(Math.floor(Number(e||"0")*t))}function _(e,a){for(let t=0;tObject.values(e))).flat().map((e=>(0,f.b)(e)))}function E(e){const a=e.map((e=>w(e))),t=a.reduce(((e,a)=>e+a),BigInt("0"));return e[_(a,BigInt(Math.floor(Number(t)*Math.random())))]}class C{constructor({netId:e,config:a,fetchDataOptions:t}){this.netId=e,this.config=a,this.fetchDataOptions=t,this.tovarish=!1}askRelayerStatus(e){return x(this,arguments,(function*({hostname:e,url:a,relayerAddress:t}){var c;!a&&e?a=`https://${e.endsWith("/")?e:e+"/"}`:a&&!a.endsWith("/")?a+="/":a="";const f=yield(0,n.Fd)(`${a}status`,m(g({},this.fetchDataOptions),{headers:{"Content-Type":"application/json, application/x-www-form-urlencoded"},timeout:6e4,maxRetry:(null==(c=this.fetchDataOptions)?void 0:c.torPort)?2:0}));if(!i.SS.compile((0,i.c_)(this.netId,this.config,this.tovarish))(f))throw new Error("Invalid status schema");const d=m(g({},f),{url:a});if(d.currentQueue>5)throw new Error("Withdrawal queue is overloaded");if(d.netId!==this.netId)throw new Error("This relayer serves a different network");if(t&&this.netId===r.zr.MAINNET&&d.rewardAccount!==t)throw new Error("The Relayer reward address must match registered address");return d}))}filterRelayer(e){return x(this,null,(function*(){var a;const t=e.hostnames[this.netId],{ensName:c,relayerAddress:d}=e;if(t)try{const r=yield this.askRelayerStatus({hostname:t,relayerAddress:d});return{netId:r.netId,url:r.url,hostname:t,ensName:c,relayerAddress:d,rewardAccount:(0,f.b)(r.rewardAccount),instances:I(r.instances),stakeBalance:e.stakeBalance,gasPrice:null==(a=r.gasPrices)?void 0:a.fast,ethPrices:r.ethPrices,currentQueue:r.currentQueue,tornadoServiceFee:r.tornadoServiceFee}}catch(e){return{hostname:t,relayerAddress:d,errorMessage:e.message,hasError:!0}}}))}getValidRelayers(e){return x(this,null,(function*(){const a=[];return{validRelayers:(yield Promise.all(e.map((e=>this.filterRelayer(e))))).filter((e=>!(!e||e.hasError&&(a.push(e),1)))),invalidRelayers:a}}))}pickWeightedRandomRelayer(e){return E(e)}tornadoWithdraw(e,a){return x(this,arguments,(function*({contract:e,proof:a,args:t},c){const{url:f}=this.selectedRelayer,r=yield(0,n.Fd)(`${f}v1/tornadoWithdraw`,m(g({},this.fetchDataOptions),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contract:e,proof:a,args:t})})),{id:b,error:o}=r;if(o)throw new Error(o);let s;const l=`${f}v1/jobs/${b}`;for(console.log(`Job submitted: ${l}\n`);!s||!["FAILED","CONFIRMED"].includes(s);){const e=yield(0,n.Fd)(l,m(g({},this.fetchDataOptions),{method:"GET",headers:{"Content-Type":"application/json"}}));if(e.error)throw new Error(o);if(!i.SS.compile(i.Us)(e))throw new Error(`${l} has an invalid job response`);const{status:a,txHash:t,confirmations:f,failedReason:r}=e;if(s!==a){if("FAILED"===a)throw new Error(`Job ${a}: ${l} failed reason: ${r}`);"SENT"===a?console.log(`Job ${a}: ${l}, txhash: ${t}\n`):"MINED"===a||"CONFIRMED"===a?console.log(`Job ${a}: ${l}, txhash: ${t}, confirmations: ${f}\n`):console.log(`Job ${a}: ${l}\n`),s=a,"function"==typeof c&&c(e)}yield(0,d.yy)(3e3)}}))}}},59511:(e,a,t)=>{"use strict";t.d(a,{SC:()=>p,SS:()=>r,iL:()=>g,i1:()=>y,yF:()=>x,CI:()=>P,ME:()=>O,XW:()=>D,ZC:()=>T,c_:()=>U,FR:()=>k,Us:()=>j,Y6:()=>m,dX:()=>N,$j:()=>R});var c=t(63282),f=t.n(c),d=t(41442);const r=new(f())({allErrors:!0});r.addKeyword({keyword:"BN",validate:(e,a)=>{try{return BigInt(a),!0}catch(e){return!1}},errors:!0}),r.addKeyword({keyword:"isAddress",validate:(e,a)=>{try{return(0,d.PW)(a)}catch(e){return!1}},errors:!0});var n=t(94513),i=Object.defineProperty,b=Object.defineProperties,o=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,h=(e,a,t)=>a in e?i(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t;const p={type:"string",pattern:"^0x[a-fA-F0-9]{40}$",isAddress:!0},g={type:"string",BN:!0},m={type:"string",pattern:"^0x[a-fA-F0-9]{512}$"},x={type:"string",pattern:"^0x[a-fA-F0-9]{64}$"},y=b(((e,a)=>{for(var t in a||(a={}))l.call(a,t)&&h(e,t,a[t]);if(s)for(var t of s(a))u.call(a,t)&&h(e,t,a[t]);return e})({},x),o({BN:!0}));var A=Object.defineProperty,v=Object.defineProperties,w=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,C=(e,a,t)=>a in e?A(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,M=(e,a)=>{for(var t in a||(a={}))I.call(a,t)&&C(e,t,a[t]);if(_)for(var t of _(a))E.call(a,t)&&C(e,t,a[t]);return e},B=(e,a)=>v(e,w(a));const L={blockNumber:{type:"number"},logIndex:{type:"number"},transactionHash:x},S=Object.keys(L),k={type:"array",items:{anyOf:[{type:"object",properties:B(M({},L),{event:{type:"string"},id:{type:"number"},proposer:p,target:p,startTime:{type:"number"},endTime:{type:"number"},description:{type:"string"}}),required:[...S,"event","id","proposer","target","startTime","endTime","description"],additionalProperties:!1},{type:"object",properties:B(M({},L),{event:{type:"string"},proposalId:{type:"number"},voter:p,support:{type:"boolean"},votes:{type:"string"},from:p,input:{type:"string"}}),required:[...S,"event","proposalId","voter","support","votes","from","input"],additionalProperties:!1},{type:"object",properties:B(M({},L),{event:{type:"string"},account:p,delegateTo:p}),required:[...S,"account","delegateTo"],additionalProperties:!1},{type:"object",properties:B(M({},L),{event:{type:"string"},account:p,delegateFrom:p}),required:[...S,"account","delegateFrom"],additionalProperties:!1}]}},N={type:"array",items:{type:"object",properties:B(M({},L),{ensName:{type:"string"},relayerAddress:p}),required:[...S,"ensName","relayerAddress"],additionalProperties:!1}},P={type:"array",items:{type:"object",properties:B(M({},L),{commitment:x,leafIndex:{type:"number"},timestamp:{type:"number"},from:p}),required:[...S,"commitment","leafIndex","timestamp","from"],additionalProperties:!1}},R={type:"array",items:{type:"object",properties:B(M({},L),{nullifierHash:x,to:p,fee:g,timestamp:{type:"number"}}),required:[...S,"nullifierHash","to","fee","timestamp"],additionalProperties:!1}},O={type:"array",items:{type:"object",properties:B(M({},L),{address:p,encryptedAccount:{type:"string"}}),required:[...S,"address","encryptedAccount"],additionalProperties:!1}},D={type:"array",items:{type:"object",properties:B(M({},L),{encryptedNote:{type:"string"}}),required:[...S,"encryptedNote"],additionalProperties:!1}};function T(e){if(e===n.DEPOSIT)return r.compile(P);if(e===n.WITHDRAWAL)return r.compile(R);if("governance"===e)return r.compile(k);if("registered"===e)return r.compile(N);if("echo"===e)return r.compile(O);if("encrypted_notes"===e)return r.compile(D);throw new Error("Unsupported event type for schema validation")}var F=t(59499);const Q={type:"object",properties:{rewardAccount:p,gasPrices:{type:"object",properties:{fast:{type:"number"},additionalProperties:{type:"number"}},required:["fast"]},netId:{type:"integer"},tornadoServiceFee:{type:"number",maximum:20,minimum:0},latestBlock:{type:"number"},latestBalance:g,version:{type:"string"},health:{type:"object",properties:{status:{const:"true"},error:{type:"string"}},required:["status"]},syncStatus:{type:"object",properties:{events:{type:"boolean"},tokenPrice:{type:"boolean"},gasPrice:{type:"boolean"}},required:["events","tokenPrice","gasPrice"]},onSyncEvents:{type:"boolean"},currentQueue:{type:"number"}},required:["rewardAccount","instances","netId","tornadoServiceFee","version","health","currentQueue"]};function U(e,a,t){const{tokens:c,optionalTokens:f,disabledTokens:d,nativeCurrency:r}=a,n=JSON.parse(JSON.stringify(Q)),i=Object.keys(c).reduce(((e,a)=>{const{instanceAddress:t,tokenAddress:r,symbol:n,decimals:i,optionalInstances:b=[]}=c[a],o=Object.keys(t),s={type:"object",properties:{instanceAddress:{type:"object",properties:o.reduce(((e,a)=>(e[a]=p,e)),{}),required:o.filter((e=>!b.includes(e)))},decimals:{enum:[i]}},required:["instanceAddress","decimals"].concat(r?["tokenAddress"]:[],n?["symbol"]:[])};return r&&(s.properties.tokenAddress=p),n&&(s.properties.symbol={enum:[n]}),e.properties[a]=s,(null==f?void 0:f.includes(a))||(null==d?void 0:d.includes(a))||e.required.push(a),e}),{type:"object",properties:{},required:[]});n.properties.instances=i;const b=Object.keys(c).filter((e=>{var t,c;return e!==r&&!(null==(t=a.optionalTokens)?void 0:t.includes(e))&&!(null==(c=a.disabledTokens)?void 0:c.includes(e))}));if(e===F.zr.MAINNET&&b.push("torn"),b.length){const e={type:"object",properties:b.reduce(((e,a)=>(e[a]=g,e)),{}),required:b};n.properties.ethPrices=e,n.required.push("ethPrices")}return t&&n.required.push("gasPrices","latestBlock","latestBalance","syncStatus","onSyncEvents"),n}const j={type:"object",properties:{error:{type:"string"},id:{type:"string"},type:{type:"string"},status:{type:"string"},contract:{type:"string"},proof:{type:"string"},args:{type:"array",items:{type:"string"}},txHash:{type:"string"},confirmations:{type:"number"},failedReason:{type:"string"}},required:["id","status"]}},7393:(e,a,t)=>{"use strict";t.d(a,{H:()=>i});var c=t(98982),f=t(21278),d=t(67418),r=t(48486),n=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));function i(e){return n(this,arguments,(function*({provider:e,Multicall:a,currencyName:t,userAddress:n,tokenAddresses:i=[]}){const b=i.map((a=>{const t=f.Xc.connect(a,e);return[{contract:t,name:"balanceOf",params:[n]},{contract:t,name:"name"},{contract:t,name:"symbol"},{contract:t,name:"decimals"}]})).flat(),o=yield(0,r.C)(a,[{contract:a,name:"getEthBalance",params:[n]},...b.length?b:[]]),s=o[0],l=(o.slice(1).length?(0,d.iv)(o.slice(1),b.length/i.length):[]).map(((e,a)=>{const[t,c,f,d]=e;return{address:i[a],name:c,symbol:f,decimals:Number(d),balance:t}}));return[{address:c.j,name:t,symbol:t,decimals:18,balance:s},...l]}))}},96838:(e,a,t)=>{"use strict";t.d(a,{E:()=>y,o:()=>x});var c=t(30031),f=t(57194),d=t(68434),r=t(59511),n=Object.defineProperty,i=Object.defineProperties,b=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,h=Reflect.get,p=(e,a,t)=>a in e?n(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,g=(e,a)=>{for(var t in a||(a={}))l.call(a,t)&&p(e,t,a[t]);if(o)for(var t of o(a))u.call(a,t)&&p(e,t,a[t]);return e},m=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));const x=5e3;class y extends f.OR{constructor({netId:e,config:a,fetchDataOptions:t}){super({netId:e,config:a,fetchDataOptions:t}),this.tovarish=!0}askRelayerStatus(e){return m(this,arguments,(function*({hostname:e,url:a,relayerAddress:t}){const c=yield(f=y.prototype,h(s(f),"askRelayerStatus",this)).call(this,{hostname:e,url:a,relayerAddress:t});var f;if(!c.version.includes("tovarish"))throw new Error("Not a tovarish relayer!");return c}))}filterRelayer(e){return m(this,null,(function*(){var a;const{ensName:t,relayerAddress:d,tovarishHost:r,tovarishNetworks:n}=e;if(!r||!(null==n?void 0:n.includes(this.netId)))return;const i=`${r}/${this.netId}`;try{const r=yield this.askRelayerStatus({hostname:i,relayerAddress:d});return{netId:r.netId,url:r.url,hostname:i,ensName:t,relayerAddress:d,rewardAccount:(0,c.b)(r.rewardAccount),instances:(0,f.XF)(r.instances),stakeBalance:e.stakeBalance,gasPrice:null==(a=r.gasPrices)?void 0:a.fast,ethPrices:r.ethPrices,currentQueue:r.currentQueue,tornadoServiceFee:r.tornadoServiceFee,latestBlock:Number(r.latestBlock),latestBalance:r.latestBalance,version:r.version,events:r.events,syncStatus:r.syncStatus}}catch(e){return{hostname:i,relayerAddress:d,errorMessage:e.message,hasError:!0}}}))}getValidRelayers(e){return m(this,null,(function*(){const a=[];return{validRelayers:(yield Promise.all(e.map((e=>this.filterRelayer(e))))).filter((e=>!(!e||e.hasError&&(a.push(e),1)))),invalidRelayers:a}}))}getEvents(e){return m(this,arguments,(function*({type:e,currency:a,amount:t,fromBlock:c,recent:f}){var n;const o=`${null==(n=this.selectedRelayer)?void 0:n.url}events`,s=(0,r.ZC)(e);try{const r=[];let n=c;for(;;){let{events:h,lastSyncBlock:p}=yield(0,d.Fd)(o,(l=g({},this.fetchDataOptions),u={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:e,currency:a,amount:t,fromBlock:c,recent:f})},i(l,b(u))));if(!s(h)){const a=`Schema validation failed for ${e} events`;throw new Error(a)}if(n=p,!Array.isArray(h)||!h.length)break;h=h.sort(((e,a)=>e.blockNumber===a.blockNumber?e.logIndex-a.logIndex:e.blockNumber-a.blockNumber));const[m]=h.slice(-1);if(h.lengthe.blockNumber!==m.blockNumber)),c=Number(m.blockNumber),r.push(...h)}return{events:r,lastSyncBlock:n}}catch(e){return console.log("Error from TovarishClient events endpoint"),console.log(e),{events:[],lastSyncBlock:c}}var l,u}))}}},21278:(e,a,t)=>{"use strict";t.d(a,{p2:()=>n,Xc:()=>b,Q2:()=>s,Hk:()=>u,Ld:()=>p,Rp:()=>m,XB:()=>c});var c={};t.r(c),t.d(c,{ENS__factory:()=>n,ERC20__factory:()=>b,Multicall__factory:()=>s,OffchainOracle__factory:()=>u,OvmGasPriceOracle__factory:()=>p,ReverseRecords__factory:()=>m});var f=t(73622),d=t(24391);const r=[{constant:!0,inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"},{internalType:"string",name:"value",type:"string"}],name:"setText",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"interfaceImplementer",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"x",type:"bytes32"},{internalType:"bytes32",name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes",name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"isAuthorised",type:"bool"}],name:"setAuthorisation",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"}],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"contentType",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"coinType",type:"uint256"},{internalType:"bytes",name:"a",type:"bytes"}],name:"setAddr",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"contenthash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"pubkey",outputs:[{internalType:"bytes32",name:"x",type:"bytes32"},{internalType:"bytes32",name:"y",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"a",type:"address"}],name:"setAddr",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes4",name:"interfaceID",type:"bytes4"},{internalType:"address",name:"implementer",type:"address"}],name:"setInterface",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"coinType",type:"uint256"}],name:"addr",outputs:[{internalType:"bytes",name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"authorisations",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ENS",name:"_ens",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"bool",name:"isAuthorised",type:"bool"}],name:"AuthorisationChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"string",name:"indexedKey",type:"string"},{indexed:!1,internalType:"string",name:"key",type:"string"}],name:"TextChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"x",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"string",name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes4",name:"interfaceID",type:"bytes4"},{indexed:!1,internalType:"address",name:"implementer",type:"address"}],name:"InterfaceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"coinType",type:"uint256"},{indexed:!1,internalType:"bytes",name:"newAddress",type:"bytes"}],name:"AddressChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"uint256",name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"}];class n{static createInterface(){return new f.KA(r)}static connect(e,a){return new d.NZ(e,r,a)}}n.abi=r;const i=[{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"_totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"who",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"}];class b{static createInterface(){return new f.KA(i)}static connect(e,a){return new d.NZ(e,i,a)}}b.abi=i;const o=[{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes[]",name:"returnData",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3[]",name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3Value[]",name:"calls",type:"tuple[]"}],name:"aggregate3Value",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"blockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getBasefee",outputs:[{internalType:"uint256",name:"basefee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBlockNumber",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"chainid",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockCoinbase",outputs:[{internalType:"address",name:"coinbase",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockDifficulty",outputs:[{internalType:"uint256",name:"difficulty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockGasLimit",outputs:[{internalType:"uint256",name:"gaslimit",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"}],name:"getEthBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryAggregate",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryBlockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"}];class s{static createInterface(){return new f.KA(o)}static connect(e,a){return new d.NZ(e,o,a)}}s.abi=o;const l=[{inputs:[{internalType:"contract MultiWrapper",name:"_multiWrapper",type:"address"},{internalType:"contract IOracle[]",name:"existingOracles",type:"address[]"},{internalType:"enum OffchainOracle.OracleType[]",name:"oracleTypes",type:"uint8[]"},{internalType:"contract IERC20[]",name:"existingConnectors",type:"address[]"},{internalType:"contract IERC20",name:"wBase",type:"address"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ArraysLengthMismatch",type:"error"},{inputs:[],name:"ConnectorAlreadyAdded",type:"error"},{inputs:[],name:"InvalidOracleTokenKind",type:"error"},{inputs:[],name:"OracleAlreadyAdded",type:"error"},{inputs:[],name:"SameTokens",type:"error"},{inputs:[],name:"TooBigThreshold",type:"error"},{inputs:[],name:"UnknownConnector",type:"error"},{inputs:[],name:"UnknownOracle",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IERC20",name:"connector",type:"address"}],name:"ConnectorAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IERC20",name:"connector",type:"address"}],name:"ConnectorRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract MultiWrapper",name:"multiWrapper",type:"address"}],name:"MultiWrapperUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IOracle",name:"oracle",type:"address"},{indexed:!1,internalType:"enum OffchainOracle.OracleType",name:"oracleType",type:"uint8"}],name:"OracleAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IOracle",name:"oracle",type:"address"},{indexed:!1,internalType:"enum OffchainOracle.OracleType",name:"oracleType",type:"uint8"}],name:"OracleRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[{internalType:"contract IERC20",name:"connector",type:"address"}],name:"addConnector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IOracle",name:"oracle",type:"address"},{internalType:"enum OffchainOracle.OracleType",name:"oracleKind",type:"uint8"}],name:"addOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"connectors",outputs:[{internalType:"contract IERC20[]",name:"allConnectors",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"}],name:"getRate",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"}],name:"getRateToEth",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"},{internalType:"contract IERC20[]",name:"customConnectors",type:"address[]"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateToEthWithCustomConnectors",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateToEthWithThreshold",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"},{internalType:"contract IERC20[]",name:"customConnectors",type:"address[]"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateWithCustomConnectors",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateWithThreshold",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"multiWrapper",outputs:[{internalType:"contract MultiWrapper",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"oracles",outputs:[{internalType:"contract IOracle[]",name:"allOracles",type:"address[]"},{internalType:"enum OffchainOracle.OracleType[]",name:"oracleTypes",type:"uint8[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"connector",type:"address"}],name:"removeConnector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IOracle",name:"oracle",type:"address"},{internalType:"enum OffchainOracle.OracleType",name:"oracleKind",type:"uint8"}],name:"removeOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract MultiWrapper",name:"_multiWrapper",type:"address"}],name:"setMultiWrapper",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class u{static createInterface(){return new f.KA(l)}static connect(e,a){return new d.NZ(e,l,a)}}u.abi=l;const h=[{inputs:[{internalType:"address",name:"_owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"DecimalsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"GasPriceUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"L1BaseFeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"OverheadUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"ScalarUpdated",type:"event"},{inputs:[],name:"decimals",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"gasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_data",type:"bytes"}],name:"getL1Fee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_data",type:"bytes"}],name:"getL1GasUsed",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"l1BaseFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"overhead",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"scalar",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_decimals",type:"uint256"}],name:"setDecimals",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_gasPrice",type:"uint256"}],name:"setGasPrice",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_baseFee",type:"uint256"}],name:"setL1BaseFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_overhead",type:"uint256"}],name:"setOverhead",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_scalar",type:"uint256"}],name:"setScalar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class p{static createInterface(){return new f.KA(h)}static connect(e,a){return new d.NZ(e,h,a)}}p.abi=h;const g=[{inputs:[{internalType:"contract ENS",name:"_ens",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address[]",name:"addresses",type:"address[]"}],name:"getNames",outputs:[{internalType:"string[]",name:"r",type:"string[]"}],stateMutability:"view",type:"function"}];class m{static createInterface(){return new f.KA(g)}static connect(e,a){return new d.NZ(e,g,a)}}m.abi=g},67418:(e,a,t)=>{"use strict";t.d(a,{$W:()=>w,EI:()=>v,Et:()=>i,Id:()=>l,Ju:()=>x,Kp:()=>p,Ll:()=>n,My:()=>g,aT:()=>m,ae:()=>A,br:()=>M,gn:()=>E,ib:()=>I,if:()=>h,iv:()=>b,jm:()=>y,lY:()=>u,sY:()=>_,uU:()=>C,wv:()=>s,yy:()=>o});var c=t(91565),f=t(39404),d=t.n(f),r=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));BigInt.prototype.toJSON=function(){return this.toString()};const n=!process.browser&&void 0===globalThis.window,i=n?c.webcrypto:globalThis.crypto,b=(e,a)=>[...Array(Math.ceil(e.length/a))].map(((t,c)=>e.slice(a*c,a+a*c)));function o(e){return new Promise((a=>setTimeout(a,e)))}function s(e,a){try{const t=new URL(e);return!a||!a.length||a.map((e=>e.toLowerCase())).includes(t.protocol)}catch(e){return!1}}function l(...e){const a=e.reduce(((e,a)=>e+a.length),0),t=new Uint8Array(a);return e.forEach(((e,a,c)=>{const f=c.slice(0,a).reduce(((e,a)=>e+a.length),0);t.set(e,f)})),t}function u(e){return new Uint8Array(e.buffer)}function h(e){return btoa(e.reduce(((e,a)=>e+String.fromCharCode(a)),""))}function p(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}function g(e){return"0x"+Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join("")}function m(e){return"0x"===e.slice(0,2)&&(e=e.replace("0x","")),e.length%2!=0&&(e="0"+e),Uint8Array.from(e.match(/.{1,2}/g).map((e=>parseInt(e,16))))}function x(e){return BigInt(g(e))}function y(e){let a="bigint"==typeof e?e.toString(16):e;return a.startsWith("0x")&&(a=a.replace("0x","")),a.length%2!=0&&(a="0"+a),Uint8Array.from(a.match(/.{1,2}/g).map((e=>parseInt(e,16))))}function A(e){return new(d())(e,16,"le")}function v(e){return Uint8Array.from(new(d())(e).toArray("le",31))}function w(e,a=32){return"0x"+BigInt(e).toString(16).padStart(2*a,"0")}function _(e,a=32){return"0x"+(e=e.replace("0x","")).padStart(2*a,"0")}function I(e=31){return x(i.getRandomValues(new Uint8Array(e)))}function E(e,a){return"bigint"==typeof a?a.toString():a}function C(e,a=10){return e.length<2*a?e:`${e.substring(0,a)}...${e.substring(e.length-a)}`}function M(e,a="SHA-384"){return r(this,null,(function*(){return new Uint8Array(yield i.subtle.digest(a,e))}))}},26746:(e,a,t)=>{"use strict";t.d(a,{O:()=>b,i:()=>o});var c=t(84276),f=t(36336),d=t.n(f),r=t(67418),n=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));let i;function b(){return n(this,null,(function*(){i||(i=yield d()({wasmInitialMemory:2e3}))}))}function o(e,a,t){return n(this,null,(function*(){i||(yield b());const f={root:e.root,nullifierHash:BigInt(e.nullifierHex).toString(),recipient:BigInt(e.recipient),relayer:BigInt(e.relayer),fee:e.fee,refund:e.refund,nullifier:e.nullifier,secret:e.secret,pathElements:e.pathElements,pathIndices:e.pathIndices};console.log("Start generating SNARK proof",f),console.time("SNARK proof time");const d=yield c.genWitnessAndProve(yield i,f,a,t),n=c.toSolidityInput(d).proof;return console.timeEnd("SNARK proof time"),{proof:n,args:[(0,r.$W)(e.root,32),(0,r.$W)(e.nullifierHex,32),e.recipient,e.relayer,(0,r.$W)(e.fee,32),(0,r.$W)(e.refund,32)]}}))}},18995:(e,a,t)=>{"use strict";t.d(a,{_6:()=>Ce,fY:()=>Ee,a8:()=>Ie});var c={},f=Uint8Array,d=Uint16Array,r=Int32Array,n=new f([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new f([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),b=new f([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=function(e,a){for(var t=new d(31),c=0;c<31;++c)t[c]=a+=1<>1|(21845&x)<<1;y=(61680&(y=(52428&y)>>2|(13107&y)<<2))>>4|(3855&y)<<4,m[x]=((65280&y)>>8|(255&y)<<8)>>1}var A=function(e,a,t){for(var c=e.length,f=0,r=new d(a);f>b]=o}else for(n=new d(c),f=0;f>15-e[f]);return n},v=new f(288);for(x=0;x<144;++x)v[x]=8;for(x=144;x<256;++x)v[x]=9;for(x=256;x<280;++x)v[x]=7;for(x=280;x<288;++x)v[x]=8;var w=new f(32);for(x=0;x<32;++x)w[x]=5;var _=A(v,9,0),I=A(v,9,1),E=A(w,5,0),C=A(w,5,1),M=function(e){for(var a=e[0],t=1;ta&&(a=e[t]);return a},B=function(e,a,t){var c=a/8|0;return(e[c]|e[c+1]<<8)>>(7&a)&t},L=function(e,a){var t=a/8|0;return(e[t]|e[t+1]<<8|e[t+2]<<16)>>(7&a)},S=function(e){return(e+7)/8|0},k=function(e,a,t){return(null==a||a<0)&&(a=0),(null==t||t>e.length)&&(t=e.length),new f(e.subarray(a,t))},N=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],P=function(e,a,t){var c=new Error(a||N[e]);if(c.code=e,Error.captureStackTrace&&Error.captureStackTrace(c,P),!t)throw c;return c},R=function(e,a,t,c){var d=e.length,r=c?c.length:0;if(!d||a.f&&!a.l)return t||new f(0);var o=!t,s=o||2!=a.i,u=a.i;o&&(t=new f(3*d));var h=function(e){var a=t.length;if(e>a){var c=new f(Math.max(2*a,e));c.set(t),t=c}},g=a.f||0,m=a.p||0,x=a.b||0,y=a.l,v=a.d,w=a.m,_=a.n,E=8*d;do{if(!y){g=B(e,m,1);var N=B(e,m+1,3);if(m+=3,!N){var R=e[(G=S(m)+4)-4]|e[G-3]<<8,O=G+R;if(O>d){u&&P(0);break}s&&h(x+R),t.set(e.subarray(G,O),x),a.b=x+=R,a.p=m=8*O,a.f=g;continue}if(1==N)y=I,v=C,w=9,_=5;else if(2==N){var D=B(e,m,31)+257,T=B(e,m+10,15)+4,F=D+B(e,m+5,31)+1;m+=14;for(var Q=new f(F),U=new f(19),j=0;j>4)<16)Q[j++]=G;else{var K=0,V=0;for(16==G?(V=3+B(e,m,3),m+=2,K=Q[j-1]):17==G?(V=3+B(e,m,7),m+=3):18==G&&(V=11+B(e,m,127),m+=7);V--;)Q[j++]=K}}var Z=Q.subarray(0,D),J=Q.subarray(D);w=M(Z),_=M(J),y=A(Z,w,1),v=A(J,_,1)}else P(1);if(m>E){u&&P(0);break}}s&&h(x+131072);for(var W=(1<>4;if((m+=15&K)>E){u&&P(0);break}if(K||P(2),ee<256)t[x++]=ee;else{if(256==ee){X=m,y=null;break}var ae=ee-254;if(ee>264){var te=n[j=ee-257];ae=B(e,m,(1<>4;if(ce||P(3),m+=15&ce,J=p[fe],fe>3&&(te=i[fe],J+=L(e,m)&(1<E){u&&P(0);break}s&&h(x+131072);var de=x+ae;if(x>8},D=function(e,a,t){t<<=7&a;var c=a/8|0;e[c]|=t,e[c+1]|=t>>8,e[c+2]|=t>>16},T=function(e,a){for(var t=[],c=0;ch&&(h=n[c].s);var p=new d(h+1),g=F(t[l-1],p,0);if(g>a){c=0;var m=0,x=g-a,y=1<a))break;m+=y-(1<>=x;m>0;){var v=n[c].s;p[v]=0&&m;--c){var w=n[c].s;p[w]==a&&(--p[w],++m)}g=a}return{t:new f(p),l:g}},F=function(e,a,t){return-1==e.s?Math.max(F(e.l,a,t+1),F(e.r,a,t+1)):a[e.s]=t},Q=function(e){for(var a=e.length;a&&!e[--a];);for(var t=new d(++a),c=0,f=e[0],r=1,n=function(e){t[c++]=e},i=1;i<=a;++i)if(e[i]==f&&i!=a)++r;else{if(!f&&r>2){for(;r>138;r-=138)n(32754);r>2&&(n(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(n(f),--r;r>6;r-=6)n(8304);r>2&&(n(r-3<<5|8208),r=0)}for(;r--;)n(f);r=1,f=e[i]}return{c:t.subarray(0,c),n:a}},U=function(e,a){for(var t=0,c=0;c>8,e[f+2]=255^e[f],e[f+3]=255^e[f+1];for(var d=0;d4&&!F[b[$-1]];--$);var q,G,z,K,V=u+5<<3,Z=U(f,v)+U(r,w)+o,J=U(f,g)+U(r,y)+o+14+3*$+U(N,F)+2*N[16]+3*N[17]+7*N[18];if(l>=0&&V<=Z&&V<=J)return j(a,h,e.subarray(l,l+u));if(O(a,h,1+(J15&&(O(a,h,ee[P]>>5&127),h+=ee[P]>>12)}}}else q=_,G=v,z=E,K=w;for(P=0;P255){D(a,h,q[257+(ae=te>>18&31)]),h+=G[ae+257],ae>7&&(O(a,h,te>>23&31),h+=n[ae]);var ce=31&te;D(a,h,z[ce]),h+=K[ce],ce>3&&(D(a,h,te>>5&8191),h+=i[ce])}else D(a,h,q[te]),h+=G[te]}return D(a,h,q[256]),h+G[256]},$=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),q=new f(0),G=function(e,a,t,c,b,o){var s=o.z||e.length,l=new f(c+s+5*(1+Math.ceil(s/7e3))+b),h=l.subarray(c,l.length-b),p=o.l,m=7&(o.r||0);if(a){m&&(h[0]=o.r>>3);for(var x=$[a-1],y=x>>13,A=8191&x,v=(1<7e3||O>24576)&&(q>423||!p)){m=H(e,h,0,M,B,L,P,O,T,R-T,m),O=N=P=0,T=R;for(var G=0;G<286;++G)B[G]=0;for(G=0;G<30;++G)L[G]=0}var z=2,K=0,V=A,Z=Q-U&32767;if(q>2&&F==C(R-Z))for(var J=Math.min(y,q)-1,W=Math.min(32767,R),Y=Math.min(258,q);Z<=W&&--V&&Q!=U;){if(e[R+z]==e[R+z-Z]){for(var X=0;Xz){if(z=X,K=Z,X>J)break;var ee=Math.min(Z,X-2),ae=0;for(G=0;Gae&&(ae=ce,U=te)}}}Z+=(Q=U)-(U=w[Q])&32767}if(K){M[O++]=268435456|u[z]<<18|g[K];var fe=31&u[z],de=31&g[K];P+=n[fe]+i[de],++B[257+fe],++L[de],D=R+z,++N}else M[O++]=e[R],++B[e[R]]}}for(R=Math.max(R,D);R=s&&(h[m/8|0]=p,re=s),m=j(h,m+1,e.subarray(R,re))}o.i=s}return k(l,0,c+S(m)+b)},z=function(){for(var e=new Int32Array(256),a=0;a<256;++a){for(var t=a,c=9;--c;)t=(1&t&&-306674912)^t>>>1;e[a]=t}return e}(),K=function(){var e=-1;return{p:function(a){for(var t=e,c=0;c>>8;e=t},d:function(){return~e}}},V=function(e,a,t,c,d){if(!d&&(d={l:1},a.dictionary)){var r=a.dictionary.subarray(-32768),n=new f(r.length+e.length);n.set(r),n.set(e,r.length),e=n,d.w=r.length}return G(e,null==a.level?6:a.level,null==a.mem?d.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+a.mem,t,c,d)},Z=function(e,a){var t={};for(var c in e)t[c]=e[c];for(var c in a)t[c]=a[c];return t},J=function(e,a,t){for(var c=e(),f=e.toString(),d=f.slice(f.indexOf("[")+1,f.lastIndexOf("]")).replace(/\s+/g,"").split(","),r=0;r>>0},de=function(e,a){return fe(e,a)+4294967296*fe(e,a+4)},re=function(e,a,t){for(;t;++a)e[a]=t,t>>>=8};function ne(e,a){return V(e,a||{},0,0)}function ie(e,a){return R(e,{i:2},a&&a.out,a&&a.dictionary)}var be=function(e,a,t,c){for(var d in e){var r=e[d],n=a+d,i=c;Array.isArray(r)&&(i=Z(c,r[1]),r=r[0]),r instanceof f?t[n]=[r,i]:(t[n+="/"]=[new f(0),i],be(r,n,t,c))}},oe="undefined"!=typeof TextEncoder&&new TextEncoder,se="undefined"!=typeof TextDecoder&&new TextDecoder;try{se.decode(q,{stream:!0})}catch(e){}function le(e,a){if(a){for(var t=new f(e.length),c=0;c>1)),n=0,i=function(e){r[n++]=e};for(c=0;cr.length){var b=new f(n+8+(d-c<<1));b.set(r),r=b}var o=e.charCodeAt(c);o<128||a?i(o):o<2048?(i(192|o>>6),i(128|63&o)):o>55295&&o<57344?(i(240|(o=65536+(1047552&o)|1023&e.charCodeAt(++c))>>18),i(128|o>>12&63),i(128|o>>6&63),i(128|63&o)):(i(224|o>>12),i(128|o>>6&63),i(128|63&o))}return k(r,0,n)}function ue(e,a){if(a){for(var t="",c=0;c127)+(c>223)+(c>239);if(t+f>e.length)return{s:a,r:k(e,t-1)};f?3==f?(c=((15&c)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,a+=String.fromCharCode(55296|c>>10,56320|1023&c)):a+=1&f?String.fromCharCode((31&c)<<6|63&e[t++]):String.fromCharCode((15&c)<<12|(63&e[t++])<<6|63&e[t++]):a+=String.fromCharCode(c)}}(e),d=f.s;return(t=f.r).length&&P(8),d}var he=function(e,a){return a+30+ce(e,a+26)+ce(e,a+28)},pe=function(e,a,t){var c=ce(e,a+28),f=ue(e.subarray(a+46,a+46+c),!(2048&ce(e,a+8))),d=a+46+c,r=fe(e,a+20),n=t&&4294967295==r?ge(e,d):[r,fe(e,a+24),fe(e,a+42)],i=n[0],b=n[1],o=n[2];return[ce(e,a+10),i,b,f,d+ce(e,a+30)+ce(e,a+32),o]},ge=function(e,a){for(;1!=ce(e,a);a+=4+ce(e,a+2));return[de(e,a+12),de(e,a+4),de(e,a+20)]},me=function(e){var a=0;if(e)for(var t in e){var c=e[t].length;c>65535&&P(9),a+=c+4}return a},xe=function(e,a,t,c,f,d,r,n){var i=c.length,b=t.extra,o=n&&n.length,s=me(b);re(e,a,null!=r?33639248:67324752),a+=4,null!=r&&(e[a++]=20,e[a++]=t.os),e[a]=20,a+=2,e[a++]=t.flag<<1|(d<0&&8),e[a++]=f&&8,e[a++]=255&t.compression,e[a++]=t.compression>>8;var l=new Date(null==t.mtime?Date.now():t.mtime),u=l.getFullYear()-1980;if((u<0||u>119)&&P(10),re(e,a,u<<25|l.getMonth()+1<<21|l.getDate()<<16|l.getHours()<<11|l.getMinutes()<<5|l.getSeconds()>>1),a+=4,-1!=d&&(re(e,a,t.crc),re(e,a+4,d<0?-d-2:d),re(e,a+8,t.size)),re(e,a+12,i),re(e,a+14,s),a+=16,null!=r&&(re(e,a,o),re(e,a+6,t.attrs),re(e,a+10,r),a+=14),e.set(c,a),a+=i,s)for(var h in b){var p=b[h],g=p.length;re(e,a,+h),re(e,a+2,g),e.set(p,a+4),a+=4+g}return o&&(e.set(n,a),a+=o),a},ye=function(e,a,t,c,f){re(e,a,101010256),re(e,a+8,t),re(e,a+10,t),re(e,a+12,c),re(e,a+16,f)};var Ae="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()},ve=t(68434),we=t(67418),_e=(e,a,t)=>new Promise(((c,f)=>{var d=e=>{try{n(t.next(e))}catch(e){f(e)}},r=e=>{try{n(t.throw(e))}catch(e){f(e)}},n=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,r);n((t=t.apply(e,a)).next())}));function Ie(e){return new Promise(((a,t)=>{!function(e,a,t){t||(t=a,a={}),"function"!=typeof t&&P(7);var c={};be(e,"",c,a);var d=Object.keys(c),r=d.length,n=0,i=0,b=r,o=new Array(r),s=[],l=function(){for(var e=0;e65535&&I(P(11,0,1),null),_)if(g<16e4)try{I(null,ne(f,b))}catch(e){I(e,null)}else s.push(function(e,a,t){return t||(t=a,a={}),"function"!=typeof t&&P(7),te(e,a,[X],(function(e){return ee(ne(e.data[0],e.data[1]))}),0,t)}(f,b,I));else I(null,f)},g=0;g{e?t(e):a(c)}))}))}function Ee(e){return new Promise(((a,t)=>{!function(e,a,t){t||(t=a,a={}),"function"!=typeof t&&P(7);var c=[],d=function(){for(var e=0;e65558)return n(P(13,0,1),null),d;var b=ce(e,i+8);if(b){var o=b,s=fe(e,i+16),l=4294967295==s||65535==o;if(l){var u=fe(e,i-12);(l=101075792==fe(e,u))&&(o=b=fe(e,u+32),s=fe(e,u+48))}for(var h=a&&a.filter,p=function(a){var t=pe(e,s,l),i=t[0],o=t[1],u=t[2],p=t[3],g=t[4],m=t[5],x=he(e,m);s=g;var y=function(e,a){e?(d(),n(e,null)):(a&&(r[p]=a),--b||n(null,r))};if(!h||h({name:p,size:o,originalSize:u,compression:i}))if(i)if(8==i){var A=e.subarray(x,x+o);if(u<524288||o>.8*u)try{y(null,ie(A,{out:new f(u)}))}catch(e){y(e,null)}else c.push(function(e,a,t){return t||(t=a,a={}),"function"!=typeof t&&P(7),te(e,a,[Y],(function(e){return ee(ie(e.data[0],ae(e.data[1])))}),1,t)}(A,{size:u},y))}else y(P(14,"unknown compression type "+i,1),null);else y(null,k(e,x,x+o));else y(null,null)},g=0;g{e?t(e):a(c)}))}))}function Ce(e){return _e(this,arguments,(function*({staticUrl:e="",zipName:a,zipDigest:t,parseJson:c=!0}){const f=`${e}/${a}.zip`,d=yield(0,ve.Fd)(f,{method:"GET",returnResponse:!0}),r=new Uint8Array(yield d.arrayBuffer());if(t){const e="sha384-"+(0,we.if)(yield(0,we.br)(r));if(t!==e)throw new Error(`Invalid digest hash for file ${f}, wants ${t} has ${e}`)}const{[a]:n}=yield Ee(r);return console.log(`Downloaded ${f}${t?` ( Digest: ${t} )`:""}`),c?JSON.parse((new TextDecoder).decode(n)):n}))}},32019:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.keccak512=a.keccak384=a.keccak256=a.keccak224=void 0;const c=t(32955),f=t(82672);a.keccak224=(0,f.wrapHash)(c.keccak_224),a.keccak256=(()=>{const e=(0,f.wrapHash)(c.keccak_256);return e.create=c.keccak_256.create,e})(),a.keccak384=(0,f.wrapHash)(c.keccak_384),a.keccak512=(0,f.wrapHash)(c.keccak_512)},26513:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.secp256k1=void 0;var c=t(8510);Object.defineProperty(a,"secp256k1",{enumerable:!0,get:function(){return c.secp256k1}})},82672:function(e,a,t){"use strict";e=t.nmd(e);var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.crypto=a.utf8ToBytes=a.createView=a.concatBytes=a.toHex=a.bytesToHex=a.assertBytes=a.assertBool=void 0,a.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},a.hexToBytes=function(e){const a=e.startsWith("0x")?e.substring(2):e;return(0,d.hexToBytes)(a)},a.equalsBytes=function(e,a){if(e.length!==a.length)return!1;for(let t=0;t(f.default.bytes(a),e(a))};const f=c(t(67557)),d=t(99175),r=f.default.bool;a.assertBool=r;const n=f.default.bytes;a.assertBytes=n;var i=t(99175);Object.defineProperty(a,"bytesToHex",{enumerable:!0,get:function(){return i.bytesToHex}}),Object.defineProperty(a,"toHex",{enumerable:!0,get:function(){return i.bytesToHex}}),Object.defineProperty(a,"concatBytes",{enumerable:!0,get:function(){return i.concatBytes}}),Object.defineProperty(a,"createView",{enumerable:!0,get:function(){return i.createView}}),Object.defineProperty(a,"utf8ToBytes",{enumerable:!0,get:function(){return i.utf8ToBytes}}),a.crypto=(()=>{const a="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,t="function"==typeof e.require&&e.require.bind(e);return{node:t&&!a?t("crypto"):void 0,web:a}})()},37007:e=>{"use strict";var a,t="object"==typeof Reflect?Reflect:null,c=t&&"function"==typeof t.apply?t.apply:function(e,a,t){return Function.prototype.apply.call(e,a,t)};a=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var f=Number.isNaN||function(e){return e!=e};function d(){d.init.call(this)}e.exports=d,e.exports.once=function(e,a){return new Promise((function(t,c){function f(t){e.removeListener(a,d),c(t)}function d(){"function"==typeof e.removeListener&&e.removeListener("error",f),t([].slice.call(arguments))}p(e,a,d,{once:!0}),"error"!==a&&function(e,a){"function"==typeof e.on&&p(e,"error",a,{once:!0})}(e,f)}))},d.EventEmitter=d,d.prototype._events=void 0,d.prototype._eventsCount=0,d.prototype._maxListeners=void 0;var r=10;function n(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function i(e){return void 0===e._maxListeners?d.defaultMaxListeners:e._maxListeners}function b(e,a,t,c){var f,d,r,b;if(n(t),void 0===(d=e._events)?(d=e._events=Object.create(null),e._eventsCount=0):(void 0!==d.newListener&&(e.emit("newListener",a,t.listener?t.listener:t),d=e._events),r=d[a]),void 0===r)r=d[a]=t,++e._eventsCount;else if("function"==typeof r?r=d[a]=c?[t,r]:[r,t]:c?r.unshift(t):r.push(t),(f=i(e))>0&&r.length>f&&!r.warned){r.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(a)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=a,o.count=r.length,b=o,console&&console.warn&&console.warn(b)}return e}function o(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(e,a,t){var c={fired:!1,wrapFn:void 0,target:e,type:a,listener:t},f=o.bind(c);return f.listener=t,c.wrapFn=f,f}function l(e,a,t){var c=e._events;if(void 0===c)return[];var f=c[a];return void 0===f?[]:"function"==typeof f?t?[f.listener||f]:[f]:t?function(e){for(var a=new Array(e.length),t=0;t0&&(r=a[0]),r instanceof Error)throw r;var n=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw n.context=r,n}var i=d[e];if(void 0===i)return!1;if("function"==typeof i)c(i,this,a);else{var b=i.length,o=h(i,b);for(t=0;t=0;d--)if(t[d]===a||t[d].listener===a){r=t[d].listener,f=d;break}if(f<0)return this;0===f?t.shift():function(e,a){for(;a+1=0;c--)this.removeListener(e,a[c]);return this},d.prototype.listeners=function(e){return l(this,e,!0)},d.prototype.rawListeners=function(e){return l(this,e,!1)},d.listenerCount=function(e,a){return"function"==typeof e.listenerCount?e.listenerCount(a):u.call(e,a)},d.prototype.listenerCount=u,d.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]}},68078:(e,a,t)=>{var c=t(92861).Buffer,f=t(88276);e.exports=function(e,a,t,d){if(c.isBuffer(e)||(e=c.from(e,"binary")),a&&(c.isBuffer(a)||(a=c.from(a,"binary")),8!==a.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var r=t/8,n=c.alloc(r),i=c.alloc(d||0),b=c.alloc(0);r>0||d>0;){var o=new f;o.update(b),o.update(e),a&&o.update(a),b=o.digest();var s=0;if(r>0){var l=n.length-r;s=Math.min(r,b.length),b.copy(n,l,0,s),r-=s}if(s0){var u=i.length-d,h=Math.min(d,b.length-s);b.copy(i,u,s,s+h),d-=h}}return b.fill(0),{key:n,iv:i}}},32017:e=>{"use strict";e.exports=function e(a,t){if(a===t)return!0;if(a&&t&&"object"==typeof a&&"object"==typeof t){if(a.constructor!==t.constructor)return!1;var c,f,d;if(Array.isArray(a)){if((c=a.length)!=t.length)return!1;for(f=c;0!=f--;)if(!e(a[f],t[f]))return!1;return!0}if(a.constructor===RegExp)return a.source===t.source&&a.flags===t.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===t.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===t.toString();if((c=(d=Object.keys(a)).length)!==Object.keys(t).length)return!1;for(f=c;0!=f--;)if(!Object.prototype.hasOwnProperty.call(t,d[f]))return!1;for(f=c;0!=f--;){var r=d[f];if(!e(a[r],t[r]))return!1}return!0}return a!=a&&t!=t}},82682:(e,a,t)=>{"use strict";var c=t(69600),f=Object.prototype.toString,d=Object.prototype.hasOwnProperty;e.exports=function(e,a,t){if(!c(a))throw new TypeError("iterator must be a function");var r;arguments.length>=3&&(r=t),"[object Array]"===f.call(e)?function(e,a,t){for(var c=0,f=e.length;c{"use strict";var a=Object.prototype.toString,t=Math.max,c=function(e,a){for(var t=[],c=0;c{"use strict";var c=t(89353);e.exports=Function.prototype.bind||c},70453:(e,a,t)=>{"use strict";var c,f=t(69383),d=t(41237),r=t(79290),n=t(79538),i=t(58068),b=t(69675),o=t(35345),s=Function,l=function(e){try{return s('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var h=function(){throw new b},p=u?function(){try{return h}catch(e){try{return u(arguments,"callee").get}catch(e){return h}}}():h,g=t(64039)(),m=t(80024)(),x=Object.getPrototypeOf||(m?function(e){return e.__proto__}:null),y={},A="undefined"!=typeof Uint8Array&&x?x(Uint8Array):c,v={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?c:ArrayBuffer,"%ArrayIteratorPrototype%":g&&x?x([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?c:Atomics,"%BigInt%":"undefined"==typeof BigInt?c:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?c:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?c:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":f,"%eval%":eval,"%EvalError%":d,"%Float32Array%":"undefined"==typeof Float32Array?c:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?c:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?c:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?c:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?c:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&x?x(x([][Symbol.iterator]())):c,"%JSON%":"object"==typeof JSON?JSON:c,"%Map%":"undefined"==typeof Map?c:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&x?x((new Map)[Symbol.iterator]()):c,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?c:Promise,"%Proxy%":"undefined"==typeof Proxy?c:Proxy,"%RangeError%":r,"%ReferenceError%":n,"%Reflect%":"undefined"==typeof Reflect?c:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?c:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&x?x((new Set)[Symbol.iterator]()):c,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&x?x(""[Symbol.iterator]()):c,"%Symbol%":g?Symbol:c,"%SyntaxError%":i,"%ThrowTypeError%":p,"%TypedArray%":A,"%TypeError%":b,"%Uint8Array%":"undefined"==typeof Uint8Array?c:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?c:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?c:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?c:Uint32Array,"%URIError%":o,"%WeakMap%":"undefined"==typeof WeakMap?c:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?c:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?c:WeakSet};if(x)try{null.error}catch(e){var w=x(x(e));v["%Error.prototype%"]=w}var _=function e(a){var t;if("%AsyncFunction%"===a)t=l("async function () {}");else if("%GeneratorFunction%"===a)t=l("function* () {}");else if("%AsyncGeneratorFunction%"===a)t=l("async function* () {}");else if("%AsyncGenerator%"===a){var c=e("%AsyncGeneratorFunction%");c&&(t=c.prototype)}else if("%AsyncIteratorPrototype%"===a){var f=e("%AsyncGenerator%");f&&x&&(t=x(f.prototype))}return v[a]=t,t},I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=t(66743),C=t(9957),M=E.call(Function.call,Array.prototype.concat),B=E.call(Function.apply,Array.prototype.splice),L=E.call(Function.call,String.prototype.replace),S=E.call(Function.call,String.prototype.slice),k=E.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g,R=function(e,a){var t,c=e;if(C(I,c)&&(c="%"+(t=I[c])[0]+"%"),C(v,c)){var f=v[c];if(f===y&&(f=_(c)),void 0===f&&!a)throw new b("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:t,name:c,value:f}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,a){if("string"!=typeof e||0===e.length)throw new b("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof a)throw new b('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=function(e){var a=S(e,0,1),t=S(e,-1);if("%"===a&&"%"!==t)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===t&&"%"!==a)throw new i("invalid intrinsic syntax, expected opening `%`");var c=[];return L(e,N,(function(e,a,t,f){c[c.length]=t?L(f,P,"$1"):a||e})),c}(e),c=t.length>0?t[0]:"",f=R("%"+c+"%",a),d=f.name,r=f.value,n=!1,o=f.alias;o&&(c=o[0],B(t,M([0,1],o)));for(var s=1,l=!0;s=t.length){var m=u(r,h);r=(l=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:r[h]}else l=C(r,h),r=r[h];l&&!n&&(v[d]=r)}}return r}},75795:(e,a,t)=>{"use strict";var c=t(70453)("%Object.getOwnPropertyDescriptor%",!0);if(c)try{c([],"length")}catch(e){c=null}e.exports=c},30592:(e,a,t)=>{"use strict";var c=t(30655),f=function(){return!!c};f.hasArrayLengthDefineBug=function(){if(!c)return null;try{return 1!==c([],"length",{value:1}).length}catch(e){return!0}},e.exports=f},80024:e=>{"use strict";var a={__proto__:null,foo:{}},t=Object;e.exports=function(){return{__proto__:a}.foo===a.foo&&!(a instanceof t)}},64039:(e,a,t)=>{"use strict";var c="undefined"!=typeof Symbol&&Symbol,f=t(41333);e.exports=function(){return"function"==typeof c&&"function"==typeof Symbol&&"symbol"==typeof c("foo")&&"symbol"==typeof Symbol("bar")&&f()}},41333:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},a=Symbol("test"),t=Object(a);if("string"==typeof a)return!1;if("[object Symbol]"!==Object.prototype.toString.call(a))return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;for(a in e[a]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var c=Object.getOwnPropertySymbols(e);if(1!==c.length||c[0]!==a)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var f=Object.getOwnPropertyDescriptor(e,a);if(42!==f.value||!0!==f.enumerable)return!1}return!0}},49092:(e,a,t)=>{"use strict";var c=t(41333);e.exports=function(){return c()&&!!Symbol.toStringTag}},77952:(e,a,t)=>{var c=a;c.utils=t(67426),c.common=t(66166),c.sha=t(46229),c.ripemd=t(46784),c.hmac=t(28948),c.sha1=c.sha.sha1,c.sha256=c.sha.sha256,c.sha224=c.sha.sha224,c.sha384=c.sha.sha384,c.sha512=c.sha.sha512,c.ripemd160=c.ripemd.ripemd160},66166:(e,a,t)=>{"use strict";var c=t(67426),f=t(43349);function d(){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}a.BlockHash=d,d.prototype.update=function(e,a){if(e=c.toArray(e,a),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var t=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-t,e.length),0===this.pending.length&&(this.pending=null),e=c.join32(e,0,e.length-t,this.endian);for(var f=0;f>>24&255,c[f++]=e>>>16&255,c[f++]=e>>>8&255,c[f++]=255&e}else for(c[f++]=255&e,c[f++]=e>>>8&255,c[f++]=e>>>16&255,c[f++]=e>>>24&255,c[f++]=0,c[f++]=0,c[f++]=0,c[f++]=0,d=8;d{"use strict";var c=t(67426),f=t(43349);function d(e,a,t){if(!(this instanceof d))return new d(e,a,t);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(c.toArray(a,t))}e.exports=d,d.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),f(e.length<=this.blockSize);for(var a=e.length;a{"use strict";var c=t(67426),f=t(66166),d=c.rotl32,r=c.sum32,n=c.sum32_3,i=c.sum32_4,b=f.BlockHash;function o(){if(!(this instanceof o))return new o;b.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function s(e,a,t,c){return e<=15?a^t^c:e<=31?a&t|~a&c:e<=47?(a|~t)^c:e<=63?a&c|t&~c:a^(t|~c)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function u(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}c.inherits(o,b),a.ripemd160=o,o.blockSize=512,o.outSize=160,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(e,a){for(var t=this.h[0],c=this.h[1],f=this.h[2],b=this.h[3],o=this.h[4],x=t,y=c,A=f,v=b,w=o,_=0;_<80;_++){var I=r(d(i(t,s(_,c,f,b),e[h[_]+a],l(_)),g[_]),o);t=o,o=b,b=d(f,10),f=c,c=I,I=r(d(i(x,s(79-_,y,A,v),e[p[_]+a],u(_)),m[_]),w),x=w,w=v,v=d(A,10),A=y,y=I}I=n(this.h[1],f,v),this.h[1]=n(this.h[2],b,w),this.h[2]=n(this.h[3],o,x),this.h[3]=n(this.h[4],t,y),this.h[4]=n(this.h[0],c,A),this.h[0]=I},o.prototype._digest=function(e){return"hex"===e?c.toHex32(this.h,"little"):c.split32(this.h,"little")};var h=[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],p=[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],g=[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],m=[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]},46229:(e,a,t)=>{"use strict";a.sha1=t(43917),a.sha224=t(47714),a.sha256=t(2287),a.sha384=t(21911),a.sha512=t(57766)},43917:(e,a,t)=>{"use strict";var c=t(67426),f=t(66166),d=t(66225),r=c.rotl32,n=c.sum32,i=c.sum32_5,b=d.ft_1,o=f.BlockHash,s=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}c.inherits(l,o),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,a){for(var t=this.W,c=0;c<16;c++)t[c]=e[a+c];for(;c{"use strict";var c=t(67426),f=t(2287);function d(){if(!(this instanceof d))return new d;f.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}c.inherits(d,f),e.exports=d,d.blockSize=512,d.outSize=224,d.hmacStrength=192,d.padLength=64,d.prototype._digest=function(e){return"hex"===e?c.toHex32(this.h.slice(0,7),"big"):c.split32(this.h.slice(0,7),"big")}},2287:(e,a,t)=>{"use strict";var c=t(67426),f=t(66166),d=t(66225),r=t(43349),n=c.sum32,i=c.sum32_4,b=c.sum32_5,o=d.ch32,s=d.maj32,l=d.s0_256,u=d.s1_256,h=d.g0_256,p=d.g1_256,g=f.BlockHash,m=[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 x(){if(!(this instanceof x))return new x;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}c.inherits(x,g),e.exports=x,x.blockSize=512,x.outSize=256,x.hmacStrength=192,x.padLength=64,x.prototype._update=function(e,a){for(var t=this.W,c=0;c<16;c++)t[c]=e[a+c];for(;c{"use strict";var c=t(67426),f=t(57766);function d(){if(!(this instanceof d))return new d;f.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}c.inherits(d,f),e.exports=d,d.blockSize=1024,d.outSize=384,d.hmacStrength=192,d.padLength=128,d.prototype._digest=function(e){return"hex"===e?c.toHex32(this.h.slice(0,12),"big"):c.split32(this.h.slice(0,12),"big")}},57766:(e,a,t)=>{"use strict";var c=t(67426),f=t(66166),d=t(43349),r=c.rotr64_hi,n=c.rotr64_lo,i=c.shr64_hi,b=c.shr64_lo,o=c.sum64,s=c.sum64_hi,l=c.sum64_lo,u=c.sum64_4_hi,h=c.sum64_4_lo,p=c.sum64_5_hi,g=c.sum64_5_lo,m=f.BlockHash,x=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=x,this.W=new Array(160)}function A(e,a,t,c,f){var d=e&t^~e&f;return d<0&&(d+=4294967296),d}function v(e,a,t,c,f,d){var r=a&c^~a&d;return r<0&&(r+=4294967296),r}function w(e,a,t,c,f){var d=e&t^e&f^t&f;return d<0&&(d+=4294967296),d}function _(e,a,t,c,f,d){var r=a&c^a&d^c&d;return r<0&&(r+=4294967296),r}function I(e,a){var t=r(e,a,28)^r(a,e,2)^r(a,e,7);return t<0&&(t+=4294967296),t}function E(e,a){var t=n(e,a,28)^n(a,e,2)^n(a,e,7);return t<0&&(t+=4294967296),t}function C(e,a){var t=n(e,a,14)^n(e,a,18)^n(a,e,9);return t<0&&(t+=4294967296),t}function M(e,a){var t=r(e,a,1)^r(e,a,8)^i(e,a,7);return t<0&&(t+=4294967296),t}function B(e,a){var t=n(e,a,1)^n(e,a,8)^b(e,a,7);return t<0&&(t+=4294967296),t}function L(e,a){var t=n(e,a,19)^n(a,e,29)^b(e,a,6);return t<0&&(t+=4294967296),t}c.inherits(y,m),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,a){for(var t=this.W,c=0;c<32;c++)t[c]=e[a+c];for(;c{"use strict";var c=t(67426).rotr32;function f(e,a,t){return e&a^~e&t}function d(e,a,t){return e&a^e&t^a&t}function r(e,a,t){return e^a^t}a.ft_1=function(e,a,t,c){return 0===e?f(a,t,c):1===e||3===e?r(a,t,c):2===e?d(a,t,c):void 0},a.ch32=f,a.maj32=d,a.p32=r,a.s0_256=function(e){return c(e,2)^c(e,13)^c(e,22)},a.s1_256=function(e){return c(e,6)^c(e,11)^c(e,25)},a.g0_256=function(e){return c(e,7)^c(e,18)^e>>>3},a.g1_256=function(e){return c(e,17)^c(e,19)^e>>>10}},67426:(e,a,t)=>{"use strict";var c=t(43349),f=t(56698);function d(e,a){return 55296==(64512&e.charCodeAt(a))&&!(a<0||a+1>=e.length)&&56320==(64512&e.charCodeAt(a+1))}function r(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function n(e){return 1===e.length?"0"+e:e}function i(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}a.inherits=f,a.toArray=function(e,a){if(Array.isArray(e))return e.slice();if(!e)return[];var t=[];if("string"==typeof e)if(a){if("hex"===a)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),f=0;f>6|192,t[c++]=63&r|128):d(e,f)?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++f)),t[c++]=r>>18|240,t[c++]=r>>12&63|128,t[c++]=r>>6&63|128,t[c++]=63&r|128):(t[c++]=r>>12|224,t[c++]=r>>6&63|128,t[c++]=63&r|128)}else for(f=0;f>>0}return r},a.split32=function(e,a){for(var t=new Array(4*e.length),c=0,f=0;c>>24,t[f+1]=d>>>16&255,t[f+2]=d>>>8&255,t[f+3]=255&d):(t[f+3]=d>>>24,t[f+2]=d>>>16&255,t[f+1]=d>>>8&255,t[f]=255&d)}return t},a.rotr32=function(e,a){return e>>>a|e<<32-a},a.rotl32=function(e,a){return e<>>32-a},a.sum32=function(e,a){return e+a>>>0},a.sum32_3=function(e,a,t){return e+a+t>>>0},a.sum32_4=function(e,a,t,c){return e+a+t+c>>>0},a.sum32_5=function(e,a,t,c,f){return e+a+t+c+f>>>0},a.sum64=function(e,a,t,c){var f=e[a],d=c+e[a+1]>>>0,r=(d>>0,e[a+1]=d},a.sum64_hi=function(e,a,t,c){return(a+c>>>0>>0},a.sum64_lo=function(e,a,t,c){return a+c>>>0},a.sum64_4_hi=function(e,a,t,c,f,d,r,n){var i=0,b=a;return i+=(b=b+c>>>0)>>0)>>0)>>0},a.sum64_4_lo=function(e,a,t,c,f,d,r,n){return a+c+d+n>>>0},a.sum64_5_hi=function(e,a,t,c,f,d,r,n,i,b){var o=0,s=a;return o+=(s=s+c>>>0)>>0)>>0)>>0)>>0},a.sum64_5_lo=function(e,a,t,c,f,d,r,n,i,b){return a+c+d+n+b>>>0},a.rotr64_hi=function(e,a,t){return(a<<32-t|e>>>t)>>>0},a.rotr64_lo=function(e,a,t){return(e<<32-t|a>>>t)>>>0},a.shr64_hi=function(e,a,t){return e>>>t},a.shr64_lo=function(e,a,t){return(e<<32-t|a>>>t)>>>0}},9957:(e,a,t)=>{"use strict";var c=Function.prototype.call,f=Object.prototype.hasOwnProperty,d=t(66743);e.exports=d.call(c,f)},32723:(e,a,t)=>{"use strict";var c=t(77952),f=t(64367),d=t(43349);function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var a=f.toArray(e.entropy,e.entropyEnc||"hex"),t=f.toArray(e.nonce,e.nonceEnc||"hex"),c=f.toArray(e.pers,e.persEnc||"hex");d(a.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(a,t,c)}e.exports=r,r.prototype._init=function(e,a,t){var c=e.concat(a).concat(t);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var f=0;f=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(t||[])),this._reseed=1},r.prototype.generate=function(e,a,t,c){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof a&&(c=t,t=a,a=null),t&&(t=f.toArray(t,c||"hex"),this._update(t));for(var d=[];d.length{var c=t(11568),f=t(23276),d=e.exports;for(var r in c)c.hasOwnProperty(r)&&(d[r]=c[r]);function n(e){if("string"==typeof e&&(e=f.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}d.request=function(e,a){return e=n(e),c.request.call(this,e,a)},d.get=function(e,a){return e=n(e),c.get.call(this,e,a)}},251:(e,a)=>{a.read=function(e,a,t,c,f){var d,r,n=8*f-c-1,i=(1<>1,o=-7,s=t?f-1:0,l=t?-1:1,u=e[a+s];for(s+=l,d=u&(1<<-o)-1,u>>=-o,o+=n;o>0;d=256*d+e[a+s],s+=l,o-=8);for(r=d&(1<<-o)-1,d>>=-o,o+=c;o>0;r=256*r+e[a+s],s+=l,o-=8);if(0===d)d=1-b;else{if(d===i)return r?NaN:1/0*(u?-1:1);r+=Math.pow(2,c),d-=b}return(u?-1:1)*r*Math.pow(2,d-c)},a.write=function(e,a,t,c,f,d){var r,n,i,b=8*d-f-1,o=(1<>1,l=23===f?Math.pow(2,-24)-Math.pow(2,-77):0,u=c?0:d-1,h=c?1:-1,p=a<0||0===a&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(n=isNaN(a)?1:0,r=o):(r=Math.floor(Math.log(a)/Math.LN2),a*(i=Math.pow(2,-r))<1&&(r--,i*=2),(a+=r+s>=1?l/i:l*Math.pow(2,1-s))*i>=2&&(r++,i/=2),r+s>=o?(n=0,r=o):r+s>=1?(n=(a*i-1)*Math.pow(2,f),r+=s):(n=a*Math.pow(2,s-1)*Math.pow(2,f),r=0));f>=8;e[t+u]=255&n,u+=h,n/=256,f-=8);for(r=r<0;e[t+u]=255&r,u+=h,r/=256,b-=8);e[t+u-h]|=128*p}},56698:e=>{"function"==typeof Object.create?e.exports=function(e,a){a&&(e.super_=a,e.prototype=Object.create(a.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,a){if(a){e.super_=a;var t=function(){};t.prototype=a.prototype,e.prototype=new t,e.prototype.constructor=e}}},47244:(e,a,t)=>{"use strict";var c=t(49092)(),f=t(38075)("Object.prototype.toString"),d=function(e){return!(c&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===f(e)},r=function(e){return!!d(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==f(e)&&"[object Function]"===f(e.callee)},n=function(){return d(arguments)}();d.isLegacyArguments=r,e.exports=n?d:r},69600:e=>{"use strict";var a,t,c=Function.prototype.toString,f="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof f&&"function"==typeof Object.defineProperty)try{a=Object.defineProperty({},"length",{get:function(){throw t}}),t={},f((function(){throw 42}),null,a)}catch(e){e!==t&&(f=null)}else f=null;var d=/^\s*class\b/,r=function(e){try{var a=c.call(e);return d.test(a)}catch(e){return!1}},n=function(e){try{return!r(e)&&(c.call(e),!0)}catch(e){return!1}},i=Object.prototype.toString,b="function"==typeof Symbol&&!!Symbol.toStringTag,o=!(0 in[,]),s=function(){return!1};if("object"==typeof document){var l=document.all;i.call(l)===i.call(document.all)&&(s=function(e){if((o||!e)&&(void 0===e||"object"==typeof e))try{var a=i.call(e);return("[object HTMLAllCollection]"===a||"[object HTML document.all class]"===a||"[object HTMLCollection]"===a||"[object Object]"===a)&&null==e("")}catch(e){}return!1})}e.exports=f?function(e){if(s(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{f(e,null,a)}catch(e){if(e!==t)return!1}return!r(e)&&n(e)}:function(e){if(s(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(b)return n(e);if(r(e))return!1;var a=i.call(e);return!("[object Function]"!==a&&"[object GeneratorFunction]"!==a&&!/^\[object HTML/.test(a))&&n(e)}},48184:(e,a,t)=>{"use strict";var c,f=Object.prototype.toString,d=Function.prototype.toString,r=/^\s*(?:function)?\*/,n=t(49092)(),i=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(r.test(d.call(e)))return!0;if(!n)return"[object GeneratorFunction]"===f.call(e);if(!i)return!1;if(void 0===c){var a=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch(e){}}();c=!!a&&i(a)}return i(e)===c}},13003:e=>{"use strict";e.exports=function(e){return e!=e}},24133:(e,a,t)=>{"use strict";var c=t(10487),f=t(38452),d=t(13003),r=t(76642),n=t(92464),i=c(r(),Number);f(i,{getPolyfill:r,implementation:d,shim:n}),e.exports=i},76642:(e,a,t)=>{"use strict";var c=t(13003);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:c}},92464:(e,a,t)=>{"use strict";var c=t(38452),f=t(76642);e.exports=function(){var e=f();return c(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},35680:(e,a,t)=>{"use strict";var c=t(25767);e.exports=function(e){return!!c(e)}},31176:(e,a,t)=>{var c;!function(){"use strict";var f="input is invalid type",d="object"==typeof window,r=d?window:{};r.JS_SHA3_NO_WINDOW&&(d=!1);var n=!d&&"object"==typeof self;!r.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?r=t.g:n&&(r=self);var i=!r.JS_SHA3_NO_COMMON_JS&&e.exports,b=t.amdO,o=!r.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,s="0123456789abcdef".split(""),l=[4,1024,262144,67108864],u=[0,8,16,24],h=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],p=[224,256,384,512],g=[128,256],m=["hex","buffer","arrayBuffer","array","digest"],x={128:168,256:136};!r.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!o||!r.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var y=function(e,a,t){return function(c){return new R(e,a,e).update(c)[t]()}},A=function(e,a,t){return function(c,f){return new R(e,a,f).update(c)[t]()}},v=function(e,a,t){return function(a,c,f,d){return C["cshake"+e].update(a,c,f,d)[t]()}},w=function(e,a,t){return function(a,c,f,d){return C["kmac"+e].update(a,c,f,d)[t]()}},_=function(e,a,t,c){for(var f=0;f>5,this.byteCount=this.blockCount<<2,this.outputBlocks=t>>5,this.extraBytes=(31&t)>>3;for(var c=0;c<50;++c)this.s[c]=0}function O(e,a,t){R.call(this,e,a,t)}R.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var a,t=typeof e;if("string"!==t){if("object"!==t)throw new Error(f);if(null===e)throw new Error(f);if(o&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||o&&ArrayBuffer.isView(e)))throw new Error(f);a=!0}for(var c,d,r=this.blocks,n=this.byteCount,i=e.length,b=this.blockCount,s=0,l=this.s;s>2]|=e[s]<>2]|=d<>2]|=(192|d>>6)<>2]|=(128|63&d)<=57344?(r[c>>2]|=(224|d>>12)<>2]|=(128|d>>6&63)<>2]|=(128|63&d)<>2]|=(240|d>>18)<>2]|=(128|d>>12&63)<>2]|=(128|d>>6&63)<>2]|=(128|63&d)<=n){for(this.start=c-n,this.block=r[b],c=0;c>=8);t>0;)f.unshift(t),t=255&(e>>=8),++c;return a?f.push(c):f.unshift(c),this.update(f),f.length},R.prototype.encodeString=function(e){var a,t=typeof e;if("string"!==t){if("object"!==t)throw new Error(f);if(null===e)throw new Error(f);if(o&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||o&&ArrayBuffer.isView(e)))throw new Error(f);a=!0}var c=0,d=e.length;if(a)c=d;else for(var r=0;r=57344?c+=3:(n=65536+((1023&n)<<10|1023&e.charCodeAt(++r)),c+=4)}return c+=this.encode(8*c),this.update(e),c},R.prototype.bytepad=function(e,a){for(var t=this.encode(a),c=0;c>2]|=this.padding[3&a],this.lastByteIndex===this.byteCount)for(e[0]=e[t],a=1;a>4&15]+s[15&e]+s[e>>12&15]+s[e>>8&15]+s[e>>20&15]+s[e>>16&15]+s[e>>28&15]+s[e>>24&15];r%a==0&&(D(t),d=0)}return f&&(e=t[d],n+=s[e>>4&15]+s[15&e],f>1&&(n+=s[e>>12&15]+s[e>>8&15]),f>2&&(n+=s[e>>20&15]+s[e>>16&15])),n},R.prototype.arrayBuffer=function(){this.finalize();var e,a=this.blockCount,t=this.s,c=this.outputBlocks,f=this.extraBytes,d=0,r=0,n=this.outputBits>>3;e=f?new ArrayBuffer(c+1<<2):new ArrayBuffer(n);for(var i=new Uint32Array(e);r>8&255,i[e+2]=a>>16&255,i[e+3]=a>>24&255;n%t==0&&D(c)}return d&&(e=n<<2,a=c[r],i[e]=255&a,d>1&&(i[e+1]=a>>8&255),d>2&&(i[e+2]=a>>16&255)),i},O.prototype=new R,O.prototype.finalize=function(){return this.encode(this.outputBits,!0),R.prototype.finalize.call(this)};var D=function(e){var a,t,c,f,d,r,n,i,b,o,s,l,u,p,g,m,x,y,A,v,w,_,I,E,C,M,B,L,S,k,N,P,R,O,D,T,F,Q,U,j,H,$,q,G,z,K,V,Z,J,W,Y,X,ee,ae,te,ce,fe,de,re,ne,ie,be,oe;for(c=0;c<48;c+=2)f=e[0]^e[10]^e[20]^e[30]^e[40],d=e[1]^e[11]^e[21]^e[31]^e[41],r=e[2]^e[12]^e[22]^e[32]^e[42],n=e[3]^e[13]^e[23]^e[33]^e[43],i=e[4]^e[14]^e[24]^e[34]^e[44],b=e[5]^e[15]^e[25]^e[35]^e[45],o=e[6]^e[16]^e[26]^e[36]^e[46],s=e[7]^e[17]^e[27]^e[37]^e[47],a=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(r<<1|n>>>31),t=(u=e[9]^e[19]^e[29]^e[39]^e[49])^(n<<1|r>>>31),e[0]^=a,e[1]^=t,e[10]^=a,e[11]^=t,e[20]^=a,e[21]^=t,e[30]^=a,e[31]^=t,e[40]^=a,e[41]^=t,a=f^(i<<1|b>>>31),t=d^(b<<1|i>>>31),e[2]^=a,e[3]^=t,e[12]^=a,e[13]^=t,e[22]^=a,e[23]^=t,e[32]^=a,e[33]^=t,e[42]^=a,e[43]^=t,a=r^(o<<1|s>>>31),t=n^(s<<1|o>>>31),e[4]^=a,e[5]^=t,e[14]^=a,e[15]^=t,e[24]^=a,e[25]^=t,e[34]^=a,e[35]^=t,e[44]^=a,e[45]^=t,a=i^(l<<1|u>>>31),t=b^(u<<1|l>>>31),e[6]^=a,e[7]^=t,e[16]^=a,e[17]^=t,e[26]^=a,e[27]^=t,e[36]^=a,e[37]^=t,e[46]^=a,e[47]^=t,a=o^(f<<1|d>>>31),t=s^(d<<1|f>>>31),e[8]^=a,e[9]^=t,e[18]^=a,e[19]^=t,e[28]^=a,e[29]^=t,e[38]^=a,e[39]^=t,e[48]^=a,e[49]^=t,p=e[0],g=e[1],K=e[11]<<4|e[10]>>>28,V=e[10]<<4|e[11]>>>28,L=e[20]<<3|e[21]>>>29,S=e[21]<<3|e[20]>>>29,ne=e[31]<<9|e[30]>>>23,ie=e[30]<<9|e[31]>>>23,$=e[40]<<18|e[41]>>>14,q=e[41]<<18|e[40]>>>14,O=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,x=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,k=e[33]<<13|e[32]>>>19,N=e[32]<<13|e[33]>>>19,be=e[42]<<2|e[43]>>>30,oe=e[43]<<2|e[42]>>>30,ae=e[5]<<30|e[4]>>>2,te=e[4]<<30|e[5]>>>2,T=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,W=e[34]<<15|e[35]>>>17,Y=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,ce=e[17]<<23|e[16]>>>9,fe=e[16]<<23|e[17]>>>9,Q=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,v=e[36]<<21|e[37]>>>11,w=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,z=e[9]<<27|e[8]>>>5,M=e[18]<<20|e[19]>>>12,B=e[19]<<20|e[18]>>>12,de=e[29]<<7|e[28]>>>25,re=e[28]<<7|e[29]>>>25,j=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,I=e[49]<<14|e[48]>>>18,e[0]=p^~m&y,e[1]=g^~x&A,e[10]=E^~M&L,e[11]=C^~B&S,e[20]=O^~T&Q,e[21]=D^~F&U,e[30]=G^~K&Z,e[31]=z^~V&J,e[40]=ae^~ce&de,e[41]=te^~fe&re,e[2]=m^~y&v,e[3]=x^~A&w,e[12]=M^~L&k,e[13]=B^~S&N,e[22]=T^~Q&j,e[23]=F^~U&H,e[32]=K^~Z&W,e[33]=V^~J&Y,e[42]=ce^~de&ne,e[43]=fe^~re&ie,e[4]=y^~v&_,e[5]=A^~w&I,e[14]=L^~k&P,e[15]=S^~N&R,e[24]=Q^~j&$,e[25]=U^~H&q,e[34]=Z^~W&X,e[35]=J^~Y&ee,e[44]=de^~ne&be,e[45]=re^~ie&oe,e[6]=v^~_&p,e[7]=w^~I&g,e[16]=k^~P&E,e[17]=N^~R&C,e[26]=j^~$&O,e[27]=H^~q&D,e[36]=W^~X&G,e[37]=Y^~ee&z,e[46]=ne^~be&ae,e[47]=ie^~oe&te,e[8]=_^~p&m,e[9]=I^~g&x,e[18]=P^~E&M,e[19]=R^~C&B,e[28]=$^~O&T,e[29]=q^~D&F,e[38]=X^~G&K,e[39]=ee^~z&V,e[48]=be^~ae&ce,e[49]=oe^~te&fe,e[0]^=h[c],e[1]^=h[c+1]};if(i)e.exports=C;else{for(B=0;B{"use strict";var a=e.exports=function(e,a,c){"function"==typeof a&&(c=a,a={}),t(a,"function"==typeof(c=a.cb||c)?c:c.pre||function(){},c.post||function(){},e,"",e)};function t(e,c,f,d,r,n,i,b,o,s){if(d&&"object"==typeof d&&!Array.isArray(d)){for(var l in c(d,r,n,i,b,o,s),d){var u=d[l];if(Array.isArray(u)){if(l in a.arrayKeywords)for(var h=0;h{"use strict";var c=t(56698),f=t(73726),d=t(92861).Buffer,r=new Array(16);function n(){f.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function i(e,a){return e<>>32-a}function b(e,a,t,c,f,d,r){return i(e+(a&t|~a&c)+f+d|0,r)+a|0}function o(e,a,t,c,f,d,r){return i(e+(a&c|t&~c)+f+d|0,r)+a|0}function s(e,a,t,c,f,d,r){return i(e+(a^t^c)+f+d|0,r)+a|0}function l(e,a,t,c,f,d,r){return i(e+(t^(a|~c))+f+d|0,r)+a|0}c(n,f),n.prototype._update=function(){for(var e=r,a=0;a<16;++a)e[a]=this._block.readInt32LE(4*a);var t=this._a,c=this._b,f=this._c,d=this._d;t=b(t,c,f,d,e[0],3614090360,7),d=b(d,t,c,f,e[1],3905402710,12),f=b(f,d,t,c,e[2],606105819,17),c=b(c,f,d,t,e[3],3250441966,22),t=b(t,c,f,d,e[4],4118548399,7),d=b(d,t,c,f,e[5],1200080426,12),f=b(f,d,t,c,e[6],2821735955,17),c=b(c,f,d,t,e[7],4249261313,22),t=b(t,c,f,d,e[8],1770035416,7),d=b(d,t,c,f,e[9],2336552879,12),f=b(f,d,t,c,e[10],4294925233,17),c=b(c,f,d,t,e[11],2304563134,22),t=b(t,c,f,d,e[12],1804603682,7),d=b(d,t,c,f,e[13],4254626195,12),f=b(f,d,t,c,e[14],2792965006,17),t=o(t,c=b(c,f,d,t,e[15],1236535329,22),f,d,e[1],4129170786,5),d=o(d,t,c,f,e[6],3225465664,9),f=o(f,d,t,c,e[11],643717713,14),c=o(c,f,d,t,e[0],3921069994,20),t=o(t,c,f,d,e[5],3593408605,5),d=o(d,t,c,f,e[10],38016083,9),f=o(f,d,t,c,e[15],3634488961,14),c=o(c,f,d,t,e[4],3889429448,20),t=o(t,c,f,d,e[9],568446438,5),d=o(d,t,c,f,e[14],3275163606,9),f=o(f,d,t,c,e[3],4107603335,14),c=o(c,f,d,t,e[8],1163531501,20),t=o(t,c,f,d,e[13],2850285829,5),d=o(d,t,c,f,e[2],4243563512,9),f=o(f,d,t,c,e[7],1735328473,14),t=s(t,c=o(c,f,d,t,e[12],2368359562,20),f,d,e[5],4294588738,4),d=s(d,t,c,f,e[8],2272392833,11),f=s(f,d,t,c,e[11],1839030562,16),c=s(c,f,d,t,e[14],4259657740,23),t=s(t,c,f,d,e[1],2763975236,4),d=s(d,t,c,f,e[4],1272893353,11),f=s(f,d,t,c,e[7],4139469664,16),c=s(c,f,d,t,e[10],3200236656,23),t=s(t,c,f,d,e[13],681279174,4),d=s(d,t,c,f,e[0],3936430074,11),f=s(f,d,t,c,e[3],3572445317,16),c=s(c,f,d,t,e[6],76029189,23),t=s(t,c,f,d,e[9],3654602809,4),d=s(d,t,c,f,e[12],3873151461,11),f=s(f,d,t,c,e[15],530742520,16),t=l(t,c=s(c,f,d,t,e[2],3299628645,23),f,d,e[0],4096336452,6),d=l(d,t,c,f,e[7],1126891415,10),f=l(f,d,t,c,e[14],2878612391,15),c=l(c,f,d,t,e[5],4237533241,21),t=l(t,c,f,d,e[12],1700485571,6),d=l(d,t,c,f,e[3],2399980690,10),f=l(f,d,t,c,e[10],4293915773,15),c=l(c,f,d,t,e[1],2240044497,21),t=l(t,c,f,d,e[8],1873313359,6),d=l(d,t,c,f,e[15],4264355552,10),f=l(f,d,t,c,e[6],2734768916,15),c=l(c,f,d,t,e[13],1309151649,21),t=l(t,c,f,d,e[4],4149444226,6),d=l(d,t,c,f,e[11],3174756917,10),f=l(f,d,t,c,e[2],718787259,15),c=l(c,f,d,t,e[9],3951481745,21),this._a=this._a+t|0,this._b=this._b+c|0,this._c=this._c+f|0,this._d=this._d+d|0},n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=d.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=n},73726:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=t(28399).Transform;function d(e){f.call(this),this._block=c.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}t(56698)(d,f),d.prototype._transform=function(e,a,t){var c=null;try{this.update(e,a)}catch(e){c=e}t(c)},d.prototype._flush=function(e){var a=null;try{this.push(this.digest())}catch(e){a=e}e(a)},d.prototype.update=function(e,a){if(function(e){if(!c.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");c.isBuffer(e)||(e=c.from(e,a));for(var t=this._block,f=0;this._blockOffset+e.length-f>=this._blockSize;){for(var d=this._blockOffset;d0;++r)this._length[r]+=n,(n=this._length[r]/4294967296|0)>0&&(this._length[r]-=4294967296*n);return this},d.prototype._update=function(){throw new Error("_update is not implemented")},d.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var a=this._digest();void 0!==e&&(a=a.toString(e)),this._block.fill(0),this._blockOffset=0;for(var t=0;t<4;++t)this._length[t]=0;return a},d.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=d},6215:(e,a,t)=>{"use strict";var c=t(48287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.InvalidStatusCodeError=a.InvalidCertError=void 0;const f=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class d extends Error{constructor(e,a){super(e),this.fingerprint256=a}}a.InvalidCertError=d;class r extends Error{constructor(e){super(`Request Failed. Status Code: ${e}`),this.statusCode=e}}function n(e,a){if(!a||"text"===a||"json"===a)try{let t=new TextDecoder("utf8",{fatal:!0}).decode(e);if("text"===a)return t;try{return JSON.parse(t)}catch(e){if("json"===a)throw e;return t}}catch(e){if("text"===a||"json"===a)throw e}return e}a.InvalidStatusCodeError=r;let i={};function b(e,a){let o={...f,...a};const s=t(11568),l=t(11083),u=t(78559),{promisify:h}=t(40537),{resolve:p}=t(59676),g=!!/^https/.test(e);let m={method:o.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const x=e=>e.replace(/:| /g,"").toLowerCase();if(o.keepAlive){const e={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},a=[g,g&&o.sslPinnedCertificates?.map((e=>x(e))).sort()].join();m.agent=i[a]||(i[a]=new(g?l:s).Agent(e))}return"json"===o.type&&(m.headers["Content-Type"]="application/json"),o.data&&(o.method||(m.method="POST"),m.body="json"===o.type?JSON.stringify(o.data):o.data),m.headers={...m.headers,...o.headers},o.sslAllowSelfSigned&&(m.rejectUnauthorized=!1),new Promise(((a,t)=>{const f=async a=>{if(a&&"DEPTH_ZERO_SELF_SIGNED_CERT"===a.code)try{await b(e,{...o,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(e){e&&e.fingerprint256&&(a=new d(`Self-signed SSL certificate: ${e.fingerprint256}`,e.fingerprint256))}t(a)},i=(g?l:s).request(e,m,(d=>{d.on("error",f),(async()=>{try{a(await(async a=>{const t=a.statusCode;if(o.redirect&&300<=t&&t<400&&a.headers.location){if(10==o._redirectCount)throw new Error("Request failed. Too much redirects.");return o._redirectCount+=1,await b(p(e,a.headers.location),o)}if(o.expectStatusCode&&t!==o.expectStatusCode)throw a.resume(),new r(t);let f=[];for await(const e of a)f.push(e);let d=c.concat(f);const i=a.headers["content-encoding"];"br"===i&&(d=await h(u.brotliDecompress)(d)),"gzip"!==i&&"deflate"!==i||(d=await h(u.unzip)(d));const s=n(d,o.type);return o.full?{headers:a.headers,status:t,body:s}:s})(d))}catch(e){t(e)}})()}));i.on("error",f);const y=o.sslPinnedCertificates?.map((e=>x(e))),A=e=>{const a=x(e.getPeerCertificate()?.fingerprint256||"");if((a||!e.isSessionReused())&&!y.includes(a))return i.emit("error",new d(`Invalid SSL certificate: ${a} Expected: ${y}`,a)),i.abort()};o.sslPinnedCertificates&&i.on("socket",(e=>{e.listeners("secureConnect").map((e=>(e.name||"").replace("bound ",""))).includes("mfetchSecureConnect")||e.on("secureConnect",A.bind(null,e))})),o.keepAlive&&i.setNoDelay(!0),m.body&&i.write(m.body),i.end()}))}const o=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map((e=>e.toLowerCase()))),s=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map((e=>e.toLowerCase())));async function l(e,a){let t={...f,...a};const c=new Headers;"json"===t.type&&c.set("Content-Type","application/json");let d=new URL(e);if(d.username){const e=btoa(`${d.username}:${d.password}`);c.set("Authorization",`Basic ${e}`),d.username="",d.password=""}e=""+d;for(let e in t.headers){const a=e.toLowerCase();(o.has(a)||t.cors&&!s.has(a))&&c.set(e,t.headers[e])}let i={headers:c,redirect:t.redirect?"follow":"manual"};t.referrer||(i.referrerPolicy="no-referrer"),t.cors&&(i.mode="cors"),t.data&&(t.method||(i.method="POST"),i.body="json"===t.type?JSON.stringify(t.data):t.data);const b=await fetch(e,i);if(t.expectStatusCode&&b.status!==t.expectStatusCode)throw new r(b.status);const l=n(new Uint8Array(await b.arrayBuffer()),t.type);return t.full?{headers:Object.fromEntries(b.headers.entries()),status:b.status,body:l}:l}const u=!!("object"==typeof process&&process.versions&&process.versions.node&&process.versions.v8);a.default=function(e,a){return(u?b:l)(e,a)}},52244:(e,a,t)=>{var c=t(61158),f=t(15037);function d(e){this.rand=e||new f.Rand}e.exports=d,d.create=function(e){return new d(e)},d.prototype._randbelow=function(e){var a=e.bitLength(),t=Math.ceil(a/8);do{var f=new c(this.rand.generate(t))}while(f.cmp(e)>=0);return f},d.prototype._randrange=function(e,a){var t=a.sub(e);return e.add(this._randbelow(t))},d.prototype.test=function(e,a,t){var f=e.bitLength(),d=c.mont(e),r=new c(1).toRed(d);a||(a=Math.max(1,f/48|0));for(var n=e.subn(1),i=0;!n.testn(i);i++);for(var b=e.shrn(i),o=n.toRed(d);a>0;a--){var s=this._randrange(new c(2),n);t&&t(s);var l=s.toRed(d).redPow(b);if(0!==l.cmp(r)&&0!==l.cmp(o)){for(var u=1;u0;a--){var o=this._randrange(new c(2),r),s=e.gcd(o);if(0!==s.cmpn(1))return s;var l=o.toRed(f).redPow(i);if(0!==l.cmp(d)&&0!==l.cmp(b)){for(var u=1;u=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},43349:e=>{function a(e,a){if(!e)throw new Error(a||"Assertion failed")}e.exports=a,a.equal=function(e,a,t){if(e!=a)throw new Error(t||"Assertion failed: "+e+" != "+a)}},64367:(e,a)=>{"use strict";var t=a;function c(e){return 1===e.length?"0"+e:e}function f(e){for(var a="",t=0;t>8,r=255&f;d?t.push(d,r):t.push(r)}return t},t.zero2=c,t.toHex=f,t.encode=function(e,a){return"hex"===a?f(e):e}},6585:e=>{var a=1e3,t=60*a,c=60*t,f=24*c,d=7*f;function r(e,a,t,c){var f=a>=1.5*t;return Math.round(e/t)+" "+c+(f?"s":"")}e.exports=function(e,n){n=n||{};var i,b,o=typeof e;if("string"===o&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var n=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return n*d;case"days":case"day":case"d":return n*f;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*t;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===o&&isFinite(e))return n.long?(i=e,(b=Math.abs(i))>=f?r(i,b,f,"day"):b>=c?r(i,b,c,"hour"):b>=t?r(i,b,t,"minute"):b>=a?r(i,b,a,"second"):i+" ms"):function(e){var d=Math.abs(e);return d>=f?Math.round(e/f)+"d":d>=c?Math.round(e/c)+"h":d>=t?Math.round(e/t)+"m":d>=a?Math.round(e/a)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},86889:e=>{e.exports=function e(t,c){if(!t){var f=new a(c);throw Error.captureStackTrace&&Error.captureStackTrace(f,e),f}};class a extends Error{}a.prototype.name="AssertionError"},89211:e=>{"use strict";var a=function(e){return e!=e};e.exports=function(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!a(e)||!a(t))}},37653:(e,a,t)=>{"use strict";var c=t(38452),f=t(10487),d=t(89211),r=t(9394),n=t(36576),i=f(r(),Object);c(i,{getPolyfill:r,implementation:d,shim:n}),e.exports=i},9394:(e,a,t)=>{"use strict";var c=t(89211);e.exports=function(){return"function"==typeof Object.is?Object.is:c}},36576:(e,a,t)=>{"use strict";var c=t(9394),f=t(38452);e.exports=function(){var e=c();return f(Object,{is:e},{is:function(){return Object.is!==e}}),e}},28875:(e,a,t)=>{"use strict";var c;if(!Object.keys){var f=Object.prototype.hasOwnProperty,d=Object.prototype.toString,r=t(1093),n=Object.prototype.propertyIsEnumerable,i=!n.call({toString:null},"toString"),b=n.call((function(){}),"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],s=function(e){var a=e.constructor;return a&&a.prototype===e},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!l["$"+e]&&f.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{s(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();c=function(e){var a=null!==e&&"object"==typeof e,t="[object Function]"===d.call(e),c=r(e),n=a&&"[object String]"===d.call(e),l=[];if(!a&&!t&&!c)throw new TypeError("Object.keys called on a non-object");var h=b&&t;if(n&&e.length>0&&!f.call(e,0))for(var p=0;p0)for(var g=0;g{"use strict";var c=Array.prototype.slice,f=t(1093),d=Object.keys,r=d?function(e){return d(e)}:t(28875),n=Object.keys;r.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return f(e)?n(c.call(e)):n(e)})}else Object.keys=r;return Object.keys||r},e.exports=r},1093:e=>{"use strict";var a=Object.prototype.toString;e.exports=function(e){var t=a.call(e),c="[object Arguments]"===t;return c||(c="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===a.call(e.callee)),c}},38403:(e,a,t)=>{"use strict";var c=t(1189),f=t(41333)(),d=t(38075),r=Object,n=d("Array.prototype.push"),i=d("Object.prototype.propertyIsEnumerable"),b=f?Object.getOwnPropertySymbols:null;e.exports=function(e,a){if(null==e)throw new TypeError("target must be an object");var t=r(e);if(1===arguments.length)return t;for(var d=1;d{"use strict";var c=t(38403);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",a=e.split(""),t={},c=0;c{"use strict";var t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function c(e,a){return Object.prototype.hasOwnProperty.call(e,a)}a.assign=function(e){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var t=a.shift();if(t){if("object"!=typeof t)throw new TypeError(t+"must be non-object");for(var f in t)c(t,f)&&(e[f]=t[f])}}return e},a.shrinkBuf=function(e,a){return e.length===a?e:e.subarray?e.subarray(0,a):(e.length=a,e)};var f={arraySet:function(e,a,t,c,f){if(a.subarray&&e.subarray)e.set(a.subarray(t,t+c),f);else for(var d=0;d{"use strict";e.exports=function(e,a,t,c){for(var f=65535&e,d=e>>>16&65535,r=0;0!==t;){t-=r=t>2e3?2e3:t;do{d=d+(f=f+a[c++]|0)|0}while(--r);f%=65521,d%=65521}return f|d<<16}},19681:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},14823:e=>{"use strict";var a=function(){for(var e,a=[],t=0;t<256;t++){e=t;for(var c=0;c<8;c++)e=1&e?3988292384^e>>>1:e>>>1;a[t]=e}return a}();e.exports=function(e,t,c,f){var d=a,r=f+c;e^=-1;for(var n=f;n>>8^d[255&(e^t[n])];return~e}},58411:(e,a,t)=>{"use strict";var c,f=t(9805),d=t(23665),r=t(53269),n=t(14823),i=t(54674),b=-2,o=258,s=262,l=103,u=113,h=666;function p(e,a){return e.msg=i[a],a}function g(e){return(e<<1)-(e>4?9:0)}function m(e){for(var a=e.length;--a>=0;)e[a]=0}function x(e){var a=e.state,t=a.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(f.arraySet(e.output,a.pending_buf,a.pending_out,t,e.next_out),e.next_out+=t,a.pending_out+=t,e.total_out+=t,e.avail_out-=t,a.pending-=t,0===a.pending&&(a.pending_out=0))}function y(e,a){d._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,a),e.block_start=e.strstart,x(e.strm)}function A(e,a){e.pending_buf[e.pending++]=a}function v(e,a){e.pending_buf[e.pending++]=a>>>8&255,e.pending_buf[e.pending++]=255&a}function w(e,a){var t,c,f=e.max_chain_length,d=e.strstart,r=e.prev_length,n=e.nice_match,i=e.strstart>e.w_size-s?e.strstart-(e.w_size-s):0,b=e.window,l=e.w_mask,u=e.prev,h=e.strstart+o,p=b[d+r-1],g=b[d+r];e.prev_length>=e.good_match&&(f>>=2),n>e.lookahead&&(n=e.lookahead);do{if(b[(t=a)+r]===g&&b[t+r-1]===p&&b[t]===b[d]&&b[++t]===b[d+1]){d+=2,t++;do{}while(b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&b[++d]===b[++t]&&dr){if(e.match_start=a,r=c,c>=n)break;p=b[d+r-1],g=b[d+r]}}}while((a=u[a&l])>i&&0!=--f);return r<=e.lookahead?r:e.lookahead}function _(e){var a,t,c,d,i,b,o,l,u,h,p=e.w_size;do{if(d=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-s)){f.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,a=t=e.hash_size;do{c=e.head[--a],e.head[a]=c>=p?c-p:0}while(--t);a=t=p;do{c=e.prev[--a],e.prev[a]=c>=p?c-p:0}while(--t);d+=p}if(0===e.strm.avail_in)break;if(b=e.strm,o=e.window,l=e.strstart+e.lookahead,u=d,h=void 0,(h=b.avail_in)>u&&(h=u),t=0===h?0:(b.avail_in-=h,f.arraySet(o,b.input,b.next_in,h,l),1===b.state.wrap?b.adler=r(b.adler,o,h,l):2===b.state.wrap&&(b.adler=n(b.adler,o,h,l)),b.next_in+=h,b.total_in+=h,h),e.lookahead+=t,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(c=d._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){f=e.strstart+e.lookahead-3,c=d._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=f&&(e.ins_h=(e.ins_h<15&&(n=2,c-=16),d<1||d>9||8!==t||c<8||c>15||a<0||a>9||r<0||r>4)return p(e,b);8===c&&(c=9);var i=new M;return e.state=i,i.strm=e,i.wrap=n,i.gzhead=null,i.w_bits=c,i.w_size=1<e.pending_buf_size-5&&(t=e.pending_buf_size-5);;){if(e.lookahead<=1){if(_(e),0===e.lookahead&&0===a)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var c=e.block_start+t;if((0===e.strstart||e.strstart>=c)&&(e.lookahead=e.strstart-c,e.strstart=c,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-s&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===a?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)})),new C(4,4,8,4,I),new C(4,5,16,8,I),new C(4,6,32,32,I),new C(4,4,16,16,E),new C(8,16,32,32,E),new C(8,16,128,128,E),new C(8,32,128,256,E),new C(32,128,258,1024,E),new C(32,258,258,4096,E)],a.deflateInit=function(e,a){return S(e,a,8,15,8,0)},a.deflateInit2=S,a.deflateReset=L,a.deflateResetKeep=B,a.deflateSetHeader=function(e,a){return e&&e.state?2!==e.state.wrap?b:(e.state.gzhead=a,0):b},a.deflate=function(e,a){var t,f,r,i;if(!e||!e.state||a>5||a<0)return e?p(e,b):b;if(f=e.state,!e.output||!e.input&&0!==e.avail_in||f.status===h&&4!==a)return p(e,0===e.avail_out?-5:b);if(f.strm=e,t=f.last_flush,f.last_flush=a,42===f.status)if(2===f.wrap)e.adler=0,A(f,31),A(f,139),A(f,8),f.gzhead?(A(f,(f.gzhead.text?1:0)+(f.gzhead.hcrc?2:0)+(f.gzhead.extra?4:0)+(f.gzhead.name?8:0)+(f.gzhead.comment?16:0)),A(f,255&f.gzhead.time),A(f,f.gzhead.time>>8&255),A(f,f.gzhead.time>>16&255),A(f,f.gzhead.time>>24&255),A(f,9===f.level?2:f.strategy>=2||f.level<2?4:0),A(f,255&f.gzhead.os),f.gzhead.extra&&f.gzhead.extra.length&&(A(f,255&f.gzhead.extra.length),A(f,f.gzhead.extra.length>>8&255)),f.gzhead.hcrc&&(e.adler=n(e.adler,f.pending_buf,f.pending,0)),f.gzindex=0,f.status=69):(A(f,0),A(f,0),A(f,0),A(f,0),A(f,0),A(f,9===f.level?2:f.strategy>=2||f.level<2?4:0),A(f,3),f.status=u);else{var s=8+(f.w_bits-8<<4)<<8;s|=(f.strategy>=2||f.level<2?0:f.level<6?1:6===f.level?2:3)<<6,0!==f.strstart&&(s|=32),s+=31-s%31,f.status=u,v(f,s),0!==f.strstart&&(v(f,e.adler>>>16),v(f,65535&e.adler)),e.adler=1}if(69===f.status)if(f.gzhead.extra){for(r=f.pending;f.gzindex<(65535&f.gzhead.extra.length)&&(f.pending!==f.pending_buf_size||(f.gzhead.hcrc&&f.pending>r&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),x(e),r=f.pending,f.pending!==f.pending_buf_size));)A(f,255&f.gzhead.extra[f.gzindex]),f.gzindex++;f.gzhead.hcrc&&f.pending>r&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),f.gzindex===f.gzhead.extra.length&&(f.gzindex=0,f.status=73)}else f.status=73;if(73===f.status)if(f.gzhead.name){r=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>r&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),x(e),r=f.pending,f.pending===f.pending_buf_size)){i=1;break}i=f.gzindexr&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),0===i&&(f.gzindex=0,f.status=91)}else f.status=91;if(91===f.status)if(f.gzhead.comment){r=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>r&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),x(e),r=f.pending,f.pending===f.pending_buf_size)){i=1;break}i=f.gzindexr&&(e.adler=n(e.adler,f.pending_buf,f.pending-r,r)),0===i&&(f.status=l)}else f.status=l;if(f.status===l&&(f.gzhead.hcrc?(f.pending+2>f.pending_buf_size&&x(e),f.pending+2<=f.pending_buf_size&&(A(f,255&e.adler),A(f,e.adler>>8&255),e.adler=0,f.status=u)):f.status=u),0!==f.pending){if(x(e),0===e.avail_out)return f.last_flush=-1,0}else if(0===e.avail_in&&g(a)<=g(t)&&4!==a)return p(e,-5);if(f.status===h&&0!==e.avail_in)return p(e,-5);if(0!==e.avail_in||0!==f.lookahead||0!==a&&f.status!==h){var w=2===f.strategy?function(e,a){for(var t;;){if(0===e.lookahead&&(_(e),0===e.lookahead)){if(0===a)return 1;break}if(e.match_length=0,t=d._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===a?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(f,a):3===f.strategy?function(e,a){for(var t,c,f,r,n=e.window;;){if(e.lookahead<=o){if(_(e),e.lookahead<=o&&0===a)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(c=n[f=e.strstart-1])===n[++f]&&c===n[++f]&&c===n[++f]){r=e.strstart+o;do{}while(c===n[++f]&&c===n[++f]&&c===n[++f]&&c===n[++f]&&c===n[++f]&&c===n[++f]&&c===n[++f]&&c===n[++f]&&fe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(t=d._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=d._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===a?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(f,a):c[f.level].func(f,a);if(3!==w&&4!==w||(f.status=h),1===w||3===w)return 0===e.avail_out&&(f.last_flush=-1),0;if(2===w&&(1===a?d._tr_align(f):5!==a&&(d._tr_stored_block(f,0,0,!1),3===a&&(m(f.head),0===f.lookahead&&(f.strstart=0,f.block_start=0,f.insert=0))),x(e),0===e.avail_out))return f.last_flush=-1,0}return 4!==a?0:f.wrap<=0?1:(2===f.wrap?(A(f,255&e.adler),A(f,e.adler>>8&255),A(f,e.adler>>16&255),A(f,e.adler>>24&255),A(f,255&e.total_in),A(f,e.total_in>>8&255),A(f,e.total_in>>16&255),A(f,e.total_in>>24&255)):(v(f,e.adler>>>16),v(f,65535&e.adler)),x(e),f.wrap>0&&(f.wrap=-f.wrap),0!==f.pending?0:1)},a.deflateEnd=function(e){var a;return e&&e.state?42!==(a=e.state.status)&&69!==a&&73!==a&&91!==a&&a!==l&&a!==u&&a!==h?p(e,b):(e.state=null,a===u?p(e,-3):0):b},a.deflateSetDictionary=function(e,a){var t,c,d,n,i,o,s,l,u=a.length;if(!e||!e.state)return b;if(2===(n=(t=e.state).wrap)||1===n&&42!==t.status||t.lookahead)return b;for(1===n&&(e.adler=r(e.adler,a,u,0)),t.wrap=0,u>=t.w_size&&(0===n&&(m(t.head),t.strstart=0,t.block_start=0,t.insert=0),l=new f.Buf8(t.w_size),f.arraySet(l,a,u-t.w_size,t.w_size,0),a=l,u=t.w_size),i=e.avail_in,o=e.next_in,s=e.input,e.avail_in=u,e.next_in=0,e.input=a,_(t);t.lookahead>=3;){c=t.strstart,d=t.lookahead-2;do{t.ins_h=(t.ins_h<{"use strict";e.exports=function(e,a){var t,c,f,d,r,n,i,b,o,s,l,u,h,p,g,m,x,y,A,v,w,_,I,E,C;t=e.state,c=e.next_in,E=e.input,f=c+(e.avail_in-5),d=e.next_out,C=e.output,r=d-(a-e.avail_out),n=d+(e.avail_out-257),i=t.dmax,b=t.wsize,o=t.whave,s=t.wnext,l=t.window,u=t.hold,h=t.bits,p=t.lencode,g=t.distcode,m=(1<>>=A=y>>>24,h-=A,0==(A=y>>>16&255))C[d++]=65535&y;else{if(!(16&A)){if(64&A){if(32&A){t.mode=12;break e}e.msg="invalid literal/length code",t.mode=30;break e}y=p[(65535&y)+(u&(1<>>=A,h-=A),h<15&&(u+=E[c++]<>>=A=y>>>24,h-=A,16&(A=y>>>16&255)){if(w=65535&y,h<(A&=15)&&(u+=E[c++]<i){e.msg="invalid distance too far back",t.mode=30;break e}if(u>>>=A,h-=A,w>(A=d-r)){if((A=w-A)>o&&t.sane){e.msg="invalid distance too far back",t.mode=30;break e}if(_=0,I=l,0===s){if(_+=b-A,A2;)C[d++]=I[_++],C[d++]=I[_++],C[d++]=I[_++],v-=3;v&&(C[d++]=I[_++],v>1&&(C[d++]=I[_++]))}else{_=d-w;do{C[d++]=C[_++],C[d++]=C[_++],C[d++]=C[_++],v-=3}while(v>2);v&&(C[d++]=C[_++],v>1&&(C[d++]=C[_++]))}break}if(64&A){e.msg="invalid distance code",t.mode=30;break e}y=g[(65535&y)+(u&(1<>3,u&=(1<<(h-=v<<3))-1,e.next_in=c,e.next_out=d,e.avail_in=c{"use strict";var c=t(9805),f=t(53269),d=t(14823),r=t(47293),n=t(21998),i=-2,b=12,o=30;function s(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function l(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new c.Buf16(320),this.work=new c.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var a;return e&&e.state?(a=e.state,e.total_in=e.total_out=a.total=0,e.msg="",a.wrap&&(e.adler=1&a.wrap),a.mode=1,a.last=0,a.havedict=0,a.dmax=32768,a.head=null,a.hold=0,a.bits=0,a.lencode=a.lendyn=new c.Buf32(852),a.distcode=a.distdyn=new c.Buf32(592),a.sane=1,a.back=-1,0):i}function h(e){var a;return e&&e.state?((a=e.state).wsize=0,a.whave=0,a.wnext=0,u(e)):i}function p(e,a){var t,c;return e&&e.state?(c=e.state,a<0?(t=0,a=-a):(t=1+(a>>4),a<48&&(a&=15)),a&&(a<8||a>15)?i:(null!==c.window&&c.wbits!==a&&(c.window=null),c.wrap=t,c.wbits=a,h(e))):i}function g(e,a){var t,c;return e?(c=new l,e.state=c,c.window=null,0!==(t=p(e,a))&&(e.state=null),t):i}var m,x,y=!0;function A(e){if(y){var a;for(m=new c.Buf32(512),x=new c.Buf32(32),a=0;a<144;)e.lens[a++]=8;for(;a<256;)e.lens[a++]=9;for(;a<280;)e.lens[a++]=7;for(;a<288;)e.lens[a++]=8;for(n(1,e.lens,0,288,m,0,e.work,{bits:9}),a=0;a<32;)e.lens[a++]=5;n(2,e.lens,0,32,x,0,e.work,{bits:5}),y=!1}e.lencode=m,e.lenbits=9,e.distcode=x,e.distbits=5}function v(e,a,t,f){var d,r=e.state;return null===r.window&&(r.wsize=1<=r.wsize?(c.arraySet(r.window,a,t-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):((d=r.wsize-r.wnext)>f&&(d=f),c.arraySet(r.window,a,t-f,d,r.wnext),(f-=d)?(c.arraySet(r.window,a,t-f,f,0),r.wnext=f,r.whave=r.wsize):(r.wnext+=d,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,t.check=d(t.check,F,2,0),x=0,y=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&x)<<8)+(x>>8))%31){e.msg="incorrect header check",t.mode=o;break}if(8!=(15&x)){e.msg="unknown compression method",t.mode=o;break}if(y-=4,P=8+(15&(x>>>=4)),0===t.wbits)t.wbits=P;else if(P>t.wbits){e.msg="invalid window size",t.mode=o;break}t.dmax=1<>8&1),512&t.flags&&(F[0]=255&x,F[1]=x>>>8&255,t.check=d(t.check,F,2,0)),x=0,y=0,t.mode=3;case 3:for(;y<32;){if(0===g)break e;g--,x+=l[h++]<>>8&255,F[2]=x>>>16&255,F[3]=x>>>24&255,t.check=d(t.check,F,4,0)),x=0,y=0,t.mode=4;case 4:for(;y<16;){if(0===g)break e;g--,x+=l[h++]<>8),512&t.flags&&(F[0]=255&x,F[1]=x>>>8&255,t.check=d(t.check,F,2,0)),x=0,y=0,t.mode=5;case 5:if(1024&t.flags){for(;y<16;){if(0===g)break e;g--,x+=l[h++]<>>8&255,t.check=d(t.check,F,2,0)),x=0,y=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&((I=t.length)>g&&(I=g),I&&(t.head&&(P=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),c.arraySet(t.head.extra,l,h,I,P)),512&t.flags&&(t.check=d(t.check,l,I,h)),g-=I,h+=I,t.length-=I),t.length))break e;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(0===g)break e;I=0;do{P=l[h+I++],t.head&&P&&t.length<65536&&(t.head.name+=String.fromCharCode(P))}while(P&&I>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=b;break;case 10:for(;y<32;){if(0===g)break e;g--,x+=l[h++]<>>=7&y,y-=7&y,t.mode=27;break}for(;y<3;){if(0===g)break e;g--,x+=l[h++]<>>=1)){case 0:t.mode=14;break;case 1:if(A(t),t.mode=20,6===a){x>>>=2,y-=2;break e}break;case 2:t.mode=17;break;case 3:e.msg="invalid block type",t.mode=o}x>>>=2,y-=2;break;case 14:for(x>>>=7&y,y-=7&y;y<32;){if(0===g)break e;g--,x+=l[h++]<>>16^65535)){e.msg="invalid stored block lengths",t.mode=o;break}if(t.length=65535&x,x=0,y=0,t.mode=15,6===a)break e;case 15:t.mode=16;case 16:if(I=t.length){if(I>g&&(I=g),I>m&&(I=m),0===I)break e;c.arraySet(u,l,h,I,p),g-=I,h+=I,m-=I,p+=I,t.length-=I;break}t.mode=b;break;case 17:for(;y<14;){if(0===g)break e;g--,x+=l[h++]<>>=5,y-=5,t.ndist=1+(31&x),x>>>=5,y-=5,t.ncode=4+(15&x),x>>>=4,y-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=o;break}t.have=0,t.mode=18;case 18:for(;t.have>>=3,y-=3}for(;t.have<19;)t.lens[Q[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,O={bits:t.lenbits},R=n(0,t.lens,0,19,t.lencode,0,t.work,O),t.lenbits=O.bits,R){e.msg="invalid code lengths set",t.mode=o;break}t.have=0,t.mode=19;case 19:for(;t.have>>16&255,L=65535&T,!((M=T>>>24)<=y);){if(0===g)break e;g--,x+=l[h++]<>>=M,y-=M,t.lens[t.have++]=L;else{if(16===L){for(D=M+2;y>>=M,y-=M,0===t.have){e.msg="invalid bit length repeat",t.mode=o;break}P=t.lens[t.have-1],I=3+(3&x),x>>>=2,y-=2}else if(17===L){for(D=M+3;y>>=M)),x>>>=3,y-=3}else{for(D=M+7;y>>=M)),x>>>=7,y-=7}if(t.have+I>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=o;break}for(;I--;)t.lens[t.have++]=P}}if(t.mode===o)break;if(0===t.lens[256]){e.msg="invalid code -- missing end-of-block",t.mode=o;break}if(t.lenbits=9,O={bits:t.lenbits},R=n(1,t.lens,0,t.nlen,t.lencode,0,t.work,O),t.lenbits=O.bits,R){e.msg="invalid literal/lengths set",t.mode=o;break}if(t.distbits=6,t.distcode=t.distdyn,O={bits:t.distbits},R=n(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,O),t.distbits=O.bits,R){e.msg="invalid distances set",t.mode=o;break}if(t.mode=20,6===a)break e;case 20:t.mode=21;case 21:if(g>=6&&m>=258){e.next_out=p,e.avail_out=m,e.next_in=h,e.avail_in=g,t.hold=x,t.bits=y,r(e,_),p=e.next_out,u=e.output,m=e.avail_out,h=e.next_in,l=e.input,g=e.avail_in,x=t.hold,y=t.bits,t.mode===b&&(t.back=-1);break}for(t.back=0;B=(T=t.lencode[x&(1<>>16&255,L=65535&T,!((M=T>>>24)<=y);){if(0===g)break e;g--,x+=l[h++]<>S)])>>>16&255,L=65535&T,!(S+(M=T>>>24)<=y);){if(0===g)break e;g--,x+=l[h++]<>>=S,y-=S,t.back+=S}if(x>>>=M,y-=M,t.back+=M,t.length=L,0===B){t.mode=26;break}if(32&B){t.back=-1,t.mode=b;break}if(64&B){e.msg="invalid literal/length code",t.mode=o;break}t.extra=15&B,t.mode=22;case 22:if(t.extra){for(D=t.extra;y>>=t.extra,y-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;B=(T=t.distcode[x&(1<>>16&255,L=65535&T,!((M=T>>>24)<=y);){if(0===g)break e;g--,x+=l[h++]<>S)])>>>16&255,L=65535&T,!(S+(M=T>>>24)<=y);){if(0===g)break e;g--,x+=l[h++]<>>=S,y-=S,t.back+=S}if(x>>>=M,y-=M,t.back+=M,64&B){e.msg="invalid distance code",t.mode=o;break}t.offset=L,t.extra=15&B,t.mode=24;case 24:if(t.extra){for(D=t.extra;y>>=t.extra,y-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=o;break}t.mode=25;case 25:if(0===m)break e;if(I=_-m,t.offset>I){if((I=t.offset-I)>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=o;break}I>t.wnext?(I-=t.wnext,E=t.wsize-I):E=t.wnext-I,I>t.length&&(I=t.length),C=t.window}else C=u,E=p-t.offset,I=t.length;I>m&&(I=m),m-=I,t.length-=I;do{u[p++]=C[E++]}while(--I);0===t.length&&(t.mode=21);break;case 26:if(0===m)break e;u[p++]=t.length,m--,t.mode=21;break;case 27:if(t.wrap){for(;y<32;){if(0===g)break e;g--,x|=l[h++]<{"use strict";var c=t(9805),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,a,t,i,b,o,s,l){var u,h,p,g,m,x,y,A,v,w=l.bits,_=0,I=0,E=0,C=0,M=0,B=0,L=0,S=0,k=0,N=0,P=null,R=0,O=new c.Buf16(16),D=new c.Buf16(16),T=null,F=0;for(_=0;_<=15;_++)O[_]=0;for(I=0;I=1&&0===O[C];C--);if(M>C&&(M=C),0===C)return b[o++]=20971520,b[o++]=20971520,l.bits=1,0;for(E=1;E0&&(0===e||1!==C))return-1;for(D[1]=0,_=1;_<15;_++)D[_+1]=D[_]+O[_];for(I=0;I852||2===e&&k>592)return 1;for(;;){y=_-L,s[I]x?(A=T[F+s[I]],v=P[R+s[I]]):(A=96,v=0),u=1<<_-L,E=h=1<>L)+(h-=u)]=y<<24|A<<16|v}while(0!==h);for(u=1<<_-1;N&u;)u>>=1;if(0!==u?(N&=u-1,N+=u):N=0,I++,0==--O[_]){if(_===C)break;_=a[t+s[I]]}if(_>M&&(N&g)!==p){for(0===L&&(L=M),m+=E,S=1<<(B=_-L);B+L852||2===e&&k>592)return 1;b[p=N&g]=M<<24|B<<16|m-o}}return 0!==N&&(b[m+N]=_-L<<24|64<<16),l.bits=M,0}},54674:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},23665:(e,a,t)=>{"use strict";var c=t(9805);function f(e){for(var a=e.length;--a>=0;)e[a]=0}var d=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],r=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],i=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],b=new Array(576);f(b);var o=new Array(60);f(o);var s=new Array(512);f(s);var l=new Array(256);f(l);var u=new Array(29);f(u);var h,p,g,m=new Array(30);function x(e,a,t,c,f){this.static_tree=e,this.extra_bits=a,this.extra_base=t,this.elems=c,this.max_length=f,this.has_stree=e&&e.length}function y(e,a){this.dyn_tree=e,this.max_code=0,this.stat_desc=a}function A(e){return e<256?s[e]:s[256+(e>>>7)]}function v(e,a){e.pending_buf[e.pending++]=255&a,e.pending_buf[e.pending++]=a>>>8&255}function w(e,a,t){e.bi_valid>16-t?(e.bi_buf|=a<>16-e.bi_valid,e.bi_valid+=t-16):(e.bi_buf|=a<>>=1,t<<=1}while(--a>0);return t>>>1}function E(e,a,t){var c,f,d=new Array(16),r=0;for(c=1;c<=15;c++)d[c]=r=r+t[c-1]<<1;for(f=0;f<=a;f++){var n=e[2*f+1];0!==n&&(e[2*f]=I(d[n]++,n))}}function C(e){var a;for(a=0;a<286;a++)e.dyn_ltree[2*a]=0;for(a=0;a<30;a++)e.dyn_dtree[2*a]=0;for(a=0;a<19;a++)e.bl_tree[2*a]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function M(e){e.bi_valid>8?v(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function B(e,a,t,c){var f=2*a,d=2*t;return e[f]>1;t>=1;t--)L(e,d,t);f=i;do{t=e.heap[1],e.heap[1]=e.heap[e.heap_len--],L(e,d,1),c=e.heap[1],e.heap[--e.heap_max]=t,e.heap[--e.heap_max]=c,d[2*f]=d[2*t]+d[2*c],e.depth[f]=(e.depth[t]>=e.depth[c]?e.depth[t]:e.depth[c])+1,d[2*t+1]=d[2*c+1]=f,e.heap[1]=f++,L(e,d,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,a){var t,c,f,d,r,n,i=a.dyn_tree,b=a.max_code,o=a.stat_desc.static_tree,s=a.stat_desc.has_stree,l=a.stat_desc.extra_bits,u=a.stat_desc.extra_base,h=a.stat_desc.max_length,p=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(i[2*e.heap[e.heap_max]+1]=0,t=e.heap_max+1;t<573;t++)(d=i[2*i[2*(c=e.heap[t])+1]+1]+1)>h&&(d=h,p++),i[2*c+1]=d,c>b||(e.bl_count[d]++,r=0,c>=u&&(r=l[c-u]),n=i[2*c],e.opt_len+=n*(d+r),s&&(e.static_len+=n*(o[2*c+1]+r)));if(0!==p){do{for(d=h-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[h]--,p-=2}while(p>0);for(d=h;0!==d;d--)for(c=e.bl_count[d];0!==c;)(f=e.heap[--t])>b||(i[2*f+1]!==d&&(e.opt_len+=(d-i[2*f+1])*i[2*f],i[2*f+1]=d),c--)}}(e,a),E(d,b,e.bl_count)}function N(e,a,t){var c,f,d=-1,r=a[1],n=0,i=7,b=4;for(0===r&&(i=138,b=3),a[2*(t+1)+1]=65535,c=0;c<=t;c++)f=r,r=a[2*(c+1)+1],++n>=7;c<30;c++)for(m[c]=f<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var a,t=4093624447;for(a=0;a<=31;a++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*a])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(a=32;a<256;a++)if(0!==e.dyn_ltree[2*a])return 1;return 0}(e)),k(e,e.l_desc),k(e,e.d_desc),r=function(e){var a;for(N(e,e.dyn_ltree,e.l_desc.max_code),N(e,e.dyn_dtree,e.d_desc.max_code),k(e,e.bl_desc),a=18;a>=3&&0===e.bl_tree[2*i[a]+1];a--);return e.opt_len+=3*(a+1)+5+5+4,a}(e),f=e.opt_len+3+7>>>3,(d=e.static_len+3+7>>>3)<=f&&(f=d)):f=d=t+5,t+4<=f&&-1!==a?O(e,a,t,c):4===e.strategy||d===f?(w(e,2+(c?1:0),3),S(e,b,o)):(w(e,4+(c?1:0),3),function(e,a,t,c){var f;for(w(e,a-257,5),w(e,t-1,5),w(e,c-4,4),f=0;f>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&a,e.pending_buf[e.l_buf+e.last_lit]=255&t,e.last_lit++,0===a?e.dyn_ltree[2*t]++:(e.matches++,a--,e.dyn_ltree[2*(l[t]+256+1)]++,e.dyn_dtree[2*A(a)]++),e.last_lit===e.lit_bufsize-1},a._tr_align=function(e){w(e,2,3),_(e,256,b),function(e){16===e.bi_valid?(v(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},44442:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},21137:(e,a,t)=>{"use strict";var c=t(87568);a.certificate=t(36413);var f=c.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));a.RSAPrivateKey=f;var d=c.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));a.RSAPublicKey=d;var r=c.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),n=c.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(r),this.key("subjectPublicKey").bitstr())}));a.PublicKey=n;var i=c.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(r),this.key("subjectPrivateKey").octstr())}));a.PrivateKey=i;var b=c.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));a.EncryptedPrivateKey=b;var o=c.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));a.DSAPrivateKey=o,a.DSAparam=c.define("DSAparam",(function(){this.int()}));var s=c.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),l=c.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(s),this.key("publicKey").optional().explicit(1).bitstr())}));a.ECPrivateKey=l,a.signature=c.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},36413:(e,a,t)=>{"use strict";var c=t(87568),f=c.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),d=c.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),r=c.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),n=c.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(r),this.key("subjectPublicKey").bitstr())})),i=c.define("RelativeDistinguishedName",(function(){this.setof(d)})),b=c.define("RDNSequence",(function(){this.seqof(i)})),o=c.define("Name",(function(){this.choice({rdnSequence:this.use(b)})})),s=c.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(f),this.key("notAfter").use(f))})),l=c.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),u=c.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(r),this.key("issuer").use(o),this.key("validity").use(s),this.key("subject").use(o),this.key("subjectPublicKeyInfo").use(n),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),h=c.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(u),this.key("signatureAlgorithm").use(r),this.key("signatureValue").bitstr())}));e.exports=h},24101:(e,a,t)=>{"use strict";var c=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,f=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,d=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,r=t(68078),n=t(1241),i=t(92861).Buffer;e.exports=function(e,a){var t,b=e.toString(),o=b.match(c);if(o){var s="aes"+o[1],l=i.from(o[2],"hex"),u=i.from(o[3].replace(/[\r\n]/g,""),"base64"),h=r(a,l.slice(0,8),parseInt(o[1],10)).key,p=[],g=n.createDecipheriv(s,h,l);p.push(g.update(u)),p.push(g.final()),t=i.concat(p)}else{var m=b.match(d);t=i.from(m[2].replace(/[\r\n]/g,""),"base64")}return{tag:b.match(f)[1],data:t}}},78170:(e,a,t)=>{"use strict";var c=t(21137),f=t(15579),d=t(24101),r=t(1241),n=t(78396),i=t(92861).Buffer;function b(e){var a;"object"!=typeof e||i.isBuffer(e)||(a=e.passphrase,e=e.key),"string"==typeof e&&(e=i.from(e));var t,b,o=d(e,a),s=o.tag,l=o.data;switch(s){case"CERTIFICATE":b=c.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(b||(b=c.PublicKey.decode(l,"der")),t=b.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return c.RSAPublicKey.decode(b.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return b.subjectPrivateKey=b.subjectPublicKey,{type:"ec",data:b};case"1.2.840.10040.4.1":return b.algorithm.params.pub_key=c.DSAparam.decode(b.subjectPublicKey.data,"der"),{type:"dsa",data:b.algorithm.params};default:throw new Error("unknown key id "+t)}case"ENCRYPTED PRIVATE KEY":l=function(e,a){var t=e.algorithm.decrypt.kde.kdeparams.salt,c=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),d=f[e.algorithm.decrypt.cipher.algo.join(".")],b=e.algorithm.decrypt.cipher.iv,o=e.subjectPrivateKey,s=parseInt(d.split("-")[1],10)/8,l=n.pbkdf2Sync(a,t,c,s,"sha1"),u=r.createDecipheriv(d,l,b),h=[];return h.push(u.update(o)),h.push(u.final()),i.concat(h)}(l=c.EncryptedPrivateKey.decode(l,"der"),a);case"PRIVATE KEY":switch(t=(b=c.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return c.RSAPrivateKey.decode(b.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:b.algorithm.curve,privateKey:c.ECPrivateKey.decode(b.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return b.algorithm.params.priv_key=c.DSAparam.decode(b.subjectPrivateKey,"der"),{type:"dsa",params:b.algorithm.params};default:throw new Error("unknown key id "+t)}case"RSA PUBLIC KEY":return c.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return c.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:c.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=c.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+s)}}b.signature=c.signature,e.exports=b},78396:(e,a,t)=>{a.pbkdf2=t(43832),a.pbkdf2Sync=t(21352)},43832:(e,a,t)=>{var c,f,d=t(92861).Buffer,r=t(64196),n=t(2455),i=t(21352),b=t(93382),o=t.g.crypto&&t.g.crypto.subtle,s={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];function u(){return f||(f=t.g.process&&t.g.process.nextTick?t.g.process.nextTick:t.g.queueMicrotask?t.g.queueMicrotask:t.g.setImmediate?t.g.setImmediate:t.g.setTimeout)}function h(e,a,t,c,f){return o.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return o.deriveBits({name:"PBKDF2",salt:a,iterations:t,hash:{name:f}},e,c<<3)})).then((function(e){return d.from(e)}))}e.exports=function(e,a,f,p,g,m){"function"==typeof g&&(m=g,g=void 0);var x=s[(g=g||"sha1").toLowerCase()];if(x&&"function"==typeof t.g.Promise){if(r(f,p),e=b(e,n,"Password"),a=b(a,n,"Salt"),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");!function(e,a){e.then((function(e){u()((function(){a(null,e)}))}),(function(e){u()((function(){a(e)}))}))}(function(e){if(t.g.process&&!t.g.process.browser)return Promise.resolve(!1);if(!o||!o.importKey||!o.deriveBits)return Promise.resolve(!1);if(void 0!==l[e])return l[e];var a=h(c=c||d.alloc(8),c,10,128,e).then((function(){return!0})).catch((function(){return!1}));return l[e]=a,a}(x).then((function(t){return t?h(e,a,f,p,x):i(e,a,f,p,g)})),m)}else u()((function(){var t;try{t=i(e,a,f,p,g)}catch(e){return m(e)}m(null,t)}))}},2455:(e,a,t)=>{var c;c=t.g.process&&t.g.process.browser?"utf-8":t.g.process&&t.g.process.version?parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=c},64196:e=>{var a=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>a||t!=t)throw new TypeError("Bad key length")}},21352:(e,a,t)=>{var c=t(20320),f=t(66011),d=t(62802),r=t(92861).Buffer,n=t(64196),i=t(2455),b=t(93382),o=r.alloc(128),s={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,a,t){var n=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new f).update(e).digest()}:"md5"===e?c:function(a){return d(e).update(a).digest()}}(e),i="sha512"===e||"sha384"===e?128:64;a.length>i?a=n(a):a.length{var c=t(92861).Buffer;e.exports=function(e,a,t){if(c.isBuffer(e))return e;if("string"==typeof e)return c.from(e,a);if(ArrayBuffer.isView(e))return c.from(e.buffer);throw new TypeError(t+" must be a string, a Buffer, a typed array or a DataView")}},71843:(e,a,t)=>{"use strict";const{ErrorWithCause:c}=t(75832),{findCauseByReference:f,getErrorCause:d,messageWithCauses:r,stackWithCauses:n}=t(94306);e.exports={ErrorWithCause:c,findCauseByReference:f,getErrorCause:d,stackWithCauses:n,messageWithCauses:r}},75832:e=>{"use strict";class a extends Error{constructor(e,{cause:t}={}){super(e),this.name=a.name,t&&(this.cause=t),this.message=e}}e.exports={ErrorWithCause:a}},94306:e=>{"use strict";const a=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"==typeof e.cause){const a=e.cause();return a instanceof Error?a:void 0}return e.cause instanceof Error?e.cause:void 0}},t=(e,c)=>{if(!(e instanceof Error))return"";const f=e.stack||"";if(c.has(e))return f+"\ncauses have become circular...";const d=a(e);return d?(c.add(e),f+"\ncaused by: "+t(d,c)):f},c=(e,t,f)=>{if(!(e instanceof Error))return"";const d=f?"":e.message||"";if(t.has(e))return d+": ...";const r=a(e);if(r){t.add(e);const a="cause"in e&&"function"==typeof e.cause;return d+(a?"":": ")+c(r,t,a)}return d};e.exports={findCauseByReference:(e,t)=>{if(!e||!t)return;if(!(e instanceof Error))return;if(!(t.prototype instanceof Error)&&t!==Error)return;const c=new Set;let f=e;for(;f&&!c.has(f);){if(c.add(f),f instanceof t)return f;f=a(f)}},getErrorCause:a,stackWithCauses:e=>t(e,new Set),messageWithCauses:e=>c(e,new Set)}},76578:e=>{"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},33225:e=>{"use strict";"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?e.exports={nextTick:function(e,a,t,c){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var f,d,r=arguments.length;switch(r){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,a)}));case 3:return process.nextTick((function(){e.call(null,a,t)}));case 4:return process.nextTick((function(){e.call(null,a,t,c)}));default:for(f=new Array(r-1),d=0;d{a.publicEncrypt=t(28902),a.privateDecrypt=t(77362),a.privateEncrypt=function(e,t){return a.publicEncrypt(e,t,!0)},a.publicDecrypt=function(e,t){return a.privateDecrypt(e,t,!0)}},48206:(e,a,t)=>{var c=t(47108),f=t(92861).Buffer;function d(e){var a=f.allocUnsafe(4);return a.writeUInt32BE(e,0),a}e.exports=function(e,a){for(var t,r=f.alloc(0),n=0;r.length=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};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"],s=[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],l=[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];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(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)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},77362:(e,a,t)=>{var c=t(78170),f=t(48206),d=t(52061),r=t(82509),n=t(67332),i=t(47108),b=t(99247),o=t(92861).Buffer;e.exports=function(e,a,t){var s;s=e.padding?e.padding:t?1:4;var l,u=c(e),h=u.modulus.byteLength();if(a.length>h||new r(a).cmp(u.modulus)>=0)throw new Error("decryption error");l=t?b(new r(a),u):n(a,u);var p=o.alloc(h-l.length);if(l=o.concat([p,l],h),4===s)return function(e,a){var t=e.modulus.byteLength(),c=i("sha1").update(o.alloc(0)).digest(),r=c.length;if(0!==a[0])throw new Error("decryption error");var n=a.slice(1,r+1),b=a.slice(r+1),s=d(n,f(b,r)),l=d(b,f(s,t-r-1));if(function(e,a){e=o.from(e),a=o.from(a);var t=0,c=e.length;e.length!==a.length&&(t++,c=Math.min(e.length,a.length));for(var f=-1;++f=a.length){d++;break}var r=a.slice(2,f-1);if(("0002"!==c.toString("hex")&&!t||"0001"!==c.toString("hex")&&t)&&d++,r.length<8&&d++,d)throw new Error("decryption error");return a.slice(f)}(0,l,t);if(3===s)return l;throw new Error("unknown padding")}},28902:(e,a,t)=>{var c=t(78170),f=t(53209),d=t(47108),r=t(48206),n=t(52061),i=t(82509),b=t(99247),o=t(67332),s=t(92861).Buffer;e.exports=function(e,a,t){var l;l=e.padding?e.padding:t?1:4;var u,h=c(e);if(4===l)u=function(e,a){var t=e.modulus.byteLength(),c=a.length,b=d("sha1").update(s.alloc(0)).digest(),o=b.length,l=2*o;if(c>t-l-2)throw new Error("message too long");var u=s.alloc(t-c-l-2),h=t-o-1,p=f(o),g=n(s.concat([b,u,s.alloc(1,1),a],h),r(p,h)),m=n(p,r(g,o));return new i(s.concat([s.alloc(1),m,g],t))}(h,a);else if(1===l)u=function(e,a,t){var c,d=a.length,r=e.modulus.byteLength();if(d>r-11)throw new Error("message too long");return c=t?s.alloc(r-d-3,255):function(e){for(var a,t=s.allocUnsafe(e),c=0,d=f(2*e),r=0;c=0)throw new Error("data too long for modulus")}return t?o(u,h):b(u,h)}},99247:(e,a,t)=>{var c=t(82509),f=t(92861).Buffer;e.exports=function(e,a){return f.from(e.toRed(c.mont(a.modulus)).redPow(new c(a.publicExponent)).fromRed().toArray())}},52061:e=>{e.exports=function(e,a){for(var t=e.length,c=-1;++c{"use strict";var c=65536,f=t(92861).Buffer,d=t.g.crypto||t.g.msCrypto;d&&d.getRandomValues?e.exports=function(e,a){if(e>4294967295)throw new RangeError("requested too many random bytes");var t=f.allocUnsafe(e);if(e>0)if(e>c)for(var r=0;r{"use strict";function c(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var f=t(92861),d=t(53209),r=f.Buffer,n=f.kMaxLength,i=t.g.crypto||t.g.msCrypto,b=Math.pow(2,32)-1;function o(e,a){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>b||e<0)throw new TypeError("offset must be a uint32");if(e>n||e>a)throw new RangeError("offset out of range")}function s(e,a,t){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>b||e<0)throw new TypeError("size must be a uint32");if(e+a>t||e>n)throw new RangeError("buffer too small")}function l(e,a,t,c){if(process.browser){var f=e.buffer,r=new Uint8Array(f,a,t);return i.getRandomValues(r),c?void process.nextTick((function(){c(null,e)})):e}if(!c)return d(t).copy(e,a),e;d(t,(function(t,f){if(t)return c(t);f.copy(e,a),c(null,e)}))}i&&i.getRandomValues||!process.browser?(a.randomFill=function(e,a,c,f){if(!(r.isBuffer(e)||e instanceof t.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof a)f=a,a=0,c=e.length;else if("function"==typeof c)f=c,c=e.length-a;else if("function"!=typeof f)throw new TypeError('"cb" argument must be a function');return o(a,e.length),s(c,a,e.length),l(e,a,c,f)},a.randomFillSync=function(e,a,c){if(void 0===a&&(a=0),!(r.isBuffer(e)||e instanceof t.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return o(a,e.length),void 0===c&&(c=e.length-a),s(c,a,e.length),l(e,a,c)}):(a.randomFill=c,a.randomFillSync=c)},86048:e=>{"use strict";var a={};function t(e,t,c){c||(c=Error);var f=function(e){var a,c;function f(a,c,f){return e.call(this,function(e,a,c){return"string"==typeof t?t:t(e,a,c)}(a,c,f))||this}return c=e,(a=f).prototype=Object.create(c.prototype),a.prototype.constructor=a,a.__proto__=c,f}(c);f.prototype.name=c.name,f.prototype.code=e,a[e]=f}function c(e,a){if(Array.isArray(e)){var t=e.length;return e=e.map((function(e){return String(e)})),t>2?"one of ".concat(a," ").concat(e.slice(0,t-1).join(", "),", or ")+e[t-1]:2===t?"one of ".concat(a," ").concat(e[0]," or ").concat(e[1]):"of ".concat(a," ").concat(e[0])}return"of ".concat(a," ").concat(String(e))}t("ERR_INVALID_OPT_VALUE",(function(e,a){return'The value "'+a+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,a,t){var f,d,r,n,i;if("string"==typeof a&&(d="not ",a.substr(0,4)===d)?(f="must not be",a=a.replace(/^not /,"")):f="must be",function(e,a,t){return(void 0===t||t>e.length)&&(t=e.length),e.substring(t-9,t)===a}(e," argument"))r="The ".concat(e," ").concat(f," ").concat(c(a,"type"));else{var b=("number"!=typeof i&&(i=0),i+1>(n=e).length||-1===n.indexOf(".",i)?"argument":"property");r='The "'.concat(e,'" ').concat(b," ").concat(f," ").concat(c(a,"type"))}return r+". Received type ".concat(typeof t)}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=a},25382:(e,a,t)=>{"use strict";var c=Object.keys||function(e){var a=[];for(var t in e)a.push(t);return a};e.exports=b;var f=t(45412),d=t(16708);t(56698)(b,f);for(var r=c(d.prototype),n=0;n{"use strict";e.exports=f;var c=t(74610);function f(e){if(!(this instanceof f))return new f(e);c.call(this,e)}t(56698)(f,c),f.prototype._transform=function(e,a,t){t(null,e)}},45412:(e,a,t)=>{"use strict";var c;e.exports=I,I.ReadableState=_,t(37007).EventEmitter;var f,d=function(e,a){return e.listeners(a).length},r=t(40345),n=t(48287).Buffer,i=(void 0!==t.g?t.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},b=t(79838);f=b&&b.debuglog?b.debuglog("stream"):function(){};var o,s,l,u=t(80345),h=t(75896),p=t(65291).getHighWaterMark,g=t(86048).F,m=g.ERR_INVALID_ARG_TYPE,x=g.ERR_STREAM_PUSH_AFTER_EOF,y=g.ERR_METHOD_NOT_IMPLEMENTED,A=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;t(56698)(I,r);var v=h.errorOrDestroy,w=["error","close","destroy","pause","resume"];function _(e,a,f){c=c||t(25382),e=e||{},"boolean"!=typeof f&&(f=a instanceof c),this.objectMode=!!e.objectMode,f&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,"readableHighWaterMark",f),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o||(o=t(83141).I),this.decoder=new o(e.encoding),this.encoding=e.encoding)}function I(e){if(c=c||t(25382),!(this instanceof I))return new I(e);var a=this instanceof c;this._readableState=new _(e,this,a),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),r.call(this)}function E(e,a,t,c,d){f("readableAddChunk",a);var r,b=e._readableState;if(null===a)b.reading=!1,function(e,a){if(f("onEofChunk"),!a.ended){if(a.decoder){var t=a.decoder.end();t&&t.length&&(a.buffer.push(t),a.length+=a.objectMode?1:t.length)}a.ended=!0,a.sync?L(e):(a.needReadable=!1,a.emittedReadable||(a.emittedReadable=!0,S(e)))}}(e,b);else if(d||(r=function(e,a){var t,c;return c=a,n.isBuffer(c)||c instanceof i||"string"==typeof a||void 0===a||e.objectMode||(t=new m("chunk",["string","Buffer","Uint8Array"],a)),t}(b,a)),r)v(e,r);else if(b.objectMode||a&&a.length>0)if("string"==typeof a||b.objectMode||Object.getPrototypeOf(a)===n.prototype||(a=function(e){return n.from(e)}(a)),c)b.endEmitted?v(e,new A):C(e,b,a,!0);else if(b.ended)v(e,new x);else{if(b.destroyed)return!1;b.reading=!1,b.decoder&&!t?(a=b.decoder.write(a),b.objectMode||0!==a.length?C(e,b,a,!1):k(e,b)):C(e,b,a,!1)}else c||(b.reading=!1,k(e,b));return!b.ended&&(b.lengtha.highWaterMark&&(a.highWaterMark=function(e){return e>=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=a.length?e:a.ended?a.length:(a.needReadable=!0,0))}function L(e){var a=e._readableState;f("emitReadable",a.needReadable,a.emittedReadable),a.needReadable=!1,a.emittedReadable||(f("emitReadable",a.flowing),a.emittedReadable=!0,process.nextTick(S,e))}function S(e){var a=e._readableState;f("emitReadable_",a.destroyed,a.length,a.ended),a.destroyed||!a.length&&!a.ended||(e.emit("readable"),a.emittedReadable=!1),a.needReadable=!a.flowing&&!a.ended&&a.length<=a.highWaterMark,D(e)}function k(e,a){a.readingMore||(a.readingMore=!0,process.nextTick(N,e,a))}function N(e,a){for(;!a.reading&&!a.ended&&(a.length0,a.resumeScheduled&&!a.paused?a.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){f("readable nexttick read 0"),e.read(0)}function O(e,a){f("resume",a.reading),a.reading||e.read(0),a.resumeScheduled=!1,e.emit("resume"),D(e),a.flowing&&!a.reading&&e.read(0)}function D(e){var a=e._readableState;for(f("flow",a.flowing);a.flowing&&null!==e.read(););}function T(e,a){return 0===a.length?null:(a.objectMode?t=a.buffer.shift():!e||e>=a.length?(t=a.decoder?a.buffer.join(""):1===a.buffer.length?a.buffer.first():a.buffer.concat(a.length),a.buffer.clear()):t=a.buffer.consume(e,a.decoder),t);var t}function F(e){var a=e._readableState;f("endReadable",a.endEmitted),a.endEmitted||(a.ended=!0,process.nextTick(Q,a,e))}function Q(e,a){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,a.readable=!1,a.emit("end"),e.autoDestroy)){var t=a._writableState;(!t||t.autoDestroy&&t.finished)&&a.destroy()}}function U(e,a){for(var t=0,c=e.length;t=a.highWaterMark:a.length>0)||a.ended))return f("read: emitReadable",a.length,a.ended),0===a.length&&a.ended?F(this):L(this),null;if(0===(e=B(e,a))&&a.ended)return 0===a.length&&F(this),null;var c,d=a.needReadable;return f("need readable",d),(0===a.length||a.length-e0?T(e,a):null)?(a.needReadable=a.length<=a.highWaterMark,e=0):(a.length-=e,a.awaitDrain=0),0===a.length&&(a.ended||(a.needReadable=!0),t!==e&&a.ended&&F(this)),null!==c&&this.emit("data",c),c},I.prototype._read=function(e){v(this,new y("_read()"))},I.prototype.pipe=function(e,a){var t=this,c=this._readableState;switch(c.pipesCount){case 0:c.pipes=e;break;case 1:c.pipes=[c.pipes,e];break;default:c.pipes.push(e)}c.pipesCount+=1,f("pipe count=%d opts=%j",c.pipesCount,a);var r=a&&!1===a.end||e===process.stdout||e===process.stderr?h:n;function n(){f("onend"),e.end()}c.endEmitted?process.nextTick(r):t.once("end",r),e.on("unpipe",(function a(d,r){f("onunpipe"),d===t&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,f("cleanup"),e.removeListener("close",l),e.removeListener("finish",u),e.removeListener("drain",i),e.removeListener("error",s),e.removeListener("unpipe",a),t.removeListener("end",n),t.removeListener("end",h),t.removeListener("data",o),b=!0,!c.awaitDrain||e._writableState&&!e._writableState.needDrain||i())}));var i=function(e){return function(){var a=e._readableState;f("pipeOnDrain",a.awaitDrain),a.awaitDrain&&a.awaitDrain--,0===a.awaitDrain&&d(e,"data")&&(a.flowing=!0,D(e))}}(t);e.on("drain",i);var b=!1;function o(a){f("ondata");var d=e.write(a);f("dest.write",d),!1===d&&((1===c.pipesCount&&c.pipes===e||c.pipesCount>1&&-1!==U(c.pipes,e))&&!b&&(f("false write response, pause",c.awaitDrain),c.awaitDrain++),t.pause())}function s(a){f("onerror",a),h(),e.removeListener("error",s),0===d(e,"error")&&v(e,a)}function l(){e.removeListener("finish",u),h()}function u(){f("onfinish"),e.removeListener("close",l),h()}function h(){f("unpipe"),t.unpipe(e)}return t.on("data",o),function(e,a,t){if("function"==typeof e.prependListener)return e.prependListener(a,t);e._events&&e._events[a]?Array.isArray(e._events[a])?e._events[a].unshift(t):e._events[a]=[t,e._events[a]]:e.on(a,t)}(e,"error",s),e.once("close",l),e.once("finish",u),e.emit("pipe",t),c.flowing||(f("pipe resume"),t.resume()),e},I.prototype.unpipe=function(e){var a=this._readableState,t={hasUnpiped:!1};if(0===a.pipesCount)return this;if(1===a.pipesCount)return e&&e!==a.pipes||(e||(e=a.pipes),a.pipes=null,a.pipesCount=0,a.flowing=!1,e&&e.emit("unpipe",this,t)),this;if(!e){var c=a.pipes,f=a.pipesCount;a.pipes=null,a.pipesCount=0,a.flowing=!1;for(var d=0;d0,!1!==c.flowing&&this.resume()):"readable"===e&&(c.endEmitted||c.readableListening||(c.readableListening=c.needReadable=!0,c.flowing=!1,c.emittedReadable=!1,f("on readable",c.length,c.reading),c.length?L(this):c.reading||process.nextTick(R,this))),t},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,a){var t=r.prototype.removeListener.call(this,e,a);return"readable"===e&&process.nextTick(P,this),t},I.prototype.removeAllListeners=function(e){var a=r.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(P,this),a},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,a){a.resumeScheduled||(a.resumeScheduled=!0,process.nextTick(O,e,a))}(this,e)),e.paused=!1,this},I.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var a=this,t=this._readableState,c=!1;for(var d in e.on("end",(function(){if(f("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&a.push(e)}a.push(null)})),e.on("data",(function(d){f("wrapped data"),t.decoder&&(d=t.decoder.write(d)),t.objectMode&&null==d||(t.objectMode||d&&d.length)&&(a.push(d)||(c=!0,e.pause()))})),e)void 0===this[d]&&"function"==typeof e[d]&&(this[d]=function(a){return function(){return e[a].apply(e,arguments)}}(d));for(var r=0;r{"use strict";e.exports=o;var c=t(86048).F,f=c.ERR_METHOD_NOT_IMPLEMENTED,d=c.ERR_MULTIPLE_CALLBACK,r=c.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=c.ERR_TRANSFORM_WITH_LENGTH_0,i=t(25382);function b(e,a){var t=this._transformState;t.transforming=!1;var c=t.writecb;if(null===c)return this.emit("error",new d);t.writechunk=null,t.writecb=null,null!=a&&this.push(a),c(e);var f=this._readableState;f.reading=!1,(f.needReadable||f.length{"use strict";function c(e){var a=this;this.next=null,this.entry=null,this.finish=function(){!function(e,a){var t=e.entry;for(e.entry=null;t;){var c=t.callback;a.pendingcb--,c(undefined),t=t.next}a.corkedRequestsFree.next=e}(a,e)}}var f;e.exports=I,I.WritableState=_;var d,r={deprecate:t(94643)},n=t(40345),i=t(48287).Buffer,b=(void 0!==t.g?t.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},o=t(75896),s=t(65291).getHighWaterMark,l=t(86048).F,u=l.ERR_INVALID_ARG_TYPE,h=l.ERR_METHOD_NOT_IMPLEMENTED,p=l.ERR_MULTIPLE_CALLBACK,g=l.ERR_STREAM_CANNOT_PIPE,m=l.ERR_STREAM_DESTROYED,x=l.ERR_STREAM_NULL_VALUES,y=l.ERR_STREAM_WRITE_AFTER_END,A=l.ERR_UNKNOWN_ENCODING,v=o.errorOrDestroy;function w(){}function _(e,a,d){f=f||t(25382),e=e||{},"boolean"!=typeof d&&(d=a instanceof f),this.objectMode=!!e.objectMode,d&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=s(this,e,"writableHighWaterMark",d),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var r=!1===e.decodeStrings;this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,a){var t=e._writableState,c=t.sync,f=t.writecb;if("function"!=typeof f)throw new p;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(t),a)!function(e,a,t,c,f){--a.pendingcb,t?(process.nextTick(f,c),process.nextTick(S,e,a),e._writableState.errorEmitted=!0,v(e,c)):(f(c),e._writableState.errorEmitted=!0,v(e,c),S(e,a))}(e,t,c,a,f);else{var d=B(t)||e.destroyed;d||t.corked||t.bufferProcessing||!t.bufferedRequest||M(e,t),c?process.nextTick(C,e,t,d,f):C(e,t,d,f)}}(a,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}function I(e){var a=this instanceof(f=f||t(25382));if(!a&&!d.call(I,this))return new I(e);this._writableState=new _(e,this,a),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),n.call(this)}function E(e,a,t,c,f,d,r){a.writelen=c,a.writecb=r,a.writing=!0,a.sync=!0,a.destroyed?a.onwrite(new m("write")):t?e._writev(f,a.onwrite):e._write(f,d,a.onwrite),a.sync=!1}function C(e,a,t,c){t||function(e,a){0===a.length&&a.needDrain&&(a.needDrain=!1,e.emit("drain"))}(e,a),a.pendingcb--,c(),S(e,a)}function M(e,a){a.bufferProcessing=!0;var t=a.bufferedRequest;if(e._writev&&t&&t.next){var f=a.bufferedRequestCount,d=new Array(f),r=a.corkedRequestsFree;r.entry=t;for(var n=0,i=!0;t;)d[n]=t,t.isBuf||(i=!1),t=t.next,n+=1;d.allBuffers=i,E(e,a,!0,a.length,d,"",r.finish),a.pendingcb++,a.lastBufferedRequest=null,r.next?(a.corkedRequestsFree=r.next,r.next=null):a.corkedRequestsFree=new c(a),a.bufferedRequestCount=0}else{for(;t;){var b=t.chunk,o=t.encoding,s=t.callback;if(E(e,a,!1,a.objectMode?1:b.length,b,o,s),t=t.next,a.bufferedRequestCount--,a.writing)break}null===t&&(a.lastBufferedRequest=null)}a.bufferedRequest=t,a.bufferProcessing=!1}function B(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function L(e,a){e._final((function(t){a.pendingcb--,t&&v(e,t),a.prefinished=!0,e.emit("prefinish"),S(e,a)}))}function S(e,a){var t=B(a);if(t&&(function(e,a){a.prefinished||a.finalCalled||("function"!=typeof e._final||a.destroyed?(a.prefinished=!0,e.emit("prefinish")):(a.pendingcb++,a.finalCalled=!0,process.nextTick(L,e,a)))}(e,a),0===a.pendingcb&&(a.finished=!0,e.emit("finish"),a.autoDestroy))){var c=e._readableState;(!c||c.autoDestroy&&c.endEmitted)&&e.destroy()}return t}t(56698)(I,n),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,a=[];e;)a.push(e),e=e.next;return a},function(){try{Object.defineProperty(_.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===I&&e&&e._writableState instanceof _}})):d=function(e){return e instanceof this},I.prototype.pipe=function(){v(this,new g)},I.prototype.write=function(e,a,t){var c,f=this._writableState,d=!1,r=!f.objectMode&&(c=e,i.isBuffer(c)||c instanceof b);return r&&!i.isBuffer(e)&&(e=function(e){return i.from(e)}(e)),"function"==typeof a&&(t=a,a=null),r?a="buffer":a||(a=f.defaultEncoding),"function"!=typeof t&&(t=w),f.ending?function(e,a){var t=new y;v(e,t),process.nextTick(a,t)}(this,t):(r||function(e,a,t,c){var f;return null===t?f=new x:"string"==typeof t||a.objectMode||(f=new u("chunk",["string","Buffer"],t)),!f||(v(e,f),process.nextTick(c,f),!1)}(this,f,e,t))&&(f.pendingcb++,d=function(e,a,t,c,f,d){if(!t){var r=function(e,a,t){return e.objectMode||!1===e.decodeStrings||"string"!=typeof a||(a=i.from(a,t)),a}(a,c,f);c!==r&&(t=!0,f="buffer",c=r)}var n=a.objectMode?1:c.length;a.length+=n;var b=a.length-1))throw new A(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(e,a,t){t(new h("_write()"))},I.prototype._writev=null,I.prototype.end=function(e,a,t){var c=this._writableState;return"function"==typeof e?(t=e,e=null,a=null):"function"==typeof a&&(t=a,a=null),null!=e&&this.write(e,a),c.corked&&(c.corked=1,this.uncork()),c.ending||function(e,a,t){a.ending=!0,S(e,a),t&&(a.finished?process.nextTick(t):e.once("finish",t)),a.ended=!0,e.writable=!1}(this,c,t),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),I.prototype.destroy=o.destroy,I.prototype._undestroy=o.undestroy,I.prototype._destroy=function(e,a){a(e)}},2955:(e,a,t)=>{"use strict";var c;function f(e,a,t){return(a=function(e){var a=function(e){if("object"!=typeof e||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var t=a.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof a?a:String(a)}(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}var d=t(86238),r=Symbol("lastResolve"),n=Symbol("lastReject"),i=Symbol("error"),b=Symbol("ended"),o=Symbol("lastPromise"),s=Symbol("handlePromise"),l=Symbol("stream");function u(e,a){return{value:e,done:a}}function h(e){var a=e[r];if(null!==a){var t=e[l].read();null!==t&&(e[o]=null,e[r]=null,e[n]=null,a(u(t,!1)))}}function p(e){process.nextTick(h,e)}var g=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((f(c={get stream(){return this[l]},next:function(){var e=this,a=this[i];if(null!==a)return Promise.reject(a);if(this[b])return Promise.resolve(u(void 0,!0));if(this[l].destroyed)return new Promise((function(a,t){process.nextTick((function(){e[i]?t(e[i]):a(u(void 0,!0))}))}));var t,c=this[o];if(c)t=new Promise(function(e,a){return function(t,c){e.then((function(){a[b]?t(u(void 0,!0)):a[s](t,c)}),c)}}(c,this));else{var f=this[l].read();if(null!==f)return Promise.resolve(u(f,!1));t=new Promise(this[s])}return this[o]=t,t}},Symbol.asyncIterator,(function(){return this})),f(c,"return",(function(){var e=this;return new Promise((function(a,t){e[l].destroy(null,(function(e){e?t(e):a(u(void 0,!0))}))}))})),c),g);e.exports=function(e){var a,t=Object.create(m,(f(a={},l,{value:e,writable:!0}),f(a,r,{value:null,writable:!0}),f(a,n,{value:null,writable:!0}),f(a,i,{value:null,writable:!0}),f(a,b,{value:e._readableState.endEmitted,writable:!0}),f(a,s,{value:function(e,a){var c=t[l].read();c?(t[o]=null,t[r]=null,t[n]=null,e(u(c,!1))):(t[r]=e,t[n]=a)},writable:!0}),a));return t[o]=null,d(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var a=t[n];return null!==a&&(t[o]=null,t[r]=null,t[n]=null,a(e)),void(t[i]=e)}var c=t[r];null!==c&&(t[o]=null,t[r]=null,t[n]=null,c(u(void 0,!0))),t[b]=!0})),e.on("readable",p.bind(null,t)),t}},80345:(e,a,t)=>{"use strict";function c(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);a&&(c=c.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var a=1;a0?this.tail.next=a:this.head=a,this.tail=a,++this.length}},{key:"unshift",value:function(e){var a={data:e,next:this.head};0===this.length&&(this.tail=a),this.head=a,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var a=this.head,t=""+a.data;a=a.next;)t+=e+a.data;return t}},{key:"concat",value:function(e){if(0===this.length)return i.alloc(0);for(var a,t,c,f=i.allocUnsafe(e>>>0),d=this.head,r=0;d;)a=d.data,t=f,c=r,i.prototype.copy.call(a,t,c),r+=d.data.length,d=d.next;return f}},{key:"consume",value:function(e,a){var t;return ef.length?f.length:e;if(d===f.length?c+=f:c+=f.slice(0,e),0==(e-=d)){d===f.length?(++t,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=f.slice(d));break}++t}return this.length-=t,c}},{key:"_getBuffer",value:function(e){var a=i.allocUnsafe(e),t=this.head,c=1;for(t.data.copy(a),e-=t.data.length;t=t.next;){var f=t.data,d=e>f.length?f.length:e;if(f.copy(a,a.length-e,0,d),0==(e-=d)){d===f.length?(++c,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=f.slice(d));break}++c}return this.length-=c,a}},{key:o,value:function(e,a){return b(this,f(f({},a),{},{depth:0,customInspect:!1}))}}])&&r(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),e}()},75896:e=>{"use strict";function a(e,a){c(e,a),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function c(e,a){e.emit("error",a)}e.exports={destroy:function(e,f){var d=this,r=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return r||n?(f?f(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(c,this,e)):process.nextTick(c,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!f&&e?d._writableState?d._writableState.errorEmitted?process.nextTick(t,d):(d._writableState.errorEmitted=!0,process.nextTick(a,d,e)):process.nextTick(a,d,e):f?(process.nextTick(t,d),f(e)):process.nextTick(t,d)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,a){var t=e._readableState,c=e._writableState;t&&t.autoDestroy||c&&c.autoDestroy?e.destroy(a):e.emit("error",a)}}},86238:(e,a,t)=>{"use strict";var c=t(86048).F.ERR_STREAM_PREMATURE_CLOSE;function f(){}e.exports=function e(a,t,d){if("function"==typeof t)return e(a,null,t);t||(t={}),d=function(e){var a=!1;return function(){if(!a){a=!0;for(var t=arguments.length,c=new Array(t),f=0;f{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},57758:(e,a,t)=>{"use strict";var c,f=t(86048).F,d=f.ERR_MISSING_ARGS,r=f.ERR_STREAM_DESTROYED;function n(e){if(e)throw e}function i(e){e()}function b(e,a){return e.pipe(a)}e.exports=function(){for(var e=arguments.length,a=new Array(e),f=0;f0,(function(e){o||(o=e),e&&l.forEach(i),d||(l.forEach(i),s(o))}))}));return a.reduce(b)}},65291:(e,a,t)=>{"use strict";var c=t(86048).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,a,t,f){var d=function(e,a,t){return null!=e.highWaterMark?e.highWaterMark:a?e[t]:null}(a,f,t);if(null!=d){if(!isFinite(d)||Math.floor(d)!==d||d<0)throw new c(f?t:"highWaterMark",d);return Math.floor(d)}return e.objectMode?16:16384}}},40345:(e,a,t)=>{e.exports=t(37007).EventEmitter},28399:(e,a,t)=>{(a=e.exports=t(45412)).Stream=a,a.Readable=a,a.Writable=t(16708),a.Duplex=t(25382),a.Transform=t(74610),a.PassThrough=t(63600),a.finished=t(86238),a.pipeline=t(57758)},66011:(e,a,t)=>{"use strict";var c=t(48287).Buffer,f=t(56698),d=t(51147),r=new Array(16),n=[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],i=[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],b=[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],o=[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],s=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function u(){d.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function h(e,a){return e<>>32-a}function p(e,a,t,c,f,d,r,n){return h(e+(a^t^c)+d+r|0,n)+f|0}function g(e,a,t,c,f,d,r,n){return h(e+(a&t|~a&c)+d+r|0,n)+f|0}function m(e,a,t,c,f,d,r,n){return h(e+((a|~t)^c)+d+r|0,n)+f|0}function x(e,a,t,c,f,d,r,n){return h(e+(a&c|t&~c)+d+r|0,n)+f|0}function y(e,a,t,c,f,d,r,n){return h(e+(a^(t|~c))+d+r|0,n)+f|0}f(u,d),u.prototype._update=function(){for(var e=r,a=0;a<16;++a)e[a]=this._block.readInt32LE(4*a);for(var t=0|this._a,c=0|this._b,f=0|this._c,d=0|this._d,u=0|this._e,A=0|this._a,v=0|this._b,w=0|this._c,_=0|this._d,I=0|this._e,E=0;E<80;E+=1){var C,M;E<16?(C=p(t,c,f,d,u,e[n[E]],s[0],b[E]),M=y(A,v,w,_,I,e[i[E]],l[0],o[E])):E<32?(C=g(t,c,f,d,u,e[n[E]],s[1],b[E]),M=x(A,v,w,_,I,e[i[E]],l[1],o[E])):E<48?(C=m(t,c,f,d,u,e[n[E]],s[2],b[E]),M=m(A,v,w,_,I,e[i[E]],l[2],o[E])):E<64?(C=x(t,c,f,d,u,e[n[E]],s[3],b[E]),M=g(A,v,w,_,I,e[i[E]],l[3],o[E])):(C=y(t,c,f,d,u,e[n[E]],s[4],b[E]),M=p(A,v,w,_,I,e[i[E]],l[4],o[E])),t=u,u=d,d=h(f,10),f=c,c=C,A=I,I=_,_=h(w,10),w=v,v=M}var B=this._b+f+_|0;this._b=this._c+d+I|0,this._c=this._d+u+A|0,this._d=this._e+t+v|0,this._e=this._a+c+w|0,this._a=B},u.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=c.alloc?c.alloc(20):new c(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=u},51147:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=t(28399).Transform;function d(e){f.call(this),this._block=c.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}t(56698)(d,f),d.prototype._transform=function(e,a,t){var c=null;try{this.update(e,a)}catch(e){c=e}t(c)},d.prototype._flush=function(e){var a=null;try{this.push(this.digest())}catch(e){a=e}e(a)},d.prototype.update=function(e,a){if(function(e){if(!c.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");c.isBuffer(e)||(e=c.from(e,a));for(var t=this._block,f=0;this._blockOffset+e.length-f>=this._blockSize;){for(var d=this._blockOffset;d0;++r)this._length[r]+=n,(n=this._length[r]/4294967296|0)>0&&(this._length[r]-=4294967296*n);return this},d.prototype._update=function(){throw new Error("_update is not implemented")},d.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var a=this._digest();void 0!==e&&(a=a.toString(e)),this._block.fill(0),this._blockOffset=0;for(var t=0;t<4;++t)this._length[t]=0;return a},d.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=d},92861:(e,a,t)=>{var c=t(48287),f=c.Buffer;function d(e,a){for(var t in e)a[t]=e[t]}function r(e,a,t){return f(e,a,t)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?e.exports=c:(d(c,a),a.Buffer=r),r.prototype=Object.create(f.prototype),d(f,r),r.from=function(e,a,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return f(e,a,t)},r.alloc=function(e,a,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var c=f(e);return void 0!==a?"string"==typeof t?c.fill(a,t):c.fill(a):c.fill(0),c},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return f(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return c.SlowBuffer(e)}},93904:(e,a,t)=>{const c=Symbol("SemVer ANY");class f{static get ANY(){return c}constructor(e,a){if(a=d(a),e instanceof f){if(e.loose===!!a.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),b("comparator",e,a),this.options=a,this.loose=!!a.loose,this.parse(e),this.semver===c?this.value="":this.value=this.operator+this.semver.version,b("comp",this)}parse(e){const a=this.options.loose?r[n.COMPARATORLOOSE]:r[n.COMPARATOR],t=e.match(a);if(!t)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==t[1]?t[1]:"","="===this.operator&&(this.operator=""),t[2]?this.semver=new o(t[2],this.options.loose):this.semver=c}toString(){return this.value}test(e){if(b("Comparator.test",e,this.options.loose),this.semver===c||e===c)return!0;if("string"==typeof e)try{e=new o(e,this.options)}catch(e){return!1}return i(e,this.operator,this.semver,this.options)}intersects(e,a){if(!(e instanceof f))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new s(e.value,a).test(this.value):""===e.operator?""===e.value||new s(this.value,a).test(e.semver):!((a=d(a)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!a.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(i(this.semver,"<",e.semver,a)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,a)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=f;const d=t(98587),{safeRe:r,t:n}=t(99718),i=t(72111),b=t(57272),o=t(53908),s=t(78311)},78311:(e,a,t)=>{const c=/\s+/g;class f{constructor(e,a){if(a=r(a),e instanceof f)return e.loose===!!a.loose&&e.includePrerelease===!!a.includePrerelease?e:new f(e.raw,a);if(e instanceof n)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease,this.raw=e.trim().replace(c," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!m(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&x(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e0&&(this.formatted+="||");const a=this.set[e];for(let e=0;e0&&(this.formatted+=" "),this.formatted+=a[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const a=((this.options.includePrerelease&&p)|(this.options.loose&&g))+":"+e,t=d.get(a);if(t)return t;const c=this.options.loose,f=c?o[s.HYPHENRANGELOOSE]:o[s.HYPHENRANGE];e=e.replace(f,S(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(o[s.COMPARATORTRIM],l),i("comparator trim",e),e=e.replace(o[s.TILDETRIM],u),i("tilde trim",e),e=e.replace(o[s.CARETTRIM],h),i("caret trim",e);let r=e.split(" ").map((e=>A(e,this.options))).join(" ").split(/\s+/).map((e=>L(e,this.options)));c&&(r=r.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(o[s.COMPARATORLOOSE]))))),i("range list",r);const b=new Map,x=r.map((e=>new n(e,this.options)));for(const e of x){if(m(e))return[e];b.set(e.value,e)}b.size>1&&b.has("")&&b.delete("");const y=[...b.values()];return d.set(a,y),y}intersects(e,a){if(!(e instanceof f))throw new TypeError("a Range is required");return this.set.some((t=>y(t,a)&&e.set.some((e=>y(e,a)&&t.every((t=>e.every((e=>t.intersects(e,a)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new b(e,this.options)}catch(e){return!1}for(let a=0;a"<0.0.0-0"===e.value,x=e=>""===e.value,y=(e,a)=>{let t=!0;const c=e.slice();let f=c.pop();for(;t&&c.length;)t=c.every((e=>f.intersects(e,a))),f=c.pop();return t},A=(e,a)=>(i("comp",e,a),e=I(e,a),i("caret",e),e=w(e,a),i("tildes",e),e=C(e,a),i("xrange",e),e=B(e,a),i("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,a)=>e.trim().split(/\s+/).map((e=>_(e,a))).join(" "),_=(e,a)=>{const t=a.loose?o[s.TILDELOOSE]:o[s.TILDE];return e.replace(t,((a,t,c,f,d)=>{let r;return i("tilde",e,a,t,c,f,d),v(t)?r="":v(c)?r=`>=${t}.0.0 <${+t+1}.0.0-0`:v(f)?r=`>=${t}.${c}.0 <${t}.${+c+1}.0-0`:d?(i("replaceTilde pr",d),r=`>=${t}.${c}.${f}-${d} <${t}.${+c+1}.0-0`):r=`>=${t}.${c}.${f} <${t}.${+c+1}.0-0`,i("tilde return",r),r}))},I=(e,a)=>e.trim().split(/\s+/).map((e=>E(e,a))).join(" "),E=(e,a)=>{i("caret",e,a);const t=a.loose?o[s.CARETLOOSE]:o[s.CARET],c=a.includePrerelease?"-0":"";return e.replace(t,((a,t,f,d,r)=>{let n;return i("caret",e,a,t,f,d,r),v(t)?n="":v(f)?n=`>=${t}.0.0${c} <${+t+1}.0.0-0`:v(d)?n="0"===t?`>=${t}.${f}.0${c} <${t}.${+f+1}.0-0`:`>=${t}.${f}.0${c} <${+t+1}.0.0-0`:r?(i("replaceCaret pr",r),n="0"===t?"0"===f?`>=${t}.${f}.${d}-${r} <${t}.${f}.${+d+1}-0`:`>=${t}.${f}.${d}-${r} <${t}.${+f+1}.0-0`:`>=${t}.${f}.${d}-${r} <${+t+1}.0.0-0`):(i("no pr"),n="0"===t?"0"===f?`>=${t}.${f}.${d}${c} <${t}.${f}.${+d+1}-0`:`>=${t}.${f}.${d}${c} <${t}.${+f+1}.0-0`:`>=${t}.${f}.${d} <${+t+1}.0.0-0`),i("caret return",n),n}))},C=(e,a)=>(i("replaceXRanges",e,a),e.split(/\s+/).map((e=>M(e,a))).join(" ")),M=(e,a)=>{e=e.trim();const t=a.loose?o[s.XRANGELOOSE]:o[s.XRANGE];return e.replace(t,((t,c,f,d,r,n)=>{i("xRange",e,t,c,f,d,r,n);const b=v(f),o=b||v(d),s=o||v(r),l=s;return"="===c&&l&&(c=""),n=a.includePrerelease?"-0":"",b?t=">"===c||"<"===c?"<0.0.0-0":"*":c&&l?(o&&(d=0),r=0,">"===c?(c=">=",o?(f=+f+1,d=0,r=0):(d=+d+1,r=0)):"<="===c&&(c="<",o?f=+f+1:d=+d+1),"<"===c&&(n="-0"),t=`${c+f}.${d}.${r}${n}`):o?t=`>=${f}.0.0${n} <${+f+1}.0.0-0`:s&&(t=`>=${f}.${d}.0${n} <${f}.${+d+1}.0-0`),i("xRange return",t),t}))},B=(e,a)=>(i("replaceStars",e,a),e.trim().replace(o[s.STAR],"")),L=(e,a)=>(i("replaceGTE0",e,a),e.trim().replace(o[a.includePrerelease?s.GTE0PRE:s.GTE0],"")),S=e=>(a,t,c,f,d,r,n,i,b,o,s,l)=>`${t=v(c)?"":v(f)?`>=${c}.0.0${e?"-0":""}`:v(d)?`>=${c}.${f}.0${e?"-0":""}`:r?`>=${t}`:`>=${t}${e?"-0":""}`} ${i=v(b)?"":v(o)?`<${+b+1}.0.0-0`:v(s)?`<${b}.${+o+1}.0-0`:l?`<=${b}.${o}.${s}-${l}`:e?`<${b}.${o}.${+s+1}-0`:`<=${i}`}`.trim(),k=(e,a,t)=>{for(let t=0;t0){const c=e[t].semver;if(c.major===a.major&&c.minor===a.minor&&c.patch===a.patch)return!0}return!1}return!0}},53908:(e,a,t)=>{const c=t(57272),{MAX_LENGTH:f,MAX_SAFE_INTEGER:d}=t(16874),{safeRe:r,t:n}=t(99718),i=t(98587),{compareIdentifiers:b}=t(61123);class o{constructor(e,a){if(a=i(a),e instanceof o){if(e.loose===!!a.loose&&e.includePrerelease===!!a.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>f)throw new TypeError(`version is longer than ${f} characters`);c("SemVer",e,a),this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease;const t=e.trim().match(a.loose?r[n.LOOSE]:r[n.FULL]);if(!t)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+t[1],this.minor=+t[2],this.patch=+t[3],this.major>d||this.major<0)throw new TypeError("Invalid major version");if(this.minor>d||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>d||this.patch<0)throw new TypeError("Invalid patch version");t[4]?this.prerelease=t[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const a=+e;if(a>=0&&a=0;)"number"==typeof this.prerelease[c]&&(this.prerelease[c]++,c=-2);if(-1===c){if(a===this.prerelease.join(".")&&!1===t)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(a){let c=[a,e];!1===t&&(c=[a]),0===b(this.prerelease[0],a)?isNaN(this.prerelease[1])&&(this.prerelease=c):this.prerelease=c}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=o},57414:(e,a,t)=>{const c=t(30144);e.exports=(e,a)=>{const t=c(e.trim().replace(/^[=v]+/,""),a);return t?t.version:null}},72111:(e,a,t)=>{const c=t(94641),f=t(13999),d=t(35580),r=t(54089),n=t(7059),i=t(25200);e.exports=(e,a,t,b)=>{switch(a){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e===t;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof t&&(t=t.version),e!==t;case"":case"=":case"==":return c(e,t,b);case"!=":return f(e,t,b);case">":return d(e,t,b);case">=":return r(e,t,b);case"<":return n(e,t,b);case"<=":return i(e,t,b);default:throw new TypeError(`Invalid operator: ${a}`)}}},46170:(e,a,t)=>{const c=t(53908),f=t(30144),{safeRe:d,t:r}=t(99718);e.exports=(e,a)=>{if(e instanceof c)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let t=null;if((a=a||{}).rtl){const c=a.includePrerelease?d[r.COERCERTLFULL]:d[r.COERCERTL];let f;for(;(f=c.exec(e))&&(!t||t.index+t[0].length!==e.length);)t&&f.index+f[0].length===t.index+t[0].length||(t=f),c.lastIndex=f.index+f[1].length+f[2].length;c.lastIndex=-1}else t=e.match(a.includePrerelease?d[r.COERCEFULL]:d[r.COERCE]);if(null===t)return null;const n=t[2],i=t[3]||"0",b=t[4]||"0",o=a.includePrerelease&&t[5]?`-${t[5]}`:"",s=a.includePrerelease&&t[6]?`+${t[6]}`:"";return f(`${n}.${i}.${b}${o}${s}`,a)}},40909:(e,a,t)=>{const c=t(53908);e.exports=(e,a,t)=>{const f=new c(e,t),d=new c(a,t);return f.compare(d)||f.compareBuild(d)}},11763:(e,a,t)=>{const c=t(50560);e.exports=(e,a)=>c(e,a,!0)},50560:(e,a,t)=>{const c=t(53908);e.exports=(e,a,t)=>new c(e,t).compare(new c(a,t))},51832:(e,a,t)=>{const c=t(30144);e.exports=(e,a)=>{const t=c(e,null,!0),f=c(a,null,!0),d=t.compare(f);if(0===d)return null;const r=d>0,n=r?t:f,i=r?f:t,b=!!n.prerelease.length;if(i.prerelease.length&&!b)return i.patch||i.minor?n.patch?"patch":n.minor?"minor":"major":"major";const o=b?"pre":"";return t.major!==f.major?o+"major":t.minor!==f.minor?o+"minor":t.patch!==f.patch?o+"patch":"prerelease"}},94641:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>0===c(e,a,t)},35580:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>c(e,a,t)>0},54089:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>c(e,a,t)>=0},93007:(e,a,t)=>{const c=t(53908);e.exports=(e,a,t,f,d)=>{"string"==typeof t&&(d=f,f=t,t=void 0);try{return new c(e instanceof c?e.version:e,t).inc(a,f,d).version}catch(e){return null}}},7059:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>c(e,a,t)<0},25200:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>c(e,a,t)<=0},32938:(e,a,t)=>{const c=t(53908);e.exports=(e,a)=>new c(e,a).major},46254:(e,a,t)=>{const c=t(53908);e.exports=(e,a)=>new c(e,a).minor},13999:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>0!==c(e,a,t)},30144:(e,a,t)=>{const c=t(53908);e.exports=(e,a,t=!1)=>{if(e instanceof c)return e;try{return new c(e,a)}catch(e){if(!t)return null;throw e}}},24493:(e,a,t)=>{const c=t(53908);e.exports=(e,a)=>new c(e,a).patch},31729:(e,a,t)=>{const c=t(30144);e.exports=(e,a)=>{const t=c(e,a);return t&&t.prerelease.length?t.prerelease:null}},9970:(e,a,t)=>{const c=t(50560);e.exports=(e,a,t)=>c(a,e,t)},74277:(e,a,t)=>{const c=t(40909);e.exports=(e,a)=>e.sort(((e,t)=>c(t,e,a)))},97638:(e,a,t)=>{const c=t(78311);e.exports=(e,a,t)=>{try{a=new c(a,t)}catch(e){return!1}return a.test(e)}},43927:(e,a,t)=>{const c=t(40909);e.exports=(e,a)=>e.sort(((e,t)=>c(e,t,a)))},56953:(e,a,t)=>{const c=t(30144);e.exports=(e,a)=>{const t=c(e,a);return t?t.version:null}},99589:(e,a,t)=>{const c=t(99718),f=t(16874),d=t(53908),r=t(61123),n=t(30144),i=t(56953),b=t(57414),o=t(93007),s=t(51832),l=t(32938),u=t(46254),h=t(24493),p=t(31729),g=t(50560),m=t(9970),x=t(11763),y=t(40909),A=t(43927),v=t(74277),w=t(35580),_=t(7059),I=t(94641),E=t(13999),C=t(54089),M=t(25200),B=t(72111),L=t(46170),S=t(93904),k=t(78311),N=t(97638),P=t(77631),R=t(19628),O=t(270),D=t(41261),T=t(13874),F=t(97075),Q=t(75571),U=t(5342),j=t(76780),H=t(72525),$=t(75032);e.exports={parse:n,valid:i,clean:b,inc:o,diff:s,major:l,minor:u,patch:h,prerelease:p,compare:g,rcompare:m,compareLoose:x,compareBuild:y,sort:A,rsort:v,gt:w,lt:_,eq:I,neq:E,gte:C,lte:M,cmp:B,coerce:L,Comparator:S,Range:k,satisfies:N,toComparators:P,maxSatisfying:R,minSatisfying:O,minVersion:D,validRange:T,outside:F,gtr:Q,ltr:U,intersects:j,simplifyRange:H,subset:$,SemVer:d,re:c.re,src:c.src,tokens:c.t,SEMVER_SPEC_VERSION:f.SEMVER_SPEC_VERSION,RELEASE_TYPES:f.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers}},16874:e=>{const a=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:a,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},57272:e=>{const a="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=a},61123:e=>{const a=/^[0-9]+$/,t=(e,t)=>{const c=a.test(e),f=a.test(t);return c&&f&&(e=+e,t=+t),e===t?0:c&&!f?-1:f&&!c?1:et(a,e)}},68794:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const a=this.map.get(e);return void 0===a?void 0:(this.map.delete(e),this.map.set(e,a),a)}delete(e){return this.map.delete(e)}set(e,a){if(!this.delete(e)&&void 0!==a){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,a)}return this}}},98587:e=>{const a=Object.freeze({loose:!0}),t=Object.freeze({});e.exports=e=>e?"object"!=typeof e?a:e:t},99718:(e,a,t)=>{const{MAX_SAFE_COMPONENT_LENGTH:c,MAX_SAFE_BUILD_LENGTH:f,MAX_LENGTH:d}=t(16874),r=t(57272),n=(a=e.exports={}).re=[],i=a.safeRe=[],b=a.src=[],o=a.t={};let s=0;const l="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",d],[l,f]],h=(e,a,t)=>{const c=(e=>{for(const[a,t]of u)e=e.split(`${a}*`).join(`${a}{0,${t}}`).split(`${a}+`).join(`${a}{1,${t}}`);return e})(a),f=s++;r(e,f,a),o[e]=f,b[f]=a,n[f]=new RegExp(a,t?"g":void 0),i[f]=new RegExp(c,t?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${l}*`),h("MAINVERSION",`(${b[o.NUMERICIDENTIFIER]})\\.(${b[o.NUMERICIDENTIFIER]})\\.(${b[o.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${b[o.NUMERICIDENTIFIERLOOSE]})\\.(${b[o.NUMERICIDENTIFIERLOOSE]})\\.(${b[o.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${b[o.NUMERICIDENTIFIER]}|${b[o.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${b[o.NUMERICIDENTIFIERLOOSE]}|${b[o.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${b[o.PRERELEASEIDENTIFIER]}(?:\\.${b[o.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${b[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[o.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${l}+`),h("BUILD",`(?:\\+(${b[o.BUILDIDENTIFIER]}(?:\\.${b[o.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${b[o.MAINVERSION]}${b[o.PRERELEASE]}?${b[o.BUILD]}?`),h("FULL",`^${b[o.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${b[o.MAINVERSIONLOOSE]}${b[o.PRERELEASELOOSE]}?${b[o.BUILD]}?`),h("LOOSE",`^${b[o.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${b[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${b[o.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${b[o.XRANGEIDENTIFIER]})(?:\\.(${b[o.XRANGEIDENTIFIER]})(?:\\.(${b[o.XRANGEIDENTIFIER]})(?:${b[o.PRERELEASE]})?${b[o.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${b[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[o.XRANGEIDENTIFIERLOOSE]})(?:${b[o.PRERELEASELOOSE]})?${b[o.BUILD]}?)?)?`),h("XRANGE",`^${b[o.GTLT]}\\s*${b[o.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${b[o.GTLT]}\\s*${b[o.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${c}})(?:\\.(\\d{1,${c}}))?(?:\\.(\\d{1,${c}}))?`),h("COERCE",`${b[o.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",b[o.COERCEPLAIN]+`(?:${b[o.PRERELEASE]})?`+`(?:${b[o.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",b[o.COERCE],!0),h("COERCERTLFULL",b[o.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${b[o.LONETILDE]}\\s+`,!0),a.tildeTrimReplace="$1~",h("TILDE",`^${b[o.LONETILDE]}${b[o.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${b[o.LONETILDE]}${b[o.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${b[o.LONECARET]}\\s+`,!0),a.caretTrimReplace="$1^",h("CARET",`^${b[o.LONECARET]}${b[o.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${b[o.LONECARET]}${b[o.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${b[o.GTLT]}\\s*(${b[o.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${b[o.GTLT]}\\s*(${b[o.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${b[o.GTLT]}\\s*(${b[o.LOOSEPLAIN]}|${b[o.XRANGEPLAIN]})`,!0),a.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${b[o.XRANGEPLAIN]})\\s+-\\s+(${b[o.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${b[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[o.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},75571:(e,a,t)=>{const c=t(97075);e.exports=(e,a,t)=>c(e,a,">",t)},76780:(e,a,t)=>{const c=t(78311);e.exports=(e,a,t)=>(e=new c(e,t),a=new c(a,t),e.intersects(a,t))},5342:(e,a,t)=>{const c=t(97075);e.exports=(e,a,t)=>c(e,a,"<",t)},19628:(e,a,t)=>{const c=t(53908),f=t(78311);e.exports=(e,a,t)=>{let d=null,r=null,n=null;try{n=new f(a,t)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(d&&-1!==r.compare(e)||(d=e,r=new c(d,t)))})),d}},270:(e,a,t)=>{const c=t(53908),f=t(78311);e.exports=(e,a,t)=>{let d=null,r=null,n=null;try{n=new f(a,t)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(d&&1!==r.compare(e)||(d=e,r=new c(d,t)))})),d}},41261:(e,a,t)=>{const c=t(53908),f=t(78311),d=t(35580);e.exports=(e,a)=>{e=new f(e,a);let t=new c("0.0.0");if(e.test(t))return t;if(t=new c("0.0.0-0"),e.test(t))return t;t=null;for(let a=0;a{const a=new c(e.semver.version);switch(e.operator){case">":0===a.prerelease.length?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":r&&!d(a,r)||(r=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!r||t&&!d(t,r)||(t=r)}return t&&e.test(t)?t:null}},97075:(e,a,t)=>{const c=t(53908),f=t(93904),{ANY:d}=f,r=t(78311),n=t(97638),i=t(35580),b=t(7059),o=t(25200),s=t(54089);e.exports=(e,a,t,l)=>{let u,h,p,g,m;switch(e=new c(e,l),a=new r(a,l),t){case">":u=i,h=o,p=b,g=">",m=">=";break;case"<":u=b,h=s,p=i,g="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(n(e,a,l))return!1;for(let t=0;t{e.semver===d&&(e=new f(">=0.0.0")),r=r||e,n=n||e,u(e.semver,r.semver,l)?r=e:p(e.semver,n.semver,l)&&(n=e)})),r.operator===g||r.operator===m)return!1;if((!n.operator||n.operator===g)&&h(e,n.semver))return!1;if(n.operator===m&&p(e,n.semver))return!1}return!0}},72525:(e,a,t)=>{const c=t(97638),f=t(50560);e.exports=(e,a,t)=>{const d=[];let r=null,n=null;const i=e.sort(((e,a)=>f(e,a,t)));for(const e of i)c(e,a,t)?(n=e,r||(r=e)):(n&&d.push([r,n]),n=null,r=null);r&&d.push([r,null]);const b=[];for(const[e,a]of d)e===a?b.push(e):a||e!==i[0]?a?e===i[0]?b.push(`<=${a}`):b.push(`${e} - ${a}`):b.push(`>=${e}`):b.push("*");const o=b.join(" || "),s="string"==typeof a.raw?a.raw:String(a);return o.length{const c=t(78311),f=t(93904),{ANY:d}=f,r=t(97638),n=t(50560),i=[new f(">=0.0.0-0")],b=[new f(">=0.0.0")],o=(e,a,t)=>{if(e===a)return!0;if(1===e.length&&e[0].semver===d){if(1===a.length&&a[0].semver===d)return!0;e=t.includePrerelease?i:b}if(1===a.length&&a[0].semver===d){if(t.includePrerelease)return!0;a=b}const c=new Set;let f,o,u,h,p,g,m;for(const a of e)">"===a.operator||">="===a.operator?f=s(f,a,t):"<"===a.operator||"<="===a.operator?o=l(o,a,t):c.add(a.semver);if(c.size>1)return null;if(f&&o){if(u=n(f.semver,o.semver,t),u>0)return null;if(0===u&&(">="!==f.operator||"<="!==o.operator))return null}for(const e of c){if(f&&!r(e,String(f),t))return null;if(o&&!r(e,String(o),t))return null;for(const c of a)if(!r(e,String(c),t))return!1;return!0}let x=!(!o||t.includePrerelease||!o.semver.prerelease.length)&&o.semver,y=!(!f||t.includePrerelease||!f.semver.prerelease.length)&&f.semver;x&&1===x.prerelease.length&&"<"===o.operator&&0===x.prerelease[0]&&(x=!1);for(const e of a){if(m=m||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,f)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),">"===e.operator||">="===e.operator){if(h=s(f,e,t),h===e&&h!==f)return!1}else if(">="===f.operator&&!r(f.semver,String(e),t))return!1;if(o)if(x&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===x.major&&e.semver.minor===x.minor&&e.semver.patch===x.patch&&(x=!1),"<"===e.operator||"<="===e.operator){if(p=l(o,e,t),p===e&&p!==o)return!1}else if("<="===o.operator&&!r(o.semver,String(e),t))return!1;if(!e.operator&&(o||f)&&0!==u)return!1}return!(f&&g&&!o&&0!==u||o&&m&&!f&&0!==u||y||x)},s=(e,a,t)=>{if(!e)return a;const c=n(e.semver,a.semver,t);return c>0?e:c<0||">"===a.operator&&">="===e.operator?a:e},l=(e,a,t)=>{if(!e)return a;const c=n(e.semver,a.semver,t);return c<0?e:c>0||"<"===a.operator&&"<="===e.operator?a:e};e.exports=(e,a,t={})=>{if(e===a)return!0;e=new c(e,t),a=new c(a,t);let f=!1;e:for(const c of e.set){for(const e of a.set){const a=o(c,e,t);if(f=f||null!==a,a)continue e}if(f)return!1}return!0}},77631:(e,a,t)=>{const c=t(78311);e.exports=(e,a)=>new c(e,a).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},13874:(e,a,t)=>{const c=t(78311);e.exports=(e,a)=>{try{return new c(e,a).range||"*"}catch(e){return null}}},96897:(e,a,t)=>{"use strict";var c=t(70453),f=t(30041),d=t(30592)(),r=t(75795),n=t(69675),i=c("%Math.floor%");e.exports=function(e,a){if("function"!=typeof e)throw new n("`fn` is not a function");if("number"!=typeof a||a<0||a>4294967295||i(a)!==a)throw new n("`length` must be a positive 32-bit integer");var t=arguments.length>2&&!!arguments[2],c=!0,b=!0;if("length"in e&&r){var o=r(e,"length");o&&!o.configurable&&(c=!1),o&&!o.writable&&(b=!1)}return(c||b||!t)&&(d?f(e,"length",a,!0,!0):f(e,"length",a)),e}},90392:(e,a,t)=>{var c=t(92861).Buffer;function f(e,a){this._block=c.alloc(e),this._finalSize=a,this._blockSize=e,this._len=0}f.prototype.update=function(e,a){"string"==typeof e&&(a=a||"utf8",e=c.from(e,a));for(var t=this._block,f=this._blockSize,d=e.length,r=this._len,n=0;n=this._finalSize&&(this._update(this._block),this._block.fill(0));var t=8*this._len;if(t<=4294967295)this._block.writeUInt32BE(t,this._blockSize-4);else{var c=(4294967295&t)>>>0,f=(t-c)/4294967296;this._block.writeUInt32BE(f,this._blockSize-8),this._block.writeUInt32BE(c,this._blockSize-4)}this._update(this._block);var d=this._hash();return e?d.toString(e):d},f.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=f},62802:(e,a,t)=>{var c=e.exports=function(e){e=e.toLowerCase();var a=c[e];if(!a)throw new Error(e+" is not supported (we accept pull requests)");return new a};c.sha=t(27816),c.sha1=t(63737),c.sha224=t(26710),c.sha256=t(24107),c.sha384=t(32827),c.sha512=t(82890)},27816:(e,a,t)=>{var c=t(56698),f=t(90392),d=t(92861).Buffer,r=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function i(){this.init(),this._w=n,f.call(this,64,56)}function b(e){return e<<30|e>>>2}function o(e,a,t,c){return 0===e?a&t|~a&c:2===e?a&t|a&c|t&c:a^t^c}c(i,f),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var a,t=this._w,c=0|this._a,f=0|this._b,d=0|this._c,n=0|this._d,i=0|this._e,s=0;s<16;++s)t[s]=e.readInt32BE(4*s);for(;s<80;++s)t[s]=t[s-3]^t[s-8]^t[s-14]^t[s-16];for(var l=0;l<80;++l){var u=~~(l/20),h=0|((a=c)<<5|a>>>27)+o(u,f,d,n)+i+t[l]+r[u];i=n,n=d,d=b(f),f=c,c=h}this._a=c+this._a|0,this._b=f+this._b|0,this._c=d+this._c|0,this._d=n+this._d|0,this._e=i+this._e|0},i.prototype._hash=function(){var e=d.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=i},63737:(e,a,t)=>{var c=t(56698),f=t(90392),d=t(92861).Buffer,r=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function i(){this.init(),this._w=n,f.call(this,64,56)}function b(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function s(e,a,t,c){return 0===e?a&t|~a&c:2===e?a&t|a&c|t&c:a^t^c}c(i,f),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var a,t=this._w,c=0|this._a,f=0|this._b,d=0|this._c,n=0|this._d,i=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=(a=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|a>>>31;for(var u=0;u<80;++u){var h=~~(u/20),p=b(c)+s(h,f,d,n)+i+t[u]+r[h]|0;i=n,n=d,d=o(f),f=c,c=p}this._a=c+this._a|0,this._b=f+this._b|0,this._c=d+this._c|0,this._d=n+this._d|0,this._e=i+this._e|0},i.prototype._hash=function(){var e=d.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=i},26710:(e,a,t)=>{var c=t(56698),f=t(24107),d=t(90392),r=t(92861).Buffer,n=new Array(64);function i(){this.init(),this._w=n,d.call(this,64,56)}c(i,f),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var e=r.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=i},24107:(e,a,t)=>{var c=t(56698),f=t(90392),d=t(92861).Buffer,r=[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],n=new Array(64);function i(){this.init(),this._w=n,f.call(this,64,56)}function b(e,a,t){return t^e&(a^t)}function o(e,a,t){return e&a|t&(e|a)}function s(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function u(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}c(i,f),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},i.prototype._update=function(e){for(var a,t=this._w,c=0|this._a,f=0|this._b,d=0|this._c,n=0|this._d,i=0|this._e,h=0|this._f,p=0|this._g,g=0|this._h,m=0;m<16;++m)t[m]=e.readInt32BE(4*m);for(;m<64;++m)t[m]=0|(((a=t[m-2])>>>17|a<<15)^(a>>>19|a<<13)^a>>>10)+t[m-7]+u(t[m-15])+t[m-16];for(var x=0;x<64;++x){var y=g+l(i)+b(i,h,p)+r[x]+t[x]|0,A=s(c)+o(c,f,d)|0;g=p,p=h,h=i,i=n+y|0,n=d,d=f,f=c,c=y+A|0}this._a=c+this._a|0,this._b=f+this._b|0,this._c=d+this._c|0,this._d=n+this._d|0,this._e=i+this._e|0,this._f=h+this._f|0,this._g=p+this._g|0,this._h=g+this._h|0},i.prototype._hash=function(){var e=d.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=i},32827:(e,a,t)=>{var c=t(56698),f=t(82890),d=t(90392),r=t(92861).Buffer,n=new Array(160);function i(){this.init(),this._w=n,d.call(this,128,112)}c(i,f),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){var e=r.allocUnsafe(48);function a(a,t,c){e.writeInt32BE(a,c),e.writeInt32BE(t,c+4)}return a(this._ah,this._al,0),a(this._bh,this._bl,8),a(this._ch,this._cl,16),a(this._dh,this._dl,24),a(this._eh,this._el,32),a(this._fh,this._fl,40),e},e.exports=i},82890:(e,a,t)=>{var c=t(56698),f=t(90392),d=t(92861).Buffer,r=[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],n=new Array(160);function i(){this.init(),this._w=n,f.call(this,128,112)}function b(e,a,t){return t^e&(a^t)}function o(e,a,t){return e&a|t&(e|a)}function s(e,a){return(e>>>28|a<<4)^(a>>>2|e<<30)^(a>>>7|e<<25)}function l(e,a){return(e>>>14|a<<18)^(e>>>18|a<<14)^(a>>>9|e<<23)}function u(e,a){return(e>>>1|a<<31)^(e>>>8|a<<24)^e>>>7}function h(e,a){return(e>>>1|a<<31)^(e>>>8|a<<24)^(e>>>7|a<<25)}function p(e,a){return(e>>>19|a<<13)^(a>>>29|e<<3)^e>>>6}function g(e,a){return(e>>>19|a<<13)^(a>>>29|e<<3)^(e>>>6|a<<26)}function m(e,a){return e>>>0>>0?1:0}c(i,f),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},i.prototype._update=function(e){for(var a=this._w,t=0|this._ah,c=0|this._bh,f=0|this._ch,d=0|this._dh,n=0|this._eh,i=0|this._fh,x=0|this._gh,y=0|this._hh,A=0|this._al,v=0|this._bl,w=0|this._cl,_=0|this._dl,I=0|this._el,E=0|this._fl,C=0|this._gl,M=0|this._hl,B=0;B<32;B+=2)a[B]=e.readInt32BE(4*B),a[B+1]=e.readInt32BE(4*B+4);for(;B<160;B+=2){var L=a[B-30],S=a[B-30+1],k=u(L,S),N=h(S,L),P=p(L=a[B-4],S=a[B-4+1]),R=g(S,L),O=a[B-14],D=a[B-14+1],T=a[B-32],F=a[B-32+1],Q=N+D|0,U=k+O+m(Q,N)|0;U=(U=U+P+m(Q=Q+R|0,R)|0)+T+m(Q=Q+F|0,F)|0,a[B]=U,a[B+1]=Q}for(var j=0;j<160;j+=2){U=a[j],Q=a[j+1];var H=o(t,c,f),$=o(A,v,w),q=s(t,A),G=s(A,t),z=l(n,I),K=l(I,n),V=r[j],Z=r[j+1],J=b(n,i,x),W=b(I,E,C),Y=M+K|0,X=y+z+m(Y,M)|0;X=(X=(X=X+J+m(Y=Y+W|0,W)|0)+V+m(Y=Y+Z|0,Z)|0)+U+m(Y=Y+Q|0,Q)|0;var ee=G+$|0,ae=q+H+m(ee,G)|0;y=x,M=C,x=i,C=E,i=n,E=I,n=d+X+m(I=_+Y|0,_)|0,d=f,_=w,f=c,w=v,c=t,v=A,t=X+ae+m(A=Y+ee|0,Y)|0}this._al=this._al+A|0,this._bl=this._bl+v|0,this._cl=this._cl+w|0,this._dl=this._dl+_|0,this._el=this._el+I|0,this._fl=this._fl+E|0,this._gl=this._gl+C|0,this._hl=this._hl+M|0,this._ah=this._ah+t+m(this._al,A)|0,this._bh=this._bh+c+m(this._bl,v)|0,this._ch=this._ch+f+m(this._cl,w)|0,this._dh=this._dh+d+m(this._dl,_)|0,this._eh=this._eh+n+m(this._el,I)|0,this._fh=this._fh+i+m(this._fl,E)|0,this._gh=this._gh+x+m(this._gl,C)|0,this._hh=this._hh+y+m(this._hl,M)|0},i.prototype._hash=function(){var e=d.allocUnsafe(64);function a(a,t,c){e.writeInt32BE(a,c),e.writeInt32BE(t,c+4)}return a(this._ah,this._al,0),a(this._bh,this._bl,8),a(this._ch,this._cl,16),a(this._dh,this._dl,24),a(this._eh,this._el,32),a(this._fh,this._fl,40),a(this._gh,this._gl,48),a(this._hh,this._hl,56),e},e.exports=i},88310:(e,a,t)=>{e.exports=f;var c=t(37007).EventEmitter;function f(){c.call(this)}t(56698)(f,c),f.Readable=t(45412),f.Writable=t(16708),f.Duplex=t(25382),f.Transform=t(74610),f.PassThrough=t(63600),f.finished=t(86238),f.pipeline=t(57758),f.Stream=f,f.prototype.pipe=function(e,a){var t=this;function f(a){e.writable&&!1===e.write(a)&&t.pause&&t.pause()}function d(){t.readable&&t.resume&&t.resume()}t.on("data",f),e.on("drain",d),e._isStdio||a&&!1===a.end||(t.on("end",n),t.on("close",i));var r=!1;function n(){r||(r=!0,e.end())}function i(){r||(r=!0,"function"==typeof e.destroy&&e.destroy())}function b(e){if(o(),0===c.listenerCount(this,"error"))throw e}function o(){t.removeListener("data",f),e.removeListener("drain",d),t.removeListener("end",n),t.removeListener("close",i),t.removeListener("error",b),e.removeListener("error",b),t.removeListener("end",o),t.removeListener("close",o),e.removeListener("close",o)}return t.on("error",b),e.on("error",b),t.on("end",o),t.on("close",o),e.on("close",o),e.emit("pipe",t),e}},11568:(e,a,t)=>{var c=t(55537),f=t(6917),d=t(57510),r=t(86866),n=t(59817),i=a;i.request=function(e,a){e="string"==typeof e?n.parse(e):d(e);var f=-1===t.g.location.protocol.search(/^https?:$/)?"http:":"",r=e.protocol||f,i=e.hostname||e.host,b=e.port,o=e.path||"/";i&&-1!==i.indexOf(":")&&(i="["+i+"]"),e.url=(i?r+"//"+i:"")+(b?":"+b:"")+o,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var s=new c(e);return a&&s.on("response",a),s},i.get=function(e,a){var t=i.request(e,a);return t.end(),t},i.ClientRequest=c,i.IncomingMessage=f.IncomingMessage,i.Agent=function(){},i.Agent.defaultMaxSockets=4,i.globalAgent=new i.Agent,i.STATUS_CODES=r,i.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},6688:(e,a,t)=>{var c;function f(){if(void 0!==c)return c;if(t.g.XMLHttpRequest){c=new t.g.XMLHttpRequest;try{c.open("GET",t.g.XDomainRequest?"/":"https://example.com")}catch(e){c=null}}else c=null;return c}function d(e){var a=f();if(!a)return!1;try{return a.responseType=e,a.responseType===e}catch(e){}return!1}function r(e){return"function"==typeof e}a.fetch=r(t.g.fetch)&&r(t.g.ReadableStream),a.writableStream=r(t.g.WritableStream),a.abortController=r(t.g.AbortController),a.arraybuffer=a.fetch||d("arraybuffer"),a.msstream=!a.fetch&&d("ms-stream"),a.mozchunkedarraybuffer=!a.fetch&&d("moz-chunked-arraybuffer"),a.overrideMimeType=a.fetch||!!f()&&r(f().overrideMimeType),c=null},55537:(e,a,t)=>{var c=t(48287).Buffer,f=t(6688),d=t(56698),r=t(6917),n=t(28399),i=r.IncomingMessage,b=r.readyStates,o=e.exports=function(e){var a,t=this;n.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+c.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(a){t.setHeader(a,e.headers[a])}));var d=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!f.abortController)d=!1,a=!0;else if("prefer-streaming"===e.mode)a=!1;else if("allow-wrong-content-type"===e.mode)a=!f.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");a=!0}t._mode=function(e,a){return f.fetch&&a?"fetch":f.mozchunkedarraybuffer?"moz-chunked-arraybuffer":f.msstream?"ms-stream":f.arraybuffer&&e?"arraybuffer":"text"}(a,d),t._fetchTimer=null,t._socketTimeout=null,t._socketTimer=null,t.on("finish",(function(){t._onFinish()}))};d(o,n.Writable),o.prototype.setHeader=function(e,a){var t=e.toLowerCase();-1===s.indexOf(t)&&(this._headers[t]={name:e,value:a})},o.prototype.getHeader=function(e){var a=this._headers[e.toLowerCase()];return a?a.value:null},o.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},o.prototype._onFinish=function(){var e=this;if(!e._destroyed){var a=e._opts;"timeout"in a&&0!==a.timeout&&e.setTimeout(a.timeout);var c=e._headers,d=null;"GET"!==a.method&&"HEAD"!==a.method&&(d=new Blob(e._body,{type:(c["content-type"]||{}).value||""}));var r=[];if(Object.keys(c).forEach((function(e){var a=c[e].name,t=c[e].value;Array.isArray(t)?t.forEach((function(e){r.push([a,e])})):r.push([a,t])})),"fetch"===e._mode){var n=null;if(f.abortController){var i=new AbortController;n=i.signal,e._fetchAbortController=i,"requestTimeout"in a&&0!==a.requestTimeout&&(e._fetchTimer=t.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),a.requestTimeout))}t.g.fetch(e._opts.url,{method:e._opts.method,headers:r,body:d||void 0,mode:"cors",credentials:a.withCredentials?"include":"same-origin",signal:n}).then((function(a){e._fetchResponse=a,e._resetTimers(!1),e._connect()}),(function(a){e._resetTimers(!0),e._destroyed||e.emit("error",a)}))}else{var o=e._xhr=new t.g.XMLHttpRequest;try{o.open(e._opts.method,e._opts.url,!0)}catch(a){return void process.nextTick((function(){e.emit("error",a)}))}"responseType"in o&&(o.responseType=e._mode),"withCredentials"in o&&(o.withCredentials=!!a.withCredentials),"text"===e._mode&&"overrideMimeType"in o&&o.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in a&&(o.timeout=a.requestTimeout,o.ontimeout=function(){e.emit("requestTimeout")}),r.forEach((function(e){o.setRequestHeader(e[0],e[1])})),e._response=null,o.onreadystatechange=function(){switch(o.readyState){case b.LOADING:case b.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(o.onprogress=function(){e._onXHRProgress()}),o.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{o.send(d)}catch(a){return void process.nextTick((function(){e.emit("error",a)}))}}}},o.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var a=e.status;return null!==a&&0!==a}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},o.prototype._connect=function(){var e=this;e._destroyed||(e._response=new i(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(a){e.emit("error",a)})),e.emit("response",e._response))},o.prototype._write=function(e,a,t){this._body.push(e),t()},o.prototype._resetTimers=function(e){var a=this;t.g.clearTimeout(a._socketTimer),a._socketTimer=null,e?(t.g.clearTimeout(a._fetchTimer),a._fetchTimer=null):a._socketTimeout&&(a._socketTimer=t.g.setTimeout((function(){a.emit("timeout")}),a._socketTimeout))},o.prototype.abort=o.prototype.destroy=function(e){var a=this;a._destroyed=!0,a._resetTimers(!0),a._response&&(a._response._destroyed=!0),a._xhr?a._xhr.abort():a._fetchAbortController&&a._fetchAbortController.abort(),e&&a.emit("error",e)},o.prototype.end=function(e,a,t){"function"==typeof e&&(t=e,e=void 0),n.Writable.prototype.end.call(this,e,a,t)},o.prototype.setTimeout=function(e,a){var t=this;a&&t.once("timeout",a),t._socketTimeout=e,t._resetTimers(!1)},o.prototype.flushHeaders=function(){},o.prototype.setNoDelay=function(){},o.prototype.setSocketKeepAlive=function(){};var s=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},6917:(e,a,t)=>{var c=t(48287).Buffer,f=t(6688),d=t(56698),r=t(28399),n=a.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},i=a.IncomingMessage=function(e,a,t,d){var n=this;if(r.Readable.call(n),n._mode=t,n.headers={},n.rawHeaders=[],n.trailers={},n.rawTrailers=[],n.on("end",(function(){process.nextTick((function(){n.emit("close")}))})),"fetch"===t){if(n._fetchResponse=a,n.url=a.url,n.statusCode=a.status,n.statusMessage=a.statusText,a.headers.forEach((function(e,a){n.headers[a.toLowerCase()]=e,n.rawHeaders.push(a,e)})),f.writableStream){var i=new WritableStream({write:function(e){return d(!1),new Promise((function(a,t){n._destroyed?t():n.push(c.from(e))?a():n._resumeFetch=a}))},close:function(){d(!0),n._destroyed||n.push(null)},abort:function(e){d(!0),n._destroyed||n.emit("error",e)}});try{return void a.body.pipeTo(i).catch((function(e){d(!0),n._destroyed||n.emit("error",e)}))}catch(e){}}var b=a.body.getReader();!function e(){b.read().then((function(a){n._destroyed||(d(a.done),a.done?n.push(null):(n.push(c.from(a.value)),e()))})).catch((function(e){d(!0),n._destroyed||n.emit("error",e)}))}()}else if(n._xhr=e,n._pos=0,n.url=e.responseURL,n.statusCode=e.status,n.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var a=e.match(/^([^:]+):\s*(.*)/);if(a){var t=a[1].toLowerCase();"set-cookie"===t?(void 0===n.headers[t]&&(n.headers[t]=[]),n.headers[t].push(a[2])):void 0!==n.headers[t]?n.headers[t]+=", "+a[2]:n.headers[t]=a[2],n.rawHeaders.push(a[1],a[2])}})),n._charset="x-user-defined",!f.overrideMimeType){var o=n.rawHeaders["mime-type"];if(o){var s=o.match(/;\s*charset=([^;])(;|$)/);s&&(n._charset=s[1].toLowerCase())}n._charset||(n._charset="utf-8")}};d(i,r.Readable),i.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},i.prototype._onXHRProgress=function(e){var a=this,f=a._xhr,d=null;switch(a._mode){case"text":if((d=f.responseText).length>a._pos){var r=d.substr(a._pos);if("x-user-defined"===a._charset){for(var i=c.alloc(r.length),b=0;ba._pos&&(a.push(c.from(new Uint8Array(o.result.slice(a._pos)))),a._pos=o.result.byteLength)},o.onload=function(){e(!0),a.push(null)},o.readAsArrayBuffer(d)}a._xhr.readyState===n.DONE&&"ms-stream"!==a._mode&&(e(!0),a.push(null))}},83141:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=c.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function d(e){var a;switch(this.encoding=function(e){var a=function(e){if(!e)return"utf8";for(var a;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(a)return;e=(""+e).toLowerCase(),a=!0}}(e);if("string"!=typeof a&&(c.isEncoding===f||!f(e)))throw new Error("Unknown encoding: "+e);return a||e}(e),this.encoding){case"utf16le":this.text=i,this.end=b,a=4;break;case"utf8":this.fillLast=n,a=4;break;case"base64":this.text=o,this.end=s,a=3;break;default:return this.write=l,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=c.allocUnsafe(a)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function n(e){var a=this.lastTotal-this.lastNeed,t=function(e,a){if(128!=(192&a[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&a.length>1){if(128!=(192&a[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&a.length>2&&128!=(192&a[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==t?t:this.lastNeed<=e.length?(e.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,a,0,e.length),void(this.lastNeed-=e.length))}function i(e,a){if((e.length-a)%2==0){var t=e.toString("utf16le",a);if(t){var c=t.charCodeAt(t.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",a,e.length-1)}function b(e){var a=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,t)}return a}function o(e,a){var t=(e.length-a)%3;return 0===t?e.toString("base64",a):(this.lastNeed=3-t,this.lastTotal=3,1===t?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",a,e.length-t))}function s(e){var a=e&&e.length?this.write(e):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function l(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}a.I=d,d.prototype.write=function(e){if(0===e.length)return"";var a,t;if(this.lastNeed){if(void 0===(a=this.fillLast(e)))return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t=0?(f>0&&(e.lastNeed=f-1),f):--c=0?(f>0&&(e.lastNeed=f-2),f):--c=0?(f>0&&(2===f?f=0:e.lastNeed=f-3),f):0}(this,e,a);if(!this.lastNeed)return e.toString("utf8",a);this.lastTotal=t;var c=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,c),e.toString("utf8",a,c)},d.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},88947:(e,a,t)=>{!function(e){"use strict";var a=function(e){var a,t=new Float64Array(16);if(e)for(a=0;a>24&255,e[a+1]=t>>16&255,e[a+2]=t>>8&255,e[a+3]=255&t,e[a+4]=c>>24&255,e[a+5]=c>>16&255,e[a+6]=c>>8&255,e[a+7]=255&c}function p(e,a,t,c,f){var d,r=0;for(d=0;d>>8)-1}function g(e,a,t,c){return p(e,a,t,c,16)}function m(e,a,t,c){return p(e,a,t,c,32)}function x(e,a,t,c){!function(e,a,t,c){for(var f,d=255&c[0]|(255&c[1])<<8|(255&c[2])<<16|(255&c[3])<<24,r=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,n=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,i=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,b=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,o=255&c[4]|(255&c[5])<<8|(255&c[6])<<16|(255&c[7])<<24,s=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,l=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,u=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,h=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,p=255&c[8]|(255&c[9])<<8|(255&c[10])<<16|(255&c[11])<<24,g=255&t[16]|(255&t[17])<<8|(255&t[18])<<16|(255&t[19])<<24,m=255&t[20]|(255&t[21])<<8|(255&t[22])<<16|(255&t[23])<<24,x=255&t[24]|(255&t[25])<<8|(255&t[26])<<16|(255&t[27])<<24,y=255&t[28]|(255&t[29])<<8|(255&t[30])<<16|(255&t[31])<<24,A=255&c[12]|(255&c[13])<<8|(255&c[14])<<16|(255&c[15])<<24,v=d,w=r,_=n,I=i,E=b,C=o,M=s,B=l,L=u,S=h,k=p,N=g,P=m,R=x,O=y,D=A,T=0;T<20;T+=2)v^=(f=(P^=(f=(L^=(f=(E^=(f=v+P|0)<<7|f>>>25)+v|0)<<9|f>>>23)+E|0)<<13|f>>>19)+L|0)<<18|f>>>14,C^=(f=(w^=(f=(R^=(f=(S^=(f=C+w|0)<<7|f>>>25)+C|0)<<9|f>>>23)+S|0)<<13|f>>>19)+R|0)<<18|f>>>14,k^=(f=(M^=(f=(_^=(f=(O^=(f=k+M|0)<<7|f>>>25)+k|0)<<9|f>>>23)+O|0)<<13|f>>>19)+_|0)<<18|f>>>14,D^=(f=(N^=(f=(B^=(f=(I^=(f=D+N|0)<<7|f>>>25)+D|0)<<9|f>>>23)+I|0)<<13|f>>>19)+B|0)<<18|f>>>14,v^=(f=(I^=(f=(_^=(f=(w^=(f=v+I|0)<<7|f>>>25)+v|0)<<9|f>>>23)+w|0)<<13|f>>>19)+_|0)<<18|f>>>14,C^=(f=(E^=(f=(B^=(f=(M^=(f=C+E|0)<<7|f>>>25)+C|0)<<9|f>>>23)+M|0)<<13|f>>>19)+B|0)<<18|f>>>14,k^=(f=(S^=(f=(L^=(f=(N^=(f=k+S|0)<<7|f>>>25)+k|0)<<9|f>>>23)+N|0)<<13|f>>>19)+L|0)<<18|f>>>14,D^=(f=(O^=(f=(R^=(f=(P^=(f=D+O|0)<<7|f>>>25)+D|0)<<9|f>>>23)+P|0)<<13|f>>>19)+R|0)<<18|f>>>14;v=v+d|0,w=w+r|0,_=_+n|0,I=I+i|0,E=E+b|0,C=C+o|0,M=M+s|0,B=B+l|0,L=L+u|0,S=S+h|0,k=k+p|0,N=N+g|0,P=P+m|0,R=R+x|0,O=O+y|0,D=D+A|0,e[0]=v>>>0&255,e[1]=v>>>8&255,e[2]=v>>>16&255,e[3]=v>>>24&255,e[4]=w>>>0&255,e[5]=w>>>8&255,e[6]=w>>>16&255,e[7]=w>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=I>>>0&255,e[13]=I>>>8&255,e[14]=I>>>16&255,e[15]=I>>>24&255,e[16]=E>>>0&255,e[17]=E>>>8&255,e[18]=E>>>16&255,e[19]=E>>>24&255,e[20]=C>>>0&255,e[21]=C>>>8&255,e[22]=C>>>16&255,e[23]=C>>>24&255,e[24]=M>>>0&255,e[25]=M>>>8&255,e[26]=M>>>16&255,e[27]=M>>>24&255,e[28]=B>>>0&255,e[29]=B>>>8&255,e[30]=B>>>16&255,e[31]=B>>>24&255,e[32]=L>>>0&255,e[33]=L>>>8&255,e[34]=L>>>16&255,e[35]=L>>>24&255,e[36]=S>>>0&255,e[37]=S>>>8&255,e[38]=S>>>16&255,e[39]=S>>>24&255,e[40]=k>>>0&255,e[41]=k>>>8&255,e[42]=k>>>16&255,e[43]=k>>>24&255,e[44]=N>>>0&255,e[45]=N>>>8&255,e[46]=N>>>16&255,e[47]=N>>>24&255,e[48]=P>>>0&255,e[49]=P>>>8&255,e[50]=P>>>16&255,e[51]=P>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=O>>>0&255,e[57]=O>>>8&255,e[58]=O>>>16&255,e[59]=O>>>24&255,e[60]=D>>>0&255,e[61]=D>>>8&255,e[62]=D>>>16&255,e[63]=D>>>24&255}(e,a,t,c)}function y(e,a,t,c){!function(e,a,t,c){for(var f,d=255&c[0]|(255&c[1])<<8|(255&c[2])<<16|(255&c[3])<<24,r=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,n=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,i=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,b=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,o=255&c[4]|(255&c[5])<<8|(255&c[6])<<16|(255&c[7])<<24,s=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,l=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,u=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,h=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,p=255&c[8]|(255&c[9])<<8|(255&c[10])<<16|(255&c[11])<<24,g=255&t[16]|(255&t[17])<<8|(255&t[18])<<16|(255&t[19])<<24,m=255&t[20]|(255&t[21])<<8|(255&t[22])<<16|(255&t[23])<<24,x=255&t[24]|(255&t[25])<<8|(255&t[26])<<16|(255&t[27])<<24,y=255&t[28]|(255&t[29])<<8|(255&t[30])<<16|(255&t[31])<<24,A=255&c[12]|(255&c[13])<<8|(255&c[14])<<16|(255&c[15])<<24,v=0;v<20;v+=2)d^=(f=(m^=(f=(u^=(f=(b^=(f=d+m|0)<<7|f>>>25)+d|0)<<9|f>>>23)+b|0)<<13|f>>>19)+u|0)<<18|f>>>14,o^=(f=(r^=(f=(x^=(f=(h^=(f=o+r|0)<<7|f>>>25)+o|0)<<9|f>>>23)+h|0)<<13|f>>>19)+x|0)<<18|f>>>14,p^=(f=(s^=(f=(n^=(f=(y^=(f=p+s|0)<<7|f>>>25)+p|0)<<9|f>>>23)+y|0)<<13|f>>>19)+n|0)<<18|f>>>14,A^=(f=(g^=(f=(l^=(f=(i^=(f=A+g|0)<<7|f>>>25)+A|0)<<9|f>>>23)+i|0)<<13|f>>>19)+l|0)<<18|f>>>14,d^=(f=(i^=(f=(n^=(f=(r^=(f=d+i|0)<<7|f>>>25)+d|0)<<9|f>>>23)+r|0)<<13|f>>>19)+n|0)<<18|f>>>14,o^=(f=(b^=(f=(l^=(f=(s^=(f=o+b|0)<<7|f>>>25)+o|0)<<9|f>>>23)+s|0)<<13|f>>>19)+l|0)<<18|f>>>14,p^=(f=(h^=(f=(u^=(f=(g^=(f=p+h|0)<<7|f>>>25)+p|0)<<9|f>>>23)+g|0)<<13|f>>>19)+u|0)<<18|f>>>14,A^=(f=(y^=(f=(x^=(f=(m^=(f=A+y|0)<<7|f>>>25)+A|0)<<9|f>>>23)+m|0)<<13|f>>>19)+x|0)<<18|f>>>14;e[0]=d>>>0&255,e[1]=d>>>8&255,e[2]=d>>>16&255,e[3]=d>>>24&255,e[4]=o>>>0&255,e[5]=o>>>8&255,e[6]=o>>>16&255,e[7]=o>>>24&255,e[8]=p>>>0&255,e[9]=p>>>8&255,e[10]=p>>>16&255,e[11]=p>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=s>>>0&255,e[17]=s>>>8&255,e[18]=s>>>16&255,e[19]=s>>>24&255,e[20]=l>>>0&255,e[21]=l>>>8&255,e[22]=l>>>16&255,e[23]=l>>>24&255,e[24]=u>>>0&255,e[25]=u>>>8&255,e[26]=u>>>16&255,e[27]=u>>>24&255,e[28]=h>>>0&255,e[29]=h>>>8&255,e[30]=h>>>16&255,e[31]=h>>>24&255}(e,a,t,c)}var A=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function v(e,a,t,c,f,d,r){var n,i,b=new Uint8Array(16),o=new Uint8Array(64);for(i=0;i<16;i++)b[i]=0;for(i=0;i<8;i++)b[i]=d[i];for(;f>=64;){for(x(o,b,r,A),i=0;i<64;i++)e[a+i]=t[c+i]^o[i];for(n=1,i=8;i<16;i++)n=n+(255&b[i])|0,b[i]=255&n,n>>>=8;f-=64,a+=64,c+=64}if(f>0)for(x(o,b,r,A),i=0;i=64;){for(x(i,n,f,A),r=0;r<64;r++)e[a+r]=i[r];for(d=1,r=8;r<16;r++)d=d+(255&n[r])|0,n[r]=255&d,d>>>=8;t-=64,a+=64}if(t>0)for(x(i,n,f,A),r=0;r>>13|t<<3),c=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(t>>>10|c<<6),f=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(c>>>7|f<<9),d=255&e[8]|(255&e[9])<<8,this.r[4]=255&(f>>>4|d<<12),this.r[5]=d>>>1&8190,r=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(d>>>14|r<<2),n=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(r>>>11|n<<5),i=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(n>>>8|i<<8),this.r[9]=i>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function C(e,a,t,c,f,d){var r=new E(d);return r.update(t,c,f),r.finish(e,a),0}function M(e,a,t,c,f,d){var r=new Uint8Array(16);return C(r,0,t,c,f,d),g(e,a,r,0)}function B(e,a,t,c,f){var d;if(t<32)return-1;for(I(e,0,a,0,t,c,f),C(e,16,e,32,t-32,e),d=0;d<16;d++)e[d]=0;return 0}function L(e,a,t,c,f){var d,r=new Uint8Array(32);if(t<32)return-1;if(_(r,0,32,c,f),0!==M(a,16,a,32,t-32,r))return-1;for(I(e,0,a,0,t,c,f),d=0;d<32;d++)e[d]=0;return 0}function S(e,a){var t;for(t=0;t<16;t++)e[t]=0|a[t]}function k(e){var a,t,c=1;for(a=0;a<16;a++)t=e[a]+c+65535,c=Math.floor(t/65536),e[a]=t-65536*c;e[0]+=c-1+37*(c-1)}function N(e,a,t){for(var c,f=~(t-1),d=0;d<16;d++)c=f&(e[d]^a[d]),e[d]^=c,a[d]^=c}function P(e,t){var c,f,d,r=a(),n=a();for(c=0;c<16;c++)n[c]=t[c];for(k(n),k(n),k(n),f=0;f<2;f++){for(r[0]=n[0]-65517,c=1;c<15;c++)r[c]=n[c]-65535-(r[c-1]>>16&1),r[c-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1),d=r[15]>>16&1,r[14]&=65535,N(n,r,1-d)}for(c=0;c<16;c++)e[2*c]=255&n[c],e[2*c+1]=n[c]>>8}function R(e,a){var t=new Uint8Array(32),c=new Uint8Array(32);return P(t,e),P(c,a),m(t,0,c,0)}function O(e){var a=new Uint8Array(32);return P(a,e),1&a[0]}function D(e,a){var t;for(t=0;t<16;t++)e[t]=a[2*t]+(a[2*t+1]<<8);e[15]&=32767}function T(e,a,t){for(var c=0;c<16;c++)e[c]=a[c]+t[c]}function F(e,a,t){for(var c=0;c<16;c++)e[c]=a[c]-t[c]}function Q(e,a,t){var c,f,d=0,r=0,n=0,i=0,b=0,o=0,s=0,l=0,u=0,h=0,p=0,g=0,m=0,x=0,y=0,A=0,v=0,w=0,_=0,I=0,E=0,C=0,M=0,B=0,L=0,S=0,k=0,N=0,P=0,R=0,O=0,D=t[0],T=t[1],F=t[2],Q=t[3],U=t[4],j=t[5],H=t[6],$=t[7],q=t[8],G=t[9],z=t[10],K=t[11],V=t[12],Z=t[13],J=t[14],W=t[15];d+=(c=a[0])*D,r+=c*T,n+=c*F,i+=c*Q,b+=c*U,o+=c*j,s+=c*H,l+=c*$,u+=c*q,h+=c*G,p+=c*z,g+=c*K,m+=c*V,x+=c*Z,y+=c*J,A+=c*W,r+=(c=a[1])*D,n+=c*T,i+=c*F,b+=c*Q,o+=c*U,s+=c*j,l+=c*H,u+=c*$,h+=c*q,p+=c*G,g+=c*z,m+=c*K,x+=c*V,y+=c*Z,A+=c*J,v+=c*W,n+=(c=a[2])*D,i+=c*T,b+=c*F,o+=c*Q,s+=c*U,l+=c*j,u+=c*H,h+=c*$,p+=c*q,g+=c*G,m+=c*z,x+=c*K,y+=c*V,A+=c*Z,v+=c*J,w+=c*W,i+=(c=a[3])*D,b+=c*T,o+=c*F,s+=c*Q,l+=c*U,u+=c*j,h+=c*H,p+=c*$,g+=c*q,m+=c*G,x+=c*z,y+=c*K,A+=c*V,v+=c*Z,w+=c*J,_+=c*W,b+=(c=a[4])*D,o+=c*T,s+=c*F,l+=c*Q,u+=c*U,h+=c*j,p+=c*H,g+=c*$,m+=c*q,x+=c*G,y+=c*z,A+=c*K,v+=c*V,w+=c*Z,_+=c*J,I+=c*W,o+=(c=a[5])*D,s+=c*T,l+=c*F,u+=c*Q,h+=c*U,p+=c*j,g+=c*H,m+=c*$,x+=c*q,y+=c*G,A+=c*z,v+=c*K,w+=c*V,_+=c*Z,I+=c*J,E+=c*W,s+=(c=a[6])*D,l+=c*T,u+=c*F,h+=c*Q,p+=c*U,g+=c*j,m+=c*H,x+=c*$,y+=c*q,A+=c*G,v+=c*z,w+=c*K,_+=c*V,I+=c*Z,E+=c*J,C+=c*W,l+=(c=a[7])*D,u+=c*T,h+=c*F,p+=c*Q,g+=c*U,m+=c*j,x+=c*H,y+=c*$,A+=c*q,v+=c*G,w+=c*z,_+=c*K,I+=c*V,E+=c*Z,C+=c*J,M+=c*W,u+=(c=a[8])*D,h+=c*T,p+=c*F,g+=c*Q,m+=c*U,x+=c*j,y+=c*H,A+=c*$,v+=c*q,w+=c*G,_+=c*z,I+=c*K,E+=c*V,C+=c*Z,M+=c*J,B+=c*W,h+=(c=a[9])*D,p+=c*T,g+=c*F,m+=c*Q,x+=c*U,y+=c*j,A+=c*H,v+=c*$,w+=c*q,_+=c*G,I+=c*z,E+=c*K,C+=c*V,M+=c*Z,B+=c*J,L+=c*W,p+=(c=a[10])*D,g+=c*T,m+=c*F,x+=c*Q,y+=c*U,A+=c*j,v+=c*H,w+=c*$,_+=c*q,I+=c*G,E+=c*z,C+=c*K,M+=c*V,B+=c*Z,L+=c*J,S+=c*W,g+=(c=a[11])*D,m+=c*T,x+=c*F,y+=c*Q,A+=c*U,v+=c*j,w+=c*H,_+=c*$,I+=c*q,E+=c*G,C+=c*z,M+=c*K,B+=c*V,L+=c*Z,S+=c*J,k+=c*W,m+=(c=a[12])*D,x+=c*T,y+=c*F,A+=c*Q,v+=c*U,w+=c*j,_+=c*H,I+=c*$,E+=c*q,C+=c*G,M+=c*z,B+=c*K,L+=c*V,S+=c*Z,k+=c*J,N+=c*W,x+=(c=a[13])*D,y+=c*T,A+=c*F,v+=c*Q,w+=c*U,_+=c*j,I+=c*H,E+=c*$,C+=c*q,M+=c*G,B+=c*z,L+=c*K,S+=c*V,k+=c*Z,N+=c*J,P+=c*W,y+=(c=a[14])*D,A+=c*T,v+=c*F,w+=c*Q,_+=c*U,I+=c*j,E+=c*H,C+=c*$,M+=c*q,B+=c*G,L+=c*z,S+=c*K,k+=c*V,N+=c*Z,P+=c*J,R+=c*W,A+=(c=a[15])*D,r+=38*(w+=c*F),n+=38*(_+=c*Q),i+=38*(I+=c*U),b+=38*(E+=c*j),o+=38*(C+=c*H),s+=38*(M+=c*$),l+=38*(B+=c*q),u+=38*(L+=c*G),h+=38*(S+=c*z),p+=38*(k+=c*K),g+=38*(N+=c*V),m+=38*(P+=c*Z),x+=38*(R+=c*J),y+=38*(O+=c*W),d=(c=(d+=38*(v+=c*T))+(f=1)+65535)-65536*(f=Math.floor(c/65536)),r=(c=r+f+65535)-65536*(f=Math.floor(c/65536)),n=(c=n+f+65535)-65536*(f=Math.floor(c/65536)),i=(c=i+f+65535)-65536*(f=Math.floor(c/65536)),b=(c=b+f+65535)-65536*(f=Math.floor(c/65536)),o=(c=o+f+65535)-65536*(f=Math.floor(c/65536)),s=(c=s+f+65535)-65536*(f=Math.floor(c/65536)),l=(c=l+f+65535)-65536*(f=Math.floor(c/65536)),u=(c=u+f+65535)-65536*(f=Math.floor(c/65536)),h=(c=h+f+65535)-65536*(f=Math.floor(c/65536)),p=(c=p+f+65535)-65536*(f=Math.floor(c/65536)),g=(c=g+f+65535)-65536*(f=Math.floor(c/65536)),m=(c=m+f+65535)-65536*(f=Math.floor(c/65536)),x=(c=x+f+65535)-65536*(f=Math.floor(c/65536)),y=(c=y+f+65535)-65536*(f=Math.floor(c/65536)),A=(c=A+f+65535)-65536*(f=Math.floor(c/65536)),d=(c=(d+=f-1+37*(f-1))+(f=1)+65535)-65536*(f=Math.floor(c/65536)),r=(c=r+f+65535)-65536*(f=Math.floor(c/65536)),n=(c=n+f+65535)-65536*(f=Math.floor(c/65536)),i=(c=i+f+65535)-65536*(f=Math.floor(c/65536)),b=(c=b+f+65535)-65536*(f=Math.floor(c/65536)),o=(c=o+f+65535)-65536*(f=Math.floor(c/65536)),s=(c=s+f+65535)-65536*(f=Math.floor(c/65536)),l=(c=l+f+65535)-65536*(f=Math.floor(c/65536)),u=(c=u+f+65535)-65536*(f=Math.floor(c/65536)),h=(c=h+f+65535)-65536*(f=Math.floor(c/65536)),p=(c=p+f+65535)-65536*(f=Math.floor(c/65536)),g=(c=g+f+65535)-65536*(f=Math.floor(c/65536)),m=(c=m+f+65535)-65536*(f=Math.floor(c/65536)),x=(c=x+f+65535)-65536*(f=Math.floor(c/65536)),y=(c=y+f+65535)-65536*(f=Math.floor(c/65536)),A=(c=A+f+65535)-65536*(f=Math.floor(c/65536)),d+=f-1+37*(f-1),e[0]=d,e[1]=r,e[2]=n,e[3]=i,e[4]=b,e[5]=o,e[6]=s,e[7]=l,e[8]=u,e[9]=h,e[10]=p,e[11]=g,e[12]=m,e[13]=x,e[14]=y,e[15]=A}function U(e,a){Q(e,a,a)}function j(e,t){var c,f=a();for(c=0;c<16;c++)f[c]=t[c];for(c=253;c>=0;c--)U(f,f),2!==c&&4!==c&&Q(f,f,t);for(c=0;c<16;c++)e[c]=f[c]}function H(e,t){var c,f=a();for(c=0;c<16;c++)f[c]=t[c];for(c=250;c>=0;c--)U(f,f),1!==c&&Q(f,f,t);for(c=0;c<16;c++)e[c]=f[c]}function $(e,t,c){var f,d,r=new Uint8Array(32),n=new Float64Array(80),b=a(),o=a(),s=a(),l=a(),u=a(),h=a();for(d=0;d<31;d++)r[d]=t[d];for(r[31]=127&t[31]|64,r[0]&=248,D(n,c),d=0;d<16;d++)o[d]=n[d],l[d]=b[d]=s[d]=0;for(b[0]=l[0]=1,d=254;d>=0;--d)N(b,o,f=r[d>>>3]>>>(7&d)&1),N(s,l,f),T(u,b,s),F(b,b,s),T(s,o,l),F(o,o,l),U(l,u),U(h,b),Q(b,s,b),Q(s,o,u),T(u,b,s),F(b,b,s),U(o,b),F(s,l,h),Q(b,s,i),T(b,b,l),Q(s,s,b),Q(b,l,h),Q(l,o,n),U(o,u),N(b,o,f),N(s,l,f);for(d=0;d<16;d++)n[d+16]=b[d],n[d+32]=s[d],n[d+48]=o[d],n[d+64]=l[d];var p=n.subarray(32),g=n.subarray(16);return j(p,p),Q(g,g,p),P(e,g),0}function q(e,a){return $(e,a,d)}function G(e,a){return c(a,32),q(e,a)}function z(e,a,t){var c=new Uint8Array(32);return $(c,t,a),y(e,f,c,A)}E.prototype.blocks=function(e,a,t){for(var c,f,d,r,n,i,b,o,s,l,u,h,p,g,m,x,y,A,v,w=this.fin?0:2048,_=this.h[0],I=this.h[1],E=this.h[2],C=this.h[3],M=this.h[4],B=this.h[5],L=this.h[6],S=this.h[7],k=this.h[8],N=this.h[9],P=this.r[0],R=this.r[1],O=this.r[2],D=this.r[3],T=this.r[4],F=this.r[5],Q=this.r[6],U=this.r[7],j=this.r[8],H=this.r[9];t>=16;)l=s=0,l+=(_+=8191&(c=255&e[a+0]|(255&e[a+1])<<8))*P,l+=(I+=8191&(c>>>13|(f=255&e[a+2]|(255&e[a+3])<<8)<<3))*(5*H),l+=(E+=8191&(f>>>10|(d=255&e[a+4]|(255&e[a+5])<<8)<<6))*(5*j),l+=(C+=8191&(d>>>7|(r=255&e[a+6]|(255&e[a+7])<<8)<<9))*(5*U),s=(l+=(M+=8191&(r>>>4|(n=255&e[a+8]|(255&e[a+9])<<8)<<12))*(5*Q))>>>13,l&=8191,l+=(B+=n>>>1&8191)*(5*F),l+=(L+=8191&(n>>>14|(i=255&e[a+10]|(255&e[a+11])<<8)<<2))*(5*T),l+=(S+=8191&(i>>>11|(b=255&e[a+12]|(255&e[a+13])<<8)<<5))*(5*D),l+=(k+=8191&(b>>>8|(o=255&e[a+14]|(255&e[a+15])<<8)<<8))*(5*O),u=s+=(l+=(N+=o>>>5|w)*(5*R))>>>13,u+=_*R,u+=I*P,u+=E*(5*H),u+=C*(5*j),s=(u+=M*(5*U))>>>13,u&=8191,u+=B*(5*Q),u+=L*(5*F),u+=S*(5*T),u+=k*(5*D),s+=(u+=N*(5*O))>>>13,u&=8191,h=s,h+=_*O,h+=I*R,h+=E*P,h+=C*(5*H),s=(h+=M*(5*j))>>>13,h&=8191,h+=B*(5*U),h+=L*(5*Q),h+=S*(5*F),h+=k*(5*T),p=s+=(h+=N*(5*D))>>>13,p+=_*D,p+=I*O,p+=E*R,p+=C*P,s=(p+=M*(5*H))>>>13,p&=8191,p+=B*(5*j),p+=L*(5*U),p+=S*(5*Q),p+=k*(5*F),g=s+=(p+=N*(5*T))>>>13,g+=_*T,g+=I*D,g+=E*O,g+=C*R,s=(g+=M*P)>>>13,g&=8191,g+=B*(5*H),g+=L*(5*j),g+=S*(5*U),g+=k*(5*Q),m=s+=(g+=N*(5*F))>>>13,m+=_*F,m+=I*T,m+=E*D,m+=C*O,s=(m+=M*R)>>>13,m&=8191,m+=B*P,m+=L*(5*H),m+=S*(5*j),m+=k*(5*U),x=s+=(m+=N*(5*Q))>>>13,x+=_*Q,x+=I*F,x+=E*T,x+=C*D,s=(x+=M*O)>>>13,x&=8191,x+=B*R,x+=L*P,x+=S*(5*H),x+=k*(5*j),y=s+=(x+=N*(5*U))>>>13,y+=_*U,y+=I*Q,y+=E*F,y+=C*T,s=(y+=M*D)>>>13,y&=8191,y+=B*O,y+=L*R,y+=S*P,y+=k*(5*H),A=s+=(y+=N*(5*j))>>>13,A+=_*j,A+=I*U,A+=E*Q,A+=C*F,s=(A+=M*T)>>>13,A&=8191,A+=B*D,A+=L*O,A+=S*R,A+=k*P,v=s+=(A+=N*(5*H))>>>13,v+=_*H,v+=I*j,v+=E*U,v+=C*Q,s=(v+=M*F)>>>13,v&=8191,v+=B*T,v+=L*D,v+=S*O,v+=k*R,_=l=8191&(s=(s=((s+=(v+=N*P)>>>13)<<2)+s|0)+(l&=8191)|0),I=u+=s>>>=13,E=h&=8191,C=p&=8191,M=g&=8191,B=m&=8191,L=x&=8191,S=y&=8191,k=A&=8191,N=v&=8191,a+=16,t-=16;this.h[0]=_,this.h[1]=I,this.h[2]=E,this.h[3]=C,this.h[4]=M,this.h[5]=B,this.h[6]=L,this.h[7]=S,this.h[8]=k,this.h[9]=N},E.prototype.finish=function(e,a){var t,c,f,d,r=new Uint16Array(10);if(this.leftover){for(d=this.leftover,this.buffer[d++]=1;d<16;d++)this.buffer[d]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(t=this.h[1]>>>13,this.h[1]&=8191,d=2;d<10;d++)this.h[d]+=t,t=this.h[d]>>>13,this.h[d]&=8191;for(this.h[0]+=5*t,t=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=t,t=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=t,r[0]=this.h[0]+5,t=r[0]>>>13,r[0]&=8191,d=1;d<10;d++)r[d]=this.h[d]+t,t=r[d]>>>13,r[d]&=8191;for(r[9]-=8192,c=(1^t)-1,d=0;d<10;d++)r[d]&=c;for(c=~c,d=0;d<10;d++)this.h[d]=this.h[d]&c|r[d];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),f=this.h[0]+this.pad[0],this.h[0]=65535&f,d=1;d<8;d++)f=(this.h[d]+this.pad[d]|0)+(f>>>16)|0,this.h[d]=65535&f;e[a+0]=this.h[0]>>>0&255,e[a+1]=this.h[0]>>>8&255,e[a+2]=this.h[1]>>>0&255,e[a+3]=this.h[1]>>>8&255,e[a+4]=this.h[2]>>>0&255,e[a+5]=this.h[2]>>>8&255,e[a+6]=this.h[3]>>>0&255,e[a+7]=this.h[3]>>>8&255,e[a+8]=this.h[4]>>>0&255,e[a+9]=this.h[4]>>>8&255,e[a+10]=this.h[5]>>>0&255,e[a+11]=this.h[5]>>>8&255,e[a+12]=this.h[6]>>>0&255,e[a+13]=this.h[6]>>>8&255,e[a+14]=this.h[7]>>>0&255,e[a+15]=this.h[7]>>>8&255},E.prototype.update=function(e,a,t){var c,f;if(this.leftover){for((f=16-this.leftover)>t&&(f=t),c=0;c=16&&(f=t-t%16,this.blocks(e,a,f),a+=f,t-=f),t){for(c=0;c=128;){for(w=0;w<16;w++)_=8*w+V,S[w]=t[_+0]<<24|t[_+1]<<16|t[_+2]<<8|t[_+3],k[w]=t[_+4]<<24|t[_+5]<<16|t[_+6]<<8|t[_+7];for(w=0;w<80;w++)if(f=N,d=P,r=R,n=O,i=D,b=T,o=F,l=U,u=j,h=H,p=$,g=q,m=G,x=z,C=65535&(E=K),M=E>>>16,B=65535&(I=Q),L=I>>>16,C+=65535&(E=(q>>>14|D<<18)^(q>>>18|D<<14)^(D>>>9|q<<23)),M+=E>>>16,B+=65535&(I=(D>>>14|q<<18)^(D>>>18|q<<14)^(q>>>9|D<<23)),L+=I>>>16,C+=65535&(E=q&G^~q&z),M+=E>>>16,B+=65535&(I=D&T^~D&F),L+=I>>>16,C+=65535&(E=Z[2*w+1]),M+=E>>>16,B+=65535&(I=Z[2*w]),L+=I>>>16,I=S[w%16],M+=(E=k[w%16])>>>16,B+=65535&I,L+=I>>>16,B+=(M+=(C+=65535&E)>>>16)>>>16,C=65535&(E=v=65535&C|M<<16),M=E>>>16,B=65535&(I=A=65535&B|(L+=B>>>16)<<16),L=I>>>16,C+=65535&(E=(U>>>28|N<<4)^(N>>>2|U<<30)^(N>>>7|U<<25)),M+=E>>>16,B+=65535&(I=(N>>>28|U<<4)^(U>>>2|N<<30)^(U>>>7|N<<25)),L+=I>>>16,M+=(E=U&j^U&H^j&H)>>>16,B+=65535&(I=N&P^N&R^P&R),L+=I>>>16,s=65535&(B+=(M+=(C+=65535&E)>>>16)>>>16)|(L+=B>>>16)<<16,y=65535&C|M<<16,C=65535&(E=p),M=E>>>16,B=65535&(I=n),L=I>>>16,M+=(E=v)>>>16,B+=65535&(I=A),L+=I>>>16,P=f,R=d,O=r,D=n=65535&(B+=(M+=(C+=65535&E)>>>16)>>>16)|(L+=B>>>16)<<16,T=i,F=b,Q=o,N=s,j=l,H=u,$=h,q=p=65535&C|M<<16,G=g,z=m,K=x,U=y,w%16==15)for(_=0;_<16;_++)I=S[_],C=65535&(E=k[_]),M=E>>>16,B=65535&I,L=I>>>16,I=S[(_+9)%16],C+=65535&(E=k[(_+9)%16]),M+=E>>>16,B+=65535&I,L+=I>>>16,A=S[(_+1)%16],C+=65535&(E=((v=k[(_+1)%16])>>>1|A<<31)^(v>>>8|A<<24)^(v>>>7|A<<25)),M+=E>>>16,B+=65535&(I=(A>>>1|v<<31)^(A>>>8|v<<24)^A>>>7),L+=I>>>16,A=S[(_+14)%16],M+=(E=((v=k[(_+14)%16])>>>19|A<<13)^(A>>>29|v<<3)^(v>>>6|A<<26))>>>16,B+=65535&(I=(A>>>19|v<<13)^(v>>>29|A<<3)^A>>>6),L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,S[_]=65535&B|L<<16,k[_]=65535&C|M<<16;C=65535&(E=U),M=E>>>16,B=65535&(I=N),L=I>>>16,I=e[0],M+=(E=a[0])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[0]=N=65535&B|L<<16,a[0]=U=65535&C|M<<16,C=65535&(E=j),M=E>>>16,B=65535&(I=P),L=I>>>16,I=e[1],M+=(E=a[1])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[1]=P=65535&B|L<<16,a[1]=j=65535&C|M<<16,C=65535&(E=H),M=E>>>16,B=65535&(I=R),L=I>>>16,I=e[2],M+=(E=a[2])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[2]=R=65535&B|L<<16,a[2]=H=65535&C|M<<16,C=65535&(E=$),M=E>>>16,B=65535&(I=O),L=I>>>16,I=e[3],M+=(E=a[3])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[3]=O=65535&B|L<<16,a[3]=$=65535&C|M<<16,C=65535&(E=q),M=E>>>16,B=65535&(I=D),L=I>>>16,I=e[4],M+=(E=a[4])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[4]=D=65535&B|L<<16,a[4]=q=65535&C|M<<16,C=65535&(E=G),M=E>>>16,B=65535&(I=T),L=I>>>16,I=e[5],M+=(E=a[5])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[5]=T=65535&B|L<<16,a[5]=G=65535&C|M<<16,C=65535&(E=z),M=E>>>16,B=65535&(I=F),L=I>>>16,I=e[6],M+=(E=a[6])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[6]=F=65535&B|L<<16,a[6]=z=65535&C|M<<16,C=65535&(E=K),M=E>>>16,B=65535&(I=Q),L=I>>>16,I=e[7],M+=(E=a[7])>>>16,B+=65535&I,L+=I>>>16,L+=(B+=(M+=(C+=65535&E)>>>16)>>>16)>>>16,e[7]=Q=65535&B|L<<16,a[7]=K=65535&C|M<<16,V+=128,c-=128}return c}function W(e,a,t){var c,f=new Int32Array(8),d=new Int32Array(8),r=new Uint8Array(256),n=t;for(f[0]=1779033703,f[1]=3144134277,f[2]=1013904242,f[3]=2773480762,f[4]=1359893119,f[5]=2600822924,f[6]=528734635,f[7]=1541459225,d[0]=4089235720,d[1]=2227873595,d[2]=4271175723,d[3]=1595750129,d[4]=2917565137,d[5]=725511199,d[6]=4215389547,d[7]=327033209,J(f,d,a,t),t%=128,c=0;c=0;--f)X(e,a,c=t[f/8|0]>>(7&f)&1),Y(a,e),Y(e,e),X(e,a,c)}function te(e,t){var c=[a(),a(),a(),a()];S(c[0],s),S(c[1],l),S(c[2],n),Q(c[3],s,l),ae(e,c,t)}function ce(e,t,f){var d,r=new Uint8Array(64),n=[a(),a(),a(),a()];for(f||c(t,32),W(r,t,32),r[0]&=248,r[31]&=127,r[31]|=64,te(n,r),ee(e,n),d=0;d<32;d++)t[d+32]=e[d];return 0}var fe=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 de(e,a){var t,c,f,d;for(c=63;c>=32;--c){for(t=0,f=c-32,d=c-12;f>4)*fe[f],t=a[f]>>8,a[f]&=255;for(f=0;f<32;f++)a[f]-=t*fe[f];for(c=0;c<32;c++)a[c+1]+=a[c]>>8,e[c]=255&a[c]}function re(e){var a,t=new Float64Array(64);for(a=0;a<64;a++)t[a]=e[a];for(a=0;a<64;a++)e[a]=0;de(e,t)}function ne(e,t,c,f){var d,r,n=new Uint8Array(64),i=new Uint8Array(64),b=new Uint8Array(64),o=new Float64Array(64),s=[a(),a(),a(),a()];W(n,f,32),n[0]&=248,n[31]&=127,n[31]|=64;var l=c+64;for(d=0;d>7&&F(e[0],r,e[0]),Q(e[3],e[0],e[1]),0)}(l,f))return-1;for(d=0;d=0},e.sign.keyPair=function(){var e=new Uint8Array(se),a=new Uint8Array(le);return ce(e,a),{publicKey:e,secretKey:a}},e.sign.keyPair.fromSecretKey=function(e){if(he(e),e.length!==le)throw new Error("bad secret key size");for(var a=new Uint8Array(se),t=0;t{function c(e){try{if(!t.g.localStorage)return!1}catch(e){return!1}var a=t.g.localStorage[e];return null!=a&&"true"===String(a).toLowerCase()}e.exports=function(e,a){if(c("noDeprecation"))return e;var t=!1;return function(){if(!t){if(c("throwDeprecation"))throw new Error(a);c("traceDeprecation")?console.trace(a):console.warn(a),t=!0}return e.apply(this,arguments)}}},81135:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},49032:(e,a,t)=>{"use strict";var c=t(47244),f=t(48184),d=t(25767),r=t(35680);function n(e){return e.call.bind(e)}var i="undefined"!=typeof BigInt,b="undefined"!=typeof Symbol,o=n(Object.prototype.toString),s=n(Number.prototype.valueOf),l=n(String.prototype.valueOf),u=n(Boolean.prototype.valueOf);if(i)var h=n(BigInt.prototype.valueOf);if(b)var p=n(Symbol.prototype.valueOf);function g(e,a){if("object"!=typeof e)return!1;try{return a(e),!0}catch(e){return!1}}function m(e){return"[object Map]"===o(e)}function x(e){return"[object Set]"===o(e)}function y(e){return"[object WeakMap]"===o(e)}function A(e){return"[object WeakSet]"===o(e)}function v(e){return"[object ArrayBuffer]"===o(e)}function w(e){return"undefined"!=typeof ArrayBuffer&&(v.working?v(e):e instanceof ArrayBuffer)}function _(e){return"[object DataView]"===o(e)}function I(e){return"undefined"!=typeof DataView&&(_.working?_(e):e instanceof DataView)}a.isArgumentsObject=c,a.isGeneratorFunction=f,a.isTypedArray=r,a.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},a.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):r(e)||I(e)},a.isUint8Array=function(e){return"Uint8Array"===d(e)},a.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===d(e)},a.isUint16Array=function(e){return"Uint16Array"===d(e)},a.isUint32Array=function(e){return"Uint32Array"===d(e)},a.isInt8Array=function(e){return"Int8Array"===d(e)},a.isInt16Array=function(e){return"Int16Array"===d(e)},a.isInt32Array=function(e){return"Int32Array"===d(e)},a.isFloat32Array=function(e){return"Float32Array"===d(e)},a.isFloat64Array=function(e){return"Float64Array"===d(e)},a.isBigInt64Array=function(e){return"BigInt64Array"===d(e)},a.isBigUint64Array=function(e){return"BigUint64Array"===d(e)},m.working="undefined"!=typeof Map&&m(new Map),a.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},x.working="undefined"!=typeof Set&&x(new Set),a.isSet=function(e){return"undefined"!=typeof Set&&(x.working?x(e):e instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),a.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(y.working?y(e):e instanceof WeakMap)},A.working="undefined"!=typeof WeakSet&&A(new WeakSet),a.isWeakSet=function(e){return A(e)},v.working="undefined"!=typeof ArrayBuffer&&v(new ArrayBuffer),a.isArrayBuffer=w,_.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&_(new DataView(new ArrayBuffer(1),0,1)),a.isDataView=I;var E="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function C(e){return"[object SharedArrayBuffer]"===o(e)}function M(e){return void 0!==E&&(void 0===C.working&&(C.working=C(new E)),C.working?C(e):e instanceof E)}function B(e){return g(e,s)}function L(e){return g(e,l)}function S(e){return g(e,u)}function k(e){return i&&g(e,h)}function N(e){return b&&g(e,p)}a.isSharedArrayBuffer=M,a.isAsyncFunction=function(e){return"[object AsyncFunction]"===o(e)},a.isMapIterator=function(e){return"[object Map Iterator]"===o(e)},a.isSetIterator=function(e){return"[object Set Iterator]"===o(e)},a.isGeneratorObject=function(e){return"[object Generator]"===o(e)},a.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===o(e)},a.isNumberObject=B,a.isStringObject=L,a.isBooleanObject=S,a.isBigIntObject=k,a.isSymbolObject=N,a.isBoxedPrimitive=function(e){return B(e)||L(e)||S(e)||k(e)||N(e)},a.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(w(e)||M(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(a,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},40537:(e,a,t)=>{var c=Object.getOwnPropertyDescriptors||function(e){for(var a=Object.keys(e),t={},c=0;c=d)return e;switch(e){case"%s":return String(c[t++]);case"%d":return Number(c[t++]);case"%j":try{return JSON.stringify(c[t++])}catch(e){return"[Circular]"}default:return e}})),n=c[t];t=3&&(c.depth=arguments[2]),arguments.length>=4&&(c.colors=arguments[3]),p(t)?c.showHidden=t:t&&a._extend(c,t),y(c.showHidden)&&(c.showHidden=!1),y(c.depth)&&(c.depth=2),y(c.colors)&&(c.colors=!1),y(c.customInspect)&&(c.customInspect=!0),c.colors&&(c.stylize=b),s(c,e,c.depth)}function b(e,a){var t=i.styles[a];return t?"["+i.colors[t][0]+"m"+e+"["+i.colors[t][1]+"m":e}function o(e,a){return e}function s(e,t,c){if(e.customInspect&&t&&I(t.inspect)&&t.inspect!==a.inspect&&(!t.constructor||t.constructor.prototype!==t)){var f=t.inspect(c,e);return x(f)||(f=s(e,f,c)),f}var d=function(e,a){if(y(a))return e.stylize("undefined","undefined");if(x(a)){var t="'"+JSON.stringify(a).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return m(a)?e.stylize(""+a,"number"):p(a)?e.stylize(""+a,"boolean"):g(a)?e.stylize("null","null"):void 0}(e,t);if(d)return d;var r=Object.keys(t),n=function(e){var a={};return e.forEach((function(e,t){a[e]=!0})),a}(r);if(e.showHidden&&(r=Object.getOwnPropertyNames(t)),_(t)&&(r.indexOf("message")>=0||r.indexOf("description")>=0))return l(t);if(0===r.length){if(I(t)){var i=t.name?": "+t.name:"";return e.stylize("[Function"+i+"]","special")}if(A(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(w(t))return e.stylize(Date.prototype.toString.call(t),"date");if(_(t))return l(t)}var b,o="",v=!1,E=["{","}"];return h(t)&&(v=!0,E=["[","]"]),I(t)&&(o=" [Function"+(t.name?": "+t.name:"")+"]"),A(t)&&(o=" "+RegExp.prototype.toString.call(t)),w(t)&&(o=" "+Date.prototype.toUTCString.call(t)),_(t)&&(o=" "+l(t)),0!==r.length||v&&0!=t.length?c<0?A(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),b=v?function(e,a,t,c,f){for(var d=[],r=0,n=a.length;r60?t[0]+(""===a?"":a+"\n ")+" "+e.join(",\n ")+" "+t[1]:t[0]+a+" "+e.join(", ")+" "+t[1]}(b,o,E)):E[0]+o+E[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,a,t,c,f,d){var r,n,i;if((i=Object.getOwnPropertyDescriptor(a,f)||{value:a[f]}).get?n=i.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):i.set&&(n=e.stylize("[Setter]","special")),B(c,f)||(r="["+f+"]"),n||(e.seen.indexOf(i.value)<0?(n=g(t)?s(e,i.value,null):s(e,i.value,t-1)).indexOf("\n")>-1&&(n=d?n.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+n.split("\n").map((function(e){return" "+e})).join("\n")):n=e.stylize("[Circular]","special")),y(r)){if(d&&f.match(/^\d+$/))return n;(r=JSON.stringify(""+f)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.slice(1,-1),r=e.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=e.stylize(r,"string"))}return r+": "+n}function h(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function g(e){return null===e}function m(e){return"number"==typeof e}function x(e){return"string"==typeof e}function y(e){return void 0===e}function A(e){return v(e)&&"[object RegExp]"===E(e)}function v(e){return"object"==typeof e&&null!==e}function w(e){return v(e)&&"[object Date]"===E(e)}function _(e){return v(e)&&("[object Error]"===E(e)||e instanceof Error)}function I(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}a.debuglog=function(e){if(e=e.toUpperCase(),!d[e])if(r.test(e)){var t=process.pid;d[e]=function(){var c=a.format.apply(a,arguments);console.error("%s %d: %s",e,t,c)}}else d[e]=function(){};return d[e]},a.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},a.types=t(49032),a.isArray=h,a.isBoolean=p,a.isNull=g,a.isNullOrUndefined=function(e){return null==e},a.isNumber=m,a.isString=x,a.isSymbol=function(e){return"symbol"==typeof e},a.isUndefined=y,a.isRegExp=A,a.types.isRegExp=A,a.isObject=v,a.isDate=w,a.types.isDate=w,a.isError=_,a.types.isNativeError=_,a.isFunction=I,a.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},a.isBuffer=t(81135);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(e,a){return Object.prototype.hasOwnProperty.call(e,a)}a.log=function(){var e,t;console.log("%s - %s",(t=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),M[e.getMonth()],t].join(" ")),a.format.apply(a,arguments))},a.inherits=t(56698),a._extend=function(e,a){if(!a||!v(a))return e;for(var t=Object.keys(a),c=t.length;c--;)e[t[c]]=a[t[c]];return e};var L="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function S(e,a){if(!e){var t=new Error("Promise was rejected with a falsy value");t.reason=e,e=t}return a(e)}a.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(L&&e[L]){var a;if("function"!=typeof(a=e[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(a,L,{value:a,enumerable:!1,writable:!1,configurable:!0}),a}function a(){for(var a,t,c=new Promise((function(e,c){a=e,t=c})),f=[],d=0;d{var indexOf=function(e,a){if(e.indexOf)return e.indexOf(a);for(var t=0;t{"use strict";var c=t(82682),f=t(39209),d=t(10487),r=t(38075),n=t(75795),i=r("Object.prototype.toString"),b=t(49092)(),o="undefined"==typeof globalThis?t.g:globalThis,s=f(),l=r("String.prototype.slice"),u=Object.getPrototypeOf,h=r("Array.prototype.indexOf",!0)||function(e,a){for(var t=0;t-1?a:"Object"===a&&function(e){var a=!1;return c(p,(function(t,c){if(!a)try{t(e),a=l(c,1)}catch(e){}})),a}(e)}return n?function(e){var a=!1;return c(p,(function(t,c){if(!a)try{"$"+t(e)===c&&(a=l(c,1))}catch(e){}})),a}(e):null}},57510:e=>{e.exports=function(){for(var e={},t=0;t{},78982:()=>{},47790:()=>{},73776:()=>{},21638:()=>{},92668:()=>{},77965:()=>{},66089:()=>{},79368:()=>{},23276:()=>{},59676:()=>{},64688:()=>{},51069:()=>{},15340:()=>{},79838:()=>{},59817:()=>{},71281:()=>{},60513:()=>{},2378:()=>{},60290:()=>{},47882:()=>{},27754:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.StructError=void 0;class t extends TypeError{constructor(e,a){let t;const{message:c,explanation:f,...d}=e,{path:r}=e,n=0===r.length?c:`At path: ${r.join(".")} -- ${c}`;super(f??n),null!=f&&(this.cause=n),Object.assign(this,d),this.name=this.constructor.name,this.failures=()=>t??(t=[e,...a()])}}a.StructError=t},35620:function(e,a,t){"use strict";var c=this&&this.__createBinding||(Object.create?function(e,a,t,c){void 0===c&&(c=t);var f=Object.getOwnPropertyDescriptor(a,t);f&&!("get"in f?!a.__esModule:f.writable||f.configurable)||(f={enumerable:!0,get:function(){return a[t]}}),Object.defineProperty(e,c,f)}:function(e,a,t,c){void 0===c&&(c=t),e[c]=a[t]}),f=this&&this.__exportStar||function(e,a){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(a,t)||c(a,e,t)};Object.defineProperty(a,"__esModule",{value:!0}),f(t(27754),a),f(t(99067),a),f(t(91704),a),f(t(50401),a),f(t(67792),a),f(t(65991),a)},99067:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validate=a.is=a.mask=a.create=a.assert=a.Struct=void 0;const c=t(27754),f=t(70639);function d(e,a,t){const c=b(e,a,{message:t});if(c[0])throw c[0]}function r(e,a,t){const c=b(e,a,{coerce:!0,message:t});if(c[0])throw c[0];return c[1]}function n(e,a,t){const c=b(e,a,{coerce:!0,mask:!0,message:t});if(c[0])throw c[0];return c[1]}function i(e,a){return!b(e,a)[0]}function b(e,a,t={}){const d=(0,f.run)(e,a,t),r=(0,f.shiftIterator)(d);return r[0]?[new c.StructError(r[0],(function*(){for(const e of d)e[0]&&(yield e[0])})),void 0]:[void 0,r[1]]}a.Struct=class{constructor(e){const{type:a,schema:t,validator:c,refiner:d,coercer:r=e=>e,entries:n=function*(){}}=e;this.type=a,this.schema=t,this.entries=n,this.coercer=r,this.validator=c?(e,a)=>{const t=c(e,a);return(0,f.toFailures)(t,a,this,e)}:()=>[],this.refiner=d?(e,a)=>{const t=d(e,a);return(0,f.toFailures)(t,a,this,e)}:()=>[]}assert(e,a){return d(e,this,a)}create(e,a){return r(e,this,a)}is(e){return i(e,this)}mask(e,a){return n(e,this,a)}validate(e,a={}){return b(e,this,a)}},a.assert=d,a.create=r,a.mask=n,a.is=i,a.validate=b},91704:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.trimmed=a.defaulted=a.coerce=void 0;const c=t(99067),f=t(70639),d=t(67792);function r(e,a,t){return new c.Struct({...e,coercer:(f,d)=>(0,c.is)(f,a)?e.coercer(t(f,d),d):e.coercer(f,d)})}a.coerce=r,a.defaulted=function(e,a,t={}){return r(e,(0,d.unknown)(),(e=>{const c="function"==typeof a?a():a;if(void 0===e)return c;if(!t.strict&&(0,f.isPlainObject)(e)&&(0,f.isPlainObject)(c)){const a={...e};let t=!1;for(const e in c)void 0===a[e]&&(a[e]=c[e],t=!0);if(t)return a}return e}))},a.trimmed=function(e){return r(e,(0,d.string)(),(e=>e.trim()))}},50401:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.refine=a.size=a.pattern=a.nonempty=a.min=a.max=a.empty=void 0;const c=t(99067),f=t(70639);function d(e){return e instanceof Map||e instanceof Set?e.size:e.length}function r(e,a,t){return new c.Struct({...e,*refiner(c,d){yield*e.refiner(c,d);const r=t(c,d),n=(0,f.toFailures)(r,d,e,c);for(const e of n)yield{...e,refinement:a}}})}a.empty=function(e){return r(e,"empty",(a=>{const t=d(a);return 0===t||`Expected an empty ${e.type} but received one with a size of \`${t}\``}))},a.max=function(e,a,t={}){const{exclusive:c}=t;return r(e,"max",(t=>c?tc?t>a:t>=a||`Expected a ${e.type} greater than ${c?"":"or equal to "}${a} but received \`${t}\``))},a.nonempty=function(e){return r(e,"nonempty",(a=>d(a)>0||`Expected a nonempty ${e.type} but received an empty one`))},a.pattern=function(e,a){return r(e,"pattern",(t=>a.test(t)||`Expected a ${e.type} matching \`/${a.source}/\` but received "${t}"`))},a.size=function(e,a,t=a){const c=`Expected a ${e.type}`,f=a===t?`of \`${a}\``:`between \`${a}\` and \`${t}\``;return r(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return a<=e&&e<=t||`${c} ${f} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:d}=e;return a<=d&&d<=t||`${c} with a size ${f} but received one with a size of \`${d}\``}const{length:d}=e;return a<=d&&d<=t||`${c} with a length ${f} but received one with a length of \`${d}\``}))},a.refine=r},67792:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.unknown=a.union=a.type=a.tuple=a.string=a.set=a.regexp=a.record=a.optional=a.object=a.number=a.nullable=a.never=a.map=a.literal=a.intersection=a.integer=a.instance=a.func=a.enums=a.date=a.boolean=a.bigint=a.array=a.any=void 0;const c=t(99067),f=t(70639),d=t(65991);function r(){return(0,d.define)("never",(()=>!1))}a.any=function(){return(0,d.define)("any",(()=>!0))},a.array=function(e){return new c.Struct({type:"array",schema:e,*entries(a){if(e&&Array.isArray(a))for(const[t,c]of a.entries())yield[t,c,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${(0,f.print)(e)}`})},a.bigint=function(){return(0,d.define)("bigint",(e=>"bigint"==typeof e))},a.boolean=function(){return(0,d.define)("boolean",(e=>"boolean"==typeof e))},a.date=function(){return(0,d.define)("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${(0,f.print)(e)}`))},a.enums=function(e){const a={},t=e.map((e=>(0,f.print)(e))).join();for(const t of e)a[t]=t;return new c.Struct({type:"enums",schema:a,validator:a=>e.includes(a)||`Expected one of \`${t}\`, but received: ${(0,f.print)(a)}`})},a.func=function(){return(0,d.define)("func",(e=>"function"==typeof e||`Expected a function, but received: ${(0,f.print)(e)}`))},a.instance=function(e){return(0,d.define)("instance",(a=>a instanceof e||`Expected a \`${e.name}\` instance, but received: ${(0,f.print)(a)}`))},a.integer=function(){return(0,d.define)("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${(0,f.print)(e)}`))},a.intersection=function(e){return new c.Struct({type:"intersection",schema:null,*entries(a,t){for(const{entries:c}of e)yield*c(a,t)},*validator(a,t){for(const{validator:c}of e)yield*c(a,t)},*refiner(a,t){for(const{refiner:c}of e)yield*c(a,t)}})},a.literal=function(e){const a=(0,f.print)(e),t=typeof e;return new c.Struct({type:"literal",schema:"string"===t||"number"===t||"boolean"===t?e:null,validator:t=>t===e||`Expected the literal \`${a}\`, but received: ${(0,f.print)(t)}`})},a.map=function(e,a){return new c.Struct({type:"map",schema:null,*entries(t){if(e&&a&&t instanceof Map)for(const[c,f]of t.entries())yield[c,c,e],yield[c,f,a]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${(0,f.print)(e)}`})},a.never=r,a.nullable=function(e){return new c.Struct({...e,validator:(a,t)=>null===a||e.validator(a,t),refiner:(a,t)=>null===a||e.refiner(a,t)})},a.number=function(){return(0,d.define)("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${(0,f.print)(e)}`))},a.object=function(e){const a=e?Object.keys(e):[],t=r();return new c.Struct({type:"object",schema:e??null,*entries(c){if(e&&(0,f.isObject)(c)){const f=new Set(Object.keys(c));for(const t of a)f.delete(t),yield[t,c[t],e[t]];for(const e of f)yield[e,c[e],t]}},validator:e=>(0,f.isObject)(e)||`Expected an object, but received: ${(0,f.print)(e)}`,coercer:e=>(0,f.isObject)(e)?{...e}:e})},a.optional=function(e){return new c.Struct({...e,validator:(a,t)=>void 0===a||e.validator(a,t),refiner:(a,t)=>void 0===a||e.refiner(a,t)})},a.record=function(e,a){return new c.Struct({type:"record",schema:null,*entries(t){if((0,f.isObject)(t))for(const c in t){const f=t[c];yield[c,c,e],yield[c,f,a]}},validator:e=>(0,f.isObject)(e)||`Expected an object, but received: ${(0,f.print)(e)}`})},a.regexp=function(){return(0,d.define)("regexp",(e=>e instanceof RegExp))},a.set=function(e){return new c.Struct({type:"set",schema:null,*entries(a){if(e&&a instanceof Set)for(const t of a)yield[t,t,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${(0,f.print)(e)}`})},a.string=function(){return(0,d.define)("string",(e=>"string"==typeof e||`Expected a string, but received: ${(0,f.print)(e)}`))},a.tuple=function(e){const a=r();return new c.Struct({type:"tuple",schema:null,*entries(t){if(Array.isArray(t)){const c=Math.max(e.length,t.length);for(let f=0;fArray.isArray(e)||`Expected an array, but received: ${(0,f.print)(e)}`})},a.type=function(e){const a=Object.keys(e);return new c.Struct({type:"type",schema:e,*entries(t){if((0,f.isObject)(t))for(const c of a)yield[c,t[c],e[c]]},validator:e=>(0,f.isObject)(e)||`Expected an object, but received: ${(0,f.print)(e)}`,coercer:e=>(0,f.isObject)(e)?{...e}:e})},a.union=function(e){const a=e.map((e=>e.type)).join(" | ");return new c.Struct({type:"union",schema:null,coercer(a){for(const t of e){const[e,c]=t.validate(a,{coerce:!0});if(!e)return c}return a},validator(t,c){const d=[];for(const a of e){const[...e]=(0,f.run)(t,a,c),[r]=e;if(!r?.[0])return[];for(const[a]of e)a&&d.push(a)}return[`Expected the value to satisfy a union of \`${a}\`, but received: ${(0,f.print)(t)}`,...d]}})},a.unknown=function(){return(0,d.define)("unknown",(()=>!0))}},65991:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.pick=a.partial=a.omit=a.lazy=a.dynamic=a.deprecated=a.define=a.assign=void 0;const c=t(99067),f=t(67792);a.assign=function(...e){const a="type"===e[0]?.type,t=e.map((({schema:e})=>e)),c=Object.assign({},...t);return a?(0,f.type)(c):(0,f.object)(c)},a.define=function(e,a){return new c.Struct({type:e,schema:null,validator:a})},a.deprecated=function(e,a){return new c.Struct({...e,refiner:(a,t)=>void 0===a||e.refiner(a,t),validator:(t,c)=>void 0===t||(a(t,c),e.validator(t,c))})},a.dynamic=function(e){return new c.Struct({type:"dynamic",schema:null,*entries(a,t){const c=e(a,t);yield*c.entries(a,t)},validator:(a,t)=>e(a,t).validator(a,t),coercer:(a,t)=>e(a,t).coercer(a,t),refiner:(a,t)=>e(a,t).refiner(a,t)})},a.lazy=function(e){let a;return new c.Struct({type:"lazy",schema:null,*entries(t,c){a??(a=e()),yield*a.entries(t,c)},validator:(t,c)=>(a??(a=e()),a.validator(t,c)),coercer:(t,c)=>(a??(a=e()),a.coercer(t,c)),refiner:(t,c)=>(a??(a=e()),a.refiner(t,c))})},a.omit=function(e,a){const{schema:t}=e,c={...t};for(const e of a)delete c[e];return"type"===e.type?(0,f.type)(c):(0,f.object)(c)},a.partial=function(e){const a=e instanceof c.Struct,t=a?{...e.schema}:{...e};for(const e in t)t[e]=(0,f.optional)(t[e]);return a&&"type"===e.type?(0,f.type)(t):(0,f.object)(t)},a.pick=function(e,a){const{schema:t}=e,c={};for(const e of a)c[e]=t[e];return"type"===e.type?(0,f.type)(c):(0,f.object)(c)}},70639:(e,a)=>{"use strict";function t(e){return"object"==typeof e&&null!==e}function c(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function f(e,a,t,f){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:d,branch:r}=a,{type:n}=t,{refinement:i,message:b=`Expected a value of type \`${n}\`${i?` with refinement \`${i}\``:""}, but received: \`${c(f)}\``}=e;return{value:f,type:n,refinement:i,key:d[d.length-1],path:d,branch:r,...e,message:b}}Object.defineProperty(a,"__esModule",{value:!0}),a.run=a.toFailures=a.toFailure=a.shiftIterator=a.print=a.isPlainObject=a.isObject=void 0,a.isObject=t,a.isPlainObject=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const a=Object.getPrototypeOf(e);return null===a||a===Object.prototype},a.print=c,a.shiftIterator=function(e){const{done:a,value:t}=e.next();return a?void 0:t},a.toFailure=f,a.toFailures=function*(e,a,c,d){(function(e){return t(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const t of e){const e=f(t,a,c,d);e&&(yield e)}},a.run=function*e(a,c,f={}){const{path:d=[],branch:r=[a],coerce:n=!1,mask:i=!1}=f,b={path:d,branch:r};if(n&&(a=c.coercer(a,b),i&&"type"!==c.type&&t(c.schema)&&t(a)&&!Array.isArray(a)))for(const e in a)void 0===c.schema[e]&&delete a[e];let o="valid";for(const e of c.validator(a,b))e.explanation=f.message,o="not_valid",yield[e,void 0];for(let[s,l,u]of c.entries(a,b)){const c=e(l,u,{path:void 0===s?d:[...d,s],branch:void 0===s?r:[...r,l],coerce:n,mask:i,message:f.message});for(const e of c)e[0]?(o=null===e[0].refinement||void 0===e[0].refinement?"not_valid":"not_refined",yield[e[0],void 0]):n&&(l=e[1],void 0===s?a=l:a instanceof Map?a.set(s,l):a instanceof Set?a.add(l):t(a)&&(void 0!==l||s in a)&&(a[s]=l))}if("not_valid"!==o)for(const e of c.refiner(a,b))e.explanation=f.message,o="not_refined",yield[e,void 0];"valid"===o&&(yield[void 0,a])}},22011:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.assertExhaustive=a.assertStruct=a.assert=a.AssertionError=void 0;const c=t(35620),f=t(75940);function d(e,a){return t=e,Boolean("string"==typeof t?.prototype?.constructor?.name)?new e({message:a}):e({message:a});var t}class r extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}a.AssertionError=r,a.assert=function(e,a="Assertion failed.",t=r){if(!e){if(a instanceof Error)throw a;throw d(t,a)}},a.assertStruct=function(e,a,t="Assertion failed",n=r){try{(0,c.assert)(e,a)}catch(e){throw d(n,`${t}: ${function(e){return(0,f.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},a.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},20472:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.base64=void 0;const c=t(35620),f=t(22011);a.base64=(e,a={})=>{const t=a.paddingRequired??!1,d=a.characterSet??"base64";let r,n;return"base64"===d?r=String.raw`[A-Za-z0-9+\/]`:((0,f.assert)("base64url"===d),r=String.raw`[-_A-Za-z0-9]`),n=t?new RegExp(`^(?:${r}{4})*(?:${r}{3}=|${r}{2}==)?$`,"u"):new RegExp(`^(?:${r}{4})*(?:${r}{2,3}|${r}{3}=|${r}{2}==)?$`,"u"),(0,c.pattern)(e,n)}},77862:(e,a,t)=>{"use strict";var c=t(48287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.createDataView=a.concatBytes=a.valueToBytes=a.base64ToBytes=a.stringToBytes=a.numberToBytes=a.signedBigIntToBytes=a.bigIntToBytes=a.hexToBytes=a.bytesToBase64=a.bytesToString=a.bytesToNumber=a.bytesToSignedBigInt=a.bytesToBigInt=a.bytesToHex=a.assertIsBytes=a.isBytes=void 0;const f=t(63203),d=t(22011),r=t(93976),n=function(){const e=[];return()=>{if(0===e.length)for(let a=0;a<256;a++)e.push(a.toString(16).padStart(2,"0"));return e}}();function i(e){return e instanceof Uint8Array}function b(e){(0,d.assert)(i(e),"Value must be a Uint8Array.")}function o(e){if(b(e),0===e.length)return"0x";const a=n(),t=new Array(e.length);for(let c=0;c=BigInt(0),"Value must be a non-negative bigint."),l(e.toString(16))}function h(e){return(0,d.assert)("number"==typeof e,"Value must be a number."),(0,d.assert)(e>=0,"Value must be a non-negative number."),(0,d.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),l(e.toString(16))}function p(e){return(0,d.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function g(e){if("bigint"==typeof e)return u(e);if("number"==typeof e)return h(e);if("string"==typeof e)return e.startsWith("0x")?l(e):p(e);if(i(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}a.isBytes=i,a.assertIsBytes=b,a.bytesToHex=o,a.bytesToBigInt=s,a.bytesToSignedBigInt=function(e){b(e);let a=BigInt(0);for(const t of e)a=(a<0,"Byte length must be greater than 0."),(0,d.assert)(function(e,a){(0,d.assert)(a>0);const t=e>>BigInt(31);return!((~e&t)+(e&~t)>>BigInt(8*a-1))}(e,a),"Byte length is too small to represent the given value.");let t=e;const c=new Uint8Array(a);for(let e=0;e>=BigInt(8);return c.reverse()},a.numberToBytes=h,a.stringToBytes=p,a.base64ToBytes=function(e){return(0,d.assert)("string"==typeof e,"Value must be a string."),f.base64.decode(e)},a.valueToBytes=g,a.concatBytes=function(e){const a=new Array(e.length);let t=0;for(let c=0;c{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.toCaipChainId=a.parseCaipAccountId=a.parseCaipChainId=a.isCaipAccountAddress=a.isCaipAccountId=a.isCaipReference=a.isCaipNamespace=a.isCaipChainId=a.KnownCaipNamespace=a.CaipAccountAddressStruct=a.CaipAccountIdStruct=a.CaipReferenceStruct=a.CaipNamespaceStruct=a.CaipChainIdStruct=a.CAIP_ACCOUNT_ADDRESS_REGEX=a.CAIP_ACCOUNT_ID_REGEX=a.CAIP_REFERENCE_REGEX=a.CAIP_NAMESPACE_REGEX=a.CAIP_CHAIN_ID_REGEX=void 0;const c=t(35620);function f(e){return(0,c.is)(e,a.CaipNamespaceStruct)}function d(e){return(0,c.is)(e,a.CaipReferenceStruct)}var r;a.CAIP_CHAIN_ID_REGEX=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,a.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,a.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,a.CAIP_ACCOUNT_ID_REGEX=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,a.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,a.CaipChainIdStruct=(0,c.pattern)((0,c.string)(),a.CAIP_CHAIN_ID_REGEX),a.CaipNamespaceStruct=(0,c.pattern)((0,c.string)(),a.CAIP_NAMESPACE_REGEX),a.CaipReferenceStruct=(0,c.pattern)((0,c.string)(),a.CAIP_REFERENCE_REGEX),a.CaipAccountIdStruct=(0,c.pattern)((0,c.string)(),a.CAIP_ACCOUNT_ID_REGEX),a.CaipAccountAddressStruct=(0,c.pattern)((0,c.string)(),a.CAIP_ACCOUNT_ADDRESS_REGEX),(r=a.KnownCaipNamespace||(a.KnownCaipNamespace={})).Eip155="eip155",r.Wallet="wallet",a.isCaipChainId=function(e){return(0,c.is)(e,a.CaipChainIdStruct)},a.isCaipNamespace=f,a.isCaipReference=d,a.isCaipAccountId=function(e){return(0,c.is)(e,a.CaipAccountIdStruct)},a.isCaipAccountAddress=function(e){return(0,c.is)(e,a.CaipAccountAddressStruct)},a.parseCaipChainId=function(e){const t=a.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},a.parseCaipAccountId=function(e){const t=a.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},a.toCaipChainId=function(e,t){if(!f(e))throw new Error(`Invalid "namespace", must match: ${a.CAIP_NAMESPACE_REGEX.toString()}`);if(!d(t))throw new Error(`Invalid "reference", must match: ${a.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}},98860:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ChecksumStruct=void 0;const c=t(35620),f=t(20472);a.ChecksumStruct=(0,c.size)((0,f.base64)((0,c.string)(),{paddingRequired:!0}),44,44)},65211:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createHex=a.createBytes=a.createBigInt=a.createNumber=void 0;const c=t(35620),f=t(22011),d=t(77862),r=t(93976),n=(0,c.union)([(0,c.number)(),(0,c.bigint)(),(0,c.string)(),r.StrictHexStruct]),i=(0,c.coerce)((0,c.number)(),n,Number),b=(0,c.coerce)((0,c.bigint)(),n,BigInt),o=((0,c.union)([r.StrictHexStruct,(0,c.instance)(Uint8Array)]),(0,c.coerce)((0,c.instance)(Uint8Array),(0,c.union)([r.StrictHexStruct]),d.hexToBytes)),s=(0,c.coerce)(r.StrictHexStruct,(0,c.instance)(Uint8Array),d.bytesToHex);a.createNumber=function(e){try{const a=(0,c.create)(e,i);return(0,f.assert)(Number.isFinite(a),`Expected a number-like value, got "${e}".`),a}catch(a){if(a instanceof c.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw a}},a.createBigInt=function(e){try{return(0,c.create)(e,b)}catch(e){if(e instanceof c.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},a.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,c.create)(e,o)}catch(e){if(e instanceof c.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},a.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,c.create)(e,s)}catch(e){if(e instanceof c.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},44180:function(e,a){"use strict";var t,c,f=this&&this.__classPrivateFieldGet||function(e,a,t,c){if("a"===t&&!c)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof a?e!==a||!c:!a.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?c:"a"===t?c.call(e):c?c.value:a.get(e)},d=this&&this.__classPrivateFieldSet||function(e,a,t,c,f){if("m"===c)throw new TypeError("Private method is not writable");if("a"===c&&!f)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof a?e!==a||!f:!a.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===c?f.call(e,t):f?f.value=t:a.set(e,t),t};Object.defineProperty(a,"__esModule",{value:!0}),a.FrozenSet=a.FrozenMap=void 0;class r{get size(){return f(this,t,"f").size}[(t=new WeakMap,Symbol.iterator)](){return f(this,t,"f")[Symbol.iterator]()}constructor(e){t.set(this,void 0),d(this,t,new Map(e),"f"),Object.freeze(this)}entries(){return f(this,t,"f").entries()}forEach(e,a){return f(this,t,"f").forEach(((t,c,f)=>e.call(a,t,c,this)))}get(e){return f(this,t,"f").get(e)}has(e){return f(this,t,"f").has(e)}keys(){return f(this,t,"f").keys()}values(){return f(this,t,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,a])=>`${String(e)} => ${String(a)}`)).join(", ")} `:""}}`}}a.FrozenMap=r;class n{get size(){return f(this,c,"f").size}[(c=new WeakMap,Symbol.iterator)](){return f(this,c,"f")[Symbol.iterator]()}constructor(e){c.set(this,void 0),d(this,c,new Set(e),"f"),Object.freeze(this)}entries(){return f(this,c,"f").entries()}forEach(e,a){return f(this,c,"f").forEach(((t,c,f)=>e.call(a,t,c,this)))}has(e){return f(this,c,"f").has(e)}keys(){return f(this,c,"f").keys()}values(){return f(this,c,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}a.FrozenSet=n,Object.freeze(r),Object.freeze(r.prototype),Object.freeze(n),Object.freeze(n.prototype)},91630:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0})},75940:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.wrapError=a.getErrorMessage=a.isErrorWithStack=a.isErrorWithMessage=a.isErrorWithCode=void 0;const c=t(71843),f=t(33745);function d(e){return"object"==typeof e&&null!==e&&"code"in e}function r(e){return"object"==typeof e&&null!==e&&"message"in e}a.isErrorWithCode=d,a.isErrorWithMessage=r,a.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},a.getErrorMessage=function(e){return r(e)&&"string"==typeof e.message?e.message:(0,f.isNullOrUndefined)(e)?"":String(e)},a.wrapError=function(e,a){if((t=e)instanceof Error||(0,f.isObject)(t)&&"Error"===t.constructor.name){let t;return t=2===Error.length?new Error(a,{cause:e}):new c.ErrorWithCause(a,{cause:e}),d(e)&&(t.code=e.code),t}var t;return a.length>0?new Error(`${String(e)}: ${a}`):new Error(String(e))}},93976:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.remove0x=a.add0x=a.isValidChecksumAddress=a.getChecksumAddress=a.isValidHexAddress=a.assertIsStrictHexString=a.assertIsHexString=a.isStrictHexString=a.isHexString=a.HexChecksumAddressStruct=a.HexAddressStruct=a.StrictHexStruct=a.HexStruct=void 0;const c=t(35620),f=t(2214),d=t(22011),r=t(77862);function n(e){return(0,c.is)(e,a.HexStruct)}function i(e){return(0,c.is)(e,a.StrictHexStruct)}function b(e){(0,d.assert)((0,c.is)(e,a.HexChecksumAddressStruct),"Invalid hex address.");const t=s(e.toLowerCase()),n=s((0,r.bytesToHex)((0,f.keccak_256)(t)));return`0x${t.split("").map(((e,a)=>{const t=n[a];return(0,d.assert)((0,c.is)(t,(0,c.string)()),"Hash shorter than address."),parseInt(t,16)>7?e.toUpperCase():e})).join("")}`}function o(e){return!!(0,c.is)(e,a.HexChecksumAddressStruct)&&b(e)===e}function s(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}a.HexStruct=(0,c.pattern)((0,c.string)(),/^(?:0x)?[0-9a-f]+$/iu),a.StrictHexStruct=(0,c.pattern)((0,c.string)(),/^0x[0-9a-f]+$/iu),a.HexAddressStruct=(0,c.pattern)((0,c.string)(),/^0x[0-9a-f]{40}$/u),a.HexChecksumAddressStruct=(0,c.pattern)((0,c.string)(),/^0x[0-9a-fA-F]{40}$/u),a.isHexString=n,a.isStrictHexString=i,a.assertIsHexString=function(e){(0,d.assert)(n(e),"Value must be a hexadecimal string.")},a.assertIsStrictHexString=function(e){(0,d.assert)(i(e),'Value must be a hexadecimal string, starting with "0x".')},a.isValidHexAddress=function(e){return(0,c.is)(e,a.HexAddressStruct)||o(e)},a.getChecksumAddress=b,a.isValidChecksumAddress=o,a.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},a.remove0x=s},52367:function(e,a,t){"use strict";var c=this&&this.__createBinding||(Object.create?function(e,a,t,c){void 0===c&&(c=t);var f=Object.getOwnPropertyDescriptor(a,t);f&&!("get"in f?!a.__esModule:f.writable||f.configurable)||(f={enumerable:!0,get:function(){return a[t]}}),Object.defineProperty(e,c,f)}:function(e,a,t,c){void 0===c&&(c=t),e[c]=a[t]}),f=this&&this.__exportStar||function(e,a){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(a,t)||c(a,e,t)};Object.defineProperty(a,"__esModule",{value:!0}),f(t(22011),a),f(t(20472),a),f(t(77862),a),f(t(87690),a),f(t(98860),a),f(t(65211),a),f(t(44180),a),f(t(91630),a),f(t(75940),a),f(t(93976),a),f(t(60087),a),f(t(24956),a),f(t(98912),a),f(t(33745),a),f(t(5770),a),f(t(3028),a),f(t(2812),a),f(t(32954),a),f(t(16871),a),f(t(49266),a)},60087:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getJsonRpcIdValidator=a.assertIsJsonRpcError=a.isJsonRpcError=a.assertIsJsonRpcFailure=a.isJsonRpcFailure=a.assertIsJsonRpcSuccess=a.isJsonRpcSuccess=a.assertIsJsonRpcResponse=a.isJsonRpcResponse=a.assertIsPendingJsonRpcResponse=a.isPendingJsonRpcResponse=a.JsonRpcResponseStruct=a.JsonRpcFailureStruct=a.JsonRpcSuccessStruct=a.PendingJsonRpcResponseStruct=a.assertIsJsonRpcRequest=a.isJsonRpcRequest=a.assertIsJsonRpcNotification=a.isJsonRpcNotification=a.JsonRpcNotificationStruct=a.JsonRpcRequestStruct=a.JsonRpcParamsStruct=a.JsonRpcErrorStruct=a.JsonRpcIdStruct=a.JsonRpcVersionStruct=a.jsonrpc2=a.getJsonSize=a.getSafeJson=a.isValidJson=a.JsonStruct=a.UnsafeJsonStruct=a.exactOptional=a.object=void 0;const c=t(35620),f=t(22011),d=t(33745);function r({path:e,branch:a}){const t=e[e.length-1];return(0,d.hasProperty)(a[a.length-2],t)}function n(e){return new c.Struct({...e,type:`optional ${e.type}`,validator:(a,t)=>!r(t)||e.validator(a,t),refiner:(a,t)=>!r(t)||e.refiner(a,t)})}function i(e){return(0,c.create)(e,a.JsonStruct)}a.object=e=>(0,c.object)(e),a.exactOptional=n,a.UnsafeJsonStruct=(0,c.union)([(0,c.literal)(null),(0,c.boolean)(),(0,c.define)("finite number",(e=>(0,c.is)(e,(0,c.number)())&&Number.isFinite(e))),(0,c.string)(),(0,c.array)((0,c.lazy)((()=>a.UnsafeJsonStruct))),(0,c.record)((0,c.string)(),(0,c.lazy)((()=>a.UnsafeJsonStruct)))]),a.JsonStruct=(0,c.coerce)(a.UnsafeJsonStruct,(0,c.any)(),(e=>((0,f.assertStruct)(e,a.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,a)=>{if("__proto__"!==e&&"constructor"!==e)return a})))))),a.isValidJson=function(e){try{return i(e),!0}catch{return!1}},a.getSafeJson=i,a.getJsonSize=function(e){(0,f.assertStruct)(e,a.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},a.jsonrpc2="2.0",a.JsonRpcVersionStruct=(0,c.literal)(a.jsonrpc2),a.JsonRpcIdStruct=(0,c.nullable)((0,c.union)([(0,c.number)(),(0,c.string)()])),a.JsonRpcErrorStruct=(0,a.object)({code:(0,c.integer)(),message:(0,c.string)(),data:n(a.JsonStruct),stack:n((0,c.string)())}),a.JsonRpcParamsStruct=(0,c.union)([(0,c.record)((0,c.string)(),a.JsonStruct),(0,c.array)(a.JsonStruct)]),a.JsonRpcRequestStruct=(0,a.object)({id:a.JsonRpcIdStruct,jsonrpc:a.JsonRpcVersionStruct,method:(0,c.string)(),params:n(a.JsonRpcParamsStruct)}),a.JsonRpcNotificationStruct=(0,a.object)({jsonrpc:a.JsonRpcVersionStruct,method:(0,c.string)(),params:n(a.JsonRpcParamsStruct)}),a.isJsonRpcNotification=function(e){return(0,c.is)(e,a.JsonRpcNotificationStruct)},a.assertIsJsonRpcNotification=function(e,t){(0,f.assertStruct)(e,a.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},a.isJsonRpcRequest=function(e){return(0,c.is)(e,a.JsonRpcRequestStruct)},a.assertIsJsonRpcRequest=function(e,t){(0,f.assertStruct)(e,a.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},a.PendingJsonRpcResponseStruct=(0,c.object)({id:a.JsonRpcIdStruct,jsonrpc:a.JsonRpcVersionStruct,result:(0,c.optional)((0,c.unknown)()),error:(0,c.optional)(a.JsonRpcErrorStruct)}),a.JsonRpcSuccessStruct=(0,a.object)({id:a.JsonRpcIdStruct,jsonrpc:a.JsonRpcVersionStruct,result:a.JsonStruct}),a.JsonRpcFailureStruct=(0,a.object)({id:a.JsonRpcIdStruct,jsonrpc:a.JsonRpcVersionStruct,error:a.JsonRpcErrorStruct}),a.JsonRpcResponseStruct=(0,c.union)([a.JsonRpcSuccessStruct,a.JsonRpcFailureStruct]),a.isPendingJsonRpcResponse=function(e){return(0,c.is)(e,a.PendingJsonRpcResponseStruct)},a.assertIsPendingJsonRpcResponse=function(e,t){(0,f.assertStruct)(e,a.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},a.isJsonRpcResponse=function(e){return(0,c.is)(e,a.JsonRpcResponseStruct)},a.assertIsJsonRpcResponse=function(e,t){(0,f.assertStruct)(e,a.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},a.isJsonRpcSuccess=function(e){return(0,c.is)(e,a.JsonRpcSuccessStruct)},a.assertIsJsonRpcSuccess=function(e,t){(0,f.assertStruct)(e,a.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},a.isJsonRpcFailure=function(e){return(0,c.is)(e,a.JsonRpcFailureStruct)},a.assertIsJsonRpcFailure=function(e,t){(0,f.assertStruct)(e,a.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},a.isJsonRpcError=function(e){return(0,c.is)(e,a.JsonRpcErrorStruct)},a.assertIsJsonRpcError=function(e,t){(0,f.assertStruct)(e,a.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},a.getJsonRpcIdValidator=function(e){const{permitEmptyString:a,permitFractions:t,permitNull:c}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(t||Number.isInteger(e))||"string"==typeof e&&(a||e.length>0)||c&&null===e)}},24956:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0})},98912:function(e,a,t){"use strict";var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.createModuleLogger=a.createProjectLogger=void 0;const f=(0,c(t(17833)).default)("metamask");a.createProjectLogger=function(e){return f.extend(e)},a.createModuleLogger=function(e,a){return e.extend(a)}},33745:(e,a)=>{"use strict";function t(e){return e.charCodeAt(0)<=127}var c;Object.defineProperty(a,"__esModule",{value:!0}),a.calculateNumberSize=a.calculateStringSize=a.isASCII=a.isPlainObject=a.ESCAPE_CHARACTERS_REGEXP=a.JsonSize=a.getKnownPropertyNames=a.hasProperty=a.isObject=a.isNullOrUndefined=a.isNonEmptyArray=void 0,a.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},a.isNullOrUndefined=function(e){return null==e},a.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},a.hasProperty=(e,a)=>Object.hasOwnProperty.call(e,a),a.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},(c=a.JsonSize||(a.JsonSize={}))[c.Null=4]="Null",c[c.Comma=1]="Comma",c[c.Wrapper=1]="Wrapper",c[c.True=4]="True",c[c.False=5]="False",c[c.Quote=1]="Quote",c[c.Colon=1]="Colon",c[c.Date=24]="Date",a.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,a.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let a=e;for(;null!==Object.getPrototypeOf(a);)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(e)===a}catch(e){return!1}},a.isASCII=t,a.calculateStringSize=function(e){return e.split("").reduce(((e,a)=>t(a)?e+1:e+2),0)+(e.match(a.ESCAPE_CHARACTERS_REGEXP)??[]).length},a.calculateNumberSize=function(e){return e.toString().length}},5770:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.hexToBigInt=a.hexToNumber=a.bigIntToHex=a.numberToHex=void 0;const c=t(22011),f=t(93976);a.numberToHex=e=>((0,c.assert)("number"==typeof e,"Value must be a number."),(0,c.assert)(e>=0,"Value must be a non-negative number."),(0,c.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,f.add0x)(e.toString(16))),a.bigIntToHex=e=>((0,c.assert)("bigint"==typeof e,"Value must be a bigint."),(0,c.assert)(e>=0,"Value must be a non-negative bigint."),(0,f.add0x)(e.toString(16))),a.hexToNumber=e=>{(0,f.assertIsHexString)(e);const a=parseInt(e,16);return(0,c.assert)(Number.isSafeInteger(a),"Value is not a safe integer. Use `hexToBigInt` instead."),a},a.hexToBigInt=e=>((0,f.assertIsHexString)(e),BigInt((0,f.add0x)(e)))},3028:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0})},2812:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createDeferredPromise=void 0,a.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let a,t;const c=new Promise(((e,c)=>{a=e,t=c}));return e&&c.catch((e=>{})),{promise:c,resolve:a,reject:t}}},32954:(e,a)=>{"use strict";var t;Object.defineProperty(a,"__esModule",{value:!0}),a.timeSince=a.inMilliseconds=a.Duration=void 0,(t=a.Duration||(a.Duration={}))[t.Millisecond=1]="Millisecond",t[t.Second=1e3]="Second",t[t.Minute=6e4]="Minute",t[t.Hour=36e5]="Hour",t[t.Day=864e5]="Day",t[t.Week=6048e5]="Week",t[t.Year=31536e6]="Year";const c=(e,a)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${a}" must be a non-negative integer. Received: "${e}".`)};a.inMilliseconds=function(e,a){return c(e,"count"),e*a},a.timeSince=function(e){return c(e,"timestamp"),Date.now()-e}},16871:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0})},49266:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.satisfiesVersionRange=a.gtRange=a.gtVersion=a.assertIsSemVerRange=a.assertIsSemVerVersion=a.isValidSemVerRange=a.isValidSemVerVersion=a.VersionRangeStruct=a.VersionStruct=void 0;const c=t(35620),f=t(99589),d=t(22011);a.VersionStruct=(0,c.refine)((0,c.string)(),"Version",(e=>null!==(0,f.valid)(e)||`Expected SemVer version, got "${e}"`)),a.VersionRangeStruct=(0,c.refine)((0,c.string)(),"Version range",(e=>null!==(0,f.validRange)(e)||`Expected SemVer range, got "${e}"`)),a.isValidSemVerVersion=function(e){return(0,c.is)(e,a.VersionStruct)},a.isValidSemVerRange=function(e){return(0,c.is)(e,a.VersionRangeStruct)},a.assertIsSemVerVersion=function(e){(0,d.assertStruct)(e,a.VersionStruct)},a.assertIsSemVerRange=function(e){(0,d.assertStruct)(e,a.VersionRangeStruct)},a.gtVersion=function(e,a){return(0,f.gt)(e,a)},a.gtRange=function(e,a){return(0,f.gtr)(e,a)},a.satisfiesVersionRange=function(e,a){return(0,f.satisfies)(e,a,{includePrerelease:!0})}},39209:(e,a,t)=>{"use strict";var c=t(76578),f="undefined"==typeof globalThis?t.g:globalThis;e.exports=function(){for(var e=[],a=0;a{"use strict";const{normalizeIPv6:c,normalizeIPv4:f,removeDotSegments:d,recomposeAuthority:r,normalizeComponentEncoding:n}=t(34834),i=t(343);function b(e,a,t,c){const f={};return c||(e=u(o(e,t),t),a=u(o(a,t),t)),!(t=t||{}).tolerant&&a.scheme?(f.scheme=a.scheme,f.userinfo=a.userinfo,f.host=a.host,f.port=a.port,f.path=d(a.path||""),f.query=a.query):(void 0!==a.userinfo||void 0!==a.host||void 0!==a.port?(f.userinfo=a.userinfo,f.host=a.host,f.port=a.port,f.path=d(a.path||""),f.query=a.query):(a.path?("/"===a.path.charAt(0)?f.path=d(a.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?f.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+a.path:f.path=a.path:f.path="/"+a.path,f.path=d(f.path)),f.query=a.query):(f.path=e.path,void 0!==a.query?f.query=a.query:f.query=e.query),f.userinfo=e.userinfo,f.host=e.host,f.port=e.port),f.scheme=e.scheme),f.fragment=a.fragment,f}function o(e,a){const t={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},c=Object.assign({},a),f=[],n=i[(c.scheme||t.scheme||"").toLowerCase()];n&&n.serialize&&n.serialize(t,c),void 0!==t.path&&(c.skipEscape?t.path=unescape(t.path):(t.path=escape(t.path),void 0!==t.scheme&&(t.path=t.path.split("%3A").join(":")))),"suffix"!==c.reference&&t.scheme&&(f.push(t.scheme),f.push(":"));const b=r(t,c);if(void 0!==b&&("suffix"!==c.reference&&f.push("//"),f.push(b),t.path&&"/"!==t.path.charAt(0)&&f.push("/")),void 0!==t.path){let e=t.path;c.absolutePath||n&&n.absolutePath||(e=d(e)),void 0===b&&(e=e.replace(/^\/\//u,"/%2F")),f.push(e)}return void 0!==t.query&&(f.push("?"),f.push(t.query)),void 0!==t.fragment&&(f.push("#"),f.push(t.fragment)),f.join("")}const s=Array.from({length:127},((e,a)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(a)))),l=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function u(e,a){const t=Object.assign({},a),d={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=-1!==e.indexOf("%");let n=!1;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);const b=e.match(l);if(b){if(d.scheme=b[1],d.userinfo=b[3],d.host=b[4],d.port=parseInt(b[5],10),d.path=b[6]||"",d.query=b[7],d.fragment=b[8],isNaN(d.port)&&(d.port=b[5]),d.host){const e=f(d.host);if(!1===e.isIPV4){const a=c(e.host,{isIPV4:!1});d.host=a.host.toLowerCase(),n=a.isIPV6}else d.host=e.host,n=!0}void 0!==d.scheme||void 0!==d.userinfo||void 0!==d.host||void 0!==d.port||d.path||void 0!==d.query?void 0===d.scheme?d.reference="relative":void 0===d.fragment?d.reference="absolute":d.reference="uri":d.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==d.reference&&(d.error=d.error||"URI is not a "+t.reference+" reference.");const e=i[(t.scheme||d.scheme||"").toLowerCase()];if(!(t.unicodeSupport||e&&e.unicodeSupport)&&d.host&&(t.domainHost||e&&e.domainHost)&&!1===n&&function(e){let a=0;for(let t=0,c=e.length;t126||s[a])return!0;return!1}(d.host))try{d.host=URL.domainToASCII(d.host.toLowerCase())}catch(e){d.error=d.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(r&&void 0!==d.scheme&&(d.scheme=unescape(d.scheme)),r&&void 0!==d.userinfo&&(d.userinfo=unescape(d.userinfo)),r&&void 0!==d.host&&(d.host=unescape(d.host)),void 0!==d.path&&d.path.length&&(d.path=escape(unescape(d.path))),void 0!==d.fragment&&d.fragment.length&&(d.fragment=encodeURI(decodeURIComponent(d.fragment)))),e&&e.parse&&e.parse(d,t)}else d.error=d.error||"URI can not be parsed.";return d}const h={SCHEMES:i,normalize:function(e,a){return"string"==typeof e?e=o(u(e,a),a):"object"==typeof e&&(e=u(o(e,a),a)),e},resolve:function(e,a,t){const c=Object.assign({scheme:"null"},t);return o(b(u(e,c),u(a,c),c,!0),{...c,skipEscape:!0})},resolveComponents:b,equal:function(e,a,t){return"string"==typeof e?(e=unescape(e),e=o(n(u(e,t),!0),{...t,skipEscape:!0})):"object"==typeof e&&(e=o(n(e,!0),{...t,skipEscape:!0})),"string"==typeof a?(a=unescape(a),a=o(n(u(a,t),!0),{...t,skipEscape:!0})):"object"==typeof a&&(a=o(n(a,!0),{...t,skipEscape:!0})),e.toLowerCase()===a.toLowerCase()},serialize:o,parse:u};e.exports=h,e.exports.default=h,e.exports.fastUri=h},343:e=>{"use strict";const a=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function c(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function f(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function d(e){const a="https"===String(e.scheme).toLowerCase();return e.port!==(a?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const r={scheme:"http",domainHost:!0,parse:f,serialize:d},n={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=c(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(c(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[a,t]=e.resourceName.split("?");e.path=a&&"/"!==a?a:void 0,e.query=t,e.resourceName=void 0}return e.fragment=void 0,e}},i={http:r,https:{scheme:"https",domainHost:r.domainHost,parse:f,serialize:d},ws:n,wss:{scheme:"wss",domainHost:n.domainHost,parse:n.parse,serialize:n.serialize},urn:{scheme:"urn",parse:function(e,a){if(!e.path)return e.error="URN can not be parsed",e;const c=e.path.match(t);if(c){const t=a.scheme||e.scheme||"urn";e.nid=c[1].toLowerCase(),e.nss=c[2];const f=`${t}:${a.nid||e.nid}`,d=i[f];e.path=void 0,d&&(e=d.parse(e,a))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,a){const t=a.scheme||e.scheme||"urn",c=e.nid.toLowerCase(),f=`${t}:${a.nid||c}`,d=i[f];d&&(e=d.serialize(e,a));const r=e,n=e.nss;return r.path=`${c||a.nid}:${n}`,a.skipEscape=!0,r},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){const c=e;return c.uuid=c.nss,c.nss=void 0,t.tolerant||c.uuid&&a.test(c.uuid)||(c.error=c.error||"UUID is not valid."),c},serialize:function(e){const a=e;return a.nss=(e.uuid||"").toLowerCase(),a},skipNormalize:!0}};e.exports=i},64914:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},34834:(e,a,t)=>{"use strict";const{HEX:c}=t(64914);function f(e){if(i(e,".")<3)return{host:e,isIPV4:!1};const a=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[t]=a;return t?{host:n(t,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function d(e,a=!1){let t="",f=!0;for(const a of e){if(void 0===c[a])return;"0"!==a&&!0===f&&(f=!1),f||(t+=a)}return a&&0===t.length&&(t="0"),t}function r(e,a={}){if(i(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let a=0;const t={error:!1,address:"",zone:""},c=[],f=[];let r=!1,n=!1,i=!1;function b(){if(f.length){if(!1===r){const e=d(f);if(void 0===e)return t.error=!0,!1;c.push(e)}f.length=0}return!0}for(let d=0;d7){t.error=!0;break}d-1>=0&&":"===e[d-1]&&(n=!0)}}return f.length&&(r?t.zone=f.join(""):i?c.push(f.join("")):c.push(d(f))),t.address=c.join(""),t}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,a=t.address;return t.zone&&(e+="%"+t.zone,a+="%25"+t.zone),{host:e,escapedHost:a,isIPV6:!0}}}function n(e,a){let t="",c=!0;const f=e.length;for(let d=0;d{"use strict";t.d(a,{HI:()=>Bt,vu:()=>ct});const c=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];function f(e,a){return a&&10!=a?16==a?"0x"==e.slice(0,2)?BigInt(e):BigInt("0x"+e):void 0:BigInt(e)}const d=f;function r(e){const a=e.toString(16);return 4*(a.length-1)+c[parseInt(a[0],16)]}function n(e){return BigInt(e)>BigInt(a)}const o=i,s=b;function l(e){return(BigInt(e)&BigInt(1))==BigInt(1)}function u(e){if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Number too big");return Number(e)}function h(e,a){return BigInt(e)+BigInt(a)}function p(e,a){return BigInt(e)-BigInt(a)}function g(e){return-BigInt(e)}function m(e,a){return BigInt(e)*BigInt(a)}function x(e,a){return BigInt(e)%BigInt(a)}function y(e,a){return BigInt(e)>BigInt(a)}function A(e,a){return BigInt(e)>=BigInt(a)}function v(e,a){return BigInt(e)&BigInt(a)}function w(e,a,t,c){const f="0000000"+t.toString(16),d=new Uint32Array(e.buffer,e.byteOffset+a,c/4),r=1+(4*(f.length-7)-1>>5);for(let e=0;ed[d.length-a-1]=e.toString(16).padStart(8,"0"))),f(d.join(""),16)}function I(e,a){return e.toString(a)}function E(e){const a=new Uint8Array(Math.floor((r(e)-1)/8)+1);return w(a,0,e,a.byteLength),a}const C=d(0),M=d(1);var B=Object.freeze({__proto__:null,abs:function(e){return BigInt(e)>=0?BigInt(e):-BigInt(e)},add:h,band:v,bitLength:r,bits:function(e){let a=BigInt(e);const t=[];for(;a;)a&BigInt(1)?t.push(1):t.push(0),a>>=BigInt(1);return t},bor:function(e,a){return BigInt(e)|BigInt(a)},bxor:function(e,a){return BigInt(e)^BigInt(a)},div:function(e,a){return BigInt(e)/BigInt(a)},e:d,eq:function(e,a){return BigInt(e)==BigInt(a)},exp:function(e,a){return BigInt(e)**BigInt(a)},fromArray:function(e,a){let t=BigInt(0);a=BigInt(a);for(let c=0;c>=BigInt(1)}return t},neg:g,neq:function(e,a){return BigInt(e)!=BigInt(a)},one:M,pow:function(e,a){return BigInt(e)**BigInt(a)},shiftLeft:i,shiftRight:b,shl:o,shr:s,square:function(e){return BigInt(e)*BigInt(e)},sub:p,toArray:function(e,a){const t=[];let c=BigInt(e);for(a=BigInt(a);c;)t.unshift(Number(c%a)),c/=a;return t},toLEBuff:E,toNumber:u,toRprBE:function(e,a,t,c){const f="0000000"+t.toString(16),d=new DataView(e.buffer,e.byteOffset+a,c),r=1+(4*(f.length-7)-1>>5);for(let e=0;e>=1;return t}function k(e,a,t,c,f){e[a]=e[a]+e[t]>>>0,e[f]=(e[f]^e[a])>>>0,e[f]=(e[f]<<16|e[f]>>>16&65535)>>>0,e[c]=e[c]+e[f]>>>0,e[t]=(e[t]^e[c])>>>0,e[t]=(e[t]<<12|e[t]>>>20&4095)>>>0,e[a]=e[a]+e[t]>>>0,e[f]=(e[f]^e[a])>>>0,e[f]=(e[f]<<8|e[f]>>>24&255)>>>0,e[c]=e[c]+e[f]>>>0,e[t]=(e[t]^e[c])>>>0,e[t]=(e[t]<<7|e[t]>>>25&127)>>>0}class N{constructor(e){e=e||[0,0,0,0,0,0,0,0],this.state=[1634760805,857760878,2036477234,1797285236,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],0,0,0,0],this.idx=16,this.buff=new Array(16)}nextU32(){return 16==this.idx&&this.update(),this.buff[this.idx++]}nextU64(){return h(m(this.nextU32(),4294967296),this.nextU32())}nextBool(){return!(1&~this.nextU32())}update(){for(let e=0;e<16;e++)this.buff[e]=this.state[e];for(let a=0;a<10;a++)k(e=this.buff,0,4,8,12),k(e,1,5,9,13),k(e,2,6,10,14),k(e,3,7,11,15),k(e,0,5,10,15),k(e,1,6,11,12),k(e,2,7,8,13),k(e,3,4,9,14);var e;for(let e=0;e<16;e++)this.buff[e]=this.buff[e]+this.state[e]>>>0;this.idx=0,this.state[12]=this.state[12]+1>>>0,0==this.state[12]&&(this.state[13]=this.state[13]+1>>>0,0==this.state[13]&&(this.state[14]=this.state[14]+1>>>0,0==this.state[14]&&(this.state[15]=this.state[15]+1>>>0)))}}let P=null;function R(){return P||(P=new N(function(){const e=function(e){let a=new Uint8Array(e);if(void 0!==globalThis.crypto)globalThis.crypto.getRandomValues(a);else for(let t=0;t>>0;return a}(32),a=new Uint32Array(e.buffer),t=[];for(let e=0;e<8;e++)t.push(a[e]);return t}()),P)}function O(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var D={bigInt2BytesLE:function(e,a){const t=Array(a);let c=BigInt(e);for(let e=0;e>=8n;return t},bigInt2U32LE:function(e,a){const t=Array(a);let c=BigInt(e);for(let e=0;e>=32n;return t},isOcamNum:function(e){return!!Array.isArray(e)&&3==e.length&&"number"==typeof e[0]&&"number"==typeof e[1]&&!!Array.isArray(e[2])}},T=function(e,a,t,c,f,d,r){const n=e.addFunction(a);n.addParam("base","i32"),n.addParam("scalar","i32"),n.addParam("scalarLength","i32"),n.addParam("r","i32"),n.addLocal("i","i32"),n.addLocal("b","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(t));n.addCode(i.if(i.i32_eqz(i.getLocal("scalarLength")),[...i.call(r,i.getLocal("r")),...i.ret([])])),n.addCode(i.call(d,i.getLocal("base"),b)),n.addCode(i.call(r,i.getLocal("r"))),n.addCode(i.setLocal("i",i.getLocal("scalarLength"))),n.addCode(i.block(i.loop(i.setLocal("i",i.i32_sub(i.getLocal("i"),i.i32_const(1))),i.setLocal("b",i.i32_load8_u(i.i32_add(i.getLocal("scalar"),i.getLocal("i")))),...function(){const e=[];for(let a=0;a<8;a++)e.push(...i.call(f,i.getLocal("r"),i.getLocal("r")),...i.if(i.i32_ge_u(i.getLocal("b"),i.i32_const(128>>a)),[...i.setLocal("b",i.i32_sub(i.getLocal("b"),i.i32_const(128>>a))),...i.call(c,i.getLocal("r"),b,i.getLocal("r"))]));return e}(),i.br_if(1,i.i32_eqz(i.getLocal("i"))),i.br(0))))},F=function(e,a){const t=8*e.modules[a].n64,c=e.addFunction(a+"_batchInverse");c.addParam("pIn","i32"),c.addParam("inStep","i32"),c.addParam("n","i32"),c.addParam("pOut","i32"),c.addParam("outStep","i32"),c.addLocal("itAux","i32"),c.addLocal("itIn","i32"),c.addLocal("itOut","i32"),c.addLocal("i","i32");const f=c.getCodeBuilder(),d=f.i32_const(e.alloc(t));c.addCode(f.setLocal("itAux",f.i32_load(f.i32_const(0))),f.i32_store(f.i32_const(0),f.i32_add(f.getLocal("itAux"),f.i32_mul(f.i32_add(f.getLocal("n"),f.i32_const(1)),f.i32_const(t))))),c.addCode(f.call(a+"_one",f.getLocal("itAux")),f.setLocal("itIn",f.getLocal("pIn")),f.setLocal("itAux",f.i32_add(f.getLocal("itAux"),f.i32_const(t))),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("n"))),f.if(f.call(a+"_isZero",f.getLocal("itIn")),f.call(a+"_copy",f.i32_sub(f.getLocal("itAux"),f.i32_const(t)),f.getLocal("itAux")),f.call(a+"_mul",f.getLocal("itIn"),f.i32_sub(f.getLocal("itAux"),f.i32_const(t)),f.getLocal("itAux"))),f.setLocal("itIn",f.i32_add(f.getLocal("itIn"),f.getLocal("inStep"))),f.setLocal("itAux",f.i32_add(f.getLocal("itAux"),f.i32_const(t))),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))),f.setLocal("itIn",f.i32_sub(f.getLocal("itIn"),f.getLocal("inStep"))),f.setLocal("itAux",f.i32_sub(f.getLocal("itAux"),f.i32_const(t))),f.setLocal("itOut",f.i32_add(f.getLocal("pOut"),f.i32_mul(f.i32_sub(f.getLocal("n"),f.i32_const(1)),f.getLocal("outStep")))),f.call(a+"_inverse",f.getLocal("itAux"),f.getLocal("itAux")),f.block(f.loop(f.br_if(1,f.i32_eqz(f.getLocal("i"))),f.if(f.call(a+"_isZero",f.getLocal("itIn")),[...f.call(a+"_copy",f.getLocal("itAux"),f.i32_sub(f.getLocal("itAux"),f.i32_const(t))),...f.call(a+"_zero",f.getLocal("itOut"))],[...f.call(a+"_copy",f.i32_sub(f.getLocal("itAux"),f.i32_const(t)),d),...f.call(a+"_mul",f.getLocal("itAux"),f.getLocal("itIn"),f.i32_sub(f.getLocal("itAux"),f.i32_const(t))),...f.call(a+"_mul",f.getLocal("itAux"),d,f.getLocal("itOut"))]),f.setLocal("itIn",f.i32_sub(f.getLocal("itIn"),f.getLocal("inStep"))),f.setLocal("itOut",f.i32_sub(f.getLocal("itOut"),f.getLocal("outStep"))),f.setLocal("itAux",f.i32_sub(f.getLocal("itAux"),f.i32_const(t))),f.setLocal("i",f.i32_sub(f.getLocal("i"),f.i32_const(1))),f.br(0)))),c.addCode(f.i32_store(f.i32_const(0),f.getLocal("itAux")))},Q=function(e,a,t,c,f,d){void 0===d&&(d=ca?1:-1}function H(e){return e*e}function $(e){return e%2n!==0n}function q(e){return e%2n===0n}function G(e){return e<0n}function z(e){return e>0n}function K(e){return G(e)?e.toString(2).length-1:e.toString(2).length}function V(e){return e<0n?-e:e}function Z(e){return 1n===V(e)}function J(e,a){for(var t,c,f,d=0n,r=1n,n=a,i=V(e);0n!==i;)t=n/i,c=d,f=n,d=r,n=i,r=c-t*r,i=f-t*i;if(!Z(n))throw new Error(e.toString()+" and "+a.toString()+" are not co-prime");return-1===j(d,0n)&&(d+=a),G(e)?-d:d}function W(e,a,t){if(0n===t)throw new Error("Cannot take modPow with modulus 0");var c=1n,f=e%t;for(G(a)&&(a*=-1n,f=J(f,t));z(a);){if(0n===f)return 0n;$(a)&&(c=c*f%t),a/=2n,f=H(f)%t}return c}function Y(e,a){return 0n!==a&&(!!Z(a)||(0===function(e,a){return(e=e>=0n?e:-e)===(a=a>=0n?a:-a)?0:e>a?1:-1}(a,2n)?q(e):e%a===0n))}function X(e,a){for(var t,c,f,d=function(e){return e-1n}(e),r=d,n=0;q(r);)r/=2n,n++;e:for(c=0;c>1&&c>1,e>>1)))),a.addCode(t.setLocal(i,t.i64_add(t.getLocal(i),t.i64_shr_u(t.getLocal(n),t.i64_const(32)))))),e>0&&(a.addCode(t.setLocal(n,t.i64_add(t.i64_and(t.getLocal(n),t.i64_const(4294967295)),t.i64_and(t.getLocal(b),t.i64_const(4294967295))))),a.addCode(t.setLocal(i,t.i64_add(t.i64_add(t.getLocal(i),t.i64_shr_u(t.getLocal(n),t.i64_const(32))),t.getLocal(o))))),a.addCode(t.i64_store32(t.getLocal("r"),4*e,t.getLocal(n))),a.addCode(t.setLocal(b,t.getLocal(i)),t.setLocal(o,t.i64_shr_u(t.getLocal(b),t.i64_const(32))))}a.addCode(t.i64_store32(t.getLocal("r"),4*f*2-4,t.getLocal(b)))}(),function(){const a=e.addFunction(c+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(c+"_mul",t.getLocal("x"),t.getLocal("x"),t.getLocal("r")))}(),function(){!function(){const a=e.addFunction(c+"__mul1");a.addParam("px","i32"),a.addParam("y","i64"),a.addParam("pr","i32"),a.addLocal("c","i64");const t=a.getCodeBuilder();a.addCode(t.setLocal("c",t.i64_mul(t.i64_load32_u(t.getLocal("px"),0,0),t.getLocal("y")))),a.addCode(t.i64_store32(t.getLocal("pr"),0,0,t.getLocal("c")));for(let e=1;e>1n,g=e.alloc(n,ee.bigInt2BytesLE(p,n)),m=p+1n,x=e.alloc(n,ee.bigInt2BytesLE(m,n));e.modules[i]={pq:o,pR2:s,n64:d,q:f,pOne:l,pZero:u,pePlusOne:x};let y=2n;if(ie(f))for(;ne(y,p,f)!==h;)y+=1n;let A=0,v=h;for(;!be(v)&&0n!==v;)A++,v>>=1n;const w=e.alloc(n,ee.bigInt2BytesLE(v,n)),_=ne(y,v,f),I=e.alloc(ee.bigInt2BytesLE((_<>1n,C=e.alloc(n,ee.bigInt2BytesLE(E,n));return e.exportFunction(b+"_copy",i+"_copy"),e.exportFunction(b+"_zero",i+"_zero"),e.exportFunction(b+"_isZero",i+"_isZero"),e.exportFunction(b+"_eq",i+"_eq"),function(){const a=e.addFunction(i+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const t=a.getCodeBuilder();a.addCode(t.ret(t.call(b+"_eq",t.getLocal("x"),t.i32_const(l))))}(),function(){const a=e.addFunction(i+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.if(t.call(b+"_add",t.getLocal("x"),t.getLocal("y"),t.getLocal("r")),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))),t.if(t.call(b+"_gte",t.getLocal("r"),t.i32_const(o)),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))))))}(),function(){const a=e.addFunction(i+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.if(t.call(b+"_sub",t.getLocal("x"),t.getLocal("y"),t.getLocal("r")),t.drop(t.call(b+"_add",t.getLocal("r"),t.i32_const(o),t.getLocal("r")))))}(),function(){const a=e.addFunction(i+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(i+"_sub",t.i32_const(u),t.getLocal("x"),t.getLocal("r")))}(),function(){const a=e.alloc(r*r*8),t=e.addFunction(i+"_mReduct");t.addParam("t","i32"),t.addParam("r","i32"),t.addLocal("np32","i64"),t.addLocal("c","i64"),t.addLocal("m","i64");const c=t.getCodeBuilder(),d=Number(0x100000000n-re(f,0x100000000n));t.addCode(c.setLocal("np32",c.i64_const(d)));for(let e=0;e=r&&a.addCode(t.i64_store32(t.getLocal("r"),4*(e-r),t.getLocal(h))),[h,p]=[p,h],a.addCode(t.setLocal(p,t.i64_shr_u(t.getLocal(h),t.i64_const(32))))}a.addCode(t.i64_store32(t.getLocal("r"),4*r-4,t.getLocal(h))),a.addCode(t.if(t.i32_wrap_i64(t.getLocal(p)),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))),t.if(t.call(b+"_gte",t.getLocal("r"),t.i32_const(o)),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))))))}(),function(){const a=e.addFunction(i+"_square");a.addParam("x","i32"),a.addParam("r","i32"),a.addLocal("c0","i64"),a.addLocal("c1","i64"),a.addLocal("c0_old","i64"),a.addLocal("c1_old","i64"),a.addLocal("np32","i64");for(let e=0;e>1&&c>1,e>>1)))),a.addCode(t.setLocal(h,t.i64_add(t.getLocal(h),t.i64_shr_u(t.getLocal(u),t.i64_const(32)))))),e>0&&(a.addCode(t.setLocal(u,t.i64_add(t.i64_and(t.getLocal(u),t.i64_const(4294967295)),t.i64_and(t.getLocal(p),t.i64_const(4294967295))))),a.addCode(t.setLocal(h,t.i64_add(t.i64_add(t.getLocal(h),t.i64_shr_u(t.getLocal(u),t.i64_const(32))),t.getLocal(g)))));for(let c=Math.max(1,e-r+1);c<=e&&c=r&&a.addCode(t.i64_store32(t.getLocal("r"),4*(e-r),t.getLocal(u))),a.addCode(t.setLocal(p,t.getLocal(h)),t.setLocal(g,t.i64_shr_u(t.getLocal(p),t.i64_const(32))))}a.addCode(t.i64_store32(t.getLocal("r"),4*r-4,t.getLocal(p))),a.addCode(t.if(t.i32_wrap_i64(t.getLocal(g)),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))),t.if(t.call(b+"_gte",t.getLocal("r"),t.i32_const(o)),t.drop(t.call(b+"_sub",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))))))}(),function(){const a=e.addFunction(i+"_squareOld");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(i+"_mul",t.getLocal("x"),t.getLocal("x"),t.getLocal("r")))}(),function(){const a=e.addFunction(i+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(i+"_mul",t.getLocal("x"),t.i32_const(s),t.getLocal("r")))}(),function(){const a=e.alloc(2*n),t=e.addFunction(i+"_fromMontgomery");t.addParam("x","i32"),t.addParam("r","i32");const c=t.getCodeBuilder();t.addCode(c.call(b+"_copy",c.getLocal("x"),c.i32_const(a))),t.addCode(c.call(b+"_zero",c.i32_const(a+n))),t.addCode(c.call(i+"_mReduct",c.i32_const(a),c.getLocal("r")))}(),function(){const a=e.addFunction(i+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const t=a.getCodeBuilder(),c=t.i32_const(e.alloc(n));a.addCode(t.call(i+"_fromMontgomery",t.getLocal("x"),c),t.call(b+"_gte",c,t.i32_const(x)))}(),function(){const a=e.addFunction(i+"_sign");a.addParam("x","i32"),a.setReturnType("i32");const t=a.getCodeBuilder(),c=t.i32_const(e.alloc(n));a.addCode(t.if(t.call(b+"_isZero",t.getLocal("x")),t.ret(t.i32_const(0))),t.call(i+"_fromMontgomery",t.getLocal("x"),c),t.if(t.call(b+"_gte",c,t.i32_const(x)),t.ret(t.i32_const(-1))),t.ret(t.i32_const(1)))}(),function(){const a=e.addFunction(i+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(i+"_fromMontgomery",t.getLocal("x"),t.getLocal("r"))),a.addCode(t.call(b+"_inverseMod",t.getLocal("r"),t.i32_const(o),t.getLocal("r"))),a.addCode(t.call(i+"_toMontgomery",t.getLocal("r"),t.getLocal("r")))}(),function(){const a=e.addFunction(i+"_one");a.addParam("pr","i32");const t=a.getCodeBuilder();a.addCode(t.call(b+"_copy",t.i32_const(l),t.getLocal("pr")))}(),function(){const a=e.addFunction(i+"_load");a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32"),a.addLocal("p","i32"),a.addLocal("l","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const t=a.getCodeBuilder(),c=t.i32_const(e.alloc(n)),f=e.alloc(n),d=t.i32_const(f);a.addCode(t.call(b+"_zero",t.getLocal("r")),t.setLocal("i",t.i32_const(n)),t.setLocal("p",t.getLocal("scalar")),t.block(t.loop(t.br_if(1,t.i32_gt_u(t.getLocal("i"),t.getLocal("scalarLen"))),t.if(t.i32_eq(t.getLocal("i"),t.i32_const(n)),t.call(i+"_one",c),t.call(i+"_mul",c,t.i32_const(s),c)),t.call(i+"_mul",t.getLocal("p"),c,d),t.call(i+"_add",t.getLocal("r"),d,t.getLocal("r")),t.setLocal("p",t.i32_add(t.getLocal("p"),t.i32_const(n))),t.setLocal("i",t.i32_add(t.getLocal("i"),t.i32_const(n))),t.br(0))),t.setLocal("l",t.i32_rem_u(t.getLocal("scalarLen"),t.i32_const(n))),t.if(t.i32_eqz(t.getLocal("l")),t.ret([])),t.call(b+"_zero",d),t.setLocal("j",t.i32_const(0)),t.block(t.loop(t.br_if(1,t.i32_eq(t.getLocal("j"),t.getLocal("l"))),t.i32_store8(t.getLocal("j"),f,t.i32_load8_u(t.getLocal("p"))),t.setLocal("p",t.i32_add(t.getLocal("p"),t.i32_const(1))),t.setLocal("j",t.i32_add(t.getLocal("j"),t.i32_const(1))),t.br(0))),t.if(t.i32_eq(t.getLocal("i"),t.i32_const(n)),t.call(i+"_one",c),t.call(i+"_mul",c,t.i32_const(s),c)),t.call(i+"_mul",d,c,d),t.call(i+"_add",t.getLocal("r"),d,t.getLocal("r")))}(),function(){const a=e.addFunction(i+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const t=a.getCodeBuilder(),c=t.i32_const(e.alloc(n));a.addCode(t.call(i+"_load",t.getLocal("scalar"),t.getLocal("scalarLen"),c),t.call(i+"_toMontgomery",c,c),t.call(i+"_mul",t.getLocal("x"),c,t.getLocal("r")))}(),te(e,i),ce(e,i+"_batchToMontgomery",i+"_toMontgomery",n,n),ce(e,i+"_batchFromMontgomery",i+"_fromMontgomery",n,n),ce(e,i+"_batchNeg",i+"_neg",n,n),fe(e,i+"_batchAdd",i+"_add",n,n),fe(e,i+"_batchSub",i+"_sub",n,n),fe(e,i+"_batchMul",i+"_mul",n,n),e.exportFunction(i+"_add"),e.exportFunction(i+"_sub"),e.exportFunction(i+"_neg"),e.exportFunction(i+"_isNegative"),e.exportFunction(i+"_isOne"),e.exportFunction(i+"_sign"),e.exportFunction(i+"_mReduct"),e.exportFunction(i+"_mul"),e.exportFunction(i+"_square"),e.exportFunction(i+"_squareOld"),e.exportFunction(i+"_fromMontgomery"),e.exportFunction(i+"_toMontgomery"),e.exportFunction(i+"_inverse"),e.exportFunction(i+"_one"),e.exportFunction(i+"_load"),e.exportFunction(i+"_timesScalar"),ae(e,i+"_exp",n,i+"_mul",i+"_square",b+"_copy",i+"_one"),e.exportFunction(i+"_exp"),e.exportFunction(i+"_batchInverse"),ie(f)&&(function(){const a=e.addFunction(i+"_sqrt");a.addParam("n","i32"),a.addParam("r","i32"),a.addLocal("m","i32"),a.addLocal("i","i32"),a.addLocal("j","i32");const t=a.getCodeBuilder(),c=t.i32_const(l),f=t.i32_const(e.alloc(n)),d=t.i32_const(e.alloc(n)),r=t.i32_const(e.alloc(n)),b=t.i32_const(e.alloc(n)),o=t.i32_const(e.alloc(n));a.addCode(t.if(t.call(i+"_isZero",t.getLocal("n")),t.ret(t.call(i+"_zero",t.getLocal("r")))),t.setLocal("m",t.i32_const(A)),t.call(i+"_copy",t.i32_const(I),f),t.call(i+"_exp",t.getLocal("n"),t.i32_const(w),t.i32_const(n),d),t.call(i+"_exp",t.getLocal("n"),t.i32_const(C),t.i32_const(n),r),t.block(t.loop(t.br_if(1,t.call(i+"_eq",d,c)),t.call(i+"_square",d,b),t.setLocal("i",t.i32_const(1)),t.block(t.loop(t.br_if(1,t.call(i+"_eq",b,c)),t.call(i+"_square",b,b),t.setLocal("i",t.i32_add(t.getLocal("i"),t.i32_const(1))),t.br(0))),t.call(i+"_copy",f,o),t.setLocal("j",t.i32_sub(t.i32_sub(t.getLocal("m"),t.getLocal("i")),t.i32_const(1))),t.block(t.loop(t.br_if(1,t.i32_eqz(t.getLocal("j"))),t.call(i+"_square",o,o),t.setLocal("j",t.i32_sub(t.getLocal("j"),t.i32_const(1))),t.br(0))),t.setLocal("m",t.getLocal("i")),t.call(i+"_square",o,f),t.call(i+"_mul",d,f,d),t.call(i+"_mul",r,o,r),t.br(0))),t.if(t.call(i+"_isNegative",r),t.call(i+"_neg",r,t.getLocal("r")),t.call(i+"_copy",r,t.getLocal("r"))))}(),function(){const a=e.addFunction(i+"_isSquare");a.addParam("n","i32"),a.setReturnType("i32");const t=a.getCodeBuilder(),c=t.i32_const(l),f=t.i32_const(e.alloc(n));a.addCode(t.if(t.call(i+"_isZero",t.getLocal("n")),t.ret(t.i32_const(1))),t.call(i+"_exp",t.getLocal("n"),t.i32_const(g),t.i32_const(n),f),t.call(i+"_eq",f,c))}(),e.exportFunction(i+"_sqrt"),e.exportFunction(i+"_isSquare")),e.exportFunction(i+"_batchToMontgomery"),e.exportFunction(i+"_batchFromMontgomery"),i};const le=se,{bitLength:ue}=U;var he=function(e,a,t,c,f){const d=BigInt(a),r=Math.floor((ue(d-1n)-1)/64)+1,n=8*r,i=t||"f1";if(e.modules[i])return i;e.modules[i]={n64:r};const b=f||"int",o=le(e,d,c,b),s=e.modules[o].pR2,l=e.modules[o].pq,u=e.modules[o].pePlusOne;return function(){const a=e.alloc(n),t=e.addFunction(i+"_mul");t.addParam("x","i32"),t.addParam("y","i32"),t.addParam("r","i32");const c=t.getCodeBuilder();t.addCode(c.call(o+"_mul",c.getLocal("x"),c.getLocal("y"),c.i32_const(a))),t.addCode(c.call(o+"_mul",c.i32_const(a),c.i32_const(s),c.getLocal("r")))}(),function(){const a=e.addFunction(i+"_square");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(i+"_mul",t.getLocal("x"),t.getLocal("x"),t.getLocal("r")))}(),function(){const a=e.addFunction(i+"_inverse");a.addParam("x","i32"),a.addParam("r","i32");const t=a.getCodeBuilder();a.addCode(t.call(b+"_inverseMod",t.getLocal("x"),t.i32_const(l),t.getLocal("r")))}(),function(){const a=e.addFunction(i+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const t=a.getCodeBuilder();a.addCode(t.call(b+"_gte",t.getLocal("x"),t.i32_const(u)))}(),e.exportFunction(o+"_add",i+"_add"),e.exportFunction(o+"_sub",i+"_sub"),e.exportFunction(o+"_neg",i+"_neg"),e.exportFunction(i+"_mul"),e.exportFunction(i+"_square"),e.exportFunction(i+"_inverse"),e.exportFunction(i+"_isNegative"),e.exportFunction(o+"_copy",i+"_copy"),e.exportFunction(o+"_zero",i+"_zero"),e.exportFunction(o+"_one",i+"_one"),e.exportFunction(o+"_isZero",i+"_isZero"),e.exportFunction(o+"_eq",i+"_eq"),i};const pe=T,ge=F,me=D;var xe=function(e,a,t,c){if(e.modules[t])return t;const f=8*e.modules[c].n64,d=e.modules[c].q;return e.modules[t]={n64:2*e.modules[c].n64},function(){const a=e.addFunction(t+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.i32_and(d.call(c+"_isZero",r),d.call(c+"_isZero",n)))}(),function(){const a=e.addFunction(t+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.ret(d.i32_and(d.call(c+"_isOne",r),d.call(c+"_isZero",n))))}(),function(){const a=e.addFunction(t+"_zero");a.addParam("x","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.call(c+"_zero",r),d.call(c+"_zero",n))}(),function(){const a=e.addFunction(t+"_one");a.addParam("x","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.call(c+"_one",r),d.call(c+"_zero",n))}(),function(){const a=e.addFunction(t+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_copy",r,i),d.call(c+"_copy",n,b))}(),function(){const d=e.addFunction(t+"_mul");d.addParam("x","i32"),d.addParam("y","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.getLocal("y"),o=r.i32_add(r.getLocal("y"),r.i32_const(f)),s=r.getLocal("r"),l=r.i32_add(r.getLocal("r"),r.i32_const(f)),u=r.i32_const(e.alloc(f)),h=r.i32_const(e.alloc(f)),p=r.i32_const(e.alloc(f)),g=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_mul",n,b,u),r.call(c+"_mul",i,o,h),r.call(c+"_add",n,i,p),r.call(c+"_add",b,o,g),r.call(c+"_mul",p,g,p),r.call(a,h,s),r.call(c+"_add",u,s,s),r.call(c+"_add",u,h,l),r.call(c+"_sub",p,l,l))}(),function(){const a=e.addFunction(t+"_mul1");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("y"),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_mul",r,i,b),d.call(c+"_mul",n,i,o))}(),function(){const d=e.addFunction(t+"_square");d.addParam("x","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.getLocal("r"),o=r.i32_add(r.getLocal("r"),r.i32_const(f)),s=r.i32_const(e.alloc(f)),l=r.i32_const(e.alloc(f)),u=r.i32_const(e.alloc(f)),h=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_mul",n,i,s),r.call(c+"_add",n,i,l),r.call(a,i,u),r.call(c+"_add",n,u,u),r.call(a,s,h),r.call(c+"_add",h,s,h),r.call(c+"_mul",l,u,b),r.call(c+"_sub",b,h,b),r.call(c+"_add",s,s,o))}(),function(){const a=e.addFunction(t+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("y"),b=d.i32_add(d.getLocal("y"),d.i32_const(f)),o=d.getLocal("r"),s=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_add",r,i,o),d.call(c+"_add",n,b,s))}(),function(){const a=e.addFunction(t+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("y"),b=d.i32_add(d.getLocal("y"),d.i32_const(f)),o=d.getLocal("r"),s=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_sub",r,i,o),d.call(c+"_sub",n,b,s))}(),function(){const a=e.addFunction(t+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_neg",r,i),d.call(c+"_neg",n,b))}(),function(){const a=e.addFunction(t+"_conjugate");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_copy",r,i),d.call(c+"_neg",n,b))}(),function(){const a=e.addFunction(t+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_toMontgomery",r,i),d.call(c+"_toMontgomery",n,b))}(),function(){const a=e.addFunction(t+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_fromMontgomery",r,i),d.call(c+"_fromMontgomery",n,b))}(),function(){const a=e.addFunction(t+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("y"),b=d.i32_add(d.getLocal("y"),d.i32_const(f));a.addCode(d.i32_and(d.call(c+"_eq",r,i),d.call(c+"_eq",n,b)))}(),function(){const d=e.addFunction(t+"_inverse");d.addParam("x","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.getLocal("r"),o=r.i32_add(r.getLocal("r"),r.i32_const(f)),s=r.i32_const(e.alloc(f)),l=r.i32_const(e.alloc(f)),u=r.i32_const(e.alloc(f)),h=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_square",n,s),r.call(c+"_square",i,l),r.call(a,l,u),r.call(c+"_sub",s,u,u),r.call(c+"_inverse",u,h),r.call(c+"_mul",n,h,b),r.call(c+"_mul",i,h,o),r.call(c+"_neg",o,o))}(),function(){const a=e.addFunction(t+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.getLocal("r"),b=d.i32_add(d.getLocal("r"),d.i32_const(f));a.addCode(d.call(c+"_timesScalar",r,d.getLocal("scalar"),d.getLocal("scalarLen"),i),d.call(c+"_timesScalar",n,d.getLocal("scalar"),d.getLocal("scalarLen"),b))}(),function(){const a=e.addFunction(t+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.setLocal("s",d.call(c+"_sign",n)),d.if(d.getLocal("s"),d.ret(d.getLocal("s"))),d.ret(d.call(c+"_sign",r)))}(),function(){const a=e.addFunction(t+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f));a.addCode(d.if(d.call(c+"_isZero",n),d.ret(d.call(c+"_isNegative",r))),d.ret(d.call(c+"_isNegative",n)))}(),e.exportFunction(t+"_isZero"),e.exportFunction(t+"_isOne"),e.exportFunction(t+"_zero"),e.exportFunction(t+"_one"),e.exportFunction(t+"_copy"),e.exportFunction(t+"_mul"),e.exportFunction(t+"_mul1"),e.exportFunction(t+"_square"),e.exportFunction(t+"_add"),e.exportFunction(t+"_sub"),e.exportFunction(t+"_neg"),e.exportFunction(t+"_sign"),e.exportFunction(t+"_conjugate"),e.exportFunction(t+"_fromMontgomery"),e.exportFunction(t+"_toMontgomery"),e.exportFunction(t+"_eq"),e.exportFunction(t+"_inverse"),ge(e,t),pe(e,t+"_exp",2*f,t+"_mul",t+"_square",t+"_copy",t+"_one"),function(){const a=e.addFunction(t+"_sqrt");a.addParam("a","i32"),a.addParam("pr","i32");const r=a.getCodeBuilder(),n=r.i32_const(e.alloc(me.bigInt2BytesLE((BigInt(d||0)-3n)/4n,f))),i=r.i32_const(e.alloc(me.bigInt2BytesLE((BigInt(d||0)-1n)/2n,f))),b=r.getLocal("a"),o=r.i32_const(e.alloc(2*f)),s=r.i32_const(e.alloc(2*f)),l=r.i32_const(e.alloc(2*f)),u=e.alloc(2*f),h=r.i32_const(u),p=r.i32_const(u),g=r.i32_const(u+f),m=r.i32_const(e.alloc(2*f)),x=r.i32_const(e.alloc(2*f));a.addCode(r.call(t+"_one",h),r.call(t+"_neg",h,h),r.call(t+"_exp",b,n,r.i32_const(f),o),r.call(t+"_square",o,s),r.call(t+"_mul",b,s,s),r.call(t+"_conjugate",s,l),r.call(t+"_mul",l,s,l),r.if(r.call(t+"_eq",l,h),r.unreachable()),r.call(t+"_mul",o,b,m),r.if(r.call(t+"_eq",s,h),[...r.call(c+"_zero",p),...r.call(c+"_one",g),...r.call(t+"_mul",h,m,r.getLocal("pr"))],[...r.call(t+"_one",x),...r.call(t+"_add",x,s,x),...r.call(t+"_exp",x,i,r.i32_const(f),x),...r.call(t+"_mul",x,m,r.getLocal("pr"))]))}(),function(){const a=e.addFunction(t+"_isSquare");a.addParam("a","i32"),a.setReturnType("i32");const c=a.getCodeBuilder(),r=c.i32_const(e.alloc(me.bigInt2BytesLE((BigInt(d||0)-3n)/4n,f))),n=c.getLocal("a"),i=c.i32_const(e.alloc(2*f)),b=c.i32_const(e.alloc(2*f)),o=c.i32_const(e.alloc(2*f)),s=e.alloc(2*f),l=c.i32_const(s);a.addCode(c.call(t+"_one",l),c.call(t+"_neg",l,l),c.call(t+"_exp",n,r,c.i32_const(f),i),c.call(t+"_square",i,b),c.call(t+"_mul",n,b,b),c.call(t+"_conjugate",b,o),c.call(t+"_mul",o,b,o),c.if(c.call(t+"_eq",o,l),c.ret(c.i32_const(0))),c.ret(c.i32_const(1)))}(),e.exportFunction(t+"_exp"),e.exportFunction(t+"_timesScalar"),e.exportFunction(t+"_batchInverse"),e.exportFunction(t+"_sqrt"),e.exportFunction(t+"_isSquare"),e.exportFunction(t+"_isNegative"),t};const ye=T,Ae=F;var ve=function(e,a,t,c){if(e.modules[t])return t;const f=8*e.modules[c].n64;return e.modules[t]={n64:3*e.modules[c].n64},function(){const a=e.addFunction(t+"_isZero");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.i32_and(d.i32_and(d.call(c+"_isZero",r),d.call(c+"_isZero",n)),d.call(c+"_isZero",i)))}(),function(){const a=e.addFunction(t+"_isOne");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.ret(d.i32_and(d.i32_and(d.call(c+"_isOne",r),d.call(c+"_isZero",n)),d.call(c+"_isZero",i))))}(),function(){const a=e.addFunction(t+"_zero");a.addParam("x","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.call(c+"_zero",r),d.call(c+"_zero",n),d.call(c+"_zero",i))}(),function(){const a=e.addFunction(t+"_one");a.addParam("x","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.call(c+"_one",r),d.call(c+"_zero",n),d.call(c+"_zero",i))}(),function(){const a=e.addFunction(t+"_copy");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f)),s=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_copy",r,b),d.call(c+"_copy",n,o),d.call(c+"_copy",i,s))}(),function(){const d=e.addFunction(t+"_mul");d.addParam("x","i32"),d.addParam("y","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.i32_add(r.getLocal("x"),r.i32_const(2*f)),o=r.getLocal("y"),s=r.i32_add(r.getLocal("y"),r.i32_const(f)),l=r.i32_add(r.getLocal("y"),r.i32_const(2*f)),u=r.getLocal("r"),h=r.i32_add(r.getLocal("r"),r.i32_const(f)),p=r.i32_add(r.getLocal("r"),r.i32_const(2*f)),g=r.i32_const(e.alloc(f)),m=r.i32_const(e.alloc(f)),x=r.i32_const(e.alloc(f)),y=r.i32_const(e.alloc(f)),A=r.i32_const(e.alloc(f)),v=r.i32_const(e.alloc(f)),w=r.i32_const(e.alloc(f)),_=r.i32_const(e.alloc(f)),I=r.i32_const(e.alloc(f)),E=r.i32_const(e.alloc(f)),C=r.i32_const(e.alloc(f)),M=r.i32_const(e.alloc(f)),B=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_mul",n,o,g),r.call(c+"_mul",i,s,m),r.call(c+"_mul",b,l,x),r.call(c+"_add",n,i,y),r.call(c+"_add",o,s,A),r.call(c+"_add",n,b,v),r.call(c+"_add",o,l,w),r.call(c+"_add",i,b,_),r.call(c+"_add",s,l,I),r.call(c+"_add",g,m,E),r.call(c+"_add",g,x,C),r.call(c+"_add",m,x,M),r.call(c+"_mul",_,I,u),r.call(c+"_sub",u,M,u),r.call(a,u,u),r.call(c+"_add",g,u,u),r.call(c+"_mul",y,A,h),r.call(c+"_sub",h,E,h),r.call(a,x,B),r.call(c+"_add",h,B,h),r.call(c+"_mul",v,w,p),r.call(c+"_sub",p,C,p),r.call(c+"_add",p,m,p))}(),function(){const d=e.addFunction(t+"_square");d.addParam("x","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.i32_add(r.getLocal("x"),r.i32_const(2*f)),o=r.getLocal("r"),s=r.i32_add(r.getLocal("r"),r.i32_const(f)),l=r.i32_add(r.getLocal("r"),r.i32_const(2*f)),u=r.i32_const(e.alloc(f)),h=r.i32_const(e.alloc(f)),p=r.i32_const(e.alloc(f)),g=r.i32_const(e.alloc(f)),m=r.i32_const(e.alloc(f)),x=r.i32_const(e.alloc(f)),y=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_square",n,u),r.call(c+"_mul",n,i,h),r.call(c+"_add",h,h,p),r.call(c+"_sub",n,i,g),r.call(c+"_add",g,b,g),r.call(c+"_square",g,g),r.call(c+"_mul",i,b,m),r.call(c+"_add",m,m,x),r.call(c+"_square",b,y),r.call(a,x,o),r.call(c+"_add",u,o,o),r.call(a,y,s),r.call(c+"_add",p,s,s),r.call(c+"_add",u,y,l),r.call(c+"_sub",x,l,l),r.call(c+"_add",g,l,l),r.call(c+"_add",p,l,l))}(),function(){const a=e.addFunction(t+"_add");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("y"),o=d.i32_add(d.getLocal("y"),d.i32_const(f)),s=d.i32_add(d.getLocal("y"),d.i32_const(2*f)),l=d.getLocal("r"),u=d.i32_add(d.getLocal("r"),d.i32_const(f)),h=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_add",r,b,l),d.call(c+"_add",n,o,u),d.call(c+"_add",i,s,h))}(),function(){const a=e.addFunction(t+"_sub");a.addParam("x","i32"),a.addParam("y","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("y"),o=d.i32_add(d.getLocal("y"),d.i32_const(f)),s=d.i32_add(d.getLocal("y"),d.i32_const(2*f)),l=d.getLocal("r"),u=d.i32_add(d.getLocal("r"),d.i32_const(f)),h=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_sub",r,b,l),d.call(c+"_sub",n,o,u),d.call(c+"_sub",i,s,h))}(),function(){const a=e.addFunction(t+"_neg");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f)),s=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_neg",r,b),d.call(c+"_neg",n,o),d.call(c+"_neg",i,s))}(),function(){const a=e.addFunction(t+"_sign");a.addParam("x","i32"),a.addLocal("s","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.setLocal("s",d.call(c+"_sign",i)),d.if(d.getLocal("s"),d.ret(d.getLocal("s"))),d.setLocal("s",d.call(c+"_sign",n)),d.if(d.getLocal("s"),d.ret(d.getLocal("s"))),d.ret(d.call(c+"_sign",r)))}(),function(){const a=e.addFunction(t+"_toMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f)),s=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_toMontgomery",r,b),d.call(c+"_toMontgomery",n,o),d.call(c+"_toMontgomery",i,s))}(),function(){const a=e.addFunction(t+"_fromMontgomery");a.addParam("x","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f)),s=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_fromMontgomery",r,b),d.call(c+"_fromMontgomery",n,o),d.call(c+"_fromMontgomery",i,s))}(),function(){const a=e.addFunction(t+"_eq");a.addParam("x","i32"),a.addParam("y","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("y"),o=d.i32_add(d.getLocal("y"),d.i32_const(f)),s=d.i32_add(d.getLocal("y"),d.i32_const(2*f));a.addCode(d.i32_and(d.i32_and(d.call(c+"_eq",r,b),d.call(c+"_eq",n,o)),d.call(c+"_eq",i,s)))}(),function(){const d=e.addFunction(t+"_inverse");d.addParam("x","i32"),d.addParam("r","i32");const r=d.getCodeBuilder(),n=r.getLocal("x"),i=r.i32_add(r.getLocal("x"),r.i32_const(f)),b=r.i32_add(r.getLocal("x"),r.i32_const(2*f)),o=r.getLocal("r"),s=r.i32_add(r.getLocal("r"),r.i32_const(f)),l=r.i32_add(r.getLocal("r"),r.i32_const(2*f)),u=r.i32_const(e.alloc(f)),h=r.i32_const(e.alloc(f)),p=r.i32_const(e.alloc(f)),g=r.i32_const(e.alloc(f)),m=r.i32_const(e.alloc(f)),x=r.i32_const(e.alloc(f)),y=r.i32_const(e.alloc(f)),A=r.i32_const(e.alloc(f)),v=r.i32_const(e.alloc(f)),w=r.i32_const(e.alloc(f)),_=r.i32_const(e.alloc(f));d.addCode(r.call(c+"_square",n,u),r.call(c+"_square",i,h),r.call(c+"_square",b,p),r.call(c+"_mul",n,i,g),r.call(c+"_mul",n,b,m),r.call(c+"_mul",i,b,x),r.call(a,x,y),r.call(c+"_sub",u,y,y),r.call(a,p,A),r.call(c+"_sub",A,g,A),r.call(c+"_sub",h,m,v),r.call(c+"_mul",b,A,w),r.call(c+"_mul",i,v,_),r.call(c+"_add",w,_,w),r.call(a,w,w),r.call(c+"_mul",n,y,_),r.call(c+"_add",_,w,w),r.call(c+"_inverse",w,w),r.call(c+"_mul",w,y,o),r.call(c+"_mul",w,A,s),r.call(c+"_mul",w,v,l))}(),function(){const a=e.addFunction(t+"_timesScalar");a.addParam("x","i32"),a.addParam("scalar","i32"),a.addParam("scalarLen","i32"),a.addParam("r","i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f)),b=d.getLocal("r"),o=d.i32_add(d.getLocal("r"),d.i32_const(f)),s=d.i32_add(d.getLocal("r"),d.i32_const(2*f));a.addCode(d.call(c+"_timesScalar",r,d.getLocal("scalar"),d.getLocal("scalarLen"),b),d.call(c+"_timesScalar",n,d.getLocal("scalar"),d.getLocal("scalarLen"),o),d.call(c+"_timesScalar",i,d.getLocal("scalar"),d.getLocal("scalarLen"),s))}(),function(){const a=e.addFunction(t+"_isNegative");a.addParam("x","i32"),a.setReturnType("i32");const d=a.getCodeBuilder(),r=d.getLocal("x"),n=d.i32_add(d.getLocal("x"),d.i32_const(f)),i=d.i32_add(d.getLocal("x"),d.i32_const(2*f));a.addCode(d.if(d.call(c+"_isZero",i),d.if(d.call(c+"_isZero",n),d.ret(d.call(c+"_isNegative",r)),d.ret(d.call(c+"_isNegative",n)))),d.ret(d.call(c+"_isNegative",i)))}(),e.exportFunction(t+"_isZero"),e.exportFunction(t+"_isOne"),e.exportFunction(t+"_zero"),e.exportFunction(t+"_one"),e.exportFunction(t+"_copy"),e.exportFunction(t+"_mul"),e.exportFunction(t+"_square"),e.exportFunction(t+"_add"),e.exportFunction(t+"_sub"),e.exportFunction(t+"_neg"),e.exportFunction(t+"_sign"),e.exportFunction(t+"_fromMontgomery"),e.exportFunction(t+"_toMontgomery"),e.exportFunction(t+"_eq"),e.exportFunction(t+"_inverse"),Ae(e,t),ye(e,t+"_exp",3*f,t+"_mul",t+"_square",t+"_copy",t+"_one"),e.exportFunction(t+"_exp"),e.exportFunction(t+"_timesScalar"),e.exportFunction(t+"_batchInverse"),e.exportFunction(t+"_isNegative"),t};const we=function(e,a,t,c,f,d,r,n){const i=e.addFunction(a);i.addParam("base","i32"),i.addParam("scalar","i32"),i.addParam("scalarLength","i32"),i.addParam("r","i32"),i.addLocal("old0","i32"),i.addLocal("nbits","i32"),i.addLocal("i","i32"),i.addLocal("last","i32"),i.addLocal("cur","i32"),i.addLocal("carry","i32"),i.addLocal("p","i32");const b=i.getCodeBuilder(),o=b.i32_const(e.alloc(t));function s(e){return b.i32_and(b.i32_shr_u(b.i32_load(b.i32_add(b.getLocal("scalar"),b.i32_and(b.i32_shr_u(e,b.i32_const(3)),b.i32_const(4294967292)))),b.i32_and(e,b.i32_const(31))),b.i32_const(1))}function l(e){return[...b.i32_store8(b.getLocal("p"),b.i32_const(e)),...b.setLocal("p",b.i32_add(b.getLocal("p"),b.i32_const(1)))]}i.addCode(b.if(b.i32_eqz(b.getLocal("scalarLength")),[...b.call(n,b.getLocal("r")),...b.ret([])]),b.setLocal("nbits",b.i32_shl(b.getLocal("scalarLength"),b.i32_const(3))),b.setLocal("old0",b.i32_load(b.i32_const(0))),b.setLocal("p",b.getLocal("old0")),b.i32_store(b.i32_const(0),b.i32_and(b.i32_add(b.i32_add(b.getLocal("old0"),b.i32_const(32)),b.getLocal("nbits")),b.i32_const(4294967288))),b.setLocal("i",b.i32_const(1)),b.setLocal("last",s(b.i32_const(0))),b.setLocal("carry",b.i32_const(0)),b.block(b.loop(b.br_if(1,b.i32_eq(b.getLocal("i"),b.getLocal("nbits"))),b.setLocal("cur",s(b.getLocal("i"))),b.if(b.getLocal("last"),b.if(b.getLocal("cur"),b.if(b.getLocal("carry"),[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(1)),...l(1)],[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(1)),...l(255)]),b.if(b.getLocal("carry"),[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(1)),...l(255)],[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(0)),...l(1)])),b.if(b.getLocal("cur"),b.if(b.getLocal("carry"),[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(1)),...l(0)],[...b.setLocal("last",b.i32_const(1)),...b.setLocal("carry",b.i32_const(0)),...l(0)]),b.if(b.getLocal("carry"),[...b.setLocal("last",b.i32_const(1)),...b.setLocal("carry",b.i32_const(0)),...l(0)],[...b.setLocal("last",b.i32_const(0)),...b.setLocal("carry",b.i32_const(0)),...l(0)]))),b.setLocal("i",b.i32_add(b.getLocal("i"),b.i32_const(1))),b.br(0))),b.if(b.getLocal("last"),b.if(b.getLocal("carry"),[...l(255),...l(0),...l(1)],[...l(1)]),b.if(b.getLocal("carry"),[...l(0),...l(1)])),b.setLocal("p",b.i32_sub(b.getLocal("p"),b.i32_const(1))),b.call(r,b.getLocal("base"),o),b.call(n,b.getLocal("r")),b.block(b.loop(b.call(f,b.getLocal("r"),b.getLocal("r")),b.setLocal("cur",b.i32_load8_u(b.getLocal("p"))),b.if(b.getLocal("cur"),b.if(b.i32_eq(b.getLocal("cur"),b.i32_const(1)),b.call(c,b.getLocal("r"),o,b.getLocal("r")),b.call(d,b.getLocal("r"),o,b.getLocal("r")))),b.br_if(1,b.i32_eq(b.getLocal("old0"),b.getLocal("p"))),b.setLocal("p",b.i32_sub(b.getLocal("p"),b.i32_const(1))),b.br(0))),b.i32_store(b.i32_const(0),b.getLocal("old0")))},_e=Q,Ie=function(e,a,t,c,f){const d=8*e.modules[a].n64;!function(){const a=e.addFunction(t+"_getChunk");a.addParam("pScalar","i32"),a.addParam("scalarSize","i32"),a.addParam("startBit","i32"),a.addParam("chunkSize","i32"),a.addLocal("bitsToEnd","i32"),a.addLocal("mask","i32"),a.setReturnType("i32");const c=a.getCodeBuilder();a.addCode(c.setLocal("bitsToEnd",c.i32_sub(c.i32_mul(c.getLocal("scalarSize"),c.i32_const(8)),c.getLocal("startBit"))),c.if(c.i32_gt_s(c.getLocal("chunkSize"),c.getLocal("bitsToEnd")),c.setLocal("mask",c.i32_sub(c.i32_shl(c.i32_const(1),c.getLocal("bitsToEnd")),c.i32_const(1))),c.setLocal("mask",c.i32_sub(c.i32_shl(c.i32_const(1),c.getLocal("chunkSize")),c.i32_const(1)))),c.i32_and(c.i32_shr_u(c.i32_load(c.i32_add(c.getLocal("pScalar"),c.i32_shr_u(c.getLocal("startBit"),c.i32_const(3))),0,0),c.i32_and(c.getLocal("startBit"),c.i32_const(7))),c.getLocal("mask")))}(),function(){const c=e.addFunction(t+"_reduceTable");c.addParam("pTable","i32"),c.addParam("p","i32"),c.addLocal("half","i32"),c.addLocal("it1","i32"),c.addLocal("it2","i32"),c.addLocal("pAcc","i32");const f=c.getCodeBuilder();c.addCode(f.if(f.i32_eq(f.getLocal("p"),f.i32_const(1)),f.ret([])),f.setLocal("half",f.i32_shl(f.i32_const(1),f.i32_sub(f.getLocal("p"),f.i32_const(1)))),f.setLocal("it1",f.getLocal("pTable")),f.setLocal("it2",f.i32_add(f.getLocal("pTable"),f.i32_mul(f.getLocal("half"),f.i32_const(d)))),f.setLocal("pAcc",f.i32_sub(f.getLocal("it2"),f.i32_const(d))),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("it1"),f.getLocal("pAcc"))),f.call(a+"_add",f.getLocal("it1"),f.getLocal("it2"),f.getLocal("it1")),f.call(a+"_add",f.getLocal("pAcc"),f.getLocal("it2"),f.getLocal("pAcc")),f.setLocal("it1",f.i32_add(f.getLocal("it1"),f.i32_const(d))),f.setLocal("it2",f.i32_add(f.getLocal("it2"),f.i32_const(d))),f.br(0))),f.call(t+"_reduceTable",f.getLocal("pTable"),f.i32_sub(f.getLocal("p"),f.i32_const(1))),f.setLocal("p",f.i32_sub(f.getLocal("p"),f.i32_const(1))),f.block(f.loop(f.br_if(1,f.i32_eqz(f.getLocal("p"))),f.call(a+"_double",f.getLocal("pAcc"),f.getLocal("pAcc")),f.setLocal("p",f.i32_sub(f.getLocal("p"),f.i32_const(1))),f.br(0))),f.call(a+"_add",f.getLocal("pTable"),f.getLocal("pAcc"),f.getLocal("pTable")))}(),function(){const r=e.addFunction(t+"_chunk");r.addParam("pBases","i32"),r.addParam("pScalars","i32"),r.addParam("scalarSize","i32"),r.addParam("n","i32"),r.addParam("startBit","i32"),r.addParam("chunkSize","i32"),r.addParam("pr","i32"),r.addLocal("nChunks","i32"),r.addLocal("itScalar","i32"),r.addLocal("endScalar","i32"),r.addLocal("itBase","i32"),r.addLocal("i","i32"),r.addLocal("j","i32"),r.addLocal("nTable","i32"),r.addLocal("pTable","i32"),r.addLocal("idx","i32"),r.addLocal("pIdxTable","i32");const n=r.getCodeBuilder();r.addCode(n.if(n.i32_eqz(n.getLocal("n")),[...n.call(a+"_zero",n.getLocal("pr")),...n.ret([])]),n.setLocal("nTable",n.i32_shl(n.i32_const(1),n.getLocal("chunkSize"))),n.setLocal("pTable",n.i32_load(n.i32_const(0))),n.i32_store(n.i32_const(0),n.i32_add(n.getLocal("pTable"),n.i32_mul(n.getLocal("nTable"),n.i32_const(d)))),n.setLocal("j",n.i32_const(0)),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("j"),n.getLocal("nTable"))),n.call(a+"_zero",n.i32_add(n.getLocal("pTable"),n.i32_mul(n.getLocal("j"),n.i32_const(d)))),n.setLocal("j",n.i32_add(n.getLocal("j"),n.i32_const(1))),n.br(0))),n.setLocal("itBase",n.getLocal("pBases")),n.setLocal("itScalar",n.getLocal("pScalars")),n.setLocal("endScalar",n.i32_add(n.getLocal("pScalars"),n.i32_mul(n.getLocal("n"),n.getLocal("scalarSize")))),n.block(n.loop(n.br_if(1,n.i32_eq(n.getLocal("itScalar"),n.getLocal("endScalar"))),n.setLocal("idx",n.call(t+"_getChunk",n.getLocal("itScalar"),n.getLocal("scalarSize"),n.getLocal("startBit"),n.getLocal("chunkSize"))),n.if(n.getLocal("idx"),[...n.setLocal("pIdxTable",n.i32_add(n.getLocal("pTable"),n.i32_mul(n.i32_sub(n.getLocal("idx"),n.i32_const(1)),n.i32_const(d)))),...n.call(c,n.getLocal("pIdxTable"),n.getLocal("itBase"),n.getLocal("pIdxTable"))]),n.setLocal("itScalar",n.i32_add(n.getLocal("itScalar"),n.getLocal("scalarSize"))),n.setLocal("itBase",n.i32_add(n.getLocal("itBase"),n.i32_const(f))),n.br(0))),n.call(t+"_reduceTable",n.getLocal("pTable"),n.getLocal("chunkSize")),n.call(a+"_copy",n.getLocal("pTable"),n.getLocal("pr")),n.i32_store(n.i32_const(0),n.getLocal("pTable")))}(),function(){const c=e.addFunction(t);c.addParam("pBases","i32"),c.addParam("pScalars","i32"),c.addParam("scalarSize","i32"),c.addParam("n","i32"),c.addParam("pr","i32"),c.addLocal("chunkSize","i32"),c.addLocal("nChunks","i32"),c.addLocal("itScalar","i32"),c.addLocal("endScalar","i32"),c.addLocal("itBase","i32"),c.addLocal("itBit","i32"),c.addLocal("i","i32"),c.addLocal("j","i32"),c.addLocal("nTable","i32"),c.addLocal("pTable","i32"),c.addLocal("idx","i32"),c.addLocal("pIdxTable","i32");const f=c.getCodeBuilder(),r=f.i32_const(e.alloc(d)),n=e.alloc([17,17,17,17,17,17,17,17,17,17,16,16,15,14,13,13,12,11,10,9,8,7,7,6,5,4,3,2,1,1,1,1]);c.addCode(f.call(a+"_zero",f.getLocal("pr")),f.if(f.i32_eqz(f.getLocal("n")),f.ret([])),f.setLocal("chunkSize",f.i32_load8_u(f.i32_clz(f.getLocal("n")),n)),f.setLocal("nChunks",f.i32_add(f.i32_div_u(f.i32_sub(f.i32_shl(f.getLocal("scalarSize"),f.i32_const(3)),f.i32_const(1)),f.getLocal("chunkSize")),f.i32_const(1))),f.setLocal("itBit",f.i32_mul(f.i32_sub(f.getLocal("nChunks"),f.i32_const(1)),f.getLocal("chunkSize"))),f.block(f.loop(f.br_if(1,f.i32_lt_s(f.getLocal("itBit"),f.i32_const(0))),f.if(f.i32_eqz(f.call(a+"_isZero",f.getLocal("pr"))),[...f.setLocal("j",f.i32_const(0)),...f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("j"),f.getLocal("chunkSize"))),f.call(a+"_double",f.getLocal("pr"),f.getLocal("pr")),f.setLocal("j",f.i32_add(f.getLocal("j"),f.i32_const(1))),f.br(0)))]),f.call(t+"_chunk",f.getLocal("pBases"),f.getLocal("pScalars"),f.getLocal("scalarSize"),f.getLocal("n"),f.getLocal("itBit"),f.getLocal("chunkSize"),r),f.call(a+"_add",f.getLocal("pr"),r,f.getLocal("pr")),f.setLocal("itBit",f.i32_sub(f.getLocal("itBit"),f.getLocal("chunkSize"))),f.br(0))))}(),e.exportFunction(t),e.exportFunction(t+"_chunk")};var Ee=function(e,a,t,c){const f=e.modules[t].n64,d=8*f;return e.modules[a]||(e.modules[a]={n64:3*f},function(){const c=e.addFunction(a+"_isZeroAffine");c.addParam("p1","i32"),c.setReturnType("i32");const f=c.getCodeBuilder();c.addCode(f.i32_and(f.call(t+"_isZero",f.getLocal("p1")),f.call(t+"_isZero",f.i32_add(f.getLocal("p1"),f.i32_const(d)))))}(),function(){const c=e.addFunction(a+"_isZero");c.addParam("p1","i32"),c.setReturnType("i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_isZero",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))))}(),function(){const c=e.addFunction(a+"_zeroAffine");c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_zero",f.getLocal("pr"))),c.addCode(f.call(t+"_zero",f.i32_add(f.getLocal("pr"),f.i32_const(d))))}(),function(){const c=e.addFunction(a+"_zero");c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_zero",f.getLocal("pr"))),c.addCode(f.call(t+"_one",f.i32_add(f.getLocal("pr"),f.i32_const(d)))),c.addCode(f.call(t+"_zero",f.i32_add(f.getLocal("pr"),f.i32_const(2*d))))}(),function(){const t=e.addFunction(a+"_copyAffine");t.addParam("ps","i32"),t.addParam("pd","i32");const c=t.getCodeBuilder();for(let e=0;e<2*f;e++)t.addCode(c.i64_store(c.getLocal("pd"),8*e,c.i64_load(c.getLocal("ps"),8*e)))}(),function(){const t=e.addFunction(a+"_copy");t.addParam("ps","i32"),t.addParam("pd","i32");const c=t.getCodeBuilder();for(let e=0;e<3*f;e++)t.addCode(c.i64_store(c.getLocal("pd"),8*e,c.i64_load(c.getLocal("ps"),8*e)))}(),function(){const c=e.addFunction(a+"_toJacobian");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.getLocal("pr"),b=f.i32_add(f.getLocal("pr"),f.i32_const(d)),o=f.i32_add(f.getLocal("pr"),f.i32_const(2*d));c.addCode(f.if(f.call(a+"_isZeroAffine",f.getLocal("p1")),f.call(a+"_zero",f.getLocal("pr")),[...f.call(t+"_one",o),...f.call(t+"_copy",n,b),...f.call(t+"_copy",r,i)]))}(),function(){const c=e.addFunction(a+"_eqAffine");c.addParam("p1","i32"),c.addParam("p2","i32"),c.setReturnType("i32"),c.addLocal("z1","i32");const f=c.getCodeBuilder();c.addCode(f.ret(f.i32_and(f.call(t+"_eq",f.getLocal("p1"),f.getLocal("p2")),f.call(t+"_eq",f.i32_add(f.getLocal("p1"),f.i32_const(d)),f.i32_add(f.getLocal("p2"),f.i32_const(d))))))}(),function(){const c=e.addFunction(a+"_eqMixed");c.addParam("p1","i32"),c.addParam("p2","i32"),c.setReturnType("i32"),c.addLocal("z1","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d));c.addCode(f.setLocal("z1",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))));const i=f.getLocal("z1"),b=f.getLocal("p2"),o=f.i32_add(f.getLocal("p2"),f.i32_const(d)),s=f.i32_const(e.alloc(d)),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),f.ret(f.call(a+"_isZeroAffine",f.getLocal("p2")))),f.if(f.call(a+"_isZeroAffine",f.getLocal("p2")),f.ret(f.i32_const(0))),f.if(f.call(t+"_isOne",i),f.ret(f.call(a+"_eqAffine",f.getLocal("p1"),f.getLocal("p2")))),f.call(t+"_square",i,s),f.call(t+"_mul",b,s,l),f.call(t+"_mul",i,s,u),f.call(t+"_mul",o,u,h),f.if(f.call(t+"_eq",r,l),f.if(f.call(t+"_eq",n,h),f.ret(f.i32_const(1)))),f.ret(f.i32_const(0)))}(),function(){const c=e.addFunction(a+"_eq");c.addParam("p1","i32"),c.addParam("p2","i32"),c.setReturnType("i32"),c.addLocal("z1","i32"),c.addLocal("z2","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d));c.addCode(f.setLocal("z1",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))));const i=f.getLocal("z1"),b=f.getLocal("p2"),o=f.i32_add(f.getLocal("p2"),f.i32_const(d));c.addCode(f.setLocal("z2",f.i32_add(f.getLocal("p2"),f.i32_const(2*d))));const s=f.getLocal("z2"),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d)),m=f.i32_const(e.alloc(d)),x=f.i32_const(e.alloc(d)),y=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),f.ret(f.call(a+"_isZero",f.getLocal("p2")))),f.if(f.call(a+"_isZero",f.getLocal("p2")),f.ret(f.i32_const(0))),f.if(f.call(t+"_isOne",i),f.ret(f.call(a+"_eqMixed",f.getLocal("p2"),f.getLocal("p1")))),f.if(f.call(t+"_isOne",s),f.ret(f.call(a+"_eqMixed",f.getLocal("p1"),f.getLocal("p2")))),f.call(t+"_square",i,l),f.call(t+"_square",s,u),f.call(t+"_mul",r,u,h),f.call(t+"_mul",b,l,p),f.call(t+"_mul",i,l,g),f.call(t+"_mul",s,u,m),f.call(t+"_mul",n,m,x),f.call(t+"_mul",o,g,y),f.if(f.call(t+"_eq",h,p),f.if(f.call(t+"_eq",x,y),f.ret(f.i32_const(1)))),f.ret(f.i32_const(0)))}(),function(){const c=e.addFunction(a+"_doubleAffine");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.getLocal("pr"),b=f.i32_add(f.getLocal("pr"),f.i32_const(d)),o=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),s=f.i32_const(e.alloc(d)),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZeroAffine",f.getLocal("p1")),[...f.call(a+"_toJacobian",f.getLocal("p1"),f.getLocal("pr")),...f.ret([])]),f.call(t+"_square",r,s),f.call(t+"_square",n,l),f.call(t+"_square",l,u),f.call(t+"_add",r,l,h),f.call(t+"_square",h,h),f.call(t+"_sub",h,s,h),f.call(t+"_sub",h,u,h),f.call(t+"_add",h,h,h),f.call(t+"_add",s,s,p),f.call(t+"_add",p,s,p),f.call(t+"_add",n,n,o),f.call(t+"_square",p,i),f.call(t+"_sub",i,h,i),f.call(t+"_sub",i,h,i),f.call(t+"_add",u,u,g),f.call(t+"_add",g,g,g),f.call(t+"_add",g,g,g),f.call(t+"_sub",h,i,b),f.call(t+"_mul",b,p,b),f.call(t+"_sub",b,g,b))}(),function(){const c=e.addFunction(a+"_double");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.i32_add(f.getLocal("p1"),f.i32_const(2*d)),b=f.getLocal("pr"),o=f.i32_add(f.getLocal("pr"),f.i32_const(d)),s=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d)),m=f.i32_const(e.alloc(d)),x=f.i32_const(e.alloc(d)),y=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),[...f.call(a+"_copy",f.getLocal("p1"),f.getLocal("pr")),...f.ret([])]),f.if(f.call(t+"_isOne",i),[...f.ret(f.call(a+"_doubleAffine",f.getLocal("p1"),f.getLocal("pr"))),...f.ret([])]),f.call(t+"_square",r,l),f.call(t+"_square",n,u),f.call(t+"_square",u,h),f.call(t+"_add",r,u,p),f.call(t+"_square",p,p),f.call(t+"_sub",p,l,p),f.call(t+"_sub",p,h,p),f.call(t+"_add",p,p,p),f.call(t+"_add",l,l,g),f.call(t+"_add",g,l,g),f.call(t+"_square",g,m),f.call(t+"_mul",n,i,x),f.call(t+"_add",p,p,b),f.call(t+"_sub",m,b,b),f.call(t+"_add",h,h,y),f.call(t+"_add",y,y,y),f.call(t+"_add",y,y,y),f.call(t+"_sub",p,b,o),f.call(t+"_mul",o,g,o),f.call(t+"_sub",o,y,o),f.call(t+"_add",x,x,s))}(),function(){const c=e.addFunction(a+"_addAffine");c.addParam("p1","i32"),c.addParam("p2","i32"),c.addParam("pr","i32"),c.addLocal("z1","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d));c.addCode(f.setLocal("z1",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))));const i=f.getLocal("p2"),b=f.i32_add(f.getLocal("p2"),f.i32_const(d)),o=f.getLocal("pr"),s=f.i32_add(f.getLocal("pr"),f.i32_const(d)),l=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d)),m=f.i32_const(e.alloc(d)),x=f.i32_const(e.alloc(d)),y=f.i32_const(e.alloc(d)),A=f.i32_const(e.alloc(d)),v=f.i32_const(e.alloc(d)),w=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZeroAffine",f.getLocal("p1")),[...f.call(a+"_copyAffine",f.getLocal("p2"),f.getLocal("pr")),...f.call(t+"_one",f.i32_add(f.getLocal("pr"),f.i32_const(2*d))),...f.ret([])]),f.if(f.call(a+"_isZeroAffine",f.getLocal("p2")),[...f.call(a+"_copyAffine",f.getLocal("p1"),f.getLocal("pr")),...f.call(t+"_one",f.i32_add(f.getLocal("pr"),f.i32_const(2*d))),...f.ret([])]),f.if(f.call(t+"_eq",r,i),f.if(f.call(t+"_eq",n,b),[...f.call(a+"_doubleAffine",f.getLocal("p2"),f.getLocal("pr")),...f.ret([])])),f.call(t+"_sub",i,r,u),f.call(t+"_sub",b,n,p),f.call(t+"_square",u,h),f.call(t+"_add",h,h,g),f.call(t+"_add",g,g,g),f.call(t+"_mul",u,g,m),f.call(t+"_add",p,p,x),f.call(t+"_mul",r,g,A),f.call(t+"_square",x,y),f.call(t+"_add",A,A,v),f.call(t+"_sub",y,m,o),f.call(t+"_sub",o,v,o),f.call(t+"_mul",n,m,w),f.call(t+"_add",w,w,w),f.call(t+"_sub",A,o,s),f.call(t+"_mul",s,x,s),f.call(t+"_sub",s,w,s),f.call(t+"_add",u,u,l))}(),function(){const c=e.addFunction(a+"_addMixed");c.addParam("p1","i32"),c.addParam("p2","i32"),c.addParam("pr","i32"),c.addLocal("z1","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d));c.addCode(f.setLocal("z1",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))));const i=f.getLocal("z1"),b=f.getLocal("p2"),o=f.i32_add(f.getLocal("p2"),f.i32_const(d)),s=f.getLocal("pr"),l=f.i32_add(f.getLocal("pr"),f.i32_const(d)),u=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),h=f.i32_const(e.alloc(d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d)),m=f.i32_const(e.alloc(d)),x=f.i32_const(e.alloc(d)),y=f.i32_const(e.alloc(d)),A=f.i32_const(e.alloc(d)),v=f.i32_const(e.alloc(d)),w=f.i32_const(e.alloc(d)),_=f.i32_const(e.alloc(d)),I=f.i32_const(e.alloc(d)),E=f.i32_const(e.alloc(d)),C=f.i32_const(e.alloc(d)),M=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),[...f.call(a+"_copyAffine",f.getLocal("p2"),f.getLocal("pr")),...f.call(t+"_one",f.i32_add(f.getLocal("pr"),f.i32_const(2*d))),...f.ret([])]),f.if(f.call(a+"_isZeroAffine",f.getLocal("p2")),[...f.call(a+"_copy",f.getLocal("p1"),f.getLocal("pr")),...f.ret([])]),f.if(f.call(t+"_isOne",i),[...f.call(a+"_addAffine",r,b,s),...f.ret([])]),f.call(t+"_square",i,h),f.call(t+"_mul",b,h,p),f.call(t+"_mul",i,h,g),f.call(t+"_mul",o,g,m),f.if(f.call(t+"_eq",r,p),f.if(f.call(t+"_eq",n,m),[...f.call(a+"_doubleAffine",f.getLocal("p2"),f.getLocal("pr")),...f.ret([])])),f.call(t+"_sub",p,r,x),f.call(t+"_sub",m,n,A),f.call(t+"_square",x,y),f.call(t+"_add",y,y,v),f.call(t+"_add",v,v,v),f.call(t+"_mul",x,v,w),f.call(t+"_add",A,A,_),f.call(t+"_mul",r,v,E),f.call(t+"_square",_,I),f.call(t+"_add",E,E,C),f.call(t+"_sub",I,w,s),f.call(t+"_sub",s,C,s),f.call(t+"_mul",n,w,M),f.call(t+"_add",M,M,M),f.call(t+"_sub",E,s,l),f.call(t+"_mul",l,_,l),f.call(t+"_sub",l,M,l),f.call(t+"_add",i,x,u),f.call(t+"_square",u,u),f.call(t+"_sub",u,h,u),f.call(t+"_sub",u,y,u))}(),function(){const c=e.addFunction(a+"_add");c.addParam("p1","i32"),c.addParam("p2","i32"),c.addParam("pr","i32"),c.addLocal("z1","i32"),c.addLocal("z2","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d));c.addCode(f.setLocal("z1",f.i32_add(f.getLocal("p1"),f.i32_const(2*d))));const i=f.getLocal("z1"),b=f.getLocal("p2"),o=f.i32_add(f.getLocal("p2"),f.i32_const(d));c.addCode(f.setLocal("z2",f.i32_add(f.getLocal("p2"),f.i32_const(2*d))));const s=f.getLocal("z2"),l=f.getLocal("pr"),u=f.i32_add(f.getLocal("pr"),f.i32_const(d)),h=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),p=f.i32_const(e.alloc(d)),g=f.i32_const(e.alloc(d)),m=f.i32_const(e.alloc(d)),x=f.i32_const(e.alloc(d)),y=f.i32_const(e.alloc(d)),A=f.i32_const(e.alloc(d)),v=f.i32_const(e.alloc(d)),w=f.i32_const(e.alloc(d)),_=f.i32_const(e.alloc(d)),I=f.i32_const(e.alloc(d)),E=f.i32_const(e.alloc(d)),C=f.i32_const(e.alloc(d)),M=f.i32_const(e.alloc(d)),B=f.i32_const(e.alloc(d)),L=f.i32_const(e.alloc(d)),S=f.i32_const(e.alloc(d)),k=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),[...f.call(a+"_copy",f.getLocal("p2"),f.getLocal("pr")),...f.ret([])]),f.if(f.call(a+"_isZero",f.getLocal("p2")),[...f.call(a+"_copy",f.getLocal("p1"),f.getLocal("pr")),...f.ret([])]),f.if(f.call(t+"_isOne",i),[...f.call(a+"_addMixed",b,r,l),...f.ret([])]),f.if(f.call(t+"_isOne",s),[...f.call(a+"_addMixed",r,b,l),...f.ret([])]),f.call(t+"_square",i,p),f.call(t+"_square",s,g),f.call(t+"_mul",r,g,m),f.call(t+"_mul",b,p,x),f.call(t+"_mul",i,p,y),f.call(t+"_mul",s,g,A),f.call(t+"_mul",n,A,v),f.call(t+"_mul",o,y,w),f.if(f.call(t+"_eq",m,x),f.if(f.call(t+"_eq",v,w),[...f.call(a+"_double",f.getLocal("p1"),f.getLocal("pr")),...f.ret([])])),f.call(t+"_sub",x,m,_),f.call(t+"_sub",w,v,I),f.call(t+"_add",_,_,E),f.call(t+"_square",E,E),f.call(t+"_mul",_,E,C),f.call(t+"_add",I,I,M),f.call(t+"_mul",m,E,L),f.call(t+"_square",M,B),f.call(t+"_add",L,L,S),f.call(t+"_sub",B,C,l),f.call(t+"_sub",l,S,l),f.call(t+"_mul",v,C,k),f.call(t+"_add",k,k,k),f.call(t+"_sub",L,l,u),f.call(t+"_mul",u,M,u),f.call(t+"_sub",u,k,u),f.call(t+"_add",i,s,h),f.call(t+"_square",h,h),f.call(t+"_sub",h,p,h),f.call(t+"_sub",h,g,h),f.call(t+"_mul",h,_,h))}(),function(){const c=e.addFunction(a+"_negAffine");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.getLocal("pr"),b=f.i32_add(f.getLocal("pr"),f.i32_const(d));c.addCode(f.call(t+"_copy",r,i),f.call(t+"_neg",n,b))}(),function(){const c=e.addFunction(a+"_neg");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.i32_add(f.getLocal("p1"),f.i32_const(2*d)),b=f.getLocal("pr"),o=f.i32_add(f.getLocal("pr"),f.i32_const(d)),s=f.i32_add(f.getLocal("pr"),f.i32_const(2*d));c.addCode(f.call(t+"_copy",r,b),f.call(t+"_neg",n,o),f.call(t+"_copy",i,s))}(),function(){const t=e.addFunction(a+"_subAffine");t.addParam("p1","i32"),t.addParam("p2","i32"),t.addParam("pr","i32");const c=t.getCodeBuilder(),f=c.i32_const(e.alloc(3*d));t.addCode(c.call(a+"_negAffine",c.getLocal("p2"),f),c.call(a+"_addAffine",c.getLocal("p1"),f,c.getLocal("pr")))}(),function(){const t=e.addFunction(a+"_subMixed");t.addParam("p1","i32"),t.addParam("p2","i32"),t.addParam("pr","i32");const c=t.getCodeBuilder(),f=c.i32_const(e.alloc(3*d));t.addCode(c.call(a+"_negAffine",c.getLocal("p2"),f),c.call(a+"_addMixed",c.getLocal("p1"),f,c.getLocal("pr")))}(),function(){const t=e.addFunction(a+"_sub");t.addParam("p1","i32"),t.addParam("p2","i32"),t.addParam("pr","i32");const c=t.getCodeBuilder(),f=c.i32_const(e.alloc(3*d));t.addCode(c.call(a+"_neg",c.getLocal("p2"),f),c.call(a+"_add",c.getLocal("p1"),f,c.getLocal("pr")))}(),function(){const c=e.addFunction(a+"_fromMontgomeryAffine");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_fromMontgomery",f.getLocal("p1"),f.getLocal("pr")));for(let e=1;e<2;e++)c.addCode(f.call(t+"_fromMontgomery",f.i32_add(f.getLocal("p1"),f.i32_const(e*d)),f.i32_add(f.getLocal("pr"),f.i32_const(e*d))))}(),function(){const c=e.addFunction(a+"_fromMontgomery");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_fromMontgomery",f.getLocal("p1"),f.getLocal("pr")));for(let e=1;e<3;e++)c.addCode(f.call(t+"_fromMontgomery",f.i32_add(f.getLocal("p1"),f.i32_const(e*d)),f.i32_add(f.getLocal("pr"),f.i32_const(e*d))))}(),function(){const c=e.addFunction(a+"_toMontgomeryAffine");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_toMontgomery",f.getLocal("p1"),f.getLocal("pr")));for(let e=1;e<2;e++)c.addCode(f.call(t+"_toMontgomery",f.i32_add(f.getLocal("p1"),f.i32_const(e*d)),f.i32_add(f.getLocal("pr"),f.i32_const(e*d))))}(),function(){const c=e.addFunction(a+"_toMontgomery");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder();c.addCode(f.call(t+"_toMontgomery",f.getLocal("p1"),f.getLocal("pr")));for(let e=1;e<3;e++)c.addCode(f.call(t+"_toMontgomery",f.i32_add(f.getLocal("p1"),f.i32_const(e*d)),f.i32_add(f.getLocal("pr"),f.i32_const(e*d))))}(),function(){const c=e.addFunction(a+"_toAffine");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.i32_add(f.getLocal("p1"),f.i32_const(2*d)),b=f.getLocal("pr"),o=f.i32_add(f.getLocal("pr"),f.i32_const(d)),s=f.i32_const(e.alloc(d)),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),[...f.call(t+"_zero",b),...f.call(t+"_zero",o)],[...f.call(t+"_inverse",i,s),...f.call(t+"_square",s,l),...f.call(t+"_mul",s,l,u),...f.call(t+"_mul",r,l,b),...f.call(t+"_mul",n,u,o)]))}(),function(){const f=e.addFunction(a+"_inCurveAffine");f.addParam("pIn","i32"),f.setReturnType("i32");const r=f.getCodeBuilder(),n=r.getLocal("pIn"),i=r.i32_add(r.getLocal("pIn"),r.i32_const(d)),b=r.i32_const(e.alloc(d)),o=r.i32_const(e.alloc(d));f.addCode(r.call(t+"_square",i,b),r.call(t+"_square",n,o),r.call(t+"_mul",n,o,o),r.call(t+"_add",o,r.i32_const(c),o),r.ret(r.call(t+"_eq",b,o)))}(),function(){const t=e.addFunction(a+"_inCurve");t.addParam("pIn","i32"),t.setReturnType("i32");const c=t.getCodeBuilder(),f=c.i32_const(e.alloc(2*d));t.addCode(c.call(a+"_toAffine",c.getLocal("pIn"),f),c.ret(c.call(a+"_inCurveAffine",f)))}(),function(){const c=e.addFunction(a+"_batchToAffine");c.addParam("pIn","i32"),c.addParam("n","i32"),c.addParam("pOut","i32"),c.addLocal("pAux","i32"),c.addLocal("itIn","i32"),c.addLocal("itAux","i32"),c.addLocal("itOut","i32"),c.addLocal("i","i32");const f=c.getCodeBuilder(),r=f.i32_const(e.alloc(d));c.addCode(f.setLocal("pAux",f.i32_load(f.i32_const(0))),f.i32_store(f.i32_const(0),f.i32_add(f.getLocal("pAux"),f.i32_mul(f.getLocal("n"),f.i32_const(d)))),f.call(t+"_batchInverse",f.i32_add(f.getLocal("pIn"),f.i32_const(2*d)),f.i32_const(3*d),f.getLocal("n"),f.getLocal("pAux"),f.i32_const(d)),f.setLocal("itIn",f.getLocal("pIn")),f.setLocal("itAux",f.getLocal("pAux")),f.setLocal("itOut",f.getLocal("pOut")),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("n"))),f.if(f.call(t+"_isZero",f.getLocal("itAux")),[...f.call(t+"_zero",f.getLocal("itOut")),...f.call(t+"_zero",f.i32_add(f.getLocal("itOut"),f.i32_const(d)))],[...f.call(t+"_mul",f.getLocal("itAux"),f.i32_add(f.getLocal("itIn"),f.i32_const(d)),r),...f.call(t+"_square",f.getLocal("itAux"),f.getLocal("itAux")),...f.call(t+"_mul",f.getLocal("itAux"),f.getLocal("itIn"),f.getLocal("itOut")),...f.call(t+"_mul",f.getLocal("itAux"),r,f.i32_add(f.getLocal("itOut"),f.i32_const(d)))]),f.setLocal("itIn",f.i32_add(f.getLocal("itIn"),f.i32_const(3*d))),f.setLocal("itOut",f.i32_add(f.getLocal("itOut"),f.i32_const(2*d))),f.setLocal("itAux",f.i32_add(f.getLocal("itAux"),f.i32_const(d))),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))),f.i32_store(f.i32_const(0),f.getLocal("pAux")))}(),function(){const c=e.addFunction(a+"_normalize");c.addParam("p1","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),r=f.getLocal("p1"),n=f.i32_add(f.getLocal("p1"),f.i32_const(d)),i=f.i32_add(f.getLocal("p1"),f.i32_const(2*d)),b=f.getLocal("pr"),o=f.i32_add(f.getLocal("pr"),f.i32_const(d)),s=f.i32_add(f.getLocal("pr"),f.i32_const(2*d)),l=f.i32_const(e.alloc(d)),u=f.i32_const(e.alloc(d)),h=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZero",f.getLocal("p1")),f.call(a+"_zero",f.getLocal("pr")),[...f.call(t+"_inverse",i,l),...f.call(t+"_square",l,u),...f.call(t+"_mul",l,u,h),...f.call(t+"_mul",r,u,b),...f.call(t+"_mul",n,h,o),...f.call(t+"_one",s)]))}(),function(){const t=e.addFunction(a+"__reverseBytes");t.addParam("pIn","i32"),t.addParam("n","i32"),t.addParam("pOut","i32"),t.addLocal("itOut","i32"),t.addLocal("itIn","i32");const c=t.getCodeBuilder();t.addCode(c.setLocal("itOut",c.i32_sub(c.i32_add(c.getLocal("pOut"),c.getLocal("n")),c.i32_const(1))),c.setLocal("itIn",c.getLocal("pIn")),c.block(c.loop(c.br_if(1,c.i32_lt_s(c.getLocal("itOut"),c.getLocal("pOut"))),c.i32_store8(c.getLocal("itOut"),c.i32_load8_u(c.getLocal("itIn"))),c.setLocal("itOut",c.i32_sub(c.getLocal("itOut"),c.i32_const(1))),c.setLocal("itIn",c.i32_add(c.getLocal("itIn"),c.i32_const(1))),c.br(0))))}(),function(){const t=e.addFunction(a+"_LEMtoU");t.addParam("pIn","i32"),t.addParam("pOut","i32");const c=t.getCodeBuilder(),f=e.alloc(2*d),r=c.i32_const(f),n=c.i32_const(f),i=c.i32_const(f+d);t.addCode(c.if(c.call(a+"_isZeroAffine",c.getLocal("pIn")),[...c.call(a+"_zeroAffine",c.getLocal("pOut")),...c.ret([])]),c.call(a+"_fromMontgomeryAffine",c.getLocal("pIn"),r),c.call(a+"__reverseBytes",n,c.i32_const(d),c.getLocal("pOut")),c.call(a+"__reverseBytes",i,c.i32_const(d),c.i32_add(c.getLocal("pOut"),c.i32_const(d))))}(),function(){const c=e.addFunction(a+"_LEMtoC");c.addParam("pIn","i32"),c.addParam("pOut","i32");const f=c.getCodeBuilder(),r=f.i32_const(e.alloc(d));c.addCode(f.if(f.call(a+"_isZeroAffine",f.getLocal("pIn")),[...f.call(t+"_zero",f.getLocal("pOut")),...f.i32_store8(f.getLocal("pOut"),f.i32_const(64)),...f.ret([])]),f.call(t+"_fromMontgomery",f.getLocal("pIn"),r),f.call(a+"__reverseBytes",r,f.i32_const(d),f.getLocal("pOut")),f.if(f.i32_eq(f.call(t+"_sign",f.i32_add(f.getLocal("pIn"),f.i32_const(d))),f.i32_const(-1)),f.i32_store8(f.getLocal("pOut"),f.i32_or(f.i32_load8_u(f.getLocal("pOut")),f.i32_const(128)))))}(),function(){const t=e.addFunction(a+"_UtoLEM");t.addParam("pIn","i32"),t.addParam("pOut","i32");const c=t.getCodeBuilder(),f=e.alloc(2*d),r=c.i32_const(f),n=c.i32_const(f),i=c.i32_const(f+d);t.addCode(c.if(c.i32_and(c.i32_load8_u(c.getLocal("pIn")),c.i32_const(64)),[...c.call(a+"_zeroAffine",c.getLocal("pOut")),...c.ret([])]),c.call(a+"__reverseBytes",c.getLocal("pIn"),c.i32_const(d),n),c.call(a+"__reverseBytes",c.i32_add(c.getLocal("pIn"),c.i32_const(d)),c.i32_const(d),i),c.call(a+"_toMontgomeryAffine",r,c.getLocal("pOut")))}(),function(){const f=e.addFunction(a+"_CtoLEM");f.addParam("pIn","i32"),f.addParam("pOut","i32"),f.addLocal("firstByte","i32"),f.addLocal("greatest","i32");const r=f.getCodeBuilder(),n=e.alloc(2*d),i=r.i32_const(n),b=r.i32_const(n+d);f.addCode(r.setLocal("firstByte",r.i32_load8_u(r.getLocal("pIn"))),r.if(r.i32_and(r.getLocal("firstByte"),r.i32_const(64)),[...r.call(a+"_zeroAffine",r.getLocal("pOut")),...r.ret([])]),r.setLocal("greatest",r.i32_and(r.getLocal("firstByte"),r.i32_const(128))),r.call(t+"_copy",r.getLocal("pIn"),b),r.i32_store8(b,r.i32_and(r.getLocal("firstByte"),r.i32_const(63))),r.call(a+"__reverseBytes",b,r.i32_const(d),i),r.call(t+"_toMontgomery",i,r.getLocal("pOut")),r.call(t+"_square",r.getLocal("pOut"),b),r.call(t+"_mul",r.getLocal("pOut"),b,b),r.call(t+"_add",b,r.i32_const(c),b),r.call(t+"_sqrt",b,b),r.call(t+"_neg",b,i),r.if(r.i32_eq(r.call(t+"_sign",b),r.i32_const(-1)),r.if(r.getLocal("greatest"),r.call(t+"_copy",b,r.i32_add(r.getLocal("pOut"),r.i32_const(d))),r.call(t+"_neg",b,r.i32_add(r.getLocal("pOut"),r.i32_const(d)))),r.if(r.getLocal("greatest"),r.call(t+"_neg",b,r.i32_add(r.getLocal("pOut"),r.i32_const(d))),r.call(t+"_copy",b,r.i32_add(r.getLocal("pOut"),r.i32_const(d))))))}(),_e(e,a+"_batchLEMtoU",a+"_LEMtoU",2*d,2*d),_e(e,a+"_batchLEMtoC",a+"_LEMtoC",2*d,d),_e(e,a+"_batchUtoLEM",a+"_UtoLEM",2*d,2*d),_e(e,a+"_batchCtoLEM",a+"_CtoLEM",d,2*d,!0),_e(e,a+"_batchToJacobian",a+"_toJacobian",2*d,3*d,!0),Ie(e,a,a+"_multiexp",a+"_add",3*d),Ie(e,a,a+"_multiexpAffine",a+"_addMixed",2*d),we(e,a+"_timesScalar",3*d,a+"_add",a+"_double",a+"_sub",a+"_copy",a+"_zero"),we(e,a+"_timesScalarAffine",2*d,a+"_addMixed",a+"_double",a+"_subMixed",a+"_copyAffine",a+"_zero"),e.exportFunction(a+"_isZero"),e.exportFunction(a+"_isZeroAffine"),e.exportFunction(a+"_eq"),e.exportFunction(a+"_eqMixed"),e.exportFunction(a+"_eqAffine"),e.exportFunction(a+"_copy"),e.exportFunction(a+"_copyAffine"),e.exportFunction(a+"_zero"),e.exportFunction(a+"_zeroAffine"),e.exportFunction(a+"_double"),e.exportFunction(a+"_doubleAffine"),e.exportFunction(a+"_add"),e.exportFunction(a+"_addMixed"),e.exportFunction(a+"_addAffine"),e.exportFunction(a+"_neg"),e.exportFunction(a+"_negAffine"),e.exportFunction(a+"_sub"),e.exportFunction(a+"_subMixed"),e.exportFunction(a+"_subAffine"),e.exportFunction(a+"_fromMontgomery"),e.exportFunction(a+"_fromMontgomeryAffine"),e.exportFunction(a+"_toMontgomery"),e.exportFunction(a+"_toMontgomeryAffine"),e.exportFunction(a+"_timesScalar"),e.exportFunction(a+"_timesScalarAffine"),e.exportFunction(a+"_normalize"),e.exportFunction(a+"_LEMtoU"),e.exportFunction(a+"_LEMtoC"),e.exportFunction(a+"_UtoLEM"),e.exportFunction(a+"_CtoLEM"),e.exportFunction(a+"_batchLEMtoU"),e.exportFunction(a+"_batchLEMtoC"),e.exportFunction(a+"_batchUtoLEM"),e.exportFunction(a+"_batchCtoLEM"),e.exportFunction(a+"_toAffine"),e.exportFunction(a+"_toJacobian"),e.exportFunction(a+"_batchToAffine"),e.exportFunction(a+"_batchToJacobian"),e.exportFunction(a+"_inCurve"),e.exportFunction(a+"_inCurveAffine")),a};const{isOdd:Ce,modInv:Me,modPow:Be}=U,Le=D;var Se=function(e,a,t,c,f){const d=8*e.modules[c].n64,r=8*e.modules[t].n64,n=e.modules[c].q;let i=n-1n,b=0;for(;!Ce(i);)b++,i>>=1n;let o=2n;for(;1n===Be(o,n>>1n,n);)o+=1n;const s=new Array(b+1);s[b]=Be(o,i,n);let l=b-1;for(;l>=0;)s[l]=Be(s[l+1],2n,n),l--;const u=[],h=(1n<>t);return a}const E=Array(256);for(let e=0;e<256;e++)E[e]=I(e);const C=e.alloc(E);!function(){const t=e.addFunction(a+"__rev");t.addParam("x","i32"),t.addParam("bits","i32"),t.setReturnType("i32");const c=t.getCodeBuilder();t.addCode(c.i32_rotl(c.i32_add(c.i32_add(c.i32_shl(c.i32_load8_u(c.i32_and(c.getLocal("x"),c.i32_const(255)),C,0),c.i32_const(24)),c.i32_shl(c.i32_load8_u(c.i32_and(c.i32_shr_u(c.getLocal("x"),c.i32_const(8)),c.i32_const(255)),C,0),c.i32_const(16))),c.i32_add(c.i32_shl(c.i32_load8_u(c.i32_and(c.i32_shr_u(c.getLocal("x"),c.i32_const(16)),c.i32_const(255)),C,0),c.i32_const(8)),c.i32_load8_u(c.i32_and(c.i32_shr_u(c.getLocal("x"),c.i32_const(24)),c.i32_const(255)),C,0))),c.getLocal("bits")))}(),function(){const c=e.addFunction(a+"__reversePermutation");c.addParam("px","i32"),c.addParam("bits","i32"),c.addLocal("n","i32"),c.addLocal("i","i32"),c.addLocal("ri","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32");const f=c.getCodeBuilder(),d=f.i32_const(e.alloc(r));c.addCode(f.setLocal("n",f.i32_shl(f.i32_const(1),f.getLocal("bits"))),f.setLocal("i",f.i32_const(0)),f.block(f.loop(f.br_if(1,f.i32_eq(f.getLocal("i"),f.getLocal("n"))),f.setLocal("idx1",f.i32_add(f.getLocal("px"),f.i32_mul(f.getLocal("i"),f.i32_const(r)))),f.setLocal("ri",f.call(a+"__rev",f.getLocal("i"),f.getLocal("bits"))),f.setLocal("idx2",f.i32_add(f.getLocal("px"),f.i32_mul(f.getLocal("ri"),f.i32_const(r)))),f.if(f.i32_lt_u(f.getLocal("i"),f.getLocal("ri")),[...f.call(t+"_copy",f.getLocal("idx1"),d),...f.call(t+"_copy",f.getLocal("idx2"),f.getLocal("idx1")),...f.call(t+"_copy",d,f.getLocal("idx2"))]),f.setLocal("i",f.i32_add(f.getLocal("i"),f.i32_const(1))),f.br(0))))}(),function(){const d=e.addFunction(a+"__fftFinal");d.addParam("px","i32"),d.addParam("bits","i32"),d.addParam("reverse","i32"),d.addParam("mulFactor","i32"),d.addLocal("n","i32"),d.addLocal("ndiv2","i32"),d.addLocal("pInv2","i32"),d.addLocal("i","i32"),d.addLocal("mask","i32"),d.addLocal("idx1","i32"),d.addLocal("idx2","i32");const n=d.getCodeBuilder(),i=n.i32_const(e.alloc(r));d.addCode(n.if(n.i32_and(n.i32_eqz(n.getLocal("reverse")),n.call(c+"_isOne",n.getLocal("mulFactor"))),n.ret([])),n.setLocal("n",n.i32_shl(n.i32_const(1),n.getLocal("bits"))),n.setLocal("mask",n.i32_sub(n.getLocal("n"),n.i32_const(1))),n.setLocal("i",n.i32_const(1)),n.setLocal("ndiv2",n.i32_shr_u(n.getLocal("n"),n.i32_const(1))),n.block(n.loop(n.br_if(1,n.i32_ge_u(n.getLocal("i"),n.getLocal("ndiv2"))),n.setLocal("idx1",n.i32_add(n.getLocal("px"),n.i32_mul(n.getLocal("i"),n.i32_const(r)))),n.setLocal("idx2",n.i32_add(n.getLocal("px"),n.i32_mul(n.i32_sub(n.getLocal("n"),n.getLocal("i")),n.i32_const(r)))),n.if(n.getLocal("reverse"),n.if(n.call(c+"_isOne",n.getLocal("mulFactor")),[...n.call(t+"_copy",n.getLocal("idx1"),i),...n.call(t+"_copy",n.getLocal("idx2"),n.getLocal("idx1")),...n.call(t+"_copy",i,n.getLocal("idx2"))],[...n.call(t+"_copy",n.getLocal("idx1"),i),...n.call(f,n.getLocal("idx2"),n.getLocal("mulFactor"),n.getLocal("idx1")),...n.call(f,i,n.getLocal("mulFactor"),n.getLocal("idx2"))]),n.if(n.call(c+"_isOne",n.getLocal("mulFactor")),[],[...n.call(f,n.getLocal("idx1"),n.getLocal("mulFactor"),n.getLocal("idx1")),...n.call(f,n.getLocal("idx2"),n.getLocal("mulFactor"),n.getLocal("idx2"))])),n.setLocal("i",n.i32_add(n.getLocal("i"),n.i32_const(1))),n.br(0))),n.if(n.call(c+"_isOne",n.getLocal("mulFactor")),[],[...n.call(f,n.getLocal("px"),n.getLocal("mulFactor"),n.getLocal("px")),...n.setLocal("idx2",n.i32_add(n.getLocal("px"),n.i32_mul(n.getLocal("ndiv2"),n.i32_const(r)))),...n.call(f,n.getLocal("idx2"),n.getLocal("mulFactor"),n.getLocal("idx2"))]))}(),function(){const n=e.addFunction(a+"_rawfft");n.addParam("px","i32"),n.addParam("bits","i32"),n.addParam("reverse","i32"),n.addParam("mulFactor","i32"),n.addLocal("s","i32"),n.addLocal("k","i32"),n.addLocal("j","i32"),n.addLocal("m","i32"),n.addLocal("mdiv2","i32"),n.addLocal("n","i32"),n.addLocal("pwm","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r)),s=i.i32_const(e.alloc(r));n.addCode(i.call(a+"__reversePermutation",i.getLocal("px"),i.getLocal("bits")),i.setLocal("n",i.i32_shl(i.i32_const(1),i.getLocal("bits"))),i.setLocal("s",i.i32_const(1)),i.block(i.loop(i.br_if(1,i.i32_gt_u(i.getLocal("s"),i.getLocal("bits"))),i.setLocal("m",i.i32_shl(i.i32_const(1),i.getLocal("s"))),i.setLocal("pwm",i.i32_add(i.i32_const(p),i.i32_mul(i.getLocal("s"),i.i32_const(d)))),i.setLocal("k",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_ge_u(i.getLocal("k"),i.getLocal("n"))),i.call(c+"_one",b),i.setLocal("mdiv2",i.i32_shr_u(i.getLocal("m"),i.i32_const(1))),i.setLocal("j",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_ge_u(i.getLocal("j"),i.getLocal("mdiv2"))),i.setLocal("idx1",i.i32_add(i.getLocal("px"),i.i32_mul(i.i32_add(i.getLocal("k"),i.getLocal("j")),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("idx1"),i.i32_mul(i.getLocal("mdiv2"),i.i32_const(r)))),i.call(f,i.getLocal("idx2"),b,o),i.call(t+"_copy",i.getLocal("idx1"),s),i.call(t+"_add",s,o,i.getLocal("idx1")),i.call(t+"_sub",s,o,i.getLocal("idx2")),i.call(c+"_mul",b,i.getLocal("pwm"),b),i.setLocal("j",i.i32_add(i.getLocal("j"),i.i32_const(1))),i.br(0))),i.setLocal("k",i.i32_add(i.getLocal("k"),i.getLocal("m"))),i.br(0))),i.setLocal("s",i.i32_add(i.getLocal("s"),i.i32_const(1))),i.br(0))),i.call(a+"__fftFinal",i.getLocal("px"),i.getLocal("bits"),i.getLocal("reverse"),i.getLocal("mulFactor")))}(),function(){const t=e.addFunction(a+"__log2");t.addParam("n","i32"),t.setReturnType("i32"),t.addLocal("bits","i32"),t.addLocal("aux","i32");const c=t.getCodeBuilder();t.addCode(c.setLocal("aux",c.i32_shr_u(c.getLocal("n"),c.i32_const(1)))),t.addCode(c.setLocal("bits",c.i32_const(0))),t.addCode(c.block(c.loop(c.br_if(1,c.i32_eqz(c.getLocal("aux"))),c.setLocal("aux",c.i32_shr_u(c.getLocal("aux"),c.i32_const(1))),c.setLocal("bits",c.i32_add(c.getLocal("bits"),c.i32_const(1))),c.br(0)))),t.addCode(c.if(c.i32_ne(c.getLocal("n"),c.i32_shl(c.i32_const(1),c.getLocal("bits"))),c.unreachable())),t.addCode(c.if(c.i32_gt_u(c.getLocal("bits"),c.i32_const(b)),c.unreachable())),t.addCode(c.getLocal("bits"))}(),function(){const t=e.addFunction(a+"_fft");t.addParam("px","i32"),t.addParam("n","i32"),t.addLocal("bits","i32");const f=t.getCodeBuilder(),r=f.i32_const(e.alloc(d));t.addCode(f.setLocal("bits",f.call(a+"__log2",f.getLocal("n"))),f.call(c+"_one",r),f.call(a+"_rawfft",f.getLocal("px"),f.getLocal("bits"),f.i32_const(0),r))}(),function(){const t=e.addFunction(a+"_ifft");t.addParam("px","i32"),t.addParam("n","i32"),t.addLocal("bits","i32"),t.addLocal("pInv2","i32");const c=t.getCodeBuilder();t.addCode(c.setLocal("bits",c.call(a+"__log2",c.getLocal("n"))),c.setLocal("pInv2",c.i32_add(c.i32_const(x),c.i32_mul(c.getLocal("bits"),c.i32_const(d)))),c.call(a+"_rawfft",c.getLocal("px"),c.getLocal("bits"),c.i32_const(1),c.getLocal("pInv2")))}(),function(){const n=e.addFunction(a+"_fftJoin");n.addParam("pBuff1","i32"),n.addParam("pBuff2","i32"),n.addParam("n","i32"),n.addParam("first","i32"),n.addParam("inc","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32"),n.addLocal("i","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r)),s=i.i32_const(e.alloc(r));n.addCode(i.call(c+"_copy",i.getLocal("first"),b),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("pBuff1"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("pBuff2"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.call(f,i.getLocal("idx2"),b,o),i.call(t+"_copy",i.getLocal("idx1"),s),i.call(t+"_add",s,o,i.getLocal("idx1")),i.call(t+"_sub",s,o,i.getLocal("idx2")),i.call(c+"_mul",b,i.getLocal("inc"),b),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const n=e.addFunction(a+"_fftJoinExt");n.addParam("pBuff1","i32"),n.addParam("pBuff2","i32"),n.addParam("n","i32"),n.addParam("first","i32"),n.addParam("inc","i32"),n.addParam("totalBits","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32"),n.addLocal("i","i32"),n.addLocal("pShiftToM","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r));n.addCode(i.setLocal("pShiftToM",i.i32_add(i.i32_const(w),i.i32_mul(i.getLocal("totalBits"),i.i32_const(d)))),i.call(c+"_copy",i.getLocal("first"),b),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("pBuff1"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("pBuff2"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.call(t+"_add",i.getLocal("idx1"),i.getLocal("idx2"),o),i.call(f,i.getLocal("idx2"),i.getLocal("pShiftToM"),i.getLocal("idx2")),i.call(t+"_add",i.getLocal("idx1"),i.getLocal("idx2"),i.getLocal("idx2")),i.call(f,i.getLocal("idx2"),b,i.getLocal("idx2")),i.call(t+"_copy",o,i.getLocal("idx1")),i.call(c+"_mul",b,i.getLocal("inc"),b),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const n=e.addFunction(a+"_fftJoinExtInv");n.addParam("pBuff1","i32"),n.addParam("pBuff2","i32"),n.addParam("n","i32"),n.addParam("first","i32"),n.addParam("inc","i32"),n.addParam("totalBits","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32"),n.addLocal("i","i32"),n.addLocal("pShiftToM","i32"),n.addLocal("pSConst","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r));n.addCode(i.setLocal("pShiftToM",i.i32_add(i.i32_const(w),i.i32_mul(i.getLocal("totalBits"),i.i32_const(d)))),i.setLocal("pSConst",i.i32_add(i.i32_const(_),i.i32_mul(i.getLocal("totalBits"),i.i32_const(d)))),i.call(c+"_copy",i.getLocal("first"),b),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("pBuff1"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("pBuff2"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.call(f,i.getLocal("idx2"),b,o),i.call(t+"_sub",i.getLocal("idx1"),o,i.getLocal("idx2")),i.call(f,i.getLocal("idx2"),i.getLocal("pSConst"),i.getLocal("idx2")),i.call(f,i.getLocal("idx1"),i.getLocal("pShiftToM"),i.getLocal("idx1")),i.call(t+"_sub",o,i.getLocal("idx1"),i.getLocal("idx1")),i.call(f,i.getLocal("idx1"),i.getLocal("pSConst"),i.getLocal("idx1")),i.call(c+"_mul",b,i.getLocal("inc"),b),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const n=e.addFunction(a+"_fftMix");n.addParam("pBuff","i32"),n.addParam("n","i32"),n.addParam("exp","i32"),n.addLocal("nGroups","i32"),n.addLocal("nPerGroup","i32"),n.addLocal("nPerGroupDiv2","i32"),n.addLocal("pairOffset","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32"),n.addLocal("i","i32"),n.addLocal("j","i32"),n.addLocal("pwm","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r)),s=i.i32_const(e.alloc(r));n.addCode(i.setLocal("nPerGroup",i.i32_shl(i.i32_const(1),i.getLocal("exp"))),i.setLocal("nPerGroupDiv2",i.i32_shr_u(i.getLocal("nPerGroup"),i.i32_const(1))),i.setLocal("nGroups",i.i32_shr_u(i.getLocal("n"),i.getLocal("exp"))),i.setLocal("pairOffset",i.i32_mul(i.getLocal("nPerGroupDiv2"),i.i32_const(r))),i.setLocal("pwm",i.i32_add(i.i32_const(p),i.i32_mul(i.getLocal("exp"),i.i32_const(d)))),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("nGroups"))),i.call(c+"_one",b),i.setLocal("j",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("j"),i.getLocal("nPerGroupDiv2"))),i.setLocal("idx1",i.i32_add(i.getLocal("pBuff"),i.i32_mul(i.i32_add(i.i32_mul(i.getLocal("i"),i.getLocal("nPerGroup")),i.getLocal("j")),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("idx1"),i.getLocal("pairOffset"))),i.call(f,i.getLocal("idx2"),b,o),i.call(t+"_copy",i.getLocal("idx1"),s),i.call(t+"_add",s,o,i.getLocal("idx1")),i.call(t+"_sub",s,o,i.getLocal("idx2")),i.call(c+"_mul",b,i.getLocal("pwm"),b),i.setLocal("j",i.i32_add(i.getLocal("j"),i.i32_const(1))),i.br(0))),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),function(){const c=e.addFunction(a+"_fftFinal");c.addParam("pBuff","i32"),c.addParam("n","i32"),c.addParam("factor","i32"),c.addLocal("idx1","i32"),c.addLocal("idx2","i32"),c.addLocal("i","i32"),c.addLocal("ndiv2","i32");const d=c.getCodeBuilder(),n=d.i32_const(e.alloc(r));c.addCode(d.setLocal("ndiv2",d.i32_shr_u(d.getLocal("n"),d.i32_const(1))),d.if(d.i32_and(d.getLocal("n"),d.i32_const(1)),d.call(f,d.i32_add(d.getLocal("pBuff"),d.i32_mul(d.getLocal("ndiv2"),d.i32_const(r))),d.getLocal("factor"),d.i32_add(d.getLocal("pBuff"),d.i32_mul(d.getLocal("ndiv2"),d.i32_const(r))))),d.setLocal("i",d.i32_const(0)),d.block(d.loop(d.br_if(1,d.i32_ge_u(d.getLocal("i"),d.getLocal("ndiv2"))),d.setLocal("idx1",d.i32_add(d.getLocal("pBuff"),d.i32_mul(d.getLocal("i"),d.i32_const(r)))),d.setLocal("idx2",d.i32_add(d.getLocal("pBuff"),d.i32_mul(d.i32_sub(d.i32_sub(d.getLocal("n"),d.i32_const(1)),d.getLocal("i")),d.i32_const(r)))),d.call(f,d.getLocal("idx2"),d.getLocal("factor"),n),d.call(f,d.getLocal("idx1"),d.getLocal("factor"),d.getLocal("idx2")),d.call(t+"_copy",n,d.getLocal("idx1")),d.setLocal("i",d.i32_add(d.getLocal("i"),d.i32_const(1))),d.br(0))))}(),function(){const n=e.addFunction(a+"_prepareLagrangeEvaluation");n.addParam("pBuff1","i32"),n.addParam("pBuff2","i32"),n.addParam("n","i32"),n.addParam("first","i32"),n.addParam("inc","i32"),n.addParam("totalBits","i32"),n.addLocal("idx1","i32"),n.addLocal("idx2","i32"),n.addLocal("i","i32"),n.addLocal("pShiftToM","i32"),n.addLocal("pSConst","i32");const i=n.getCodeBuilder(),b=i.i32_const(e.alloc(d)),o=i.i32_const(e.alloc(r));n.addCode(i.setLocal("pShiftToM",i.i32_add(i.i32_const(w),i.i32_mul(i.getLocal("totalBits"),i.i32_const(d)))),i.setLocal("pSConst",i.i32_add(i.i32_const(_),i.i32_mul(i.getLocal("totalBits"),i.i32_const(d)))),i.call(c+"_copy",i.getLocal("first"),b),i.setLocal("i",i.i32_const(0)),i.block(i.loop(i.br_if(1,i.i32_eq(i.getLocal("i"),i.getLocal("n"))),i.setLocal("idx1",i.i32_add(i.getLocal("pBuff1"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.setLocal("idx2",i.i32_add(i.getLocal("pBuff2"),i.i32_mul(i.getLocal("i"),i.i32_const(r)))),i.call(f,i.getLocal("idx1"),i.getLocal("pShiftToM"),o),i.call(t+"_sub",i.getLocal("idx2"),o,o),i.call(t+"_sub",i.getLocal("idx1"),i.getLocal("idx2"),i.getLocal("idx2")),i.call(f,o,i.getLocal("pSConst"),i.getLocal("idx1")),i.call(f,i.getLocal("idx2"),b,i.getLocal("idx2")),i.call(c+"_mul",b,i.getLocal("inc"),b),i.setLocal("i",i.i32_add(i.getLocal("i"),i.i32_const(1))),i.br(0))))}(),e.exportFunction(a+"_fft"),e.exportFunction(a+"_ifft"),e.exportFunction(a+"_rawfft"),e.exportFunction(a+"_fftJoin"),e.exportFunction(a+"_fftJoinExt"),e.exportFunction(a+"_fftJoinExtInv"),e.exportFunction(a+"_fftMix"),e.exportFunction(a+"_fftFinal"),e.exportFunction(a+"_prepareLagrangeEvaluation")},ke=function(e,a,t){const c=8*e.modules[t].n64;return function(){const f=e.addFunction(a+"_zero");f.addParam("px","i32"),f.addParam("n","i32"),f.addLocal("lastp","i32"),f.addLocal("p","i32");const d=f.getCodeBuilder();f.addCode(d.setLocal("p",d.getLocal("px")),d.setLocal("lastp",d.i32_add(d.getLocal("px"),d.i32_mul(d.getLocal("n"),d.i32_const(c)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("p"),d.getLocal("lastp"))),d.call(t+"_zero",d.getLocal("p")),d.setLocal("p",d.i32_add(d.getLocal("p"),d.i32_const(c))),d.br(0))))}(),function(){const f=e.addFunction(a+"_constructLC");f.addParam("ppolynomials","i32"),f.addParam("psignals","i32"),f.addParam("nSignals","i32"),f.addParam("pres","i32"),f.addLocal("i","i32"),f.addLocal("j","i32"),f.addLocal("pp","i32"),f.addLocal("ps","i32"),f.addLocal("pd","i32"),f.addLocal("ncoefs","i32");const d=f.getCodeBuilder(),r=d.i32_const(e.alloc(c));f.addCode(d.setLocal("i",d.i32_const(0)),d.setLocal("pp",d.getLocal("ppolynomials")),d.setLocal("ps",d.getLocal("psignals")),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("i"),d.getLocal("nSignals"))),d.setLocal("ncoefs",d.i32_load(d.getLocal("pp"))),d.setLocal("pp",d.i32_add(d.getLocal("pp"),d.i32_const(4))),d.setLocal("j",d.i32_const(0)),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("j"),d.getLocal("ncoefs"))),d.setLocal("pd",d.i32_add(d.getLocal("pres"),d.i32_mul(d.i32_load(d.getLocal("pp")),d.i32_const(c)))),d.setLocal("pp",d.i32_add(d.getLocal("pp"),d.i32_const(4))),d.call(t+"_mul",d.getLocal("ps"),d.getLocal("pp"),r),d.call(t+"_add",r,d.getLocal("pd"),d.getLocal("pd")),d.setLocal("pp",d.i32_add(d.getLocal("pp"),d.i32_const(c))),d.setLocal("j",d.i32_add(d.getLocal("j"),d.i32_const(1))),d.br(0))),d.setLocal("ps",d.i32_add(d.getLocal("ps"),d.i32_const(c))),d.setLocal("i",d.i32_add(d.getLocal("i"),d.i32_const(1))),d.br(0))))}(),e.exportFunction(a+"_zero"),e.exportFunction(a+"_constructLC"),a},Ne=function(e,a,t){const c=8*e.modules[t].n64;return function(){const f=e.addFunction(a+"_buildABC");f.addParam("pCoefs","i32"),f.addParam("nCoefs","i32"),f.addParam("pWitness","i32"),f.addParam("pA","i32"),f.addParam("pB","i32"),f.addParam("pC","i32"),f.addParam("offsetOut","i32"),f.addParam("nOut","i32"),f.addParam("offsetWitness","i32"),f.addParam("nWitness","i32"),f.addLocal("it","i32"),f.addLocal("ita","i32"),f.addLocal("itb","i32"),f.addLocal("last","i32"),f.addLocal("m","i32"),f.addLocal("c","i32"),f.addLocal("s","i32"),f.addLocal("pOut","i32");const d=f.getCodeBuilder(),r=d.i32_const(e.alloc(c));f.addCode(d.setLocal("ita",d.getLocal("pA")),d.setLocal("itb",d.getLocal("pB")),d.setLocal("last",d.i32_add(d.getLocal("pA"),d.i32_mul(d.getLocal("nOut"),d.i32_const(c)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("ita"),d.getLocal("last"))),d.call(t+"_zero",d.getLocal("ita")),d.call(t+"_zero",d.getLocal("itb")),d.setLocal("ita",d.i32_add(d.getLocal("ita"),d.i32_const(c))),d.setLocal("itb",d.i32_add(d.getLocal("itb"),d.i32_const(c))),d.br(0))),d.setLocal("it",d.getLocal("pCoefs")),d.setLocal("last",d.i32_add(d.getLocal("pCoefs"),d.i32_mul(d.getLocal("nCoefs"),d.i32_const(c+12)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("it"),d.getLocal("last"))),d.setLocal("s",d.i32_load(d.getLocal("it"),8)),d.if(d.i32_or(d.i32_lt_u(d.getLocal("s"),d.getLocal("offsetWitness")),d.i32_ge_u(d.getLocal("s"),d.i32_add(d.getLocal("offsetWitness"),d.getLocal("nWitness")))),[...d.setLocal("it",d.i32_add(d.getLocal("it"),d.i32_const(c+12))),...d.br(1)]),d.setLocal("m",d.i32_load(d.getLocal("it"))),d.if(d.i32_eq(d.getLocal("m"),d.i32_const(0)),d.setLocal("pOut",d.getLocal("pA")),d.if(d.i32_eq(d.getLocal("m"),d.i32_const(1)),d.setLocal("pOut",d.getLocal("pB")),[...d.setLocal("it",d.i32_add(d.getLocal("it"),d.i32_const(c+12))),...d.br(1)])),d.setLocal("c",d.i32_load(d.getLocal("it"),4)),d.if(d.i32_or(d.i32_lt_u(d.getLocal("c"),d.getLocal("offsetOut")),d.i32_ge_u(d.getLocal("c"),d.i32_add(d.getLocal("offsetOut"),d.getLocal("nOut")))),[...d.setLocal("it",d.i32_add(d.getLocal("it"),d.i32_const(c+12))),...d.br(1)]),d.setLocal("pOut",d.i32_add(d.getLocal("pOut"),d.i32_mul(d.i32_sub(d.getLocal("c"),d.getLocal("offsetOut")),d.i32_const(c)))),d.call(t+"_mul",d.i32_add(d.getLocal("pWitness"),d.i32_mul(d.i32_sub(d.getLocal("s"),d.getLocal("offsetWitness")),d.i32_const(c))),d.i32_add(d.getLocal("it"),d.i32_const(12)),r),d.call(t+"_add",d.getLocal("pOut"),r,d.getLocal("pOut")),d.setLocal("it",d.i32_add(d.getLocal("it"),d.i32_const(c+12))),d.br(0))),d.setLocal("ita",d.getLocal("pA")),d.setLocal("itb",d.getLocal("pB")),d.setLocal("it",d.getLocal("pC")),d.setLocal("last",d.i32_add(d.getLocal("pA"),d.i32_mul(d.getLocal("nOut"),d.i32_const(c)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("ita"),d.getLocal("last"))),d.call(t+"_mul",d.getLocal("ita"),d.getLocal("itb"),d.getLocal("it")),d.setLocal("ita",d.i32_add(d.getLocal("ita"),d.i32_const(c))),d.setLocal("itb",d.i32_add(d.getLocal("itb"),d.i32_const(c))),d.setLocal("it",d.i32_add(d.getLocal("it"),d.i32_const(c))),d.br(0))))}(),function(){const f=e.addFunction(a+"_joinABC");f.addParam("pA","i32"),f.addParam("pB","i32"),f.addParam("pC","i32"),f.addParam("n","i32"),f.addParam("pP","i32"),f.addLocal("ita","i32"),f.addLocal("itb","i32"),f.addLocal("itc","i32"),f.addLocal("itp","i32"),f.addLocal("last","i32");const d=f.getCodeBuilder(),r=d.i32_const(e.alloc(c));f.addCode(d.setLocal("ita",d.getLocal("pA")),d.setLocal("itb",d.getLocal("pB")),d.setLocal("itc",d.getLocal("pC")),d.setLocal("itp",d.getLocal("pP")),d.setLocal("last",d.i32_add(d.getLocal("pA"),d.i32_mul(d.getLocal("n"),d.i32_const(c)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("ita"),d.getLocal("last"))),d.call(t+"_mul",d.getLocal("ita"),d.getLocal("itb"),r),d.call(t+"_sub",r,d.getLocal("itc"),d.getLocal("itp")),d.setLocal("ita",d.i32_add(d.getLocal("ita"),d.i32_const(c))),d.setLocal("itb",d.i32_add(d.getLocal("itb"),d.i32_const(c))),d.setLocal("itc",d.i32_add(d.getLocal("itc"),d.i32_const(c))),d.setLocal("itp",d.i32_add(d.getLocal("itp"),d.i32_const(c))),d.br(0))))}(),function(){const f=e.addFunction(a+"_batchAdd");f.addParam("pa","i32"),f.addParam("pb","i32"),f.addParam("n","i32"),f.addParam("pr","i32"),f.addLocal("ita","i32"),f.addLocal("itb","i32"),f.addLocal("itr","i32"),f.addLocal("last","i32");const d=f.getCodeBuilder();f.addCode(d.setLocal("ita",d.getLocal("pa")),d.setLocal("itb",d.getLocal("pb")),d.setLocal("itr",d.getLocal("pr")),d.setLocal("last",d.i32_add(d.getLocal("pa"),d.i32_mul(d.getLocal("n"),d.i32_const(c)))),d.block(d.loop(d.br_if(1,d.i32_eq(d.getLocal("ita"),d.getLocal("last"))),d.call(t+"_add",d.getLocal("ita"),d.getLocal("itb"),d.getLocal("itr")),d.setLocal("ita",d.i32_add(d.getLocal("ita"),d.i32_const(c))),d.setLocal("itb",d.i32_add(d.getLocal("itb"),d.i32_const(c))),d.setLocal("itr",d.i32_add(d.getLocal("itr"),d.i32_const(c))),d.br(0))))}(),e.exportFunction(a+"_buildABC"),e.exportFunction(a+"_joinABC"),e.exportFunction(a+"_batchAdd"),a},Pe=function(e,a,t,c,f,d,r,n){const i=e.addFunction(a);i.addParam("pIn","i32"),i.addParam("n","i32"),i.addParam("pFirst","i32"),i.addParam("pInc","i32"),i.addParam("pOut","i32"),i.addLocal("pOldFree","i32"),i.addLocal("i","i32"),i.addLocal("pFrom","i32"),i.addLocal("pTo","i32");const b=i.getCodeBuilder(),o=b.i32_const(e.alloc(r));i.addCode(b.setLocal("pFrom",b.getLocal("pIn")),b.setLocal("pTo",b.getLocal("pOut"))),i.addCode(b.call(c+"_copy",b.getLocal("pFirst"),o)),i.addCode(b.setLocal("i",b.i32_const(0)),b.block(b.loop(b.br_if(1,b.i32_eq(b.getLocal("i"),b.getLocal("n"))),b.call(n,b.getLocal("pFrom"),o,b.getLocal("pTo")),b.setLocal("pFrom",b.i32_add(b.getLocal("pFrom"),b.i32_const(f))),b.setLocal("pTo",b.i32_add(b.getLocal("pTo"),b.i32_const(d))),b.call(c+"_mul",o,b.getLocal("pInc"),o),b.setLocal("i",b.i32_add(b.getLocal("i"),b.i32_const(1))),b.br(0)))),e.exportFunction(a)};const Re=D,Oe=se,De=he,Te=xe,Fe=ve,Qe=Ee,Ue=Se,je=ke,He=Ne,$e=Pe,{bitLength:qe,modInv:Ge,isOdd:ze,isNegative:Ke}=U,Ve=D,Ze=se,Je=he,We=xe,Ye=ve,Xe=Ee,ea=Se,aa=ke,ta=Ne,ca=Pe,{bitLength:fa,isOdd:da,isNegative:ra}=U;var na=function(e,a){const t=a||"bn128";if(e.modules[t])return t;const c=21888242871839275222246405745257275088696311157297823662689037894645226208583n,f=21888242871839275222246405745257275088548364400416034343698204186575808495617n,d=Math.floor((qe(c-1n)-1)/64)+1,r=8*d,n=r,i=r,b=2*i,o=12*i,s=e.alloc(Re.bigInt2BytesLE(f,n)),l=Oe(e,c,"f1m");De(e,f,"fr","frm");const u=e.alloc(Re.bigInt2BytesLE(y(3n),i)),h=Qe(e,"g1m","f1m",u);Ue(e,"frm","frm","frm","frm_mul"),je(e,"pol","frm"),He(e,"qap","frm");const p=Te(e,"f1m_neg","f2m","f1m"),g=e.alloc([...Re.bigInt2BytesLE(y(19485874751759354771024239261021720505790618469301721065564631296452457478373n),i),...Re.bigInt2BytesLE(y(266929791119991161246907387137283842545076965332900288569378510910307636690n),i)]),m=Qe(e,"g2m","f2m",g);function x(a,t){const c=e.addFunction(a);c.addParam("pG","i32"),c.addParam("pFr","i32"),c.addParam("pr","i32");const f=c.getCodeBuilder(),d=f.i32_const(e.alloc(r));c.addCode(f.call("frm_fromMontgomery",f.getLocal("pFr"),d),f.call(t,f.getLocal("pG"),d,f.i32_const(r),f.getLocal("pr"))),e.exportFunction(a)}function y(e){return BigInt(e)*(1n<0n;)ze(e)?a.push(1):a.push(0),e>>=1n;return a}(),D=e.alloc(O),T=3*b,F=O.length-1,Q=O.reduce(((e,a)=>e+(0!=a?1:0)),0),U=6*r,j=3*r*2+(Q+F+1)*T;function H(a){const f=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[8376118865763821496583973867626364092589906065868298776909617916018768340080n,16469823323077808223889137241176536799009286646108169935659301613961712198316n],[21888242871839275220042445260109153167277707414472061641714758635765020556617n,0n],[11697423496358154304825782922584725312912383441159505038794027105778954184319n,303847389135065887422783454877609941456349188919719272345083954437860409601n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3321304630594332808241809054958361220322477375291206261884409189760185844239n,5722266937896532885780051958958348231143373700109372999374820235121374419868n],[21888242871839275222246405745257275088696311157297823662689037894645226208582n,0n],[13512124006075453725662431877630910996106405091429524885779419978626457868503n,5418419548761466998357268504080738289687024511189653727029736280683514010267n],[2203960485148121921418603742825762020974279258880205651966n,0n],[10190819375481120917420622822672549775783927716138318623895010788866272024264n,21584395482704209334823622290379665147239961968378104390343953940207365798982n],[2203960485148121921418603742825762020974279258880205651967n,0n],[18566938241244942414004596690298913868373833782006617400804628704885040364344n,16165975933942742336466353786298926857552937457188450663314217659523851788715n]]],d=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[21575463638280843010398324269430826099269044274347216827212613867836435027261n,10307601595873709700152284273816112264069230130616436755625194854815875713954n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[3772000881919853776433695186713858239009073593817195771773381919316419345261n,2236595495967245188281701248203181795121068902605861227855261137820944008926n],[2203960485148121921418603742825762020974279258880205651966n,0n],[18429021223477853657660792034369865839114504446431234726392080002137598044644n,9344045779998320333812420223237981029506012124075525679208581902008406485703n]],[[1n,0n],[2581911344467009335267311115468803099551665605076196740867805258568234346338n,19937756971775647987995932169929341994314640652964949448313374472400716661030n],[2203960485148121921418603742825762020974279258880205651966n,0n],[5324479202449903542726783395506214481928257762400643279780343368557297135718n,16208900380737693084919495127334387981393726419856888799917914180988844123039n],[21888242871839275220042445260109153167277707414472061641714758635765020556616n,0n],[13981852324922362344252311234282257507216387789820983642040889267519694726527n,7629828391165209371577384193250820201684255241773809077146787135900891633097n]]],r=e.addFunction(t+"__frobeniusMap"+a);r.addParam("x","i32"),r.addParam("r","i32");const n=r.getCodeBuilder();for(let t=0;t<6;t++){const c=0==t?n.getLocal("x"):n.i32_add(n.getLocal("x"),n.i32_const(t*b)),s=c,u=n.i32_add(n.getLocal("x"),n.i32_const(t*b+i)),h=0==t?n.getLocal("r"):n.i32_add(n.getLocal("r"),n.i32_const(t*b)),g=h,m=n.i32_add(n.getLocal("r"),n.i32_const(t*b+i)),x=o(f[Math.floor(t/3)][a%12],d[t%3][a%6]),A=e.alloc([...Re.bigInt2BytesLE(y(x[0]),32),...Re.bigInt2BytesLE(y(x[1]),32)]);a%2==1?r.addCode(n.call(l+"_copy",s,g),n.call(l+"_neg",u,m),n.call(p+"_mul",h,n.i32_const(A),h)):r.addCode(n.call(p+"_mul",c,n.i32_const(A),h))}function o(e,a){const t=BigInt(e[0]),f=BigInt(e[1]),d=BigInt(a[0]),r=BigInt(a[1]),n=[(t*d-f*r)%c,(t*r+f*d)%c];return Ke(n[0])&&(n[0]=n[0]+c),n}}function $(){!function(){const a=e.addFunction(t+"__cyclotomicSquare");a.addParam("x","i32"),a.addParam("r","i32");const c=a.getCodeBuilder(),f=c.getLocal("x"),d=c.i32_add(c.getLocal("x"),c.i32_const(b)),r=c.i32_add(c.getLocal("x"),c.i32_const(2*b)),n=c.i32_add(c.getLocal("x"),c.i32_const(3*b)),i=c.i32_add(c.getLocal("x"),c.i32_const(4*b)),o=c.i32_add(c.getLocal("x"),c.i32_const(5*b)),s=c.getLocal("r"),l=c.i32_add(c.getLocal("r"),c.i32_const(b)),u=c.i32_add(c.getLocal("r"),c.i32_const(2*b)),h=c.i32_add(c.getLocal("r"),c.i32_const(3*b)),g=c.i32_add(c.getLocal("r"),c.i32_const(4*b)),m=c.i32_add(c.getLocal("r"),c.i32_const(5*b)),x=c.i32_const(e.alloc(b)),y=c.i32_const(e.alloc(b)),A=c.i32_const(e.alloc(b)),v=c.i32_const(e.alloc(b)),w=c.i32_const(e.alloc(b)),_=c.i32_const(e.alloc(b)),I=c.i32_const(e.alloc(b)),E=c.i32_const(e.alloc(b));a.addCode(c.call(p+"_mul",f,i,I),c.call(p+"_mul",i,c.i32_const(L),x),c.call(p+"_add",f,x,x),c.call(p+"_add",f,i,E),c.call(p+"_mul",E,x,x),c.call(p+"_mul",c.i32_const(L),I,E),c.call(p+"_add",I,E,E),c.call(p+"_sub",x,E,x),c.call(p+"_add",I,I,y),c.call(p+"_mul",n,r,I),c.call(p+"_mul",r,c.i32_const(L),A),c.call(p+"_add",n,A,A),c.call(p+"_add",n,r,E),c.call(p+"_mul",E,A,A),c.call(p+"_mul",c.i32_const(L),I,E),c.call(p+"_add",I,E,E),c.call(p+"_sub",A,E,A),c.call(p+"_add",I,I,v),c.call(p+"_mul",d,o,I),c.call(p+"_mul",o,c.i32_const(L),w),c.call(p+"_add",d,w,w),c.call(p+"_add",d,o,E),c.call(p+"_mul",E,w,w),c.call(p+"_mul",c.i32_const(L),I,E),c.call(p+"_add",I,E,E),c.call(p+"_sub",w,E,w),c.call(p+"_add",I,I,_),c.call(p+"_sub",x,f,s),c.call(p+"_add",s,s,s),c.call(p+"_add",x,s,s),c.call(p+"_add",y,i,g),c.call(p+"_add",g,g,g),c.call(p+"_add",y,g,g),c.call(p+"_mul",_,c.i32_const(k),E),c.call(p+"_add",E,n,h),c.call(p+"_add",h,h,h),c.call(p+"_add",E,h,h),c.call(p+"_sub",w,r,u),c.call(p+"_add",u,u,u),c.call(p+"_add",w,u,u),c.call(p+"_sub",A,d,l),c.call(p+"_add",l,l,l),c.call(p+"_add",A,l,l),c.call(p+"_add",v,o,m),c.call(p+"_add",m,m,m),c.call(p+"_add",v,m,m))}(),function(a,c){const f=function(e){let a=e;const t=[];for(;a>0n;){if(ze(a)){const e=2-Number(a%4n);t.push(e),a-=BigInt(e)}else t.push(0);a>>=1n}return t}(a).map((e=>-1==e?255:e)),d=e.alloc(f),r=e.addFunction(t+"__cyclotomicExp_"+c);r.addParam("x","i32"),r.addParam("r","i32"),r.addLocal("bit","i32"),r.addLocal("i","i32");const n=r.getCodeBuilder(),i=n.getLocal("x"),b=n.getLocal("r"),s=n.i32_const(e.alloc(o));r.addCode(n.call(R+"_conjugate",i,s),n.call(R+"_one",b),n.if(n.teeLocal("bit",n.i32_load8_s(n.i32_const(f.length-1),d)),n.if(n.i32_eq(n.getLocal("bit"),n.i32_const(1)),n.call(R+"_mul",b,i,b),n.call(R+"_mul",b,s,b))),n.setLocal("i",n.i32_const(f.length-2)),n.block(n.loop(n.call(t+"__cyclotomicSquare",b,b),n.if(n.teeLocal("bit",n.i32_load8_s(n.getLocal("i"),d)),n.if(n.i32_eq(n.getLocal("bit"),n.i32_const(1)),n.call(R+"_mul",b,i,b),n.call(R+"_mul",b,s,b))),n.br_if(1,n.i32_eqz(n.getLocal("i"))),n.setLocal("i",n.i32_sub(n.getLocal("i"),n.i32_const(1))),n.br(0))))}(4965661367192848881n,"w0");const a=e.addFunction(t+"__finalExponentiationLastChunk");a.addParam("x","i32"),a.addParam("r","i32");const c=a.getCodeBuilder(),f=c.getLocal("x"),d=c.getLocal("r"),r=c.i32_const(e.alloc(o)),n=c.i32_const(e.alloc(o)),i=c.i32_const(e.alloc(o)),s=c.i32_const(e.alloc(o)),l=c.i32_const(e.alloc(o)),u=c.i32_const(e.alloc(o)),h=c.i32_const(e.alloc(o)),g=c.i32_const(e.alloc(o)),m=c.i32_const(e.alloc(o)),x=c.i32_const(e.alloc(o)),y=c.i32_const(e.alloc(o)),A=c.i32_const(e.alloc(o)),v=c.i32_const(e.alloc(o)),w=c.i32_const(e.alloc(o)),_=c.i32_const(e.alloc(o)),I=c.i32_const(e.alloc(o)),E=c.i32_const(e.alloc(o)),C=c.i32_const(e.alloc(o)),M=c.i32_const(e.alloc(o)),B=c.i32_const(e.alloc(o)),S=c.i32_const(e.alloc(o));a.addCode(c.call(t+"__cyclotomicExp_w0",f,r),c.call(R+"_conjugate",r,r),c.call(t+"__cyclotomicSquare",r,n),c.call(t+"__cyclotomicSquare",n,i),c.call(R+"_mul",i,n,s),c.call(t+"__cyclotomicExp_w0",s,l),c.call(R+"_conjugate",l,l),c.call(t+"__cyclotomicSquare",l,u),c.call(t+"__cyclotomicExp_w0",u,h),c.call(R+"_conjugate",h,h),c.call(R+"_conjugate",s,g),c.call(R+"_conjugate",h,m),c.call(R+"_mul",m,l,x),c.call(R+"_mul",x,g,y),c.call(R+"_mul",y,n,A),c.call(R+"_mul",y,l,v),c.call(R+"_mul",v,f,w),c.call(t+"__frobeniusMap1",A,_),c.call(R+"_mul",_,w,I),c.call(t+"__frobeniusMap2",y,E),c.call(R+"_mul",E,I,C),c.call(R+"_conjugate",f,M),c.call(R+"_mul",M,A,B),c.call(t+"__frobeniusMap3",B,S),c.call(R+"_mul",S,C,d))}e.modules[t]={n64:d,pG1gen:v,pG1zero:_,pG1b:u,pG2gen:E,pG2zero:M,pG2b:g,pq:e.modules.f1m.pq,pr:s,pOneT:B,prePSize:U,preQSize:j,r:f.toString(),q:c.toString()};const q=e.alloc(U),G=e.alloc(j);function z(a){const c=e.addFunction(t+"_pairingEq"+a);for(let e=0;e0n;)da(e)?a.push(1):a.push(0),e>>=1n;return a}(),O=e.alloc(R),D=3*i,T=R.length-1,F=R.reduce(((e,a)=>e+(0!=a?1:0)),0),Q=6*r,U=3*r*2+(F+T+1)*D,j=15132376222941642752n;function H(a){const t=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n,151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n],[2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n,1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n,877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027n,3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257n,2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[877076961050607968509681729531255177986764537961432449499635504522207616027455086505066378536590128544573588734230n,3125332594171059424908108096204648978570118281977575435832422631601824034463382777937621250592425535493320683825557n]]],f=[[[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n],[1n,0n]],[[1n,0n],[0n,4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[0n,1n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[0n,793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n]],[[1n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437n,0n],[4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436n,0n],[4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559786n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350n,0n],[793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351n,0n]]],d=e.addFunction(P+"_frobeniusMap"+a);d.addParam("x","i32"),d.addParam("r","i32");const b=d.getCodeBuilder();for(let c=0;c<6;c++){const s=0==c?b.getLocal("x"):b.i32_add(b.getLocal("x"),b.i32_const(c*i)),l=s,u=b.i32_add(b.getLocal("x"),b.i32_const(c*i+n)),p=0==c?b.getLocal("r"):b.i32_add(b.getLocal("r"),b.i32_const(c*i)),g=p,x=b.i32_add(b.getLocal("r"),b.i32_const(c*i+n)),y=o(t[Math.floor(c/3)][a%12],f[c%3][a%6]),A=e.alloc([...Ve.bigInt2BytesLE(v(y[0]),r),...Ve.bigInt2BytesLE(v(y[1]),r)]);a%2==1?d.addCode(b.call(h+"_copy",l,g),b.call(h+"_neg",u,x),b.call(m+"_mul",p,b.i32_const(A),p)):d.addCode(b.call(m+"_mul",s,b.i32_const(A),p))}function o(e,a){const t=e[0],f=e[1],d=a[0],r=a[1],n=[(t*d-f*r)%c,(t*r+f*d)%c];return ra(n[0])&&(n[0]=n[0]+c),n}}e.modules[t]={n64q:d,n64r:o,n8q:r,n8r:s,pG1gen:_,pG1zero:E,pG1b:p,pG2gen:M,pG2zero:L,pG2b:x,pq:e.modules.f1m.pq,pr:u,pOneT:S,r:f,q:c,prePSize:Q,preQSize:U},function(){const a=e.addFunction(N+"_mul1");a.addParam("pA","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const t=a.getCodeBuilder(),c=t.getLocal("pA"),f=t.i32_add(t.getLocal("pA"),t.i32_const(2*n)),d=t.i32_add(t.getLocal("pA"),t.i32_const(4*n)),r=t.getLocal("pC1"),i=t.getLocal("pR"),b=t.i32_add(t.getLocal("pR"),t.i32_const(2*n)),o=t.i32_add(t.getLocal("pR"),t.i32_const(4*n)),s=t.i32_const(e.alloc(2*n)),l=t.i32_const(e.alloc(2*n));a.addCode(t.call(m+"_add",c,f,s),t.call(m+"_add",f,d,l),t.call(m+"_mul",f,r,o),t.call(m+"_mul",l,r,i),t.call(m+"_sub",i,o,i),t.call(m+"_mulNR",i,i),t.call(m+"_mul",s,r,b),t.call(m+"_sub",b,o,b))}(),function(){const a=e.addFunction(N+"_mul01");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pR","i32");const t=a.getCodeBuilder(),c=t.getLocal("pA"),f=t.i32_add(t.getLocal("pA"),t.i32_const(2*n)),d=t.i32_add(t.getLocal("pA"),t.i32_const(4*n)),r=t.getLocal("pC0"),i=t.getLocal("pC1"),b=t.getLocal("pR"),o=t.i32_add(t.getLocal("pR"),t.i32_const(2*n)),s=t.i32_add(t.getLocal("pR"),t.i32_const(4*n)),l=t.i32_const(e.alloc(2*n)),u=t.i32_const(e.alloc(2*n)),h=t.i32_const(e.alloc(2*n)),p=t.i32_const(e.alloc(2*n));a.addCode(t.call(m+"_mul",c,r,l),t.call(m+"_mul",f,i,u),t.call(m+"_add",c,f,h),t.call(m+"_add",c,d,p),t.call(m+"_add",f,d,b),t.call(m+"_mul",b,i,b),t.call(m+"_sub",b,u,b),t.call(m+"_mulNR",b,b),t.call(m+"_add",b,l,b),t.call(m+"_add",r,i,o),t.call(m+"_mul",o,h,o),t.call(m+"_sub",o,l,o),t.call(m+"_sub",o,u,o),t.call(m+"_mul",p,r,s),t.call(m+"_sub",s,l,s),t.call(m+"_add",s,u,s))}(),function(){const a=e.addFunction(P+"_mul014");a.addParam("pA","i32"),a.addParam("pC0","i32"),a.addParam("pC1","i32"),a.addParam("pC4","i32"),a.addParam("pR","i32");const t=a.getCodeBuilder(),c=t.getLocal("pA"),f=t.i32_add(t.getLocal("pA"),t.i32_const(6*n)),d=t.getLocal("pC0"),r=t.getLocal("pC1"),i=t.getLocal("pC4"),b=t.i32_const(e.alloc(6*n)),o=t.i32_const(e.alloc(6*n)),s=t.i32_const(e.alloc(2*n)),l=t.getLocal("pR"),u=t.i32_add(t.getLocal("pR"),t.i32_const(6*n));a.addCode(t.call(N+"_mul01",c,d,r,b),t.call(N+"_mul1",f,i,o),t.call(m+"_add",r,i,s),t.call(N+"_add",f,c,u),t.call(N+"_mul01",u,d,s,u),t.call(N+"_sub",u,b,u),t.call(N+"_sub",u,o,u),t.call(N+"_copy",o,l),t.call(N+"_mulNR",l,l),t.call(N+"_add",l,b,l))}(),function(){const a=e.addFunction(t+"_ell");a.addParam("pP","i32"),a.addParam("pCoefs","i32"),a.addParam("pF","i32");const c=a.getCodeBuilder(),f=c.getLocal("pP"),d=c.i32_add(c.getLocal("pP"),c.i32_const(r)),i=c.getLocal("pF"),b=c.getLocal("pCoefs"),o=c.i32_add(c.getLocal("pCoefs"),c.i32_const(n)),s=c.i32_add(c.getLocal("pCoefs"),c.i32_const(2*n)),l=c.i32_add(c.getLocal("pCoefs"),c.i32_const(3*n)),u=c.i32_add(c.getLocal("pCoefs"),c.i32_const(4*n)),p=e.alloc(2*n),g=c.i32_const(p),m=c.i32_const(p),x=c.i32_const(p+n),y=e.alloc(2*n),A=c.i32_const(y),v=c.i32_const(y),w=c.i32_const(y+n);a.addCode(c.call(h+"_mul",b,d,m),c.call(h+"_mul",o,d,x),c.call(h+"_mul",s,f,v),c.call(h+"_mul",l,f,w),c.call(P+"_mul014",i,u,A,g,i))}();const $=e.alloc(Q),q=e.alloc(U);function G(a){const c=e.addFunction(t+"_pairingEq"+a);for(let e=0;e0n;){if(da(a)){const e=2-Number(a%4n);t.push(e),a-=BigInt(e)}else t.push(0);a>>=1n}return t}(a).map((e=>-1==e?255:e)),r=e.alloc(d),n=e.addFunction(t+"__cyclotomicExp_"+f);n.addParam("x","i32"),n.addParam("r","i32"),n.addLocal("bit","i32"),n.addLocal("i","i32");const i=n.getCodeBuilder(),o=i.getLocal("x"),s=i.getLocal("r"),l=i.i32_const(e.alloc(b));n.addCode(i.call(P+"_conjugate",o,l),i.call(P+"_one",s),i.if(i.teeLocal("bit",i.i32_load8_s(i.i32_const(d.length-1),r)),i.if(i.i32_eq(i.getLocal("bit"),i.i32_const(1)),i.call(P+"_mul",s,o,s),i.call(P+"_mul",s,l,s))),i.setLocal("i",i.i32_const(d.length-2)),i.block(i.loop(i.call(t+"__cyclotomicSquare",s,s),i.if(i.teeLocal("bit",i.i32_load8_s(i.getLocal("i"),r)),i.if(i.i32_eq(i.getLocal("bit"),i.i32_const(1)),i.call(P+"_mul",s,o,s),i.call(P+"_mul",s,l,s))),i.br_if(1,i.i32_eqz(i.getLocal("i"))),i.setLocal("i",i.i32_sub(i.getLocal("i"),i.i32_const(1))),i.br(0)))),c&&n.addCode(i.call(P+"_conjugate",s,s))}(j,!0,"w0");const a=e.addFunction(t+"_finalExponentiation");a.addParam("x","i32"),a.addParam("r","i32");const c=a.getCodeBuilder(),f=c.getLocal("x"),d=c.getLocal("r"),r=c.i32_const(e.alloc(b)),n=c.i32_const(e.alloc(b)),o=c.i32_const(e.alloc(b)),s=c.i32_const(e.alloc(b)),l=c.i32_const(e.alloc(b)),u=c.i32_const(e.alloc(b)),h=c.i32_const(e.alloc(b));a.addCode(c.call(P+"_frobeniusMap6",f,r),c.call(P+"_inverse",f,n),c.call(P+"_mul",r,n,o),c.call(P+"_copy",o,n),c.call(P+"_frobeniusMap2",o,o),c.call(P+"_mul",o,n,o),c.call(t+"__cyclotomicSquare",o,n),c.call(P+"_conjugate",n,n),c.call(t+"__cyclotomicExp_w0",o,s),c.call(t+"__cyclotomicSquare",s,l),c.call(P+"_mul",n,s,u),c.call(t+"__cyclotomicExp_w0",u,n),c.call(t+"__cyclotomicExp_w0",n,r),c.call(t+"__cyclotomicExp_w0",r,h),c.call(P+"_mul",h,l,h),c.call(t+"__cyclotomicExp_w0",h,l),c.call(P+"_conjugate",u,u),c.call(P+"_mul",l,u,l),c.call(P+"_mul",l,o,l),c.call(P+"_conjugate",o,u),c.call(P+"_mul",n,o,n),c.call(P+"_frobeniusMap3",n,n),c.call(P+"_mul",h,u,h),c.call(P+"_frobeniusMap1",h,h),c.call(P+"_mul",s,r,s),c.call(P+"_frobeniusMap2",s,s),c.call(P+"_mul",s,n,s),c.call(P+"_mul",s,h,s),c.call(P+"_mul",s,l,d))}();for(let a=1;a<=5;a++)G(a),e.exportFunction(t+"_pairingEq"+a);!function(){const a=e.addFunction(t+"_pairing");a.addParam("p","i32"),a.addParam("q","i32"),a.addParam("r","i32");const c=a.getCodeBuilder(),f=c.i32_const(e.alloc(b));a.addCode(c.call(t+"_prepareG1",c.getLocal("p"),c.i32_const($))),a.addCode(c.call(t+"_prepareG2",c.getLocal("q"),c.i32_const(q))),a.addCode(c.call(t+"_millerLoop",c.i32_const($),c.i32_const(q),f)),a.addCode(c.call(t+"_finalExponentiation",f,c.getLocal("r")))}(),e.exportFunction(t+"_pairing"),e.exportFunction(t+"_prepareG1"),e.exportFunction(t+"_prepareG2"),e.exportFunction(t+"_millerLoop"),e.exportFunction(t+"_finalExponentiation"),e.exportFunction(t+"_finalExponentiationOld"),e.exportFunction(t+"__cyclotomicSquare"),e.exportFunction(t+"__cyclotomicExp_w0"),e.exportFunction(N+"_mul1"),e.exportFunction(N+"_mul01"),e.exportFunction(P+"_mul014"),e.exportFunction(g+"_inGroupAffine"),e.exportFunction(g+"_inGroup"),e.exportFunction(y+"_inGroupAffine"),e.exportFunction(y+"_inGroup")};function ba(e,a){let t=e;void 0===a&&0==(a=Math.floor((r(e)-1)/8)+1)&&(a=1);const c=new Uint8Array(a),f=new DataView(c.buffer);let d=0;for(;d>=BigInt(32)):d+2<=a?(f.setUint16(d,Number(t&BigInt(65535)),!0),d+=2,t>>=BigInt(16)):(f.setUint8(d,Number(t&BigInt(255)),!0),d+=1,t>>=BigInt(8));if(t)throw new Error("Number does not fit in this length");return c}const oa=[];for(let e=0;e<256;e++)oa[e]=sa(e,8);function sa(e,a){let t=0,c=e;for(let e=0;e>=1;return t}function la(e,a){return(oa[e>>>24]|oa[e>>>16&255]<<8|oa[e>>>8&255]<<16|oa[255&e]<<24)>>>32-a}function ua(e){return(4294901760&e?(e&=4294901760,16):0)|(4278255360&e?(e&=4278255360,8):0)|(4042322160&e?(e&=4042322160,4):0)|(3435973836&e?(e&=3435973836,2):0)|!!(2863311530&e)}function ha(e,a){const t=e.byteLength/a,c=ua(t);if(t!=1<t){const c=e.slice(f*a,(f+1)*a);e.set(e.slice(t*a,(t+1)*a),f*a),e.set(c,t*a)}}}function pa(e,a){const t=new Uint8Array(a*e.length);for(let c=0;c0;)t>=4?(t-=4,a+=BigInt(f.getUint32(t))<=2?(t-=2,a+=BigInt(f.getUint16(t))<0;)d-4>=0?(d-=4,f.setUint32(d,Number(t&BigInt(4294967295))),t>>=BigInt(32)):d-2>=0?(d-=2,f.setUint16(d,Number(t&BigInt(65535))),t>>=BigInt(16)):(d-=1,f.setUint8(d,Number(t&BigInt(255))),t>>=BigInt(8));if(t)throw new Error("Number does not fit in this length");return c},bitReverse:la,buffReverseBits:ha,buffer2array:ga,leBuff2int:function(e){let a=BigInt(0),t=0;const c=new DataView(e.buffer,e.byteOffset,e.byteLength);for(;t{t[c]=e(a[c])})),t}return a},stringifyFElements:function e(a,t){if("bigint"==typeof t||void 0!==t.eq)return t.toString(10);if(t instanceof Uint8Array)return a.toString(a.e(t));if(Array.isArray(t))return t.map(e.bind(this,a));if("object"==typeof t){const c={};return Object.keys(t).forEach((f=>{c[f]=e(a,t[f])})),c}return t},unstringifyBigInts:function e(a){if("string"==typeof a&&/^[0-9]+$/.test(a))return BigInt(a);if("string"==typeof a&&/^0x[0-9a-fA-F]+$/.test(a))return BigInt(a);if(Array.isArray(a))return a.map(e);if("object"==typeof a){if(null===a)return null;const t={};return Object.keys(a).forEach((c=>{t[c]=e(a[c])})),t}return a},unstringifyFElements:function e(a,t){if("string"==typeof t&&/^[0-9]+$/.test(t))return a.e(t);if("string"==typeof t&&/^0x[0-9a-fA-F]+$/.test(t))return a.e(t);if(Array.isArray(t))return t.map(e.bind(this,a));if("object"==typeof t){if(null===t)return null;const c={};return Object.keys(t).forEach((f=>{c[f]=e(a,t[f])})),c}return t}});const xa=1<<30;class ya{constructor(e){this.buffers=[],this.byteLength=e;for(let a=0;a0;){const e=r+n>xa?xa-r:n,a=new Uint8Array(this.buffers[d].buffer,this.buffers[d].byteOffset+r,e);if(e==t)return a.slice();f||(f=t<=xa?new Uint8Array(t):new ya(t)),f.set(a,t-n),n-=e,d++,r=0}return f}set(e,a){void 0===a&&(a=0);const t=e.byteLength;if(0==t)return;const c=Math.floor(a/xa);if(c==Math.floor((a+t-1)/xa))return e instanceof ya&&1==e.buffers.length?this.buffers[c].set(e.buffers[0],a%xa):this.buffers[c].set(e,a%xa);let f=c,d=a%xa,r=t;for(;r>0;){const a=d+r>xa?xa-d:r,c=e.slice(t-r,t-r+a);new Uint8Array(this.buffers[f].buffer,this.buffers[f].byteOffset+d,a).set(c),r-=a,f++,d=0}}}function Aa(e,a,t,c){return async function(f){const d=Math.floor(f.byteLength/t);if(d*t!==f.byteLength)throw new Error("Invalid buffer size");const r=Math.floor(d/e.concurrency),n=[];for(let i=0;i=0;e--)this.w[e]=this.square(this.w[e+1]);if(!this.eq(this.w[0],this.one))throw new Error("Error calculating roots of unity");this.batchToMontgomery=Aa(e,a+"_batchToMontgomery",this.n8,this.n8),this.batchFromMontgomery=Aa(e,a+"_batchFromMontgomery",this.n8,this.n8)}op2(e,a,t){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,t),this.tm.instance.exports[this.prefix+e](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op2Bool(e,a,t){return this.tm.setBuff(this.pOp1,a),this.tm.setBuff(this.pOp2,t),!!this.tm.instance.exports[this.prefix+e](this.pOp1,this.pOp2)}op1(e,a){return this.tm.setBuff(this.pOp1,a),this.tm.instance.exports[this.prefix+e](this.pOp1,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}op1Bool(e,a){return this.tm.setBuff(this.pOp1,a),!!this.tm.instance.exports[this.prefix+e](this.pOp1,this.pOp3)}add(e,a){return this.op2("_add",e,a)}eq(e,a){return this.op2Bool("_eq",e,a)}isZero(e){return this.op1Bool("_isZero",e)}sub(e,a){return this.op2("_sub",e,a)}neg(e){return this.op1("_neg",e)}inv(e){return this.op1("_inverse",e)}toMontgomery(e){return this.op1("_toMontgomery",e)}fromMontgomery(e){return this.op1("_fromMontgomery",e)}mul(e,a){return this.op2("_mul",e,a)}div(e,a){return this.tm.setBuff(this.pOp1,e),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_inverse"](this.pOp2,this.pOp2),this.tm.instance.exports[this.prefix+"_mul"](this.pOp1,this.pOp2,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}square(e){return this.op1("_square",e)}isSquare(e){return this.op1Bool("_isSquare",e)}sqrt(e){return this.op1("_sqrt",e)}exp(e,a){return a instanceof Uint8Array||(a=E(d(a))),this.tm.setBuff(this.pOp1,e),this.tm.setBuff(this.pOp2,a),this.tm.instance.exports[this.prefix+"_exp"](this.pOp1,this.pOp2,a.byteLength,this.pOp3),this.tm.getBuff(this.pOp3,this.n8)}isNegative(e){return this.op1Bool("_isNegative",e)}e(e,a){if(e instanceof Uint8Array)return e;let t=d(e,a);n(t)?(t=g(t),y(t,this.p)&&(t=x(t,this.p)),t=p(this.p,t)):y(t,this.p)&&(t=x(t,this.p));const c=ba(t,this.n8);return this.toMontgomery(c)}toString(e,a){return I(_(this.fromMontgomery(e),0),a)}fromRng(e){let a;const t=new Uint8Array(this.n8);do{a=C;for(let t=0;t{this.reject=a,this.resolve=e}))}}const Ba="data:application/javascript;base64,"+globalThis.btoa('(function thread(self) {\n const MAXMEM = 32767;\n let instance;\n let memory;\n\n if (self) {\n self.onmessage = function(e) {\n let data;\n if (e.data) {\n data = e.data;\n } else {\n data = e;\n }\n\n if (data[0].cmd == "INIT") {\n init(data[0]).then(function() {\n self.postMessage(data.result);\n });\n } else if (data[0].cmd == "TERMINATE") {\n self.close();\n } else {\n const res = runTask(data);\n self.postMessage(res);\n }\n };\n }\n\n async function init(data) {\n const code = new Uint8Array(data.code);\n const wasmModule = await WebAssembly.compile(code);\n memory = new WebAssembly.Memory({initial:data.init, maximum: MAXMEM});\n\n instance = await WebAssembly.instantiate(wasmModule, {\n env: {\n "memory": memory\n }\n });\n }\n\n\n\n function alloc(length) {\n const u32 = new Uint32Array(memory.buffer, 0, 1);\n while (u32[0] & 3) u32[0]++; // Return always aligned pointers\n const res = u32[0];\n u32[0] += length;\n if (u32[0] + length > memory.buffer.byteLength) {\n const currentPages = memory.buffer.byteLength / 0x10000;\n let requiredPages = Math.floor((u32[0] + length) / 0x10000)+1;\n if (requiredPages>MAXMEM) requiredPages=MAXMEM;\n memory.grow(requiredPages-currentPages);\n }\n return res;\n }\n\n function allocBuffer(buffer) {\n const p = alloc(buffer.byteLength);\n setBuffer(p, buffer);\n return p;\n }\n\n function getBuffer(pointer, length) {\n const u8 = new Uint8Array(memory.buffer);\n return new Uint8Array(u8.buffer, u8.byteOffset + pointer, length);\n }\n\n function setBuffer(pointer, buffer) {\n const u8 = new Uint8Array(memory.buffer);\n u8.set(new Uint8Array(buffer), pointer);\n }\n\n function runTask(task) {\n if (task[0].cmd == "INIT") {\n return init(task[0]);\n }\n const ctx = {\n vars: [],\n out: []\n };\n const u32a = new Uint32Array(memory.buffer, 0, 1);\n const oldAlloc = u32a[0];\n for (let i=0; i0;e++)if(0==this.working[e]){const a=this.actionQueue.shift();this.postAction(e,a.data,a.transfers,a.deferred)}}queueAction(e,a){const t=new Ma;if(this.singleThread){const a=this.taskManager(e);t.resolve(a)}else this.actionQueue.push({data:e,transfers:a,deferred:t}),this.processWorks();return t.promise}resetMemory(){this.u32[0]=this.initalPFree}allocBuff(e){const a=this.alloc(e.byteLength);return this.setBuff(a,e),a}getBuff(e,a){return this.u8.slice(e,e+a)}setBuff(e,a){this.u8.set(new Uint8Array(a),e)}alloc(e){for(;3&this.u32[0];)this.u32[0]++;const a=this.u32[0];return this.u32[0]+=e,a}async terminate(){for(let e=0;esetTimeout(e,200)))}}function Sa(e,a){const t=e[a],c=e.Fr,f=e.tm;e[a].batchApplyKey=async function(e,d,r,n,i){let b,o,s,l,u;if(n=n||"affine",i=i||"affine","G1"==a)"jacobian"==n?(s=3*t.F.n8,b="g1m_batchApplyKey"):(s=2*t.F.n8,b="g1m_batchApplyKeyMixed"),l=3*t.F.n8,"jacobian"==i?u=3*t.F.n8:(o="g1m_batchToAffine",u=2*t.F.n8);else if("G2"==a)"jacobian"==n?(s=3*t.F.n8,b="g2m_batchApplyKey"):(s=2*t.F.n8,b="g2m_batchApplyKeyMixed"),l=3*t.F.n8,"jacobian"==i?u=3*t.F.n8:(o="g2m_batchToAffine",u=2*t.F.n8);else{if("Fr"!=a)throw new Error("Invalid group: "+a);b="frm_batchApplyKey",s=t.n8,l=t.n8,u=t.n8}const h=Math.floor(e.byteLength/s),p=Math.floor(h/f.concurrency),g=[];r=c.e(r);let m=c.e(d);for(let a=0;a=0;e--){if(!t.isZero(p))for(let e=0;eb&&(p=b),p<1024&&(p=1024);const g=[];for(let a=0;a(n&&n.debug(`Multiexp end: ${i}: ${a}/${s}`),e))))}const m=await Promise.all(g);let x=t.zero;for(let e=m.length-1;e>=0;e--)x=t.add(x,m[e]);return x}t.multiExp=async function(e,a,t,c){return await d(e,a,"jacobian",t,c)},t.multiExpAffine=async function(e,a,t,c){return await d(e,a,"affine",t,c)}}function Pa(e,a){const t=e[a],c=e.Fr,f=t.tm;async function d(e,n,i,b,o,s){let l,u,h,p,g,m,x,y;i=i||"affine",b=b||"affine","G1"==a?("affine"==i?(l=2*t.F.n8,p="g1m_batchToJacobian"):l=3*t.F.n8,u=3*t.F.n8,n&&(y="g1m_fftFinal"),x="g1m_fftJoin",m="g1m_fftMix","affine"==b?(h=2*t.F.n8,g="g1m_batchToAffine"):h=3*t.F.n8):"G2"==a?("affine"==i?(l=2*t.F.n8,p="g2m_batchToJacobian"):l=3*t.F.n8,u=3*t.F.n8,n&&(y="g2m_fftFinal"),x="g2m_fftJoin",m="g2m_fftMix","affine"==b?(h=2*t.F.n8,g="g2m_batchToAffine"):h=3*t.F.n8):"Fr"==a&&(l=t.n8,u=t.n8,h=t.n8,n&&(y="frm_fftFinal"),m="frm_fftMix",x="frm_fftJoin");let A=!1;Array.isArray(e)?(e=pa(e,l),A=!0):e=e.slice(0,e.byteLength);const v=e.byteLength/l,w=ua(v);if(1<1<<28?new ya(2*s[0].byteLength):new Uint8Array(2*s[0].byteLength),l.set(s[0]),l.set(s[1],s[0].byteLength),l}(e,i,b,o,s):await async function(e,a,t,f,n){let i,b;i=e.slice(0,e.byteLength/2),b=e.slice(e.byteLength/2,e.byteLength);const o=[];[i,b]=await r(i,b,"fftJoinExt",c.one,c.shift,a,"jacobian",f,n),o.push(d(i,!1,"jacobian",t,f,n)),o.push(d(b,!1,"jacobian",t,f,n));const s=await Promise.all(o);let l;return l=s[0].byteLength>1<<28?new ya(2*s[0].byteLength):new Uint8Array(2*s[0].byteLength),l.set(s[0]),l.set(s[1],s[0].byteLength),l}(e,i,b,o,s),A?ga(a,h):a}let _,I,E;n&&(_=c.inv(c.e(v))),ha(e,l);let C=Math.min(16384,v),M=v/C;for(;M=16;)M*=2,C/=2;const B=ua(C),L=[];for(let a=0;a(o&&o.debug(`${s}: fft ${w} mix end: ${a}/${M}`),e))))}E=await Promise.all(L);for(let e=0;e(o&&o.debug(`${s}: fft ${w} join ${e}/${w} ${r+1}/${a} ${n}/${t/2}`),c))))}const r=await Promise.all(d);for(let e=0;e0;a--)I.set(E[a],e),e+=C*h,delete E[a];I.set(E[0].slice(0,(C-1)*h),e),delete E[0]}else for(let e=0;e65536&&(A=65536);const v=[];for(let a=0;a(s&&s.debug(`${l}: fftJoinExt End: ${a}/${y}`),e))))}const w=await Promise.all(v);let _,I;y*g>1<<28?(_=new ya(y*g),I=new ya(y*g)):(_=new Uint8Array(y*g),I=new Uint8Array(y*g));let E=0;for(let e=0;ec.s+1)throw i&&i.error("lagrangeEvaluations input too big"),new Error("lagrangeEvaluations input too big");let u=e.slice(0,e.byteLength/2),h=e.slice(e.byteLength/2,e.byteLength);const p=c.exp(c.shift,s/2),g=c.inv(c.sub(c.one,p));[u,h]=await r(u,h,"prepareLagrangeEvaluation",g,c.shiftInv,f,"jacobian",i,b+" prep");const m=[];let x;return m.push(d(u,!0,"jacobian",n,i,b+" t0")),m.push(d(h,!0,"jacobian",n,i,b+" t1")),[u,h]=await Promise.all(m),x=u.byteLength>1<<28?new ya(2*u.byteLength):new Uint8Array(2*u.byteLength),x.set(u),x.set(h,u.byteLength),x},t.fftMix=async function(e){const d=3*t.F.n8;let r,n;if("G1"==a)r="g1m_fftMix",n="g1m_fftJoin";else if("G2"==a)r="g2m_fftMix",n="g2m_fftJoin";else{if("Fr"!=a)throw new Error("Invalid group");r="frm_fftMix",n="frm_fftJoin"}const i=Math.floor(e.byteLength/d),b=ua(i);let o=1<=0;e--)u.set(l[e][0],h),h+=l[e][0].byteLength;return u}}async function Ra(e){const a=await async function(e,a){const t=new La;t.memory=new WebAssembly.Memory({initial:Ca}),t.u8=new Uint8Array(t.memory.buffer),t.u32=new Uint32Array(t.memory.buffer);const c=await WebAssembly.compile(e.code);if(t.instance=await WebAssembly.instantiate(c,{env:{memory:t.memory}}),t.singleThread=a,t.initalPFree=t.u32[0],t.pq=e.pq,t.pr=e.pr,t.pG1gen=e.pG1gen,t.pG1zero=e.pG1zero,t.pG2gen=e.pG2gen,t.pG2zero=e.pG2zero,t.pOneT=e.pOneT,a)t.code=e.code,t.taskManager=function(){const e=32767;let a,t;async function c(c){const f=new Uint8Array(c.code),d=await WebAssembly.compile(f);t=new WebAssembly.Memory({initial:c.init,maximum:e}),a=await WebAssembly.instantiate(d,{env:{memory:t}})}function f(a){const c=new Uint32Array(t.buffer,0,1);for(;3&c[0];)c[0]++;const f=c[0];if(c[0]+=a,c[0]+a>t.buffer.byteLength){const f=t.buffer.byteLength/65536;let d=Math.floor((c[0]+a)/65536)+1;d>e&&(d=e),t.grow(d-f)}return f}function d(e){const a=f(e.byteLength);return n(a,e),a}function r(e,a){const c=new Uint8Array(t.buffer);return new Uint8Array(c.buffer,c.byteOffset+e,a)}function n(e,a){new Uint8Array(t.buffer).set(new Uint8Array(a),e)}function i(e){if("INIT"==e[0].cmd)return c(e[0]);const i={vars:[],out:[]},b=new Uint32Array(t.buffer,0,1)[0];for(let t=0;t64&&(a=64),t.concurrency=a;for(let e=0;e>8n&0xFFn)),a.push(Number(t>>16n&0xFFn)),a.push(Number(t>>24n&0xFFn)),a}function Qa(e){const a=function(e){for(var a=[],t=0;t>6,128|63&c):c<55296||c>=57344?a.push(224|c>>12,128|c>>6&63,128|63&c):(t++,c=65536+((1023&c)<<10|1023&e.charCodeAt(t)),a.push(240|c>>18,128|c>>12&63,128|c>>6&63,128|63&c))}return a}(e);return[...qa(a.length),...a]}function Ua(e){const a=[];let t=Oa(e);if(Da(t))throw new Error("Number cannot be negative");for(;!Ta(t);)a.push(Number(0x7Fn&t)),t>>=7n;0==a.length&&a.push(0);for(let e=0;e0xFFFFFFFFn)throw new Error("Number too big");if(a>0x7FFFFFFFn&&(a-=0x100000000n),a<-2147483648n)throw new Error("Number too small");return ja(a)}function $a(e){let a=Oa(e);if(a>0xFFFFFFFFFFFFFFFFn)throw new Error("Number too big");if(a>0x7FFFFFFFFFFFFFFFn&&(a-=0x10000000000000000n),a<-9223372036854775808n)throw new Error("Number too small");return ja(a)}function qa(e){let a=Oa(e);if(a>0xFFFFFFFFn)throw new Error("Number too big");return Ua(a)}function Ga(e){return Array.from(e,(function(e){return("0"+(255&e).toString(16)).slice(-2)})).join("")}class za{constructor(e){this.func=e,this.functionName=e.functionName,this.module=e.module}setLocal(e,a){const t=this.func.localIdxByName[e];if(void 0===t)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${e} `);return[...a,33,...qa(t)]}teeLocal(e,a){const t=this.func.localIdxByName[e];if(void 0===t)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${e} `);return[...a,34,...qa(t)]}getLocal(e){const a=this.func.localIdxByName[e];if(void 0===a)throw new Error(`Local Variable not defined: Function: ${this.functionName} local: ${e} `);return[32,...qa(a)]}i64_load8_s(e,a,t){return[...e,48,void 0===t?0:t,...qa(a||0)]}i64_load8_u(e,a,t){return[...e,49,void 0===t?0:t,...qa(a||0)]}i64_load16_s(e,a,t){return[...e,50,void 0===t?1:t,...qa(a||0)]}i64_load16_u(e,a,t){return[...e,51,void 0===t?1:t,...qa(a||0)]}i64_load32_s(e,a,t){return[...e,52,void 0===t?2:t,...qa(a||0)]}i64_load32_u(e,a,t){return[...e,53,void 0===t?2:t,...qa(a||0)]}i64_load(e,a,t){return[...e,41,void 0===t?3:t,...qa(a||0)]}i64_store(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=3,r=a):Array.isArray(t)?(f=a,d=3,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,55,d,...qa(f)]}i64_store32(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=2,r=a):Array.isArray(t)?(f=a,d=2,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,62,d,...qa(f)]}i64_store16(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=1,r=a):Array.isArray(t)?(f=a,d=1,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,61,d,...qa(f)]}i64_store8(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=0,r=a):Array.isArray(t)?(f=a,d=0,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,60,d,...qa(f)]}i32_load8_s(e,a,t){return[...e,44,void 0===t?0:t,...qa(a||0)]}i32_load8_u(e,a,t){return[...e,45,void 0===t?0:t,...qa(a||0)]}i32_load16_s(e,a,t){return[...e,46,void 0===t?1:t,...qa(a||0)]}i32_load16_u(e,a,t){return[...e,47,void 0===t?1:t,...qa(a||0)]}i32_load(e,a,t){return[...e,40,void 0===t?2:t,...qa(a||0)]}i32_store(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=2,r=a):Array.isArray(t)?(f=a,d=2,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,54,d,...qa(f)]}i32_store16(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=1,r=a):Array.isArray(t)?(f=a,d=1,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,59,d,...qa(f)]}i32_store8(e,a,t,c){let f,d,r;return Array.isArray(a)?(f=0,d=0,r=a):Array.isArray(t)?(f=a,d=0,r=t):Array.isArray(c)&&(f=a,d=t,r=c),[...e,...r,58,d,...qa(f)]}call(e,...a){const t=this.module.functionIdxByName[e];if(void 0===t)throw new Error(`Function not defined: Function: ${e}`);return[...[].concat(...a),16,...qa(t)]}call_indirect(e,...a){return[...[].concat(...a),...e,17,0,0]}if(e,a,t){return t?[...e,4,64,...a,5,...t,11]:[...e,4,64,...a,11]}block(e){return[2,64,...e,11]}loop(...e){return[3,64,...[].concat(...e),11]}br_if(e,a){return[...a,13,...qa(e)]}br(e){return[12,...qa(e)]}ret(e){return[...e,15]}drop(e){return[...e,26]}i64_const(e){return[66,...$a(e)]}i32_const(e){return[65,...Ha(e)]}i64_eqz(e){return[...e,80]}i64_eq(e,a){return[...e,...a,81]}i64_ne(e,a){return[...e,...a,82]}i64_lt_s(e,a){return[...e,...a,83]}i64_lt_u(e,a){return[...e,...a,84]}i64_gt_s(e,a){return[...e,...a,85]}i64_gt_u(e,a){return[...e,...a,86]}i64_le_s(e,a){return[...e,...a,87]}i64_le_u(e,a){return[...e,...a,88]}i64_ge_s(e,a){return[...e,...a,89]}i64_ge_u(e,a){return[...e,...a,90]}i64_add(e,a){return[...e,...a,124]}i64_sub(e,a){return[...e,...a,125]}i64_mul(e,a){return[...e,...a,126]}i64_div_s(e,a){return[...e,...a,127]}i64_div_u(e,a){return[...e,...a,128]}i64_rem_s(e,a){return[...e,...a,129]}i64_rem_u(e,a){return[...e,...a,130]}i64_and(e,a){return[...e,...a,131]}i64_or(e,a){return[...e,...a,132]}i64_xor(e,a){return[...e,...a,133]}i64_shl(e,a){return[...e,...a,134]}i64_shr_s(e,a){return[...e,...a,135]}i64_shr_u(e,a){return[...e,...a,136]}i64_extend_i32_s(e){return[...e,172]}i64_extend_i32_u(e){return[...e,173]}i64_clz(e){return[...e,121]}i64_ctz(e){return[...e,122]}i32_eqz(e){return[...e,69]}i32_eq(e,a){return[...e,...a,70]}i32_ne(e,a){return[...e,...a,71]}i32_lt_s(e,a){return[...e,...a,72]}i32_lt_u(e,a){return[...e,...a,73]}i32_gt_s(e,a){return[...e,...a,74]}i32_gt_u(e,a){return[...e,...a,75]}i32_le_s(e,a){return[...e,...a,76]}i32_le_u(e,a){return[...e,...a,77]}i32_ge_s(e,a){return[...e,...a,78]}i32_ge_u(e,a){return[...e,...a,79]}i32_add(e,a){return[...e,...a,106]}i32_sub(e,a){return[...e,...a,107]}i32_mul(e,a){return[...e,...a,108]}i32_div_s(e,a){return[...e,...a,109]}i32_div_u(e,a){return[...e,...a,110]}i32_rem_s(e,a){return[...e,...a,111]}i32_rem_u(e,a){return[...e,...a,112]}i32_and(e,a){return[...e,...a,113]}i32_or(e,a){return[...e,...a,114]}i32_xor(e,a){return[...e,...a,115]}i32_shl(e,a){return[...e,...a,116]}i32_shr_s(e,a){return[...e,...a,117]}i32_shr_u(e,a){return[...e,...a,118]}i32_rotl(e,a){return[...e,...a,119]}i32_rotr(e,a){return[...e,...a,120]}i32_wrap_i64(e){return[...e,167]}i32_clz(e){return[...e,103]}i32_ctz(e){return[...e,104]}unreachable(){return[0]}current_memory(){return[63,0]}comment(){return[]}}const Ka={i32:127,i64:126,f32:125,f64:124,anyfunc:112,func:96,emptyblock:64};class Va{constructor(e,a,t,c,f){if("import"==t)this.fnType="import",this.moduleName=c,this.fieldName=f;else{if("internal"!=t)throw new Error("Invalid function fnType: "+t);this.fnType="internal"}this.module=e,this.fnName=a,this.params=[],this.locals=[],this.localIdxByName={},this.code=[],this.returnType=null,this.nextLocal=0}addParam(e,a){if(this.localIdxByName[e])throw new Error(`param already exists. Function: ${this.fnName}, Param: ${e} `);const t=this.nextLocal++;this.localIdxByName[e]=t,this.params.push({type:a})}addLocal(e,a,t){const c=t||1;if(this.localIdxByName[e])throw new Error(`local already exists. Function: ${this.fnName}, Param: ${e} `);const f=this.nextLocal++;this.localIdxByName[e]=f,this.locals.push({type:a,length:c})}setReturnType(e){if(this.returnType)throw new Error(`returnType already defined. Function: ${this.fnName}`);this.returnType=e}getSignature(){return[96,...qa(this.params.length),...this.params.map((e=>Ka[e.type])),...this.returnType?[1,Ka[this.returnType]]:[0]]}getBody(){const e=this.locals.map((e=>[...qa(e.length),Ka[e.type]])),a=[...qa(this.locals.length),...[].concat(...e),...this.code,11];return[...qa(a.length),...a]}addCode(...e){this.code.push(...[].concat(...e))}getCodeBuilder(){return new za(this)}}class Za{constructor(){this.functions=[],this.functionIdxByName={},this.nImportFunctions=0,this.nInternalFunctions=0,this.memory={pagesSize:1,moduleName:"env",fieldName:"memory"},this.free=8,this.datas=[],this.modules={},this.exports=[],this.functionsTable=[]}build(){return this._setSignatures(),new Uint8Array([...Fa(1836278016),...Fa(1),...this._buildType(),...this._buildImport(),...this._buildFunctionDeclarations(),...this._buildFunctionsTable(),...this._buildExports(),...this._buildElements(),...this._buildCode(),...this._buildData()])}addFunction(e){if(void 0!==this.functionIdxByName[e])throw new Error(`Function already defined: ${e}`);const a=this.functions.length;return this.functionIdxByName[e]=a,this.functions.push(new Va(this,e,"internal")),this.nInternalFunctions++,this.functions[a]}addIimportFunction(e,a,t){if(void 0!==this.functionIdxByName[e])throw new Error(`Function already defined: ${e}`);if(this.functions.length>0&&"internal"==this.functions[this.functions.length-1].type)throw new Error(`Import functions must be declared before internal: ${e}`);let c=t||e;const f=this.functions.length;return this.functionIdxByName[e]=f,this.functions.push(new Va(this,e,"import",a,c)),this.nImportFunctions++,this.functions[f]}setMemory(e,a,t){this.memory={pagesSize:e,moduleName:a||"env",fieldName:t||"memory"}}exportFunction(e,a){const t=a||e;if(void 0===this.functionIdxByName[e])throw new Error(`Function not defined: ${e}`);const c=this.functionIdxByName[e];t!=e&&(this.functionIdxByName[t]=c),this.exports.push({exportName:t,idx:c})}addFunctionToTable(e){const a=this.functionIdxByName[e];this.functionsTable.push(a)}addData(e,a){this.datas.push({offset:e,bytes:a})}alloc(e,a){let t,c;(Array.isArray(e)||ArrayBuffer.isView(e))&&void 0===a?(t=e.length,c=e):(t=e,c=a),t=1+(t-1>>3)<<3;const f=this.free;return this.free+=t,c&&this.addData(f,c),f}allocString(e){const a=(new globalThis.TextEncoder).encode(e);return this.alloc([...a,0])}_setSignatures(){this.signatures=[];const e={};if(this.functionsTable.length>0){const a=this.functions[this.functionsTable[0]].getSignature();e["s_"+Ga(a)]=0,this.signatures.push(a)}for(let a=0;a=0)c=await async function(e,a){if(!e&&globalThis.curve_bn128)return globalThis.curve_bn128;const t=new Za;t.setMemory(25),na(t),a&&a(t);const c={};c.code=t.build(),c.pq=t.modules.f1m.pq,c.pr=t.modules.frm.pq,c.pG1gen=t.modules.bn128.pG1gen,c.pG1zero=t.modules.bn128.pG1zero,c.pG1b=t.modules.bn128.pG1b,c.pG2gen=t.modules.bn128.pG2gen,c.pG2zero=t.modules.bn128.pG2zero,c.pG2b=t.modules.bn128.pG2b,c.pOneT=t.modules.bn128.pOneT,c.prePSize=t.modules.bn128.prePSize,c.preQSize=t.modules.bn128.preQSize,c.n8q=32,c.n8r=32,c.q=t.modules.bn128.q,c.r=t.modules.bn128.r;const f={name:"bn128",wasm:c,q:d("21888242871839275222246405745257275088696311157297823662689037894645226208583"),r:d("21888242871839275222246405745257275088548364400416034343698204186575808495617"),n8q:32,n8r:32,cofactorG2:d("30644e72e131a029b85045b68181585e06ceecda572a2489345f2299c0f9fa8d",16),singleThread:!!e},r=await Ra(f);return r.terminate=async function(){f.singleThread||(globalThis.curve_bn128=null,await this.tm.terminate())},e||(globalThis.curve_bn128=r),r}(a,t);else{if(!(["BLS12381"].indexOf(f)>=0))throw new Error(`Curve not supported: ${e}`);c=await async function(e,a){if(!e&&globalThis.curve_bls12381)return globalThis.curve_bls12381;const t=new Za;t.setMemory(25),ia(t),a&&a(t);const c={};c.code=t.build(),c.pq=t.modules.f1m.pq,c.pr=t.modules.frm.pq,c.pG1gen=t.modules.bls12381.pG1gen,c.pG1zero=t.modules.bls12381.pG1zero,c.pG1b=t.modules.bls12381.pG1b,c.pG2gen=t.modules.bls12381.pG2gen,c.pG2zero=t.modules.bls12381.pG2zero,c.pG2b=t.modules.bls12381.pG2b,c.pOneT=t.modules.bls12381.pOneT,c.prePSize=t.modules.bls12381.prePSize,c.preQSize=t.modules.bls12381.preQSize,c.n8q=48,c.n8r=32,c.q=t.modules.bls12381.q,c.r=t.modules.bls12381.r;const f={name:"bls12381",wasm:c,q:d("1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab",16),r:d("73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001",16),n8q:48,n8r:32,cofactorG1:d("0x396c8c005555e1568c00aaab0000aaab",16),cofactorG2:d("0x5d543a95414e7f1091d50792876a202cd91de4547085abaa68a205b2e5a7ddfa628f1cb4d9e82ef21537e293a6691ae1616ec6e786f0c70cf1c38e31c7238e5",16),singleThread:!!e},r=await Ra(f);return r.terminate=async function(){f.singleThread||(globalThis.curve_bls12381=null,await this.tm.terminate())},e||(globalThis.curve_bls12381=r),r}(a,t)}return c}globalThis.curve_bn128=null,globalThis.curve_bls12381=null,d("73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001",16),d("21888242871839275222246405745257275088548364400416034343698204186575808495617"),d("1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab",16),d("21888242871839275222246405745257275088696311157297823662689037894645226208583");const Wa=B,Ya=ma;class Xa{constructor(e){this.F=e,this.p=Wa.fromString("21888242871839275222246405745257275088548364400416034343698204186575808495617"),this.pm1d2=Wa.div(Wa.sub(this.p,Wa.e(1)),Wa.e(2)),this.Generator=[e.e("995203441582195749578291179787384436505546430278305826713579947235728471134"),e.e("5472060717959818805561601436314318772137091100104008585924551046643952123905")],this.Base8=[e.e("5299619240641551281634865583518297030282874472190772894086521144482721001553"),e.e("16950150798460657717958625567821834550301663161624707787222815936182638968203")],this.order=Wa.fromString("21888242871839275222246405745257275088614511777268538073601725287587578984328"),this.subOrder=Wa.shiftRight(this.order,3),this.A=e.e("168700"),this.D=e.e("168696")}addPoint(e,a){const t=this.F,c=[],f=t.mul(e[0],a[1]),d=t.mul(e[1],a[0]),r=t.mul(t.sub(e[1],t.mul(this.A,e[0])),t.add(a[0],a[1])),n=t.mul(f,d),i=t.mul(this.D,n);return c[0]=t.div(t.add(f,d),t.add(t.one,i)),c[1]=t.div(t.add(r,t.sub(t.mul(this.A,f),d)),t.sub(t.one,i)),c}mulPointEscalar(e,a){const t=this.F;let c=[t.e("0"),t.e("1")],f=a,d=e;for(;!Wa.isZero(f);)Wa.isOdd(f)&&(c=this.addPoint(c,d)),d=this.addPoint(d,d),f=Wa.shiftRight(f,1);return c}inSubgroup(e){const a=this.F;if(!this.inCurve(e))return!1;const t=this.mulPointEscalar(e,this.subOrder);return a.isZero(t[0])&&a.eq(t[1],a.one)}inCurve(e){const a=this.F,t=a.square(e[0]),c=a.square(e[1]);return!!a.eq(a.add(a.mul(this.A,t),c),a.add(a.one,a.mul(a.mul(t,c),this.D)))}packPoint(e){const a=this.F,t=new Uint8Array(32);a.toRprLE(t,0,e[1]);const c=a.toObject(e[0]);return Wa.gt(c,this.pm1d2)&&(t[31]=128|t[31]),t}unpackPoint(e){const a=this.F;let t=!1;const c=new Array(2);if(128&e[31]&&(t=!0,e[31]=127&e[31]),c[1]=a.fromRprLE(e,0),Wa.gt(a.toObject(c[1]),this.p))return null;const f=a.square(c[1]),d=a.div(a.sub(a.one,f),a.sub(this.A,a.mul(this.D,f))),r=a.exp(d,a.half);if(!a.eq(a.one,r))return null;let n=a.sqrt(d);return null==n?null:(t&&(n=a.neg(n)),c[0]=n,c)}}var et=t(72206),at=t(60654),tt=t(48287).Buffer;async function ct(){const e=await async function(){const e=await Ja("bn128",!0);return new Xa(e.Fr)}();return new ft(e)}class ft{constructor(e){this.babyJub=e,this.bases=[]}baseHash(e,a){return"blake"==e?at("blake256").update(a).digest():"blake2b"==e?tt.from(et(32).update(tt.from(a)).digest()):void 0}hash(e,a){(a=a||{}).baseHash=a.baseHash||"blake";const t=this.babyJub,c=this.buffer2bits(e),f=Math.floor((c.length-1)/200)+1;let d=[t.F.zero,t.F.one];for(let e=0;e>1,a[8*t+2]=(4&c)>>2,a[8*t+3]=(8&c)>>3,a[8*t+4]=(16&c)>>4,a[8*t+5]=(32&c)>>5,a[8*t+6]=(64&c)>>6,a[8*t+7]=(128&c)>>7}return a}}var dt=t(31176),rt=t.n(dt);let nt=!1,it=!1;const bt={debug:1,default:2,info:2,warning:3,error:4,off:5};let ot=bt.default,st=null;const lt=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((a=>{try{if("test"!=="test".normalize(a))throw new Error("bad normalize")}catch(t){e.push(a)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var ut,ht;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(ut||(ut={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(ht||(ht={}));const pt="0123456789abcdef";class gt{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,a){const t=e.toLowerCase();null==bt[t]&&this.throwArgumentError("invalid log level name","logLevel",e),ot>bt[t]||console.log.apply(console,a)}debug(...e){this._log(gt.levels.DEBUG,e)}info(...e){this._log(gt.levels.INFO,e)}warn(...e){this._log(gt.levels.WARNING,e)}makeError(e,a,t){if(it)return this.makeError("censored error",a,{});a||(a=gt.errors.UNKNOWN_ERROR),t||(t={});const c=[];Object.keys(t).forEach((e=>{const a=t[e];try{if(a instanceof Uint8Array){let t="";for(let e=0;e>4],t+=pt[15&a[e]];c.push(e+"=Uint8Array(0x"+t+")")}else c.push(e+"="+JSON.stringify(a))}catch(a){c.push(e+"="+JSON.stringify(t[e].toString()))}})),c.push(`code=${a}`),c.push(`version=${this.version}`);const f=e;let d="";switch(a){case ht.NUMERIC_FAULT:{d="NUMERIC_FAULT";const a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":d+="-"+a;break;case"negative-power":case"negative-width":d+="-unsupported";break;case"unbound-bitwise-result":d+="-unbound-result"}break}case ht.CALL_EXCEPTION:case ht.INSUFFICIENT_FUNDS:case ht.MISSING_NEW:case ht.NONCE_EXPIRED:case ht.REPLACEMENT_UNDERPRICED:case ht.TRANSACTION_REPLACED:case ht.UNPREDICTABLE_GAS_LIMIT:d=a}d&&(e+=" [ See: https://links.ethers.org/v5-errors-"+d+" ]"),c.length&&(e+=" ("+c.join(", ")+")");const r=new Error(e);return r.reason=f,r.code=a,Object.keys(t).forEach((function(e){r[e]=t[e]})),r}throwError(e,a,t){throw this.makeError(e,a,t)}throwArgumentError(e,a,t){return this.throwError(e,gt.errors.INVALID_ARGUMENT,{argument:a,value:t})}assert(e,a,t,c){e||this.throwError(a,t,c)}assertArgument(e,a,t,c){e||this.throwArgumentError(a,t,c)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),lt&&this.throwError("platform missing String.prototype.normalize",gt.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:lt})}checkSafeUint53(e,a){"number"==typeof e&&(null==a&&(a="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(a,gt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(a,gt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,a,t){t=t?": "+t:"",ea&&this.throwError("too many arguments"+t,gt.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:a})}checkNew(e,a){e!==Object&&null!=e||this.throwError("missing new",gt.errors.MISSING_NEW,{name:a.name})}checkAbstract(e,a){e===a?this.throwError("cannot instantiate abstract class "+JSON.stringify(a.name)+" directly; use a sub-class",gt.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",gt.errors.MISSING_NEW,{name:a.name})}static globalLogger(){return st||(st=new gt("logger/5.7.0")),st}static setCensorship(e,a){if(!e&&a&&this.globalLogger().throwError("cannot permanently disable censorship",gt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),nt){if(!e)return;this.globalLogger().throwError("error censorship permanent",gt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}it=!!e,nt=!!a}static setLogLevel(e){const a=bt[e.toLowerCase()];null!=a?ot=a:gt.globalLogger().warn("invalid log level - "+e)}static from(e){return new gt(e)}}gt.errors=ht,gt.levels=ut;const mt=new gt("bytes/5.7.0");function xt(e){return e.slice||(e.slice=function(){const a=Array.prototype.slice.call(arguments);return xt(new Uint8Array(Array.prototype.slice.apply(e,a)))}),e}function yt(e){return"number"==typeof e&&e==e&&e%1==0}function At(e,a){if(a||(a={}),"number"==typeof e){mt.checkSafeUint53(e,"invalid arrayify value");const a=[];for(;e;)a.unshift(255&e),e=parseInt(String(e/256));return 0===a.length&&a.push(0),xt(new Uint8Array(a))}if(a.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),function(e){return!!e.toHexString}(e)&&(e=e.toHexString()),function(e,a){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||a&&e.length!==2+2*a)}(e)){let t=e.substring(2);t.length%2&&("left"===a.hexPad?t="0"+t:"right"===a.hexPad?t+="0":mt.throwArgumentError("hex data is odd-length","value",e));const c=[];for(let e=0;e=256)return!1}return!0}(e)?xt(new Uint8Array(e)):mt.throwArgumentError("invalid arrayify value","value",e)}function vt(e){return"0x"+rt().keccak_256(At(e))}const wt=new gt("strings/5.7.0");var _t,It;function Et(e,a,t,c,f){if(e===It.BAD_PREFIX||e===It.UNEXPECTED_CONTINUE){let e=0;for(let c=a+1;c>6==2;c++)e++;return e}return e===It.OVERRUN?t.length-a-1:0}function Ct(e,a=_t.current){a!=_t.current&&(wt.checkNormalize(),e=e.normalize(a));let t=[];for(let a=0;a>6|192),t.push(63&c|128);else if(55296==(64512&c)){a++;const f=e.charCodeAt(a);if(a>=e.length||56320!=(64512&f))throw new Error("invalid utf-8 string");const d=65536+((1023&c)<<10)+(1023&f);t.push(d>>18|240),t.push(d>>12&63|128),t.push(d>>6&63|128),t.push(63&d|128)}else t.push(c>>12|224),t.push(c>>6&63|128),t.push(63&c|128)}return At(t)}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(_t||(_t={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(It||(It={})),Object.freeze({error:function(e,a,t,c,f){return wt.throwArgumentError(`invalid codepoint at offset ${a}; ${e}`,"bytes",t)},ignore:Et,replace:function(e,a,t,c,f){return e===It.OVERLONG?(c.push(f),0):(c.push(65533),Et(e,a,t))}});const Mt="mimcsponge";async function Bt(){const e=await Ja("bn128",!0);return new Lt(e.Fr)}class Lt{constructor(e){this.F=e,this.cts=this.getConstants(Mt,220)}getIV(e){const a=this.F;void 0===e&&(e=Mt);const t=vt(Ct(e+"_iv"));return Wa.e(t).mod(a.p)}getConstants(e,a){const t=this.F;void 0===e&&(e=Mt),void 0===a&&(a=220);const c=new Array(a);let f=vt(Ct(Mt));for(let e=1;e{"use strict";t.d(a,{r:()=>c});const c="6.13.3"},35273:(e,a,t)=>{"use strict";t.d(a,{y:()=>R});var c=t(57339),f=t(21228),d=t(30031),r=t(27033),n=t(19353);class i extends f.Ue{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,a){let t=n.V.dereference(a,"string");try{t=(0,d.b)(t)}catch(e){return this._throwError(e.message,a)}return e.writeValue(t)}decode(e){return(0,d.b)((0,r.up)(e.readValue(),20))}}var b=t(88081);class o extends f.Ue{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,a){return this.coder.encode(e,a)}decode(e){return this.coder.decode(e)}}function s(e,a,t){let d=[];if(Array.isArray(t))d=t;else if(t&&"object"==typeof t){let e={};d=a.map((a=>{const f=a.localName;return(0,c.vA)(f,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:a},value:t}),(0,c.vA)(!e[f],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:a},value:t}),e[f]=!0,t[f]}))}else(0,c.MR)(!1,"invalid tuple value","tuple",t);(0,c.MR)(a.length===d.length,"types/value length mismatch","tuple",t);let r=new f.AU,n=new f.AU,i=[];a.forEach(((e,a)=>{let t=d[a];if(e.dynamic){let a=n.length;e.encode(n,t);let c=r.writeUpdatableValue();i.push((e=>{c(e+a)}))}else e.encode(r,t)})),i.forEach((e=>{e(r.length)}));let b=e.appendWriter(r);return b+=e.appendWriter(n),b}function l(e,a){let t=[],d=[],r=e.subReader(0);return a.forEach((a=>{let f=null;if(a.dynamic){let t=e.readIndex(),d=r.subReader(t);try{f=a.decode(d)}catch(e){if((0,c.bJ)(e,"BUFFER_OVERRUN"))throw e;f=e,f.baseType=a.name,f.name=a.localName,f.type=a.type}}else try{f=a.decode(e)}catch(e){if((0,c.bJ)(e,"BUFFER_OVERRUN"))throw e;f=e,f.baseType=a.name,f.name=a.localName,f.type=a.type}if(null==f)throw new Error("investigate");t.push(f),d.push(a.localName||null)})),f.Q7.fromItems(t,d)}class u extends f.Ue{coder;length;constructor(e,a,t){super("array",e.type+"["+(a>=0?a:"")+"]",t,-1===a||e.dynamic),(0,b.n)(this,{coder:e,length:a})}defaultValue(){const e=this.coder.defaultValue(),a=[];for(let t=0;te||t<-(e+w))&&this._throwError("value out-of-bounds",a),t=(0,r.JJ)(t,8*f.Yx)}else(t(0,r.dK)(c,8*this.size))&&this._throwError("value out-of-bounds",a);return e.writeValue(t)}decode(e){let a=(0,r.dK)(e.readValue(),8*this.size);return this.signed&&(a=(0,r.ST)(a,8*this.size)),a}}var E=t(87303);class C extends g{constructor(e){super("string",e)}defaultValue(){return""}encode(e,a){return super.encode(e,(0,E.YW)(n.V.dereference(a,"string")))}decode(e){return(0,E._v)(super.decode(e))}}class M extends f.Ue{coders;constructor(e,a){let t=!1;const c=[];e.forEach((e=>{e.dynamic&&(t=!0),c.push(e.type)})),super("tuple","tuple("+c.join(",")+")",a,t),(0,b.n)(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((a=>{e.push(a.defaultValue())}));const a=this.coders.reduce(((e,a)=>{const t=a.localName;return t&&(e[t]||(e[t]=0),e[t]++),e}),{});return this.coders.forEach(((t,c)=>{let f=t.localName;f&&1===a[f]&&("length"===f&&(f="_length"),null==e[f]&&(e[f]=e[c]))})),Object.freeze(e)}encode(e,a){const t=n.V.dereference(a,"tuple");return s(e,this.coders,t)}decode(e){return l(e,this.coders)}}var B=t(76124);const L=new Map;L.set(0,"GENERIC_PANIC"),L.set(1,"ASSERT_FALSE"),L.set(17,"OVERFLOW"),L.set(18,"DIVIDE_BY_ZERO"),L.set(33,"ENUM_RANGE_ERROR"),L.set(34,"BAD_STORAGE_DATA"),L.set(49,"STACK_UNDERFLOW"),L.set(50,"ARRAY_RANGE_ERROR"),L.set(65,"OUT_OF_MEMORY"),L.set(81,"UNINITIALIZED_FUNCTION_CALL");const S=new RegExp(/^bytes([0-9]*)$/),k=new RegExp(/^(u?int)([0-9]*)$/);let N=null,P=1024;class R{#Se(e){if(e.isArray())return new u(this.#Se(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new M(e.components.map((e=>this.#Se(e))),e.name);switch(e.baseType){case"address":return new i(e.name);case"bool":return new h(e.name);case"string":return new C(e.name);case"bytes":return new m(e.name);case"":return new A(e.name)}let a=e.type.match(k);if(a){let t=parseInt(a[2]||"256");return(0,c.MR)(0!==t&&t<=256&&t%8==0,"invalid "+a[1]+" bit length","param",e),new I(t/8,"int"===a[1],e.name)}if(a=e.type.match(S),a){let t=parseInt(a[1]);return(0,c.MR)(0!==t&&t<=32,"invalid bytes length","param",e),new x(t,e.name)}(0,c.MR)(!1,"invalid type","type",e.type)}getDefaultValue(e){const a=e.map((e=>this.#Se(B.aX.from(e))));return new M(a,"_").defaultValue()}encode(e,a){(0,c.dd)(a.length,e.length,"types/values length mismatch");const t=e.map((e=>this.#Se(B.aX.from(e)))),d=new M(t,"_"),r=new f.AU;return d.encode(r,a),r.data}decode(e,a,t){const c=e.map((e=>this.#Se(B.aX.from(e))));return new M(c,"_").decode(new f.mP(a,t,P))}static _setDefaultMaxInflation(e){(0,c.MR)("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),P=e}static defaultAbiCoder(){return null==N&&(N=new R),N}static getBuiltinCallException(e,a,t){return function(e,a,t,f){let r="missing revert data",n=null,i=null;if(t){r="execution reverted";const e=(0,p.q5)(t);if(t=(0,p.c$)(t),0===e.length)r+=" (no data present; likely require(false) occurred",n="require(false)";else if(e.length%32!=4)r+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===(0,p.c$)(e.slice(0,4)))try{n=f.decode(["string"],e.slice(4))[0],i={signature:"Error(string)",name:"Error",args:[n]},r+=`: ${JSON.stringify(n)}`}catch(e){r+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===(0,p.c$)(e.slice(0,4)))try{const a=Number(f.decode(["uint256"],e.slice(4))[0]);i={signature:"Panic(uint256)",name:"Panic",args:[a]},n=`Panic due to ${L.get(a)||"UNKNOWN"}(${a})`,r+=`: ${n}`}catch(e){r+=" (could not decode panic code)"}else r+=" (unknown custom error)"}const b={to:a.to?(0,d.b)(a.to):null,data:a.data||"0x"};return a.from&&(b.from=(0,d.b)(a.from)),(0,c.xz)(r,"CALL_EXCEPTION",{action:e,data:t,reason:n,transaction:b,invocation:null,revert:i})}(e,a,t,R.defaultAbiCoder())}}},21228:(e,a,t)=>{"use strict";t.d(a,{AU:()=>y,Q7:()=>g,Ue:()=>x,Yx:()=>n,mP:()=>A});var c=t(27033),f=t(57339),d=t(36212),r=t(88081);const n=32,i=new Uint8Array(n),b=["then"],o={},s=new WeakMap;function l(e){return s.get(e)}function u(e,a){s.set(e,a)}function h(e,a){const t=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw t.error=a,t}function p(e,a,t){return e.indexOf(null)>=0?a.map(((e,a)=>e instanceof g?p(l(e),e,t):e)):e.reduce(((e,c,f)=>{let d=a.getValue(c);return c in e||(t&&d instanceof g&&(d=p(l(d),d,t)),e[c]=d),e}),{})}class g extends Array{#ke;constructor(...e){const a=e[0];let t=e[1],f=(e[2]||[]).slice(),d=!0;a!==o&&(t=e,f=[],d=!1),super(t.length),t.forEach(((e,a)=>{this[a]=e}));const r=f.reduce(((e,a)=>("string"==typeof a&&e.set(a,(e.get(a)||0)+1),e)),new Map);if(u(this,Object.freeze(t.map(((e,a)=>{const t=f[a];return null!=t&&1===r.get(t)?t:null})))),this.#ke=[],null==this.#ke&&this.#ke,!d)return;Object.freeze(this);const n=new Proxy(this,{get:(e,a,t)=>{if("string"==typeof a){if(a.match(/^[0-9]+$/)){const t=(0,c.WZ)(a,"%index");if(t<0||t>=this.length)throw new RangeError("out of result range");const f=e[t];return f instanceof Error&&h(`index ${t}`,f),f}if(b.indexOf(a)>=0)return Reflect.get(e,a,t);const f=e[a];if(f instanceof Function)return function(...a){return f.apply(this===t?e:this,a)};if(!(a in e))return e.getValue.apply(this===t?e:this,[a])}return Reflect.get(e,a,t)}});return u(n,l(this)),n}toArray(e){const a=[];return this.forEach(((t,c)=>{t instanceof Error&&h(`index ${c}`,t),e&&t instanceof g&&(t=t.toArray(e)),a.push(t)})),a}toObject(e){const a=l(this);return a.reduce(((t,c,d)=>((0,f.vA)(null!=c,`value at index ${d} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),p(a,this,e))),{})}slice(e,a){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==a&&(a=this.length),a<0&&(a+=this.length)<0&&(a=0),a>this.length&&(a=this.length);const t=l(this),c=[],f=[];for(let d=e;d{this.#_e[e]=m(a)}}}class A{allowLoose;#_e;#Re;#Oe;#De;#Te;constructor(e,a,t){(0,r.n)(this,{allowLoose:!!a}),this.#_e=(0,d.Lm)(e),this.#Oe=0,this.#De=null,this.#Te=null!=t?t:1024,this.#Re=0}get data(){return(0,d.c$)(this.#_e)}get dataLength(){return this.#_e.length}get consumed(){return this.#Re}get bytes(){return new Uint8Array(this.#_e)}#Fe(e){if(this.#De)return this.#De.#Fe(e);this.#Oe+=e,(0,f.vA)(this.#Te<1||this.#Oe<=this.#Te*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#Te} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,d.Lm)(this.#_e),offset:this.#Re,length:e,info:{bytesRead:this.#Oe,dataLength:this.dataLength}})}#Qe(e,a,t){let c=Math.ceil(a/n)*n;return this.#Re+c>this.#_e.length&&(this.allowLoose&&t&&this.#Re+a<=this.#_e.length?c=a:(0,f.vA)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,d.Lm)(this.#_e),length:this.#_e.length,offset:this.#Re+c})),this.#_e.slice(this.#Re,this.#Re+c)}subReader(e){const a=new A(this.#_e.slice(this.#Re+e),this.allowLoose,this.#Te);return a.#De=this,a}readBytes(e,a){let t=this.#Qe(0,e,!!a);return this.#Fe(e),this.#Re+=t.length,t.slice(0,e)}readValue(){return(0,c.Dg)(this.readBytes(n))}readIndex(){return(0,c.Ro)(this.readBytes(n))}}},76124:(e,a,t)=>{"use strict";t.d(a,{FK:()=>$,Pw:()=>V,Zp:()=>K,aX:()=>H,bp:()=>z,hc:()=>J});var c=t(27033),f=t(57339),d=t(88081),r=t(38264);function n(e){const a=new Set;return e.forEach((e=>a.add(e))),Object.freeze(a)}const i=n("external public payable override".split(" ")),b="constant external internal payable private public pure view override",o=n(b.split(" ")),s="constructor error event fallback function receive struct",l=n(s.split(" ")),u="calldata memory storage payable indexed",h=n(u.split(" ")),p=n([s,u,"tuple returns",b].join(" ").split(" ")),g={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},m=new RegExp("^(\\s*)"),x=new RegExp("^([0-9]+)"),y=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),A=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),v=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class w{#Re;#Ue;get offset(){return this.#Re}get length(){return this.#Ue.length-this.#Re}constructor(e){this.#Re=0,this.#Ue=e.slice()}clone(){return new w(this.#Ue)}reset(){this.#Re=0}#je(e=0,a=0){return new w(this.#Ue.slice(e,a).map((a=>Object.freeze(Object.assign({},a,{match:a.match-e,linkBack:a.linkBack-e,linkNext:a.linkNext-e})))))}popKeyword(e){const a=this.peek();if("KEYWORD"!==a.type||!e.has(a.text))throw new Error(`expected keyword ${a.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const a=this.peek();throw new Error(`expected ${e}; got ${a.type} ${JSON.stringify(a.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const a=this.#je(this.#Re+1,e.match+1);return this.#Re=e.match+1,a}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const a=[];for(;this.#Re=this.#Ue.length)throw new Error("out-of-bounds");return this.#Ue[this.#Re]}peekKeyword(e){const a=this.peekType("KEYWORD");return null!=a&&e.has(a)?a:null}peekType(e){if(0===this.length)return null;const a=this.peek();return a.type===e?a.text:null}pop(){const e=this.peek();return this.#Re++,e}toString(){const e=[];for(let a=this.#Re;a`}}function _(e){const a=[],t=a=>{const t=r0&&"NUMBER"===a[a.length-1].type){const t=a.pop().text;e=t+e,a[a.length-1].value=(0,c.WZ)(t)}if(0===a.length||"BRACKET"!==a[a.length-1].type)throw new Error("missing opening bracket");a[a.length-1].text+=e}}else if(i=n.match(y),i){if(b.text=i[1],r+=b.text.length,p.has(b.text)){b.type="KEYWORD";continue}if(b.text.match(v)){b.type="TYPE";continue}b.type="ID"}else{if(i=n.match(x),!i)throw new Error(`unexpected token ${JSON.stringify(n[0])} at position ${r}`);b.text=i[1],b.type="NUMBER",r+=b.text.length}}return new w(a.map((e=>Object.freeze(e))))}function I(e,a){let t=[];for(const c in a.keys())e.has(c)&&t.push(c);if(t.length>1)throw new Error(`conflicting types: ${t.join(", ")}`)}function E(e,a){if(a.peekKeyword(l)){const t=a.pop().text;if(t!==e)throw new Error(`expected ${e}, got ${t}`)}return a.popType("ID")}function C(e,a){const t=new Set;for(;;){const c=e.peekType("KEYWORD");if(null==c||a&&!a.has(c))break;if(e.pop(),t.has(c))throw new Error(`duplicate keywords: ${JSON.stringify(c)}`);t.add(c)}return Object.freeze(t)}function M(e){let a=C(e,o);return I(a,n("constant payable nonpayable".split(" "))),I(a,n("pure view payable nonpayable".split(" "))),a.has("view")?"view":a.has("pure")?"pure":a.has("payable")?"payable":a.has("nonpayable")?"nonpayable":a.has("constant")?"view":"nonpayable"}function B(e,a){return e.popParams().map((e=>H.from(e,a)))}function L(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return(0,c.Ab)(e.pop().text);throw new Error("invalid gas")}return null}function S(e){if(e.length)throw new Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}const k=new RegExp(/^(.*)\[([0-9]*)\]$/);function N(e){const a=e.match(v);if((0,f.MR)(a,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(a[2]){const t=parseInt(a[2]);(0,f.MR)(0!==t&&t<=32,"invalid bytes length","type",e)}else if(a[3]){const t=parseInt(a[3]);(0,f.MR)(0!==t&&t<=256&&t%8==0,"invalid numeric width","type",e)}return e}const P={},R=Symbol.for("_ethers_internal"),O="_ParamTypeInternal",D="_ErrorInternal",T="_EventInternal",F="_ConstructorInternal",Q="_FallbackInternal",U="_FunctionInternal",j="_StructInternal";class H{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,a,t,c,r,n,i,b){if((0,f.gk)(e,P,"ParamType"),Object.defineProperty(this,R,{value:O}),n&&(n=Object.freeze(n.slice())),"array"===c){if(null==i||null==b)throw new Error("")}else if(null!=i||null!=b)throw new Error("");if("tuple"===c){if(null==n)throw new Error("")}else if(null!=n)throw new Error("");(0,d.n)(this,{name:a,type:t,baseType:c,indexed:r,components:n,arrayLength:i,arrayChildren:b})}format(e){if(null==e&&(e="sighash"),"json"===e){const a=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=a,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const t={type:"tuple"===this.baseType?"tuple":this.type,name:a};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.isTuple()&&(t.components=this.components.map((a=>JSON.parse(a.format(e))))),JSON.stringify(t)}let a="";return this.isArray()?(a+=this.arrayChildren.format(e),a+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?a+="("+this.components.map((a=>a.format(e))).join("full"===e?", ":",")+")":a+=this.type,"sighash"!==e&&(!0===this.indexed&&(a+=" indexed"),"full"===e&&this.name&&(a+=" "+this.name)),a}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,a){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const t=this;return e.map((e=>t.arrayChildren.walk(e,a)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const t=this;return e.map(((e,c)=>t.components[c].walk(e,a)))}return a(this.type,e)}#He(e,a,t,c){if(this.isArray()){if(!Array.isArray(a))throw new Error("invalid array value");if(-1!==this.arrayLength&&a.length!==this.arrayLength)throw new Error("array is wrong length");const f=this.arrayChildren,d=a.slice();return d.forEach(((a,c)=>{f.#He(e,a,t,(e=>{d[c]=e}))})),void c(d)}if(this.isTuple()){const f=this.components;let d;if(Array.isArray(a))d=a.slice();else{if(null==a||"object"!=typeof a)throw new Error("invalid tuple value");d=f.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in a))throw new Error(`missing value for component ${e.name}`);return a[e.name]}))}if(d.length!==this.components.length)throw new Error("array is wrong length");return d.forEach(((a,c)=>{f[c].#He(e,a,t,(e=>{d[c]=e}))})),void c(d)}const f=t(this.type,a);f.then?e.push(async function(){c(await f)}()):c(f)}async walkAsync(e,a){const t=[],c=[e];return this.#He(t,e,a,(e=>{c[0]=e})),t.length&&await Promise.all(t),c[0]}static from(e,a){if(H.isParamType(e))return e;if("string"==typeof e)try{return H.from(_(e),a)}catch(a){(0,f.MR)(!1,"invalid param type","obj",e)}else if(e instanceof w){let t="",c="",f=null;C(e,n(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",f=e.popParams().map((e=>H.from(e))),t=`tuple(${f.map((e=>e.format())).join(",")})`):(t=N(e.popType("TYPE")),c=t);let d=null,r=null;for(;e.length&&e.peekType("BRACKET");){const a=e.pop();d=new H(P,"",t,c,null,f,r,d),r=a.value,t+=a.text,c="array",f=null}let i=null;if(C(e,h).has("indexed")){if(!a)throw new Error("");i=!0}const b=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new H(P,b,t,c,i,f,r,d)}const t=e.name;(0,f.MR)(!t||"string"==typeof t&&t.match(A),"invalid name","obj.name",t);let c=e.indexed;null!=c&&((0,f.MR)(a,"parameter cannot be indexed","obj.indexed",e.indexed),c=!!c);let d=e.type,r=d.match(k);if(r){const a=parseInt(r[2]||"-1"),f=H.from({type:r[1],components:e.components});return new H(P,t||"",d,"array",c,null,a,f)}if("tuple"===d||d.startsWith("tuple(")||d.startsWith("(")){const a=null!=e.components?e.components.map((e=>H.from(e))):null;return new H(P,t||"",d,"tuple",c,a,null,null)}return d=N(e.type),new H(P,t||"",d,d,c,null,null,null)}static isParamType(e){return e&&e[R]===O}}class ${type;inputs;constructor(e,a,t){(0,f.gk)(e,P,"Fragment"),t=Object.freeze(t.slice()),(0,d.n)(this,{type:a,inputs:t})}static from(e){if("string"==typeof e){try{$.from(JSON.parse(e))}catch(e){}return $.from(_(e))}if(e instanceof w)switch(e.peekKeyword(l)){case"constructor":return V.from(e);case"error":return z.from(e);case"event":return K.from(e);case"fallback":case"receive":return Z.from(e);case"function":return J.from(e);case"struct":return W.from(e)}else if("object"==typeof e){switch(e.type){case"constructor":return V.from(e);case"error":return z.from(e);case"event":return K.from(e);case"fallback":case"receive":return Z.from(e);case"function":return J.from(e);case"struct":return W.from(e)}(0,f.vA)(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,f.MR)(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return V.isFragment(e)}static isError(e){return z.isFragment(e)}static isEvent(e){return K.isFragment(e)}static isFunction(e){return J.isFragment(e)}static isStruct(e){return W.isFragment(e)}}class q extends ${name;constructor(e,a,t,c){super(e,a,c),(0,f.MR)("string"==typeof t&&t.match(A),"invalid identifier","name",t),c=Object.freeze(c.slice()),(0,d.n)(this,{name:t})}}function G(e,a){return"("+a.map((a=>a.format(e))).join("full"===e?", ":",")+")"}class z extends q{constructor(e,a,t){super(e,"error",a,t),Object.defineProperty(this,R,{value:D})}get selector(){return(0,r.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((a=>JSON.parse(a.format(e))))});const a=[];return"sighash"!==e&&a.push("error"),a.push(this.name+G(e,this.inputs)),a.join(" ")}static from(e){if(z.isFragment(e))return e;if("string"==typeof e)return z.from(_(e));if(e instanceof w){const a=E("error",e),t=B(e);return S(e),new z(P,a,t)}return new z(P,e.name,e.inputs?e.inputs.map(H.from):[])}static isFragment(e){return e&&e[R]===D}}class K extends q{anonymous;constructor(e,a,t,c){super(e,"event",a,t),Object.defineProperty(this,R,{value:T}),(0,d.n)(this,{anonymous:c})}get topicHash(){return(0,r.id)(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((a=>JSON.parse(a.format(e))))});const a=[];return"sighash"!==e&&a.push("event"),a.push(this.name+G(e,this.inputs)),"sighash"!==e&&this.anonymous&&a.push("anonymous"),a.join(" ")}static getTopicHash(e,a){return a=(a||[]).map((e=>H.from(e))),new K(P,e,a,!1).topicHash}static from(e){if(K.isFragment(e))return e;if("string"==typeof e)try{return K.from(_(e))}catch(a){(0,f.MR)(!1,"invalid event fragment","obj",e)}else if(e instanceof w){const a=E("event",e),t=B(e,!0),c=!!C(e,n(["anonymous"])).has("anonymous");return S(e),new K(P,a,t,c)}return new K(P,e.name,e.inputs?e.inputs.map((e=>H.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[R]===T}}class V extends ${payable;gas;constructor(e,a,t,c,f){super(e,a,t),Object.defineProperty(this,R,{value:F}),(0,d.n)(this,{payable:c,gas:f})}format(e){if((0,f.vA)(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((a=>JSON.parse(a.format(e))))});const a=[`constructor${G(e,this.inputs)}`];return this.payable&&a.push("payable"),null!=this.gas&&a.push(`@${this.gas.toString()}`),a.join(" ")}static from(e){if(V.isFragment(e))return e;if("string"==typeof e)try{return V.from(_(e))}catch(a){(0,f.MR)(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof w){C(e,n(["constructor"]));const a=B(e),t=!!C(e,i).has("payable"),c=L(e);return S(e),new V(P,"constructor",a,t,c)}return new V(P,"constructor",e.inputs?e.inputs.map(H.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[R]===F}}class Z extends ${payable;constructor(e,a,t){super(e,"fallback",a),Object.defineProperty(this,R,{value:Q}),(0,d.n)(this,{payable:t})}format(e){const a=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:a,stateMutability:e})}return`${a}()${this.payable?" payable":""}`}static from(e){if(Z.isFragment(e))return e;if("string"==typeof e)try{return Z.from(_(e))}catch(a){(0,f.MR)(!1,"invalid fallback fragment","obj",e)}else if(e instanceof w){const a=e.toString(),t=e.peekKeyword(n(["fallback","receive"]));if((0,f.MR)(t,"type must be fallback or receive","obj",a),"receive"===e.popKeyword(n(["fallback","receive"]))){const a=B(e);return(0,f.MR)(0===a.length,"receive cannot have arguments","obj.inputs",a),C(e,n(["payable"])),S(e),new Z(P,[],!0)}let c=B(e);c.length?(0,f.MR)(1===c.length&&"bytes"===c[0].type,"invalid fallback inputs","obj.inputs",c.map((e=>e.format("minimal"))).join(", ")):c=[H.from("bytes")];const d=M(e);if((0,f.MR)("nonpayable"===d||"payable"===d,"fallback cannot be constants","obj.stateMutability",d),C(e,n(["returns"])).has("returns")){const a=B(e);(0,f.MR)(1===a.length&&"bytes"===a[0].type,"invalid fallback outputs","obj.outputs",a.map((e=>e.format("minimal"))).join(", "))}return S(e),new Z(P,c,"payable"===d)}if("receive"===e.type)return new Z(P,[],!0);if("fallback"===e.type){const a=[H.from("bytes")],t="payable"===e.stateMutability;return new Z(P,a,t)}(0,f.MR)(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[R]===Q}}class J extends q{constant;outputs;stateMutability;payable;gas;constructor(e,a,t,c,f,r){super(e,"function",a,c),Object.defineProperty(this,R,{value:U}),f=Object.freeze(f.slice());const n="view"===t||"pure"===t,i="payable"===t;(0,d.n)(this,{constant:n,gas:r,outputs:f,payable:i,stateMutability:t})}get selector(){return(0,r.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((a=>JSON.parse(a.format(e)))),outputs:this.outputs.map((a=>JSON.parse(a.format(e))))});const a=[];return"sighash"!==e&&a.push("function"),a.push(this.name+G(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&a.push(this.stateMutability),this.outputs&&this.outputs.length&&(a.push("returns"),a.push(G(e,this.outputs))),null!=this.gas&&a.push(`@${this.gas.toString()}`)),a.join(" ")}static getSelector(e,a){return a=(a||[]).map((e=>H.from(e))),new J(P,e,"view",a,[],null).selector}static from(e){if(J.isFragment(e))return e;if("string"==typeof e)try{return J.from(_(e))}catch(a){(0,f.MR)(!1,"invalid function fragment","obj",e)}else if(e instanceof w){const a=E("function",e),t=B(e),c=M(e);let f=[];C(e,n(["returns"])).has("returns")&&(f=B(e));const d=L(e);return S(e),new J(P,a,c,t,f,d)}let a=e.stateMutability;return null==a&&(a="payable","boolean"==typeof e.constant?(a="view",e.constant||(a="payable","boolean"!=typeof e.payable||e.payable||(a="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(a="nonpayable")),new J(P,e.name,a,e.inputs?e.inputs.map(H.from):[],e.outputs?e.outputs.map(H.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[R]===U}}class W extends q{constructor(e,a,t){super(e,"struct",a,t),Object.defineProperty(this,R,{value:j})}format(){throw new Error("@TODO")}static from(e){if("string"==typeof e)try{return W.from(_(e))}catch(a){(0,f.MR)(!1,"invalid struct fragment","obj",e)}else if(e instanceof w){const a=E("struct",e),t=B(e);return S(e),new W(P,a,t)}return new W(P,e.name,e.inputs?e.inputs.map(H.from):[])}static isFragment(e){return e&&e[R]===j}}},73622:(e,a,t)=>{"use strict";t.d(a,{KA:()=>y});var c=t(15539),f=t(38264),d=t(88081),r=t(57339),n=t(36212),i=t(27033),b=t(35273),o=t(21228),s=t(76124),l=t(19353);class u{fragment;name;signature;topic;args;constructor(e,a,t){const c=e.name,f=e.format();(0,d.n)(this,{fragment:e,name:c,signature:f,topic:a,args:t})}}class h{fragment;name;args;signature;selector;value;constructor(e,a,t,c){const f=e.name,r=e.format();(0,d.n)(this,{fragment:e,name:f,args:t,signature:r,selector:a,value:c})}}class p{fragment;name;args;signature;selector;constructor(e,a,t){const c=e.name,f=e.format();(0,d.n)(this,{fragment:e,name:c,args:t,signature:f,selector:a})}}class g{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){(0,d.n)(this,{hash:e,_isIndexed:!0})}}const m={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},x={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let a="unknown panic code";return e>=0&&e<=255&&m[e.toString()]&&(a=m[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${a})`}}};class y{fragments;deploy;fallback;receive;#$e;#qe;#Ge;#ze;constructor(e){let a=[];a="string"==typeof e?JSON.parse(e):e,this.#Ge=new Map,this.#$e=new Map,this.#qe=new Map;const t=[];for(const e of a)try{t.push(s.FK.from(e))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(e)}:`,a.message)}(0,d.n)(this,{fragments:Object.freeze(t)});let c=null,f=!1;this.#ze=this.getAbiCoder(),this.fragments.forEach(((e,a)=>{let t;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void(0,d.n)(this,{deploy:e});case"fallback":return void(0===e.inputs.length?f=!0:((0,r.MR)(!c||e.payable!==c.payable,"conflicting fallback fragments",`fragments[${a}]`,e),c=e,f=c.payable));case"function":t=this.#Ge;break;case"event":t=this.#qe;break;case"error":t=this.#$e;break;default:return}const n=e.format();t.has(n)||t.set(n,e)})),this.deploy||(0,d.n)(this,{deploy:s.Pw.from("constructor()")}),(0,d.n)(this,{fallback:c,receive:f})}format(e){const a=e?"minimal":"full";return this.fragments.map((e=>e.format(a)))}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return b.y.defaultAbiCoder()}#Ke(e,a,t){if((0,n.Lo)(e)){const a=e.toLowerCase();for(const e of this.#Ge.values())if(a===e.selector)return e;return null}if(-1===e.indexOf("(")){const c=[];for(const[a,t]of this.#Ge)a.split("(")[0]===e&&c.push(t);if(a){const e=a.length>0?a[a.length-1]:null;let t=a.length,f=!0;l.V.isTyped(e)&&"overrides"===e.type&&(f=!1,t--);for(let e=c.length-1;e>=0;e--){const a=c[e].inputs.length;a===t||f&&a===t-1||c.splice(e,1)}for(let e=c.length-1;e>=0;e--){const t=c[e].inputs;for(let f=0;f=t.length){if("overrides"===a[f].type)continue;c.splice(e,1);break}if(a[f].type!==t[f].baseType){c.splice(e,1);break}}}}if(1===c.length&&a&&a.length!==c[0].inputs.length){const e=a[a.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&c.splice(0,1)}if(0===c.length)return null;if(c.length>1&&t){const a=c.map((e=>JSON.stringify(e.format()))).join(", ");(0,r.MR)(!1,`ambiguous function description (i.e. matches ${a})`,"key",e)}return c[0]}return this.#Ge.get(s.hc.from(e).format())||null}getFunctionName(e){const a=this.#Ke(e,null,!1);return(0,r.MR)(a,"no matching function","key",e),a.name}hasFunction(e){return!!this.#Ke(e,null,!1)}getFunction(e,a){return this.#Ke(e,a||null,!0)}forEachFunction(e){const a=Array.from(this.#Ge.keys());a.sort(((e,a)=>e.localeCompare(a)));for(let t=0;t=0;e--)c[e].inputs.length=0;e--){const t=c[e].inputs;for(let f=0;f1&&t){const a=c.map((e=>JSON.stringify(e.format()))).join(", ");(0,r.MR)(!1,`ambiguous event description (i.e. matches ${a})`,"key",e)}return c[0]}return this.#qe.get(s.Zp.from(e).format())||null}getEventName(e){const a=this.#Ve(e,null,!1);return(0,r.MR)(a,"no matching event","key",e),a.name}hasEvent(e){return!!this.#Ve(e,null,!1)}getEvent(e,a){return this.#Ve(e,a||null,!0)}forEachEvent(e){const a=Array.from(this.#qe.keys());a.sort(((e,a)=>e.localeCompare(a)));for(let t=0;t1){const t=a.map((e=>JSON.stringify(e.format()))).join(", ");(0,r.MR)(!1,`ambiguous error description (i.e. ${t})`,"name",e)}return a[0]}if("Error(string)"===(e=s.bp.from(e).format()))return s.bp.from("error Error(string)");if("Panic(uint256)"===e)return s.bp.from("error Panic(uint256)");return this.#$e.get(e)||null}forEachError(e){const a=Array.from(this.#$e.keys());a.sort(((e,a)=>e.localeCompare(a)));for(let t=0;t"string"===e.type?(0,f.id)(a):"bytes"===e.type?(0,c.S)((0,n.c$)(a)):("bool"===e.type&&"boolean"==typeof a?a=a?"0x01":"0x00":e.type.match(/^u?int/)?a=(0,i.up)(a):e.type.match(/^bytes/)?a=(0,n.X_)(a,32):"address"===e.type&&this.#ze.encode(["address"],[a]),(0,n.nx)((0,n.c$)(a),32));for(a.forEach(((a,c)=>{const f=e.inputs[c];f.indexed?null==a?t.push(null):"array"===f.baseType||"tuple"===f.baseType?(0,r.MR)(!1,"filtering with tuples or arrays not supported","contract."+f.name,a):Array.isArray(a)?t.push(a.map((e=>d(f,e)))):t.push(d(f,a)):(0,r.MR)(null==a,"cannot filter non-indexed parameters; must be null","contract."+f.name,a)}));t.length&&null===t[t.length-1];)t.pop();return t}encodeEventLog(e,a){if("string"==typeof e){const a=this.getEvent(e);(0,r.MR)(a,"unknown event","eventFragment",e),e=a}const t=[],d=[],n=[];return e.anonymous||t.push(e.topicHash),(0,r.MR)(a.length===e.inputs.length,"event arguments/values mismatch","values",a),e.inputs.forEach(((e,r)=>{const i=a[r];if(e.indexed)if("string"===e.type)t.push((0,f.id)(i));else if("bytes"===e.type)t.push((0,c.S)(i));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");t.push(this.#ze.encode([e.type],[i]))}else d.push(e),n.push(i)})),{data:this.#ze.encode(d,n),topics:t}}decodeEventLog(e,a,t){if("string"==typeof e){const a=this.getEvent(e);(0,r.MR)(a,"unknown event","eventFragment",e),e=a}if(null!=t&&!e.anonymous){const a=e.topicHash;(0,r.MR)((0,n.Lo)(t[0],32)&&t[0].toLowerCase()===a,"fragment/topic mismatch","topics[0]",t[0]),t=t.slice(1)}const c=[],f=[],d=[];e.inputs.forEach(((e,a)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(c.push(s.aX.from({type:"bytes32",name:e.name})),d.push(!0)):(c.push(e),d.push(!1)):(f.push(e),d.push(!1))}));const i=null!=t?this.#ze.decode(c,(0,n.xW)(t)):null,b=this.#ze.decode(f,a,!0),l=[],u=[];let h=0,p=0;return e.inputs.forEach(((e,a)=>{let t=null;if(e.indexed)if(null==i)t=new g(null);else if(d[a])t=new g(i[p++]);else try{t=i[p++]}catch(e){t=e}else try{t=b[h++]}catch(e){t=e}l.push(t),u.push(e.name||null)})),o.Q7.fromItems(l,u)}parseTransaction(e){const a=(0,n.q5)(e.data,"tx.data"),t=(0,i.Ab)(null!=e.value?e.value:0,"tx.value"),c=this.getFunction((0,n.c$)(a.slice(0,4)));if(!c)return null;const f=this.#ze.decode(c.inputs,a.slice(4));return new h(c,c.selector,f,t)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const a=this.getEvent(e.topics[0]);return!a||a.anonymous?null:new u(a,a.topicHash,this.decodeEventLog(a,e.data,e.topics))}parseError(e){const a=(0,n.c$)(e),t=this.getError((0,n.ZG)(a,0,4));if(!t)return null;const c=this.#ze.decode(t.inputs,(0,n.ZG)(a,4));return new p(t,t.selector,c)}static from(e){return e instanceof y?e:"string"==typeof e?new y(JSON.parse(e)):"function"==typeof e.formatJson?new y(e.formatJson()):"function"==typeof e.format?new y(e.format("json")):new y(e)}}},19353:(e,a,t)=>{"use strict";t.d(a,{V:()=>b});var c=t(57339),f=t(88081);const d={};function r(e,a){let t=!1;return a<0&&(t=!0,a*=-1),new b(d,`${t?"":"u"}int${a}`,e,{signed:t,width:a})}function n(e,a){return new b(d,`bytes${a||""}`,e,{size:a})}const i=Symbol.for("_ethers_typed");class b{type;value;#ee;_typedSymbol;constructor(e,a,t,r){null==r&&(r=null),(0,c.gk)(d,e,"Typed"),(0,f.n)(this,{_typedSymbol:i,type:a,value:t}),this.#ee=r,this.format()}format(){if("array"===this.type)throw new Error("");if("dynamicArray"===this.type)throw new Error("");return"tuple"===this.type?`tuple(${this.value.map((e=>e.format())).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#ee}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#ee?-1:!1===this.#ee?this.value.length:null}static from(e,a){return new b(d,e,a)}static uint8(e){return r(e,8)}static uint16(e){return r(e,16)}static uint24(e){return r(e,24)}static uint32(e){return r(e,32)}static uint40(e){return r(e,40)}static uint48(e){return r(e,48)}static uint56(e){return r(e,56)}static uint64(e){return r(e,64)}static uint72(e){return r(e,72)}static uint80(e){return r(e,80)}static uint88(e){return r(e,88)}static uint96(e){return r(e,96)}static uint104(e){return r(e,104)}static uint112(e){return r(e,112)}static uint120(e){return r(e,120)}static uint128(e){return r(e,128)}static uint136(e){return r(e,136)}static uint144(e){return r(e,144)}static uint152(e){return r(e,152)}static uint160(e){return r(e,160)}static uint168(e){return r(e,168)}static uint176(e){return r(e,176)}static uint184(e){return r(e,184)}static uint192(e){return r(e,192)}static uint200(e){return r(e,200)}static uint208(e){return r(e,208)}static uint216(e){return r(e,216)}static uint224(e){return r(e,224)}static uint232(e){return r(e,232)}static uint240(e){return r(e,240)}static uint248(e){return r(e,248)}static uint256(e){return r(e,256)}static uint(e){return r(e,256)}static int8(e){return r(e,-8)}static int16(e){return r(e,-16)}static int24(e){return r(e,-24)}static int32(e){return r(e,-32)}static int40(e){return r(e,-40)}static int48(e){return r(e,-48)}static int56(e){return r(e,-56)}static int64(e){return r(e,-64)}static int72(e){return r(e,-72)}static int80(e){return r(e,-80)}static int88(e){return r(e,-88)}static int96(e){return r(e,-96)}static int104(e){return r(e,-104)}static int112(e){return r(e,-112)}static int120(e){return r(e,-120)}static int128(e){return r(e,-128)}static int136(e){return r(e,-136)}static int144(e){return r(e,-144)}static int152(e){return r(e,-152)}static int160(e){return r(e,-160)}static int168(e){return r(e,-168)}static int176(e){return r(e,-176)}static int184(e){return r(e,-184)}static int192(e){return r(e,-192)}static int200(e){return r(e,-200)}static int208(e){return r(e,-208)}static int216(e){return r(e,-216)}static int224(e){return r(e,-224)}static int232(e){return r(e,-232)}static int240(e){return r(e,-240)}static int248(e){return r(e,-248)}static int256(e){return r(e,-256)}static int(e){return r(e,-256)}static bytes1(e){return n(e,1)}static bytes2(e){return n(e,2)}static bytes3(e){return n(e,3)}static bytes4(e){return n(e,4)}static bytes5(e){return n(e,5)}static bytes6(e){return n(e,6)}static bytes7(e){return n(e,7)}static bytes8(e){return n(e,8)}static bytes9(e){return n(e,9)}static bytes10(e){return n(e,10)}static bytes11(e){return n(e,11)}static bytes12(e){return n(e,12)}static bytes13(e){return n(e,13)}static bytes14(e){return n(e,14)}static bytes15(e){return n(e,15)}static bytes16(e){return n(e,16)}static bytes17(e){return n(e,17)}static bytes18(e){return n(e,18)}static bytes19(e){return n(e,19)}static bytes20(e){return n(e,20)}static bytes21(e){return n(e,21)}static bytes22(e){return n(e,22)}static bytes23(e){return n(e,23)}static bytes24(e){return n(e,24)}static bytes25(e){return n(e,25)}static bytes26(e){return n(e,26)}static bytes27(e){return n(e,27)}static bytes28(e){return n(e,28)}static bytes29(e){return n(e,29)}static bytes30(e){return n(e,30)}static bytes31(e){return n(e,31)}static bytes32(e){return n(e,32)}static address(e){return new b(d,"address",e)}static bool(e){return new b(d,"bool",!!e)}static bytes(e){return new b(d,"bytes",e)}static string(e){return new b(d,"string",e)}static array(e,a){throw new Error("not implemented yet")}static tuple(e,a){throw new Error("not implemented yet")}static overrides(e){return new b(d,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===i}static dereference(e,a){if(b.isTyped(e)){if(e.type!==a)throw new Error(`invalid type: expecetd ${a}, got ${e.type}`);return e.value}return e}}},30031:(e,a,t)=>{"use strict";t.d(a,{b:()=>l});var c=t(15539),f=t(36212),d=t(57339);const r=BigInt(0),n=BigInt(36);function i(e){const a=(e=e.toLowerCase()).substring(2).split(""),t=new Uint8Array(40);for(let e=0;e<40;e++)t[e]=a[e].charCodeAt(0);const d=(0,f.q5)((0,c.S)(t));for(let e=0;e<40;e+=2)d[e>>1]>>4>=8&&(a[e]=a[e].toUpperCase()),(15&d[e>>1])>=8&&(a[e+1]=a[e+1].toUpperCase());return"0x"+a.join("")}const b={};for(let e=0;e<10;e++)b[String(e)]=String(e);for(let e=0;e<26;e++)b[String.fromCharCode(65+e)]=String(10+e);const o=15;const s=function(){const e={};for(let a=0;a<36;a++)e["0123456789abcdefghijklmnopqrstuvwxyz"[a]]=BigInt(a);return e}();function l(e){if((0,d.MR)("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const a=i(e);return(0,d.MR)(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||a===e,"bad address checksum","address",e),a}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,d.MR)(e.substring(2,4)===function(e){let a=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>b[e])).join("");for(;a.length>=o;){let e=a.substring(0,o);a=parseInt(e,10)%97+a.substring(e.length)}let t=String(98-parseInt(a,10)%97);for(;t.length<2;)t="0"+t;return t}(e),"bad icap checksum","address",e);let a=function(e){e=e.toLowerCase();let a=r;for(let t=0;t{"use strict";t.d(a,{$C:()=>d,PW:()=>r,tG:()=>i});var c=t(57339),f=t(30031);function d(e){return e&&"function"==typeof e.getAddress}function r(e){try{return(0,f.b)(e),!0}catch(e){}return!1}async function n(e,a){const t=await a;return null!=t&&"0x0000000000000000000000000000000000000000"!==t||((0,c.vA)("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),(0,c.MR)(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),(0,f.b)(t)}function i(e,a){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?(0,f.b)(e):((0,c.vA)(null!=a,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),n(e,a.resolveName(e))):d(e)?n(e,e.getAddress()):e&&"function"==typeof e.then?n(e,e):void(0,c.MR)(!1,"unsupported addressable value","target",e)}},98982:(e,a,t)=>{"use strict";t.d(a,{j:()=>c});const c="0x0000000000000000000000000000000000000000"},24391:(e,a,t)=>{"use strict";t.d(a,{NZ:()=>Q});var c=t(19353),f=t(73622),d=t(41442),r=t(43948),n=t(88081),i=t(57339),b=t(27033),o=t(36212),s=t(99381);class l extends r.tG{interface;fragment;args;constructor(e,a,t){super(e,e.provider);const c=a.decodeEventLog(t,e.data,e.topics);(0,n.n)(this,{args:c,fragment:t,interface:a})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class u extends r.tG{error;constructor(e,a){super(e,e.provider),(0,n.n)(this,{error:a})}}class h extends r.z5{#Ze;constructor(e,a,t){super(t,a),this.#Ze=e}get logs(){return super.logs.map((e=>{const a=e.topics.length?this.#Ze.getEvent(e.topics[0]):null;if(a)try{return new l(e,this.#Ze,a)}catch(a){return new u(e,a)}return e}))}}class p extends r.uI{#Ze;constructor(e,a,t){super(t,a),this.#Ze=e}async wait(e,a){const t=await super.wait(e,a);return null==t?null:new h(this.#Ze,this.provider,t)}}class g extends s.z{log;constructor(e,a,t,c){super(e,a,t),(0,n.n)(this,{log:c})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class m extends g{constructor(e,a,t,c,f){super(e,a,t,new l(f,e.interface,c));const d=e.interface.decodeEventLog(c,this.log.data,this.log.topics);(0,n.n)(this,{args:d,fragment:c})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const x=BigInt(0);function y(e){return e&&"function"==typeof e.call}function A(e){return e&&"function"==typeof e.estimateGas}function v(e){return e&&"function"==typeof e.resolveName}function w(e){return e&&"function"==typeof e.sendTransaction}function _(e){if(null!=e){if(v(e))return e;if(e.provider)return e.provider}}class I{#H;fragment;constructor(e,a,t){if((0,n.n)(this,{fragment:a}),a.inputs.lengthnull==t[a]?null:e.walkAsync(t[a],((e,a)=>"address"===e?Array.isArray(a)?Promise.all(a.map((e=>(0,d.tG)(e,f)))):(0,d.tG)(a,f):a)))));return e.interface.encodeFilterTopics(a,c)}()}getTopicFilter(){return this.#H}}function E(e,a){return null==e?null:"function"==typeof e[a]?e:e.provider&&"function"==typeof e.provider[a]?e.provider:null}function C(e){return null==e?null:e.provider||null}async function M(e,a){const t=c.V.dereference(e,"overrides");(0,i.MR)("object"==typeof t,"invalid overrides parameter","overrides",e);const f=(0,r.VS)(t);return(0,i.MR)(null==f.to||(a||[]).indexOf("to")>=0,"cannot override to","overrides.to",f.to),(0,i.MR)(null==f.data||(a||[]).indexOf("data")>=0,"cannot override data","overrides.data",f.data),f.from&&(f.from=f.from),f}function B(e){const a=async function(a){const t=await M(a,["data"]);t.to=await e.getAddress(),t.from&&(t.from=await(0,d.tG)(t.from,_(e.runner)));const c=e.interface,f=(0,b.Ab)(t.value||x,"overrides.value")===x,r="0x"===(t.data||"0x");!c.fallback||c.fallback.payable||!c.receive||r||f||(0,i.MR)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",a),(0,i.MR)(c.fallback||r,"cannot send data to receive-only contract","overrides.data",t.data);const n=c.receive||c.fallback&&c.fallback.payable;return(0,i.MR)(n||f,"cannot send value to non-payable fallback","overrides.value",t.value),(0,i.MR)(c.fallback||r,"cannot send data to receive-only contract","overrides.data",t.data),t},t=async function(t){const c=e.runner;(0,i.vA)(w(c),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await c.sendTransaction(await a(t)),d=C(e.runner);return new p(e.interface,d,f)},c=async e=>await t(e);return(0,n.n)(c,{_contract:e,estimateGas:async function(t){const c=E(e.runner,"estimateGas");return(0,i.vA)(A(c),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await c.estimateGas(await a(t))},populateTransaction:a,send:t,staticCall:async function(t){const c=E(e.runner,"call");(0,i.vA)(y(c),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await a(t);try{return await c.call(f)}catch(a){if((0,i.E)(a)&&a.data)throw e.interface.makeError(a.data,f);throw a}}}),c}const L=Symbol.for("_ethersInternal_contract"),S=new WeakMap;function k(e){return S.get(e[L])}async function N(e,a){let t,c=null;if(Array.isArray(a)){const c=function(a){if((0,o.Lo)(a,32))return a;const t=e.interface.getEvent(a);return(0,i.MR)(t,"unknown fragment","name",a),t.topicHash};t=a.map((e=>null==e?null:Array.isArray(e)?e.map(c):c(e)))}else"*"===a?t=[null]:"string"==typeof a?(0,o.Lo)(a,32)?t=[a]:(c=e.interface.getEvent(a),(0,i.MR)(c,"unknown fragment","event",a),t=[c.topicHash]):(f=a)&&"object"==typeof f&&"getTopicFilter"in f&&"function"==typeof f.getTopicFilter&&f.fragment?t=await a.getTopicFilter():"fragment"in a?(c=a.fragment,t=[c.topicHash]):(0,i.MR)(!1,"unknown event name","event",a);var f;return t=t.map((e=>{if(null==e)return null;if(Array.isArray(e)){const a=Array.from(new Set(e.map((e=>e.toLowerCase()))).values());return 1===a.length?a[0]:(a.sort(),a)}return e.toLowerCase()})),{fragment:c,tag:t.map((e=>null==e?"null":Array.isArray(e)?e.join("|"):e)).join("&"),topics:t}}async function P(e,a){const{subs:t}=k(e);return t.get((await N(e,a)).tag)||null}async function R(e,a,t){const c=C(e.runner);(0,i.vA)(c,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:a});const{fragment:f,tag:d,topics:r}=await N(e,t),{addr:n,subs:b}=k(e);let o=b.get(d);if(!o){const a={address:n||e,topics:r},i=a=>{let c=f;if(null==c)try{c=e.interface.getEvent(a.topics[0])}catch(e){}if(c){const d=c,r=f?e.interface.decodeEventLog(f,a.data,a.topics):[];D(e,t,r,(c=>new m(e,c,t,d,a)))}else D(e,t,[],(c=>new g(e,c,t,a)))};let s=[];o={tag:d,listeners:[],start:()=>{s.length||s.push(c.on(a,i))},stop:async()=>{if(0==s.length)return;let e=s;s=[],await Promise.all(e),c.off(a,i)}},b.set(d,o)}return o}let O=Promise.resolve();async function D(e,a,t,c){try{await O}catch(e){}const f=async function(e,a,t,c){await O;const f=await P(e,a);if(!f)return!1;const d=f.listeners.length;return f.listeners=f.listeners.filter((({listener:a,once:f})=>{const d=Array.from(t);c&&d.push(c(f?null:a));try{a.call(e,...d)}catch(e){}return!f})),0===f.listeners.length&&(f.stop(),k(e).subs.delete(f.tag)),d>0}(e,a,t,c);return O=f,await f}const T=["then"];class F{target;interface;runner;filters;[L];fallback;constructor(e,a,t,c){(0,i.MR)("string"==typeof e||(0,d.$C)(e),"invalid value for Contract target","target",e),null==t&&(t=null);const r=f.KA.from(a);let b;(0,n.n)(this,{target:e,runner:t,interface:r}),Object.defineProperty(this,L,{value:{}});let s=null,l=null;if(c){const e=C(t);l=new p(this.interface,e,c)}let u=new Map;if("string"==typeof e)if((0,o.Lo)(e))s=e,b=Promise.resolve(e);else{const a=E(t,"resolveName");if(!v(a))throw(0,i.xz)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});b=a.resolveName(e).then((a=>{if(null==a)throw(0,i.xz)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return k(this).addr=a,a}))}else b=e.getAddress().then((e=>{if(null==e)throw new Error("TODO");return k(this).addr=e,e}));var h;h={addrPromise:b,addr:s,deployTx:l,subs:u},S.set(this[L],h);const g=new Proxy({},{get:(e,a,t)=>{if("symbol"==typeof a||T.indexOf(a)>=0)return Reflect.get(e,a,t);try{return this.getEvent(a)}catch(e){if(!(0,i.bJ)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,a)=>T.indexOf(a)>=0?Reflect.has(e,a):Reflect.has(e,a)||this.interface.hasEvent(String(a))});return(0,n.n)(this,{filters:g}),(0,n.n)(this,{fallback:r.receive||r.fallback?B(this):null}),new Proxy(this,{get:(e,a,t)=>{if("symbol"==typeof a||a in e||T.indexOf(a)>=0)return Reflect.get(e,a,t);try{return e.getFunction(a)}catch(e){if(!(0,i.bJ)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,a)=>"symbol"==typeof a||a in e||T.indexOf(a)>=0?Reflect.has(e,a):e.interface.hasFunction(a)})}connect(e){return new F(this.target,this.interface,e)}attach(e){return new F(e,this.interface,this.runner)}async getAddress(){return await k(this).addrPromise}async getDeployedCode(){const e=C(this.runner);(0,i.vA)(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const a=await e.getCode(await this.getAddress());return"0x"===a?null:a}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;const a=C(this.runner);return(0,i.vA)(null!=a,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise(((e,t)=>{const c=async()=>{try{if(null!=await this.getDeployedCode())return e(this);a.once("block",c)}catch(e){t(e)}};c()}))}deploymentTransaction(){return k(this).deployTx}getFunction(e){return"string"!=typeof e&&(e=e.format()),function(e,a){const t=function(...t){const c=e.interface.getFunction(a,t);return(0,i.vA)(c,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:a,args:t}}),c},f=async function(...a){const f=t(...a);let r={};if(f.inputs.length+1===a.length&&(r=await M(a.pop()),r.from&&(r.from=await(0,d.tG)(r.from,_(e.runner)))),f.inputs.length!==a.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const i=await async function(e,a,t){const f=E(e,"resolveName"),r=v(f)?f:null;return await Promise.all(a.map(((e,a)=>e.walkAsync(t[a],((e,a)=>(a=c.V.dereference(a,e),"address"===e?(0,d.tG)(a,r):a))))))}(e.runner,f.inputs,a);return Object.assign({},r,await(0,n.k)({to:e.getAddress(),data:e.interface.encodeFunctionData(f,i)}))},r=async function(...e){const a=await o(...e);return 1===a.length?a[0]:a},b=async function(...a){const t=e.runner;(0,i.vA)(w(t),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await t.sendTransaction(await f(...a)),d=C(e.runner);return new p(e.interface,d,c)},o=async function(...a){const c=E(e.runner,"call");(0,i.vA)(y(c),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const d=await f(...a);let r="0x";try{r=await c.call(d)}catch(a){if((0,i.E)(a)&&a.data)throw e.interface.makeError(a.data,d);throw a}const n=t(...a);return e.interface.decodeFunctionResult(n,r)},s=async(...e)=>t(...e).constant?await r(...e):await b(...e);return(0,n.n)(s,{name:e.interface.getFunctionName(a),_contract:e,_key:a,getFragment:t,estimateGas:async function(...a){const t=E(e.runner,"estimateGas");return(0,i.vA)(A(t),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await t.estimateGas(await f(...a))},populateTransaction:f,send:b,staticCall:r,staticCallResult:o}),Object.defineProperty(s,"fragment",{configurable:!1,enumerable:!0,get:()=>{const t=e.interface.getFunction(a);return(0,i.vA)(t,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:a}}),t}}),s}(this,e)}getEvent(e){return"string"!=typeof e&&(e=e.format()),function(e,a){const t=function(...t){const c=e.interface.getEvent(a,t);return(0,i.vA)(c,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:a,args:t}}),c},c=function(...a){return new I(e,t(...a),a)};return(0,n.n)(c,{name:e.interface.getEventName(a),_contract:e,_key:a,getFragment:t}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const t=e.interface.getEvent(a);return(0,i.vA)(t,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:a}}),t}}),c}(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,a,t){null==a&&(a=0),null==t&&(t="latest");const{addr:c,addrPromise:f}=k(this),d=c||await f,{fragment:n,topics:b}=await N(this,e),o={address:d,topics:b,fromBlock:a,toBlock:t},s=C(this.runner);return(0,i.vA)(s,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await s.getLogs(o)).map((e=>{let a=n;if(null==a)try{a=this.interface.getEvent(e.topics[0])}catch(e){}if(a)try{return new l(e,this.interface,a)}catch(a){return new u(e,a)}return new r.tG(e,s)}))}async on(e,a){const t=await R(this,"on",e);return t.listeners.push({listener:a,once:!1}),t.start(),this}async once(e,a){const t=await R(this,"once",e);return t.listeners.push({listener:a,once:!0}),t.start(),this}async emit(e,...a){return await D(this,e,a,null)}async listenerCount(e){if(e){const a=await P(this,e);return a?a.listeners.length:0}const{subs:a}=k(this);let t=0;for(const{listeners:e}of a.values())t+=e.length;return t}async listeners(e){if(e){const a=await P(this,e);return a?a.listeners.map((({listener:e})=>e)):[]}const{subs:a}=k(this);let t=[];for(const{listeners:e}of a.values())t=t.concat(e.map((({listener:e})=>e)));return t}async off(e,a){const t=await P(this,e);if(!t)return this;if(a){const e=t.listeners.map((({listener:e})=>e)).indexOf(a);e>=0&&t.listeners.splice(e,1)}return null!=a&&0!==t.listeners.length||(t.stop(),k(this).subs.delete(t.tag)),this}async removeAllListeners(e){if(e){const a=await P(this,e);if(!a)return this;a.stop(),k(this).subs.delete(a.tag)}else{const{subs:e}=k(this);for(const{tag:a,stop:t}of e.values())t(),e.delete(a)}return this}async addListener(e,a){return await this.on(e,a)}async removeListener(e,a){return await this.off(e,a)}static buildClass(e){return class extends F{constructor(a,t=null){super(a,e,t)}}}static from(e,a,t){return null==t&&(t=null),new this(e,a,t)}}class Q extends(function(){return F}()){}},8180:(e,a,t)=>{"use strict";t.d(a,{n1:()=>x,Gz:()=>y,T_:()=>A,po:()=>v});var c=t(4655),f=t(84877),d=t(3439),r=t(37171),n=t(86558),i=t(10750);const[b,o]=(()=>n.Ay.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),s=new Uint32Array(80),l=new Uint32Array(80);class u extends r.D{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:a,Bh:t,Bl:c,Ch:f,Cl:d,Dh:r,Dl:n,Eh:i,El:b,Fh:o,Fl:s,Gh:l,Gl:u,Hh:h,Hl:p}=this;return[e,a,t,c,f,d,r,n,i,b,o,s,l,u,h,p]}set(e,a,t,c,f,d,r,n,i,b,o,s,l,u,h,p){this.Ah=0|e,this.Al=0|a,this.Bh=0|t,this.Bl=0|c,this.Ch=0|f,this.Cl=0|d,this.Dh=0|r,this.Dl=0|n,this.Eh=0|i,this.El=0|b,this.Fh=0|o,this.Fl=0|s,this.Gh=0|l,this.Gl=0|u,this.Hh=0|h,this.Hl=0|p}process(e,a){for(let t=0;t<16;t++,a+=4)s[t]=e.getUint32(a),l[t]=e.getUint32(a+=4);for(let e=16;e<80;e++){const a=0|s[e-15],t=0|l[e-15],c=n.Ay.rotrSH(a,t,1)^n.Ay.rotrSH(a,t,8)^n.Ay.shrSH(a,t,7),f=n.Ay.rotrSL(a,t,1)^n.Ay.rotrSL(a,t,8)^n.Ay.shrSL(a,t,7),d=0|s[e-2],r=0|l[e-2],i=n.Ay.rotrSH(d,r,19)^n.Ay.rotrBH(d,r,61)^n.Ay.shrSH(d,r,6),b=n.Ay.rotrSL(d,r,19)^n.Ay.rotrBL(d,r,61)^n.Ay.shrSL(d,r,6),o=n.Ay.add4L(f,b,l[e-7],l[e-16]),u=n.Ay.add4H(o,c,i,s[e-7],s[e-16]);s[e]=0|u,l[e]=0|o}let{Ah:t,Al:c,Bh:f,Bl:d,Ch:r,Cl:i,Dh:u,Dl:h,Eh:p,El:g,Fh:m,Fl:x,Gh:y,Gl:A,Hh:v,Hl:w}=this;for(let e=0;e<80;e++){const a=n.Ay.rotrSH(p,g,14)^n.Ay.rotrSH(p,g,18)^n.Ay.rotrBH(p,g,41),_=n.Ay.rotrSL(p,g,14)^n.Ay.rotrSL(p,g,18)^n.Ay.rotrBL(p,g,41),I=p&m^~p&y,E=g&x^~g&A,C=n.Ay.add5L(w,_,E,o[e],l[e]),M=n.Ay.add5H(C,v,a,I,b[e],s[e]),B=0|C,L=n.Ay.rotrSH(t,c,28)^n.Ay.rotrBH(t,c,34)^n.Ay.rotrBH(t,c,39),S=n.Ay.rotrSL(t,c,28)^n.Ay.rotrBL(t,c,34)^n.Ay.rotrBL(t,c,39),k=t&f^t&r^f&r,N=c&d^c&i^d&i;v=0|y,w=0|A,y=0|m,A=0|x,m=0|p,x=0|g,({h:p,l:g}=n.Ay.add(0|u,0|h,0|M,0|B)),u=0|r,h=0|i,r=0|f,i=0|d,f=0|t,d=0|c;const P=n.Ay.add3L(B,S,N);t=n.Ay.add3H(P,M,L,k),c=0|P}({h:t,l:c}=n.Ay.add(0|this.Ah,0|this.Al,0|t,0|c)),({h:f,l:d}=n.Ay.add(0|this.Bh,0|this.Bl,0|f,0|d)),({h:r,l:i}=n.Ay.add(0|this.Ch,0|this.Cl,0|r,0|i)),({h:u,l:h}=n.Ay.add(0|this.Dh,0|this.Dl,0|u,0|h)),({h:p,l:g}=n.Ay.add(0|this.Eh,0|this.El,0|p,0|g)),({h:m,l:x}=n.Ay.add(0|this.Fh,0|this.Fl,0|m,0|x)),({h:y,l:A}=n.Ay.add(0|this.Gh,0|this.Gl,0|y,0|A)),({h:v,l:w}=n.Ay.add(0|this.Hh,0|this.Hl,0|v,0|w)),this.set(t,c,f,d,r,i,u,h,p,g,m,x,y,A,v,w)}roundClean(){s.fill(0),l.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const h=(0,i.ld)((()=>new u));var p=t(57339);const g=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}(),m=g.crypto||g.msCrypto;function x(e){switch(e){case"sha256":return d.s.create();case"sha512":return h.create()}(0,p.MR)(!1,"invalid hashing algorithm name","algorithm",e)}function y(e,a){const t={sha256:d.s,sha512:h}[e];return(0,p.MR)(null!=t,"invalid hmac algorithm","algorithm",e),c.w.create(t,a)}function A(e,a,t,c,r){const n={sha256:d.s,sha512:h}[r];return(0,p.MR)(null!=n,"invalid pbkdf2 algorithm","algorithm",r),(0,f.A)(n,e,a,{c:t,dkLen:c})}function v(e){(0,p.vA)(null!=m,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),(0,p.MR)(Number.isInteger(e)&&e>0&&e<=1024,"invalid length","length",e);const a=new Uint8Array(e);return m.getRandomValues(a),a}},15539:(e,a,t)=>{"use strict";t.d(a,{S:()=>E});var c=t(27125),f=t(86558),d=t(10750);const[r,n,i]=[[],[],[]],b=BigInt(0),o=BigInt(1),s=BigInt(2),l=BigInt(7),u=BigInt(256),h=BigInt(113);for(let e=0,a=o,t=1,c=0;e<24;e++){[t,c]=[c,(2*t+3*c)%5],r.push(2*(5*c+t)),n.push((e+1)*(e+2)/2%64);let f=b;for(let e=0;e<7;e++)a=(a<>l)*h)%u,a&s&&(f^=o<<(o<t>32?(0,f.WM)(e,a,t):(0,f.P5)(e,a,t),x=(e,a,t)=>t>32?(0,f.im)(e,a,t):(0,f.B4)(e,a,t);class y extends d.Vw{constructor(e,a,t,f=!1,r=24){if(super(),this.blockLen=e,this.suffix=a,this.outputLen=t,this.enableXOF=f,this.rounds=r,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,c.ai)(t),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,d.DH)(this.state)}keccak(){!function(e,a=24){const t=new Uint32Array(10);for(let c=24-a;c<24;c++){for(let a=0;a<10;a++)t[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(let a=0;a<10;a+=2){const c=(a+8)%10,f=(a+2)%10,d=t[f],r=t[f+1],n=m(d,r,1)^t[c],i=x(d,r,1)^t[c+1];for(let t=0;t<50;t+=10)e[a+t]^=n,e[a+t+1]^=i}let a=e[2],f=e[3];for(let t=0;t<24;t++){const c=n[t],d=m(a,f,c),i=x(a,f,c),b=r[t];a=e[b],f=e[b+1],e[b]=d,e[b+1]=i}for(let a=0;a<50;a+=10){for(let c=0;c<10;c++)t[c]=e[a+c];for(let c=0;c<10;c++)e[a+c]^=~t[(c+2)%10]&t[(c+4)%10]}e[0]^=p[c],e[1]^=g[c]}t.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,c.t2)(this);const{blockLen:a,state:t}=this,f=(e=(0,d.ZJ)(e)).length;for(let c=0;c=t&&this.keccak();const d=Math.min(t-this.posOut,f-c);e.set(a.subarray(this.posOut,this.posOut+d),c),this.posOut+=d,c+=d}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,c.ai)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,c.CG)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:a,suffix:t,outputLen:c,rounds:f,enableXOF:d}=this;return e||(e=new y(a,t,c,d,f)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=f,e.suffix=t,e.outputLen=c,e.enableXOF=d,e.destroyed=this.destroyed,e}}const A=((e,a,t)=>(0,d.ld)((()=>new y(a,e,t))))(1,136,32);var v=t(36212);let w=!1;const _=function(e){return A(e)};let I=_;function E(e){const a=(0,v.q5)(e,"data");return(0,v.c$)(I(a))}E._=_,E.lock=function(){w=!0},E.register=function(e){if(w)throw new TypeError("keccak256 is locked");I=e},Object.freeze(E)},68650:(e,a,t)=>{"use strict";t.d(a,{s:()=>s});var c=t(8180),f=t(36212);const d=function(e){return(0,c.n1)("sha256").update(e).digest()},r=function(e){return(0,c.n1)("sha512").update(e).digest()};let n=d,i=r,b=!1,o=!1;function s(e){const a=(0,f.q5)(e,"data");return(0,f.c$)(n(a))}function l(e){const a=(0,f.q5)(e,"data");return(0,f.c$)(i(a))}s._=d,s.lock=function(){b=!0},s.register=function(e){if(b)throw new Error("sha256 is locked");n=e},Object.freeze(s),l._=r,l.lock=function(){o=!0},l.register=function(e){if(o)throw new Error("sha512 is locked");i=e},Object.freeze(s)},20260:(e,a,t)=>{"use strict";t.d(a,{t:()=>p});const c="0x0000000000000000000000000000000000000000000000000000000000000000";var f=t(36212),d=t(27033),r=t(57339);const n=BigInt(0),i=BigInt(1),b=BigInt(2),o=BigInt(27),s=BigInt(28),l=BigInt(35),u={};function h(e){return(0,f.nx)((0,d.c4)(e),32)}class p{#Je;#We;#Ye;#Xe;get r(){return this.#Je}set r(e){(0,r.MR)(32===(0,f.pO)(e),"invalid r","value",e),this.#Je=(0,f.c$)(e)}get s(){return this.#We}set s(e){(0,r.MR)(32===(0,f.pO)(e),"invalid s","value",e);const a=(0,f.c$)(e);(0,r.MR)(parseInt(a.substring(0,3))<8,"non-canonical s","value",a),this.#We=a}get v(){return this.#Ye}set v(e){const a=(0,d.WZ)(e,"value");(0,r.MR)(27===a||28===a,"invalid v","v",e),this.#Ye=a}get networkV(){return this.#Xe}get legacyChainId(){const e=this.networkV;return null==e?null:p.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=(0,f.q5)(this.s);return this.yParity&&(e[0]|=128),(0,f.c$)(e)}get compactSerialized(){return(0,f.xW)([this.r,this.yParityAndS])}get serialized(){return(0,f.xW)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,a,t,c){(0,r.gk)(e,u,"Signature"),this.#Je=a,this.#We=t,this.#Ye=c,this.#Xe=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new p(u,this.r,this.s,this.v);return this.networkV&&(e.#Xe=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const a=(0,d.Ab)(e,"v");return a==o||a==s?n:((0,r.MR)(a>=l,"invalid EIP-155 v","v",e),(a-l)/b)}static getChainIdV(e,a){return(0,d.Ab)(e)*b+BigInt(35+a-27)}static getNormalizedV(e){const a=(0,d.Ab)(e);return a===n||a===o?27:a===i||a===s?28:((0,r.MR)(a>=l,"invalid v","v",e),a&i?27:28)}static from(e){function a(a,t){(0,r.MR)(a,t,"signature",e)}if(null==e)return new p(u,c,c,27);if("string"==typeof e){const t=(0,f.q5)(e,"signature");if(64===t.length){const e=(0,f.c$)(t.slice(0,32)),a=t.slice(32,64),c=128&a[0]?28:27;return a[0]&=127,new p(u,e,(0,f.c$)(a),c)}if(65===t.length){const e=(0,f.c$)(t.slice(0,32)),c=t.slice(32,64);a(!(128&c[0]),"non-canonical s");const d=p.getNormalizedV(t[64]);return new p(u,e,(0,f.c$)(c),d)}a(!1,"invalid raw signature length")}if(e instanceof p)return e.clone();const t=e.r;a(null!=t,"missing r");const n=h(t),i=function(e,t){if(null!=e)return h(e);if(null!=t){a((0,f.Lo)(t,32),"invalid yParityAndS");const e=(0,f.q5)(t);return e[0]&=127,(0,f.c$)(e)}a(!1,"missing s")}(e.s,e.yParityAndS);a(!(128&(0,f.q5)(i)[0]),"non-canonical s");const{networkV:b,v:o}=function(e,t,c){if(null!=e){const a=(0,d.Ab)(e);return{networkV:a>=l?a:void 0,v:p.getNormalizedV(a)}}if(null!=t)return a((0,f.Lo)(t,32),"invalid yParityAndS"),{v:128&(0,f.q5)(t)[0]?28:27};if(null!=c){switch((0,d.WZ)(c,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}a(!1,"invalid yParity")}a(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),s=new p(u,n,i,o);return b&&(s.#Xe=b),a(null==e.yParity||(0,d.WZ)(e.yParity,"sig.yParity")===s.yParity,"yParity mismatch"),a(null==e.yParityAndS||e.yParityAndS===s.yParityAndS,"yParityAndS mismatch"),s}}},15496:(e,a,t)=>{"use strict";t.d(a,{h:()=>be});var c={};t.r(c),t.d(c,{OG:()=>x,My:()=>b,Ph:()=>l,lX:()=>u,Id:()=>m,fg:()=>v,qj:()=>g,aT:()=>s,lq:()=>h,z:()=>p,Q5:()=>_});var f=t(3439);BigInt(0);const d=BigInt(1),r=BigInt(2),n=e=>e instanceof Uint8Array,i=Array.from({length:256},((e,a)=>a.toString(16).padStart(2,"0")));function b(e){if(!n(e))throw new Error("Uint8Array expected");let a="";for(let t=0;te+a.length),0));let t=0;return e.forEach((e=>{if(!n(e))throw new Error("Uint8Array expected");a.set(e,t),t+=e.length})),a}const x=e=>(r<new Uint8Array(e),A=e=>Uint8Array.from(e);function v(e,a,t){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof a||a<2)throw new Error("qByteLen must be a number");if("function"!=typeof t)throw new Error("hmacFn must be a function");let c=y(e),f=y(e),d=0;const r=()=>{c.fill(1),f.fill(0),d=0},n=(...e)=>t(f,c,...e),i=(e=y())=>{f=n(A([0]),e),c=n(),0!==e.length&&(f=n(A([1]),e),c=n())},b=()=>{if(d++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const t=[];for(;e{let t;for(r(),i(e);!(t=a(b()));)i();return r(),t}}const w={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,a)=>a.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function _(e,a,t={}){const c=(a,t,c)=>{const f=w[t];if("function"!=typeof f)throw new Error(`Invalid validator "${t}", expected function`);const d=e[a];if(!(c&&void 0===d||f(d,e)))throw new Error(`Invalid param ${String(a)}=${d} (${typeof d}), expected ${t}`)};for(const[e,t]of Object.entries(a))c(e,t,!1);for(const[e,a]of Object.entries(t))c(e,a,!0);return e}const I=BigInt(0),E=BigInt(1),C=BigInt(2),M=BigInt(3),B=BigInt(4),L=BigInt(5),S=BigInt(8);function k(e,a){const t=e%a;return t>=I?t:a+t}function N(e,a,t){if(t<=I||a 0");if(t===E)return I;let c=E;for(;a>I;)a&E&&(c=c*e%t),e=e*e%t,a>>=E;return c}function P(e,a,t){let c=e;for(;a-- >I;)c*=c,c%=t;return c}function R(e,a){if(e===I||a<=I)throw new Error(`invert: expected positive integers, got n=${e} mod=${a}`);let t=k(e,a),c=a,f=I,d=E,r=E,n=I;for(;t!==I;){const e=c/t,a=c%t,i=f-r*e,b=d-n*e;c=t,t=a,f=r,d=n,r=i,n=b}if(c!==E)throw new Error("invert: does not exist");return k(f,a)}BigInt(9),BigInt(16);const O=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function D(e,a){const t=void 0!==a?a:e.toString(2).length;return{nBitLength:t,nByteLength:Math.ceil(t/8)}}function T(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const a=e.toString(2).length;return Math.ceil(a/8)}function F(e){const a=T(e);return a+Math.ceil(a/2)}var Q=t(4655),U=t(10750);const j=BigInt(0),H=BigInt(1);function $(e){return _(e.Fp,O.reduce(((e,a)=>(e[a]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),_(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...D(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:q,aT:G}=c,z={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:a}=z;if(e.length<2||2!==e[0])throw new a("Invalid signature integer tag");const t=e[1],c=e.subarray(2,t+2);if(!t||c.length!==t)throw new a("Invalid signature integer: wrong length");if(128&c[0])throw new a("Invalid signature integer: negative");if(0===c[0]&&!(128&c[1]))throw new a("Invalid signature integer: unnecessary leading zero");return{d:q(c),l:e.subarray(t+2)}},toSig(e){const{Err:a}=z,t="string"==typeof e?G(e):e;if(!(t instanceof Uint8Array))throw new Error("ui8a expected");let c=t.length;if(c<2||48!=t[0])throw new a("Invalid signature tag");if(t[1]!==c-2)throw new a("Invalid signature: incorrect length");const{d:f,l:d}=z._parseInt(t.subarray(2)),{d:r,l:n}=z._parseInt(d);if(n.length)throw new a("Invalid signature: left bytes after parsing");return{r:f,s:r}},hexFromSig(e){const a=e=>8&Number.parseInt(e[0],16)?"00"+e:e,t=e=>{const a=e.toString(16);return 1&a.length?`0${a}`:a},c=a(t(e.s)),f=a(t(e.r)),d=c.length/2,r=f.length/2,n=t(d),i=t(r);return`30${t(r+d+4)}02${i}${f}02${n}${c}`}},K=BigInt(0),V=BigInt(1),Z=(BigInt(2),BigInt(3));function J(e){const a=function(e){const a=$(e);return _(a,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...a})}(e),{Fp:t,n:c}=a,f=t.BYTES+1,d=2*t.BYTES+1;function r(e){return k(e,c)}function n(e){return R(e,c)}const{ProjectivePoint:i,normPrivateKeyToScalar:o,weierstrassEquation:y,isWithinCurveOrder:A}=function(e){const a=function(e){const a=$(e);_(a,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:t,Fp:c,a:f}=a;if(t){if(!c.eql(f,c.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof t||"bigint"!=typeof t.beta||"function"!=typeof t.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...a})}(e),{Fp:t}=a,c=a.toBytes||((e,a,c)=>{const f=a.toAffine();return m(Uint8Array.from([4]),t.toBytes(f.x),t.toBytes(f.y))}),f=a.fromBytes||(e=>{const a=e.subarray(1);return{x:t.fromBytes(a.subarray(0,t.BYTES)),y:t.fromBytes(a.subarray(t.BYTES,2*t.BYTES))}});function d(e){const{a:c,b:f}=a,d=t.sqr(e),r=t.mul(d,e);return t.add(t.add(r,t.mul(e,c)),f)}if(!t.eql(t.sqr(a.Gy),d(a.Gx)))throw new Error("bad generator point: equation left != right");function r(e){return"bigint"==typeof e&&Kt.eql(e,t.ZERO);return f(a)&&f(c)?u.ZERO:new u(a,c,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const a=t.invertBatch(e.map((e=>e.pz)));return e.map(((e,t)=>e.toAffine(a[t]))).map(u.fromAffine)}static fromHex(e){const a=u.fromAffine(f(g("pointHex",e)));return a.assertValidity(),a}static fromPrivateKey(e){return u.BASE.multiply(i(e))}_setWindowSize(e){this._WINDOW_SIZE=e,o.delete(this)}assertValidity(){if(this.is0()){if(a.allowInfinityPoint&&!t.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:c}=this.toAffine();if(!t.isValid(e)||!t.isValid(c))throw new Error("bad point: x or y not FE");const f=t.sqr(c),r=d(e);if(!t.eql(f,r))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(t.isOdd)return!t.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){s(e);const{px:a,py:c,pz:f}=this,{px:d,py:r,pz:n}=e,i=t.eql(t.mul(a,n),t.mul(d,f)),b=t.eql(t.mul(c,n),t.mul(r,f));return i&&b}negate(){return new u(this.px,t.neg(this.py),this.pz)}double(){const{a:e,b:c}=a,f=t.mul(c,Z),{px:d,py:r,pz:n}=this;let i=t.ZERO,b=t.ZERO,o=t.ZERO,s=t.mul(d,d),l=t.mul(r,r),h=t.mul(n,n),p=t.mul(d,r);return p=t.add(p,p),o=t.mul(d,n),o=t.add(o,o),i=t.mul(e,o),b=t.mul(f,h),b=t.add(i,b),i=t.sub(l,b),b=t.add(l,b),b=t.mul(i,b),i=t.mul(p,i),o=t.mul(f,o),h=t.mul(e,h),p=t.sub(s,h),p=t.mul(e,p),p=t.add(p,o),o=t.add(s,s),s=t.add(o,s),s=t.add(s,h),s=t.mul(s,p),b=t.add(b,s),h=t.mul(r,n),h=t.add(h,h),s=t.mul(h,p),i=t.sub(i,s),o=t.mul(h,l),o=t.add(o,o),o=t.add(o,o),new u(i,b,o)}add(e){s(e);const{px:c,py:f,pz:d}=this,{px:r,py:n,pz:i}=e;let b=t.ZERO,o=t.ZERO,l=t.ZERO;const h=a.a,p=t.mul(a.b,Z);let g=t.mul(c,r),m=t.mul(f,n),x=t.mul(d,i),y=t.add(c,f),A=t.add(r,n);y=t.mul(y,A),A=t.add(g,m),y=t.sub(y,A),A=t.add(c,d);let v=t.add(r,i);return A=t.mul(A,v),v=t.add(g,x),A=t.sub(A,v),v=t.add(f,d),b=t.add(n,i),v=t.mul(v,b),b=t.add(m,x),v=t.sub(v,b),l=t.mul(h,A),b=t.mul(p,x),l=t.add(b,l),b=t.sub(m,l),l=t.add(m,l),o=t.mul(b,l),m=t.add(g,g),m=t.add(m,g),x=t.mul(h,x),A=t.mul(p,A),m=t.add(m,x),x=t.sub(g,x),x=t.mul(h,x),A=t.add(A,x),g=t.mul(m,A),o=t.add(o,g),g=t.mul(v,A),b=t.mul(y,b),b=t.sub(b,g),g=t.mul(y,m),l=t.mul(v,l),l=t.add(l,g),new u(b,o,l)}subtract(e){return this.add(e.negate())}is0(){return this.equals(u.ZERO)}wNAF(e){return p.wNAFCached(this,o,e,(e=>{const a=t.invertBatch(e.map((e=>e.pz)));return e.map(((e,t)=>e.toAffine(a[t]))).map(u.fromAffine)}))}multiplyUnsafe(e){const c=u.ZERO;if(e===K)return c;if(n(e),e===V)return this;const{endo:f}=a;if(!f)return p.unsafeLadder(this,e);let{k1neg:d,k1:r,k2neg:i,k2:b}=f.splitScalar(e),o=c,s=c,l=this;for(;r>K||b>K;)r&V&&(o=o.add(l)),b&V&&(s=s.add(l)),l=l.double(),r>>=V,b>>=V;return d&&(o=o.negate()),i&&(s=s.negate()),s=new u(t.mul(s.px,f.beta),s.py,s.pz),o.add(s)}multiply(e){n(e);let c,f,d=e;const{endo:r}=a;if(r){const{k1neg:e,k1:a,k2neg:n,k2:i}=r.splitScalar(d);let{p:b,f:o}=this.wNAF(a),{p:s,f:l}=this.wNAF(i);b=p.constTimeNegate(e,b),s=p.constTimeNegate(n,s),s=new u(t.mul(s.px,r.beta),s.py,s.pz),c=b.add(s),f=o.add(l)}else{const{p:e,f:a}=this.wNAF(d);c=e,f=a}return u.normalizeZ([c,f])[0]}multiplyAndAddUnsafe(e,a,t){const c=u.BASE,f=(e,a)=>a!==K&&a!==V&&e.equals(c)?e.multiply(a):e.multiplyUnsafe(a),d=f(this,a).add(f(e,t));return d.is0()?void 0:d}toAffine(e){const{px:a,py:c,pz:f}=this,d=this.is0();null==e&&(e=d?t.ONE:t.inv(f));const r=t.mul(a,e),n=t.mul(c,e),i=t.mul(f,e);if(d)return{x:t.ZERO,y:t.ZERO};if(!t.eql(i,t.ONE))throw new Error("invZ was invalid");return{x:r,y:n}}isTorsionFree(){const{h:e,isTorsionFree:t}=a;if(e===V)return!0;if(t)return t(u,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:t}=a;return e===V?this:t?t(u,this):this.multiplyUnsafe(a.h)}toRawBytes(e=!0){return this.assertValidity(),c(u,this,e)}toHex(e=!0){return b(this.toRawBytes(e))}}u.BASE=new u(a.Gx,a.Gy,t.ONE),u.ZERO=new u(t.ZERO,t.ONE,t.ZERO);const h=a.nBitLength,p=function(e,a){const t=(e,a)=>{const t=a.negate();return e?t:a},c=e=>({windows:Math.ceil(a/e)+1,windowSize:2**(e-1)});return{constTimeNegate:t,unsafeLadder(a,t){let c=e.ZERO,f=a;for(;t>j;)t&H&&(c=c.add(f)),f=f.double(),t>>=H;return c},precomputeWindow(e,a){const{windows:t,windowSize:f}=c(a),d=[];let r=e,n=r;for(let e=0;e>=l,c>n&&(c-=s,d+=H);const r=a,u=a+Math.abs(c)-1,h=e%2!=0,p=c<0;0===c?b=b.add(t(h,f[r])):i=i.add(t(p,f[u]))}return{p:i,f:b}},wNAFCached(e,a,t,c){const f=e._WINDOW_SIZE||1;let d=a.get(e);return d||(d=this.precomputeWindow(e,f),1!==f&&a.set(e,c(d))),this.wNAF(f,d,t)}}}(u,a.endo?Math.ceil(h/2):h);return{CURVE:a,ProjectivePoint:u,normPrivateKeyToScalar:i,weierstrassEquation:d,isWithinCurveOrder:r}}({...a,toBytes(e,a,c){const f=a.toAffine(),d=t.toBytes(f.x),r=m;return c?r(Uint8Array.from([a.hasEvenY()?2:3]),d):r(Uint8Array.from([4]),d,t.toBytes(f.y))},fromBytes(e){const a=e.length,c=e[0],r=e.subarray(1);if(a!==f||2!==c&&3!==c){if(a===d&&4===c)return{x:t.fromBytes(r.subarray(0,t.BYTES)),y:t.fromBytes(r.subarray(t.BYTES,2*t.BYTES))};throw new Error(`Point of length ${a} was invalid. Expected ${f} compressed bytes or ${d} uncompressed bytes`)}{const e=l(r);if(!(K<(n=e)&&nb(h(e,a.nByteLength));function I(e){return e>c>>V}const C=(e,a,t)=>l(e.slice(a,t));class M{constructor(e,a,t){this.r=e,this.s=a,this.recovery=t,this.assertValidity()}static fromCompact(e){const t=a.nByteLength;return e=g("compactSignature",e,2*t),new M(C(e,0,t),C(e,t,2*t))}static fromDER(e){const{r:a,s:t}=z.toSig(g("DER",e));return new M(a,t)}assertValidity(){if(!A(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!A(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new M(this.r,this.s,e)}recoverPublicKey(e){const{r:c,s:f,recovery:d}=this,b=N(g("msgHash",e));if(null==d||![0,1,2,3].includes(d))throw new Error("recovery id invalid");const o=2===d||3===d?c+a.n:c;if(o>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const s=1&d?"03":"02",l=i.fromHex(s+w(o)),u=n(o),h=r(-b*u),p=r(f*u),m=i.BASE.multiplyAndAddUnsafe(l,h,p);if(!m)throw new Error("point at infinify");return m.assertValidity(),m}hasHighS(){return I(this.s)}normalizeS(){return this.hasHighS()?new M(this.r,r(-this.s),this.recovery):this}toDERRawBytes(){return s(this.toDERHex())}toDERHex(){return z.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return s(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const B={isValidPrivateKey(e){try{return o(e),!0}catch(e){return!1}},normPrivateKeyToScalar:o,randomPrivateKey:()=>{const e=F(a.n);return function(e,a,t=!1){const c=e.length,f=T(a),d=F(a);if(c<16||c1024)throw new Error(`expected ${d}-1024 bytes of input, got ${c}`);const r=k(t?l(e):u(e),a-E)+E;return t?p(r,f):h(r,f)}(a.randomBytes(e),a.n)},precompute:(e=8,a=i.BASE)=>(a._setWindowSize(e),a.multiply(BigInt(3)),a)};function L(e){const a=e instanceof Uint8Array,t="string"==typeof e,c=(a||t)&&e.length;return a?c===f||c===d:t?c===2*f||c===2*d:e instanceof i}const S=a.bits2int||function(e){const t=l(e),c=8*e.length-a.nBitLength;return c>0?t>>BigInt(c):t},N=a.bits2int_modN||function(e){return r(S(e))},P=x(a.nBitLength);function O(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(K<=e&&ee in f)))throw new Error("sign() legacy options not supported");const{hash:d,randomBytes:b}=a;let{lowS:s,prehash:l,extraEntropy:u}=f;null==s&&(s=!0),e=g("msgHash",e),l&&(e=g("prehashed msgHash",d(e)));const h=N(e),p=o(c),x=[O(p),O(h)];if(null!=u){const e=!0===u?b(t.BYTES):u;x.push(g("extraEntropy",e))}const y=m(...x),v=h;return{seed:y,k2sig:function(e){const a=S(e);if(!A(a))return;const t=n(a),c=i.BASE.multiply(a).toAffine(),f=r(c.x);if(f===K)return;const d=r(t*r(v+f*p));if(d===K)return;let b=(c.x===f?0:2)|Number(c.y&V),o=d;return s&&I(d)&&(o=function(e){return I(e)?r(-e):e}(d),b^=1),new M(f,o,b)}}}(e,c,f),s=a;return v(s.hash.outputLen,s.nByteLength,s.hmac)(d,b)},verify:function(e,t,c,f=Q){const d=e;if(t=g("msgHash",t),c=g("publicKey",c),"strict"in f)throw new Error("options.strict was renamed to lowS");const{lowS:b,prehash:o}=f;let s,l;try{if("string"==typeof d||d instanceof Uint8Array)try{s=M.fromDER(d)}catch(e){if(!(e instanceof z.Err))throw e;s=M.fromCompact(d)}else{if("object"!=typeof d||"bigint"!=typeof d.r||"bigint"!=typeof d.s)throw new Error("PARSE");{const{r:e,s:a}=d;s=new M(e,a)}}l=i.fromHex(c)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(b&&s.hasHighS())return!1;o&&(t=a.hash(t));const{r:u,s:h}=s,p=N(t),m=n(h),x=r(p*m),y=r(u*m),A=i.BASE.multiplyAndAddUnsafe(l,x,y)?.toAffine();return!!A&&r(A.x)===u},ProjectivePoint:i,Signature:M,utils:B}}function W(e){return{hash:e,hmac:(a,...t)=>(0,Q.w)(e,a,(0,U.Id)(...t)),randomBytes:U.po}}BigInt(4);const Y=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),X=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ee=BigInt(1),ae=BigInt(2),te=(e,a)=>(e+a/ae)/a;const ce=function(e,a,t=!1,c={}){if(e<=I)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:f,nByteLength:d}=D(e,a);if(d>2048)throw new Error("Field lengths over 2048 bytes are not supported");const r=function(e){if(e%B===M){const a=(e+E)/B;return function(e,t){const c=e.pow(t,a);if(!e.eql(e.sqr(c),t))throw new Error("Cannot find square root");return c}}if(e%S===L){const a=(e-L)/S;return function(e,t){const c=e.mul(t,C),f=e.pow(c,a),d=e.mul(t,f),r=e.mul(e.mul(d,C),f),n=e.mul(d,e.sub(r,e.ONE));if(!e.eql(e.sqr(n),t))throw new Error("Cannot find square root");return n}}return function(e){const a=(e-E)/C;let t,c,f;for(t=e-E,c=0;t%C===I;t/=C,c++);for(f=C;fk(a,e),isValid:a=>{if("bigint"!=typeof a)throw new Error("Invalid field element: expected bigint, got "+typeof a);return I<=a&&ae===I,isOdd:e=>(e&E)===E,neg:a=>k(-a,e),eql:(e,a)=>e===a,sqr:a=>k(a*a,e),add:(a,t)=>k(a+t,e),sub:(a,t)=>k(a-t,e),mul:(a,t)=>k(a*t,e),pow:(e,a)=>function(e,a,t){if(t 0");if(t===I)return e.ONE;if(t===E)return a;let c=e.ONE,f=a;for(;t>I;)t&E&&(c=e.mul(c,f)),f=e.sqr(f),t>>=E;return c}(n,e,a),div:(a,t)=>k(a*R(t,e),e),sqrN:e=>e*e,addN:(e,a)=>e+a,subN:(e,a)=>e-a,mulN:(e,a)=>e*a,inv:a=>R(a,e),sqrt:c.sqrt||(e=>r(n,e)),invertBatch:e=>function(e,a){const t=new Array(a.length),c=a.reduce(((a,c,f)=>e.is0(c)?a:(t[f]=a,e.mul(a,c))),e.ONE),f=e.inv(c);return a.reduceRight(((a,c,f)=>e.is0(c)?a:(t[f]=e.mul(a,t[f]),e.mul(a,c))),f),t}(n,e),cmov:(e,a,t)=>t?a:e,toBytes:e=>t?p(e,d):h(e,d),fromBytes:e=>{if(e.length!==d)throw new Error(`Fp.fromBytes: expected ${d}, got ${e.length}`);return t?u(e):l(e)}});return Object.freeze(n)}(Y,void 0,void 0,{sqrt:function(e){const a=Y,t=BigInt(3),c=BigInt(6),f=BigInt(11),d=BigInt(22),r=BigInt(23),n=BigInt(44),i=BigInt(88),b=e*e*e%a,o=b*b*e%a,s=P(o,t,a)*o%a,l=P(s,t,a)*o%a,u=P(l,ae,a)*b%a,h=P(u,f,a)*u%a,p=P(h,d,a)*h%a,g=P(p,n,a)*p%a,m=P(g,i,a)*g%a,x=P(m,n,a)*p%a,y=P(x,t,a)*o%a,A=P(y,r,a)*h%a,v=P(A,c,a)*b%a,w=P(v,ae,a);if(!ce.eql(ce.sqr(w),e))throw new Error("Cannot find square root");return w}}),fe=function(e,a){const t=a=>J({...e,...W(a)});return Object.freeze({...t(a),create:t})}({a:BigInt(0),b:BigInt(7),Fp:ce,n:X,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const a=X,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),c=-ee*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),f=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),d=t,r=BigInt("0x100000000000000000000000000000000"),n=te(d*e,a),i=te(-c*e,a);let b=k(e-n*t-i*f,a),o=k(-n*c-i*d,a);const s=b>r,l=o>r;if(s&&(b=a-b),l&&(o=a-o),b>r||o>r)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:s,k1:b,k2neg:l,k2:o}}}},f.s);BigInt(0),fe.ProjectivePoint;var de=t(57339),re=t(36212),ne=t(27033),ie=t(20260);class be{#ea;constructor(e){(0,de.MR)(32===(0,re.pO)(e),"invalid private key","privateKey","[REDACTED]"),this.#ea=(0,re.c$)(e)}get privateKey(){return this.#ea}get publicKey(){return be.computePublicKey(this.#ea)}get compressedPublicKey(){return be.computePublicKey(this.#ea,!0)}sign(e){(0,de.MR)(32===(0,re.pO)(e),"invalid digest length","digest",e);const a=fe.sign((0,re.Lm)(e),(0,re.Lm)(this.#ea),{lowS:!0});return ie.t.from({r:(0,ne.up)(a.r,32),s:(0,ne.up)(a.s,32),v:a.recovery?28:27})}computeSharedSecret(e){const a=be.computePublicKey(e);return(0,re.c$)(fe.getSharedSecret((0,re.Lm)(this.#ea),(0,re.q5)(a),!1))}static computePublicKey(e,a){let t=(0,re.q5)(e,"key");if(32===t.length){const e=fe.getPublicKey(t,!!a);return(0,re.c$)(e)}if(64===t.length){const e=new Uint8Array(65);e[0]=4,e.set(t,1),t=e}const c=fe.ProjectivePoint.fromHex(t);return(0,re.c$)(c.toRawBytes(a))}static recoverPublicKey(e,a){(0,de.MR)(32===(0,re.pO)(e),"invalid digest length","digest",e);const t=ie.t.from(a);let c=fe.Signature.fromCompact((0,re.Lm)((0,re.xW)([t.r,t.s])));c=c.addRecoveryBit(t.yParity);const f=c.recoverPublicKey((0,re.Lm)(e));return(0,de.MR)(null!=f,"invalid signautre for digest","signature",a),"0x"+f.toHex(!1)}static addPoints(e,a,t){const c=fe.ProjectivePoint.fromHex(be.computePublicKey(e).substring(2)),f=fe.ProjectivePoint.fromHex(be.computePublicKey(a).substring(2));return"0x"+c.add(f).toHex(!!t)}}},38264:(e,a,t)=>{"use strict";t.d(a,{id:()=>d});var c=t(15539),f=t(87303);function d(e){return(0,c.S)((0,f.YW)(e))}},64563:(e,a,t)=>{"use strict";t.d(a,{Wh:()=>Ee,kM:()=>Ie});var c=t(15539),f=t(57339),d=t(87303),r=t(36212),n="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const i=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),b=4;function o(e){return function(e){let a=0;return()=>e[a++]}(function(e){let a=0;function t(){return e[a++]<<8|e[a++]}let c=t(),f=1,d=[0,1];for(let e=1;e>--i&1}const s=2**31,l=s>>>1,u=l>>1,h=s-1;let p=0;for(let e=0;e<31;e++)p=p<<1|o();let g=[],m=0,x=s;for(;;){let e=Math.floor(((p-m+1)*f-1)/x),a=0,t=c;for(;t-a>1;){let c=a+t>>>1;e>>1|o(),r=r<<1^l,n=(n^l)<<1|l|1;m=r,x=1+n-r}let y=c-4;return g.map((a=>{switch(a-y){case 3:return y+65792+(e[n++]<<16|e[n++]<<8|e[n++]);case 2:return y+256+(e[n++]<<8|e[n++]);case 1:return y+e[n++];default:return a-1}}))}(function(e){let a=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,t)=>a[e.charCodeAt(0)]=t));let t=e.length,c=new Uint8Array(6*t>>3);for(let f=0,d=0,r=0,n=0;f=8&&(c[d++]=n>>(r-=8));return c}(e)))}function s(e){return 1&e?~e>>1:e>>1}function l(e,a){let t=Array(e);for(let c=0,f=0;c{let a=u(e);if(a.length)return a}))}function p(e){let a=[];for(;;){let t=e();if(0==t)break;a.push(x(t,e))}for(;;){let t=e()-1;if(t<0)break;a.push(y(t,e))}return a.flat()}function g(e){let a=[];for(;;){let t=e(a.length);if(!t)break;a.push(t)}return a}function m(e,a,t){let c=Array(e).fill().map((()=>[]));for(let f=0;fc[a].push(e)));return c}function x(e,a){let t=1+a(),c=a(),f=g(a);return m(f.length,1+e,a).flatMap(((e,a)=>{let[d,...r]=e;return Array(f[a]).fill().map(((e,a)=>{let f=a*c;return[d+a*t,r.map((e=>e+f))]}))}))}function y(e,a){return m(1+a(),1+e,a).map((e=>[e[0],e.slice(1)]))}function A(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function v(e){let a=e.length;if(a<4096)return String.fromCodePoint(...e);let t=[];for(let c=0;c>24&255}function O(e){return 16777215&e}let D,T,F,Q;function U(e){return e>=I&&e=E&&e=C&&aM&&ae.map((e=>[e,a+1<<24]))))),T=new Set(u(e)),F=new Map,Q=new Map;for(let[a,t]of p(e)){if(!T.has(a)&&2==t.length){let[e,c]=t,f=Q.get(e);f||(f=new Map,Q.set(e,f)),f.set(c,a)}F.set(a,t.reverse())}}();let a=[],t=[],c=!1;function f(e){let t=D.get(e);t&&(c=!0,e|=t),a.push(e)}for(let c of e)for(;;){if(c<128)a.push(c);else if(U(c)){let e=c-I,a=e%L/B|0,t=e%B;f(E+(e/L|0)),f(C+a),t>0&&f(M+t)}else{let e=F.get(c);e?t.push(...e):f(c)}if(!t.length)break;c=t.pop()}if(c&&a.length>1){let e=R(a[0]);for(let t=1;t0&&f>=e)0==e?(a.push(c,...t),t.length=0,c=r):t.push(r),f=e;else{let d=j(c,r);d>=0?c=d:0==f&&0==e?(a.push(c),c=r):(t.push(r),f=e)}}return c>=0&&a.push(c,...t),a}(H(e))}const G=45,z=".",K=65039,V=1,Z=e=>Array.from(e);function J(e,a){return e.P.has(a)||e.Q.has(a)}class W extends Array{get is_emoji(){return!0}}let Y,X,ee,ae,te,ce,fe,de,re,ne,ie,be;function oe(){if(Y)return;let e=o(n);const a=()=>u(e),t=()=>new Set(a()),c=(e,a)=>a.forEach((a=>e.add(a)));Y=new Map(p(e)),X=t(),ee=a(),ae=new Set(a().map((e=>ee[e]))),ee=new Set(ee),te=t(),ce=t();let f=h(e),d=e();const r=()=>{let e=new Set;return a().forEach((a=>c(e,f[a]))),c(e,a()),e};fe=g((a=>{let t=g(e).map((e=>e+96));if(t.length){let c=a>=d;return t[0]-=32,t=v(t),c&&(t=`Restricted[${t}]`),{N:t,P:r(),Q:r(),M:!e(),R:c}}})),de=t(),re=new Map;let i=a().concat(Z(de)).sort(((e,a)=>e-a));i.forEach(((a,t)=>{let c=e(),f=i[t]=c?i[t-c]:{V:[],M:new Map};f.V.push(a),de.has(a)||re.set(a,f)}));for(let{V:e,M:a}of new Set(re.values())){let t=[];for(let a of e){let e=fe.filter((e=>J(e,a))),f=t.find((({G:a})=>e.some((e=>a.has(e)))));f||(f={G:new Set,V:[]},t.push(f)),f.V.push(a),c(f.G,e)}let f=t.flatMap((e=>Z(e.G)));for(let{G:e,V:c}of t){let t=new Set(f.filter((a=>!e.has(a))));for(let e of c)a.set(e,t)}}ne=new Set;let b=new Set;const s=e=>ne.has(e)?b.add(e):ne.add(e);for(let e of fe){for(let a of e.P)s(a);for(let a of e.Q)s(a)}for(let e of ne)re.has(e)||b.has(e)||re.set(e,V);c(ne,$(ne)),ie=function(e){let a=[],t=u(e);return function e({S:t,B:c},f,d){if(!(4&t&&d===f[f.length-1])){2&t&&(d=f[f.length-1]),1&t&&a.push(f);for(let a of c)for(let t of a.Q)e(a,[...f,t],d)}}(function a(c){return{S:e(),B:g((()=>{let c=u(e).map((e=>t[e]));if(c.length)return a(c)})),Q:c}}([]),[]),a}(e).map((e=>W.from(e))).sort(w),be=new Map;for(let e of ie){let a=[be];for(let t of e){let e=a.map((e=>{let a=e.get(t);return a||(a=new Map,e.set(t,a)),a}));t===K?a.push(...e):a=e}for(let t of a)t.V=e}}function se(e){return(he(e)?"":`${le(ue([e]))} `)+A(e)}function le(e){return`"${e}"‎`}function ue(e,a=1/0,t=A){let c=[];var f;f=e[0],oe(),ee.has(f)&&c.push("◌"),e.length>a&&(a>>=1,e=[...e.slice(0,a),8230,...e.slice(-a)]);let d=0,r=e.length;for(let a=0;a{let f=function(e){let a=[];for(let t=0,c=e.length;t0;)if(95!==e[--a])throw new Error("underscore allowed only at start")}(n),!(d.emoji=r>1||c[0].is_emoji)&&n.every((e=>e<128)))!function(e){if(e.length>=4&&e[2]==G&&e[3]==G)throw new Error(`invalid label extension: "${v(e.slice(0,4))}"`)}(n),e="ASCII";else{let a=c.flatMap((e=>e.is_emoji?[]:e));if(a.length){if(ee.has(n[0]))throw xe("leading combining mark");for(let e=1;eJ(e,t)));if(!e.length)throw fe.some((e=>J(e,t)))?me(a[0],t):ge(t);if(a=e,1==e.length)break}return a}(t);!function(e,a){for(let t of a)if(!J(e,t))throw me(e,t);if(e.M){let e=$(a);for(let a=1,t=e.length;ab)throw new Error(`excessive non-spacing marks: ${le(ue(e.slice(a-1,c)))} (${c-a}/${b})`);a=c}}}(f,a),function(e,a){let t,c=[];for(let e of a){let a=re.get(e);if(a===V)return;if(a){let c=a.M.get(e);if(t=t?t.filter((e=>c.has(e))):Z(c),!t.length)return}else c.push(e)}if(t)for(let a of t)if(c.every((e=>J(a,e))))throw new Error(`whole-script confusable: ${e.N}/${a.N}`)}(f,t),e=f.N}else e="Emoji"}d.type=e}catch(e){d.error=e}return d}))}function ge(e){return new Error(`disallowed character: ${se(e)}`)}function me(e,a){let t=se(a),c=fe.find((e=>e.P.has(a)));return c&&(t=`${c.N} ${t}`),new Error(`illegal mixture: ${e.N} + ${t}`)}function xe(e){return new Error(`illegal placement: ${e}`)}function ye(e){return e.filter((e=>e!=K))}function Ae(e,a){let t,c=be,f=e.length;for(;f&&(c=c.get(e[--f]),c);){let{V:d}=c;d&&(t=d,a&&a.push(...e.slice(f).reverse()),e.length=f)}return t}const ve=new Uint8Array(32);function we(e){return(0,f.MR)(0!==e.length,"invalid ENS name; empty component","comp",e),e}function _e(e){const a=(0,d.YW)(function(e){try{if(0===e.length)throw new Error("empty label");return function(e){return function(e){return e.map((({input:a,error:t,output:c})=>{if(t){let c=t.message;throw new Error(1==e.length?c:`Invalid label ${le(ue(a,63))}: ${c}`)}return v(c)})).join(z)}(pe(e,q,ye))}(e)}catch(a){(0,f.MR)(!1,`invalid ENS name (${a.message})`,"name",e)}}(e)),t=[];if(0===e.length)return t;let c=0;for(let e=0;e{(0,f.MR)(a.length<=t,`label ${JSON.stringify(e)} exceeds ${t} bytes`,"name",e);const c=new Uint8Array(a.length+1);return c.set(a,1),c[0]=c.length-1,c}))))+"00"}ve.fill(0)},43948:(e,a,t)=>{"use strict";t.d(a,{J9:()=>s,VS:()=>l,eB:()=>u,tG:()=>h,uI:()=>g,z5:()=>p});var c=t(88081),f=t(36212),d=t(27033),r=t(57339),n=t(8177);const i=BigInt(0);function b(e){return null==e?null:e}function o(e){return null==e?null:e.toString()}class s{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,a,t){(0,c.n)(this,{gasPrice:b(e),maxFeePerGas:b(a),maxPriorityFeePerGas:b(t)})}toJSON(){const{gasPrice:e,maxFeePerGas:a,maxPriorityFeePerGas:t}=this;return{_type:"FeeData",gasPrice:o(e),maxFeePerGas:o(a),maxPriorityFeePerGas:o(t)}}}function l(e){const a={};e.to&&(a.to=e.to),e.from&&(a.from=e.from),e.data&&(a.data=(0,f.c$)(e.data));const t="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const c of t)c in e&&null!=e[c]&&(a[c]=(0,d.Ab)(e[c],`request.${c}`));const c="type,nonce".split(/,/);for(const t of c)t in e&&null!=e[t]&&(a[t]=(0,d.WZ)(e[t],`request.${t}`));return e.accessList&&(a.accessList=(0,n.$)(e.accessList)),"blockTag"in e&&(a.blockTag=e.blockTag),"enableCcipRead"in e&&(a.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(a.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(a.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(a.kzg=e.kzg),"blobs"in e&&e.blobs&&(a.blobs=e.blobs.map((e=>(0,f.f)(e)?(0,f.c$)(e):Object.assign({},e)))),a}class u{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#aa;constructor(e,a){this.#aa=e.transactions.map((e=>"string"!=typeof e?new g(e,a):e)),(0,c.n)(this,{provider:a,hash:b(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:b(e.prevRandao),extraData:e.extraData,baseFeePerGas:b(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#aa.map((e=>"string"==typeof e?e:e.hash))}get prefetchedTransactions(){const e=this.#aa.slice();return 0===e.length?[]:((0,r.vA)("object"==typeof e[0],"transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:a,extraData:t,gasLimit:c,gasUsed:f,hash:d,miner:r,prevRandao:n,nonce:i,number:b,parentHash:s,parentBeaconBlockRoot:l,stateRoot:u,receiptsRoot:h,timestamp:p,transactions:g}=this;return{_type:"Block",baseFeePerGas:o(e),difficulty:o(a),extraData:t,gasLimit:o(c),gasUsed:o(f),blobGasUsed:o(this.blobGasUsed),excessBlobGas:o(this.excessBlobGas),hash:d,miner:r,prevRandao:n,nonce:i,number:b,parentHash:s,timestamp:p,parentBeaconBlockRoot:l,stateRoot:u,receiptsRoot:h,transactions:g}}[Symbol.iterator](){let e=0;const a=this.transactions;return{next:()=>enew h(e,a))));let t=i;null!=e.effectiveGasPrice?t=e.effectiveGasPrice:null!=e.gasPrice&&(t=e.gasPrice),(0,c.n)(this,{provider:a,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:t,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#ta}toJSON(){const{to:e,from:a,contractAddress:t,hash:c,index:f,blockHash:d,blockNumber:r,logsBloom:n,logs:i,status:b,root:s}=this;return{_type:"TransactionReceipt",blockHash:d,blockNumber:r,contractAddress:t,cumulativeGasUsed:o(this.cumulativeGasUsed),from:a,gasPrice:o(this.gasPrice),blobGasUsed:o(this.blobGasUsed),blobGasPrice:o(this.blobGasPrice),gasUsed:o(this.gasUsed),hash:c,index:f,logs:i,logsBloom:n,root:s,status:b,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(b)return null;const{blockNumber:e,nonce:a}=await(0,c.k)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(a{if(null==e||0!==e.status)return e;(0,r.vA)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},l=await this.provider.getTransactionReceipt(this.hash);if(0===t)return s(l);if(l){if(await l.confirmations()>=t)return s(l)}else if(await o(),0===t)return null;const u=new Promise(((e,a)=>{const c=[],n=()=>{c.forEach((e=>e()))};if(c.push((()=>{b=!0})),f>0){const e=setTimeout((()=>{n(),a((0,r.xz)("wait for transaction timeout","TIMEOUT"))}),f);c.push((()=>{clearTimeout(e)}))}const i=async c=>{if(await c.confirmations()>=t){n();try{e(s(c))}catch(e){a(e)}}};if(c.push((()=>{this.provider.off(this.hash,i)})),this.provider.on(this.hash,i),d>=0){const e=async()=>{try{await o()}catch(e){if((0,r.bJ)(e,"TRANSACTION_REPLACED"))return n(),void a(e)}b||this.provider.once("block",e)};c.push((()=>{this.provider.off("block",e)})),this.provider.once("block",e)}}));return await u}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return(0,r.vA)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),x(this)}reorderedEvent(e){return(0,r.vA)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,r.vA)(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),m(this,e)}replaceableTransaction(e){(0,r.MR)(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const a=new g(this,this.provider);return a.#ca=e,a}}function m(e,a){return{orphan:"reorder-transaction",tx:e,other:a}}function x(e){return{orphan:"drop-transaction",tx:e}}},8177:(e,a,t)=>{"use strict";t.d(a,{$:()=>n});var c=t(30031),f=t(57339),d=t(36212);function r(e,a){return{address:(0,c.b)(e),storageKeys:a.map(((e,a)=>((0,f.MR)((0,d.Lo)(e,32),"invalid slot",`storageKeys[${a}]`,e),e.toLowerCase())))}}function n(e){if(Array.isArray(e))return e.map(((a,t)=>Array.isArray(a)?((0,f.MR)(2===a.length,"invalid slot set",`value[${t}]`,a),r(a[0],a[1])):((0,f.MR)(null!=a&&"object"==typeof a,"invalid address-slot set","value",e),r(a.address,a.storageKeys))));(0,f.MR)(null!=e&&"object"==typeof e,"invalid access list","value",e);const a=Object.keys(e).map((a=>{const t=e[a].reduce(((e,a)=>(e[a]=!0,e)),{});return r(a,Object.keys(t).sort())}));return a.sort(((e,a)=>e.address.localeCompare(a.address))),a}},20415:(e,a,t)=>{"use strict";t.d(a,{K:()=>r,x:()=>n});var c=t(30031),f=t(15496),d=t(15539);function r(e){let a;return a="string"==typeof e?f.h.computePublicKey(e,!1):e.publicKey,(0,c.b)((0,d.S)("0x"+a.substring(4)).substring(26))}function n(e,a){return r(f.h.recoverPublicKey(e,a))}},79453:(e,a,t)=>{"use strict";t.d(a,{Z:()=>D});var c=t(30031),f=t(98982),d=t(68650),r=t(20260),n=t(15539),i=t(15496),b=t(57339),o=t(27033),s=t(36212);function l(e){let a=e.toString(16);for(;a.length<2;)a="0"+a;return"0x"+a}function u(e,a,t){let c=0;for(let f=0;f{(0,b.vA)(a<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:a})};if(e[a]>=248){const c=e[a]-247;t(a+1+c);const f=u(e,a+1,c);return t(a+1+c+f),h(e,a,a+1+c,c+f)}if(e[a]>=192){const c=e[a]-192;return t(a+1+c),h(e,a,a+1,c)}if(e[a]>=184){const c=e[a]-183;t(a+1+c);const f=u(e,a+1,c);return t(a+1+c+f),{consumed:1+c+f,result:(0,s.c$)(e.slice(a+1+c,a+1+c+f))}}if(e[a]>=128){const c=e[a]-128;return t(a+1+c),{consumed:1+c,result:(0,s.c$)(e.slice(a+1,a+1+c))}}return{consumed:1,result:l(e[a])}}function g(e){const a=(0,s.q5)(e,"data"),t=p(a,0);return(0,b.MR)(t.consumed===a.length,"unexpected junk after rlp payload","data",e),t.result}var m=t(65735),x=t(8177),y=t(20415);const A=BigInt(0),v=BigInt(2),w=BigInt(27),_=BigInt(28),I=BigInt(35),E=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),C=131072;function M(e,a){let t=e.toString(16);for(;t.length<2;)t="0"+t;return t+=(0,d.s)(a).substring(4),"0x"+t}function B(e){return"0x"===e?null:(0,c.b)(e)}function L(e,a){try{return(0,x.$)(e)}catch(t){(0,b.MR)(!1,t.message,a,e)}}function S(e,a){return"0x"===e?0:(0,o.WZ)(e,a)}function k(e,a){if("0x"===e)return A;const t=(0,o.Ab)(e,a);return(0,b.MR)(t<=E,"value exceeds uint size",a,t),t}function N(e,a){const t=(0,o.Ab)(e,"value"),c=(0,o.c4)(t);return(0,b.MR)(c.length<=32,"value too large",`tx.${a}`,t),c}function P(e){return(0,x.$)(e).map((e=>[e.address,e.storageKeys]))}function R(e,a){(0,b.MR)(Array.isArray(e),`invalid ${a}`,"value",e);for(let a=0;aObject.assign({},e)))}set blobs(e){if(null==e)return void(this.#ma=null);const a=[],t=[];for(let c=0;ce.data)),t.map((e=>e.commitment)),t.map((e=>e.proof))])]):(0,s.xW)(["0x03",(0,m.R)(c)])}(this,t,a?this.blobs:null)}(0,b.vA)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#xa(!0,!0)}get unsignedSerialized(){return this.#xa(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,a=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,t=null!=this.accessList,c=null!=this.#ha||this.#pa;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&(0,b.vA)(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),(0,b.vA)(!a||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),(0,b.vA)(0!==this.type||!t,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const f=[];return null!=this.type?f.push(this.type):a?f.push(2):e?(f.push(1),t||f.push(0)):t?(f.push(1),f.push(2)):(c&&this.to||(f.push(0),f.push(1),f.push(2)),f.push(3)),f.sort(),f}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return D.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new D;if("string"==typeof e){const a=(0,s.q5)(e);if(a[0]>=127)return D.from(function(e){const a=g(e);(0,b.MR)(Array.isArray(a)&&(9===a.length||6===a.length),"invalid field count for legacy transaction","data",e);const t={type:0,nonce:S(a[0],"nonce"),gasPrice:k(a[1],"gasPrice"),gasLimit:k(a[2],"gasLimit"),to:B(a[3]),value:k(a[4],"value"),data:(0,s.c$)(a[5]),chainId:A};if(6===a.length)return t;const c=k(a[6],"v"),f=k(a[7],"r"),d=k(a[8],"s");if(f===A&&d===A)t.chainId=c;else{let e=(c-I)/v;e{"use strict";t.d(a,{Lm:()=>r,Lo:()=>n,X_:()=>g,ZG:()=>u,c$:()=>o,f:()=>i,nx:()=>p,pO:()=>l,q5:()=>d,xW:()=>s});var c=t(57339);function f(e,a,t){if(e instanceof Uint8Array)return t?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const a=new Uint8Array((e.length-2)/2);let t=2;for(let c=0;c>4]+b[15&c]}return t}function s(e){return"0x"+e.map((e=>o(e).substring(2))).join("")}function l(e){return n(e,!0)?(e.length-2)/2:d(e).length}function u(e,a,t){const f=d(e);return null!=t&&t>f.length&&(0,c.vA)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:f,length:f.length,offset:t}),o(f.slice(null==a?0:a,null==t?f.length:t))}function h(e,a,t){const f=d(e);(0,c.vA)(a>=f.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(f),length:a,offset:a+1});const r=new Uint8Array(a);return r.fill(0),t?r.set(f,a-f.length):r.set(f,0),o(r)}function p(e,a){return h(e,a,!0)}function g(e,a){return h(e,a,!1)}},57339:(e,a,t)=>{"use strict";t.d(a,{E:()=>n,MR:()=>o,SP:()=>u,bJ:()=>r,dd:()=>s,gk:()=>h,vA:()=>b,xz:()=>i});var c=t(99529),f=t(88081);function d(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(d).join(", ")+" ]";if(e instanceof Uint8Array){const a="0123456789abcdef";let t="0x";for(let c=0;c>4],t+=a[15&e[c]];return t}if("object"==typeof e&&"function"==typeof e.toJSON)return d(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const a=Object.keys(e);return a.sort(),"{ "+a.map((a=>`${d(a)}: ${d(e[a])}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function r(e,a){return e&&e.code===a}function n(e){return r(e,"CALL_EXCEPTION")}function i(e,a,t){let r,n=e;{const f=[];if(t){if("message"in t||"code"in t||"name"in t)throw new Error(`value will overwrite populated values: ${d(t)}`);for(const e in t){if("shortMessage"===e)continue;const a=t[e];f.push(e+"="+d(a))}}f.push(`code=${a}`),f.push(`version=${c.r}`),f.length&&(e+=" ("+f.join(", ")+")")}switch(a){case"INVALID_ARGUMENT":r=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":r=new RangeError(e);break;default:r=new Error(e)}return(0,f.n)(r,{code:a}),t&&Object.assign(r,t),null==r.shortMessage&&(0,f.n)(r,{shortMessage:n}),r}function b(e,a,t,c){if(!e)throw i(a,t,c)}function o(e,a,t,c){b(e,a,"INVALID_ARGUMENT",{argument:t,value:c})}function s(e,a,t){null==t&&(t=""),t&&(t=": "+t),b(e>=a,"missing arguemnt"+t,"MISSING_ARGUMENT",{count:e,expectedCount:a}),b(e<=a,"too many arguments"+t,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:a})}const l=["NFD","NFC","NFKD","NFKC"].reduce(((e,a)=>{try{if("test"!=="test".normalize(a))throw new Error("bad");if("NFD"===a){if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken")}e.push(a)}catch(e){}return e}),[]);function u(e){b(l.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}function h(e,a,t){if(null==t&&(t=""),e!==a){let e=t,a="new";t&&(e+=".",a+=" "+t),b(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:a})}}},99381:(e,a,t)=>{"use strict";t.d(a,{z:()=>f});var c=t(88081);class f{filter;emitter;#ya;constructor(e,a,t){this.#ya=a,(0,c.n)(this,{emitter:e,filter:t})}async removeListener(){null!=this.#ya&&await this.emitter.off(this.filter,this.#ya)}}},27033:(e,a,t)=>{"use strict";t.d(a,{Ab:()=>s,Dg:()=>h,JJ:()=>b,Ro:()=>g,ST:()=>i,WZ:()=>p,c4:()=>x,dK:()=>o,nD:()=>y,up:()=>m});var c=t(36212),f=t(57339);const d=BigInt(0),r=BigInt(1),n=9007199254740991;function i(e,a){const t=l(e,"value"),c=BigInt(p(a,"width"));return(0,f.vA)(t>>c===d,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),t>>c-r?-((~t&(r<=-n&&e<=n,"overflow",a||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(t){(0,f.MR)(!1,`invalid BigNumberish string: ${t.message}`,a||"value",e)}}(0,f.MR)(!1,"invalid BigNumberish value",a||"value",e)}function l(e,a){const t=s(e,a);return(0,f.vA)(t>=d,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),t}const u="0123456789abcdef";function h(e){if(e instanceof Uint8Array){let a="0x0";for(const t of e)a+=u[t>>4],a+=u[15&t];return BigInt(a)}return s(e)}function p(e,a){switch(typeof e){case"bigint":return(0,f.MR)(e>=-n&&e<=n,"overflow",a||"value",e),Number(e);case"number":return(0,f.MR)(Number.isInteger(e),"underflow",a||"value",e),(0,f.MR)(e>=-n&&e<=n,"overflow",a||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return p(BigInt(e),a)}catch(t){(0,f.MR)(!1,`invalid numeric string: ${t.message}`,a||"value",e)}}(0,f.MR)(!1,"invalid numeric value",a||"value",e)}function g(e){return p(h(e))}function m(e,a){let t=l(e,"value").toString(16);if(null==a)t.length%2&&(t="0"+t);else{const c=p(a,"width");for((0,f.vA)(2*c>=t.length,`value exceeds width (${c} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});t.length<2*c;)t="0"+t}return"0x"+t}function x(e){const a=l(e,"value");if(a===d)return new Uint8Array([]);let t=a.toString(16);t.length%2&&(t="0"+t);const c=new Uint8Array(t.length/2);for(let e=0;e{"use strict";function c(e,a,t){const c=a.split("|").map((e=>e.trim()));for(let t=0;tPromise.resolve(e[a]))))).reduce(((e,t,c)=>(e[a[c]]=t,e)),{})}function d(e,a,t){for(let f in a){let d=a[f];const r=t?t[f]:null;r&&c(d,r,f),Object.defineProperty(e,f,{enumerable:!0,value:d,writable:!1})}}t.d(a,{k:()=>f,n:()=>d})},65735:(e,a,t)=>{"use strict";t.d(a,{R:()=>n});var c=t(36212);function f(e){const a=[];for(;e;)a.unshift(255&e),e>>=8;return a}function d(e){if(Array.isArray(e)){let a=[];if(e.forEach((function(e){a=a.concat(d(e))})),a.length<=55)return a.unshift(192+a.length),a;const t=f(a.length);return t.unshift(247+t.length),t.concat(a)}const a=Array.prototype.slice.call((0,c.q5)(e,"object"));if(1===a.length&&a[0]<=127)return a;if(a.length<=55)return a.unshift(128+a.length),a;const t=f(a.length);return t.unshift(183+t.length),t.concat(a)}const r="0123456789abcdef";function n(e){let a="0x";for(const t of d(e))a+=r[t>>4],a+=r[15&t];return a}},99770:(e,a,t)=>{"use strict";t.d(a,{ck:()=>y,g5:()=>A,XS:()=>x});var c=t(57339),f=t(36212),d=t(27033),r=t(88081);const n=BigInt(-1),i=BigInt(0),b=BigInt(1),o=BigInt(5),s={};let l="0000";for(;l.length<80;)l+=l;function u(e){let a=l;for(;a.length=-a&&ei?(0,d.ST)((0,d.dK)(e,f),f):-(0,d.ST)((0,d.dK)(-e,f),f)}else{const a=b<=0&&enull==d[e]?t:((0,c.MR)(typeof d[e]===a,"invalid fixed format ("+e+" not "+a+")","format."+e,d[e]),d[e]);a=r("signed","boolean",a),t=r("width","number",t),f=r("decimals","number",f)}return(0,c.MR)(t%8==0,"invalid FixedNumber width (not byte aligned)","format.width",t),(0,c.MR)(f<=80,"invalid FixedNumber decimals (too large)","format.decimals",f),{signed:a,width:t,decimals:f,name:(a?"":"u")+"fixed"+String(t)+"x"+String(f)}}class g{format;#Aa;#va;#wa;_value;constructor(e,a,t){(0,c.gk)(e,s,"FixedNumber"),this.#va=a,this.#Aa=t;const f=function(e,a){let t="";e0?t*=u(c):c<0&&(a*=u(-c)),at?1:0}eq(e){return 0===this.cmp(e)}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#va;return this.#vai&&(e+=this.#wa-b),e=this.#va/this.#wa*this.#wa,this.#Ia(e,"ceiling")}round(e){if(null==e&&(e=0),e>=this.decimals)return this;const a=this.decimals-e,t=o*u(a-1);let c=this.value+t;const f=u(a);return c=c/f*f,h(c,this.#Aa,"round"),new g(s,c,this.#Aa)}isZero(){return this.#va===i}isNegative(){return this.#va0){const a=u(b);(0,c.vA)(n%a===i,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),n/=a}else b<0&&(n*=u(-b));return h(n,r,"fromValue"),new g(s,n,r)}static fromString(e,a){const t=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,c.MR)(t&&t[2].length+t[3].length>0,"invalid FixedNumber string value","value",e);const f=p(a);let d=t[2]||"0",r=t[3]||"";for(;r.length=0,"invalid unit","unit",a),t=3*e}else null!=a&&(t=(0,d.WZ)(a,"unit"));return g.fromString(e,{decimals:t,width:512}).value}function y(e){return function(e){let a=18;return a=(0,d.WZ)(18,"unit"),g.fromValue(e,a,{decimals:a,width:512}).toString()}(e)}function A(e){return x(e,18)}},87303:(e,a,t)=>{"use strict";t.d(a,{YW:()=>n,_v:()=>i});var c=t(36212),f=t(57339);function d(e,a,t,c,f){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let c=a+1;c>6==2;c++)e++;return e}return"OVERRUN"===e?t.length-a-1:0}const r=Object.freeze({error:function(e,a,t,c,d){(0,f.MR)(!1,`invalid codepoint at offset ${a}; ${e}`,"bytes",t)},ignore:d,replace:function(e,a,t,c,r){return"OVERLONG"===e?((0,f.MR)("number"==typeof r,"invalid bad code point for replacement","badCodepoint",r),c.push(r),0):(c.push(65533),d(e,a,t))}});function n(e,a){(0,f.MR)("string"==typeof e,"invalid string value","str",e),null!=a&&((0,f.SP)(a),e=e.normalize(a));let t=[];for(let a=0;a>6|192),t.push(63&c|128);else if(55296==(64512&c)){a++;const d=e.charCodeAt(a);(0,f.MR)(a>18|240),t.push(r>>12&63|128),t.push(r>>6&63|128),t.push(63&r|128)}else t.push(c>>12|224),t.push(c>>6&63|128),t.push(63&c|128)}return new Uint8Array(t)}function i(e,a){return function(e,a){null==a&&(a=r.error);const t=(0,c.q5)(e,"bytes"),f=[];let d=0;for(;d>7)){f.push(e);continue}let c=null,r=null;if(192==(224&e))c=1,r=127;else if(224==(240&e))c=2,r=2047;else{if(240!=(248&e)){d+=a(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",d-1,t,f);continue}c=3,r=65535}if(d-1+c>=t.length){d+=a("OVERRUN",d-1,t,f);continue}let n=e&(1<<8-c-1)-1;for(let e=0;e1114111?d+=a("OUT_OF_RANGE",d-1-c,t,f,n):n>=55296&&n<=57343?d+=a("UTF16_SURROGATE",d-1-c,t,f,n):n<=r?d+=a("OVERLONG",d-1-c,t,f,n):f.push(n))}return f}(e,a).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}},27125:(e,a,t)=>{"use strict";function c(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function f(e,...a){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(a.length>0&&!a.includes(e.length))throw new Error(`Expected Uint8Array of length ${a}, not of length=${e.length}`)}function d(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");c(e.outputLen),c(e.blockLen)}function r(e,a=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(a&&e.finished)throw new Error("Hash#digest() has already been called")}function n(e,a){f(e);const t=a.outputLen;if(e.lengthn,ai:()=>c,ee:()=>f,t2:()=>r,tW:()=>d})},37171:(e,a,t)=>{"use strict";t.d(a,{D:()=>d});var c=t(27125),f=t(10750);class d extends f.Vw{constructor(e,a,t,c){super(),this.blockLen=e,this.outputLen=a,this.padOffset=t,this.isLE=c,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,f.O8)(this.buffer)}update(e){(0,c.t2)(this);const{view:a,buffer:t,blockLen:d}=this,r=(e=(0,f.ZJ)(e)).length;for(let c=0;cd-n&&(this.process(t,0),n=0);for(let e=n;e>f&d),n=Number(t&d),i=c?4:0,b=c?0:4;e.setUint32(a+i,r,c),e.setUint32(a+b,n,c)}(t,d-8,BigInt(8*this.length),r),this.process(t,0);const i=(0,f.O8)(e),b=this.outputLen;if(b%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const o=b/4,s=this.get();if(o>s.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e{"use strict";t.d(a,{Ay:()=>s,B4:()=>i,P5:()=>n,WM:()=>b,im:()=>o,lD:()=>r});const c=BigInt(2**32-1),f=BigInt(32);function d(e,a=!1){return a?{h:Number(e&c),l:Number(e>>f&c)}:{h:0|Number(e>>f&c),l:0|Number(e&c)}}function r(e,a=!1){let t=new Uint32Array(e.length),c=new Uint32Array(e.length);for(let f=0;fe<>>32-t,i=(e,a,t)=>a<>>32-t,b=(e,a,t)=>a<>>64-t,o=(e,a,t)=>e<>>64-t,s={fromBig:d,split:r,toBig:(e,a)=>BigInt(e>>>0)<>>0),shrSH:(e,a,t)=>e>>>t,shrSL:(e,a,t)=>e<<32-t|a>>>t,rotrSH:(e,a,t)=>e>>>t|a<<32-t,rotrSL:(e,a,t)=>e<<32-t|a>>>t,rotrBH:(e,a,t)=>e<<64-t|a>>>t-32,rotrBL:(e,a,t)=>e>>>t-32|a<<64-t,rotr32H:(e,a)=>a,rotr32L:(e,a)=>e,rotlSH:n,rotlSL:i,rotlBH:b,rotlBL:o,add:function(e,a,t,c){const f=(a>>>0)+(c>>>0);return{h:e+t+(f/2**32|0)|0,l:0|f}},add3L:(e,a,t)=>(e>>>0)+(a>>>0)+(t>>>0),add3H:(e,a,t,c)=>a+t+c+(e/2**32|0)|0,add4L:(e,a,t,c)=>(e>>>0)+(a>>>0)+(t>>>0)+(c>>>0),add4H:(e,a,t,c,f)=>a+t+c+f+(e/2**32|0)|0,add5H:(e,a,t,c,f,d)=>a+t+c+f+d+(e/2**32|0)|0,add5L:(e,a,t,c,f)=>(e>>>0)+(a>>>0)+(t>>>0)+(c>>>0)+(f>>>0)}},4655:(e,a,t)=>{"use strict";t.d(a,{w:()=>r});var c=t(27125),f=t(10750);class d extends f.Vw{constructor(e,a){super(),this.finished=!1,this.destroyed=!1,(0,c.tW)(e);const t=(0,f.ZJ)(a);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const d=this.blockLen,r=new Uint8Array(d);r.set(t.length>d?e.create().update(t).digest():t);for(let e=0;enew d(e,a).update(t).digest();r.create=(e,a)=>new d(e,a)},84877:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var c=t(27125),f=t(4655),d=t(10750);function r(e,a,t,r){const{c:n,dkLen:i,DK:b,PRF:o,PRFSalt:s}=function(e,a,t,r){(0,c.tW)(e);const n=(0,d.tY)({dkLen:32,asyncTick:10},r),{c:i,dkLen:b,asyncTick:o}=n;if((0,c.ai)(i),(0,c.ai)(b),(0,c.ai)(o),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const s=(0,d.ZJ)(a),l=(0,d.ZJ)(t),u=new Uint8Array(b),h=f.w.create(e,s),p=h._cloneInto().update(l);return{c:i,dkLen:b,asyncTick:o,DK:u,PRF:h,PRFSalt:p}}(e,a,t,r);let l;const u=new Uint8Array(4),h=(0,d.O8)(u),p=new Uint8Array(o.outputLen);for(let e=1,a=0;a{"use strict";t.d(a,{s:()=>o});var c=t(37171),f=t(10750);const d=(e,a,t)=>e&a^e&t^a&t,r=new Uint32Array([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]),n=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64);class b extends c.D{constructor(){super(64,32,8,!1),this.A=0|n[0],this.B=0|n[1],this.C=0|n[2],this.D=0|n[3],this.E=0|n[4],this.F=0|n[5],this.G=0|n[6],this.H=0|n[7]}get(){const{A:e,B:a,C:t,D:c,E:f,F:d,G:r,H:n}=this;return[e,a,t,c,f,d,r,n]}set(e,a,t,c,f,d,r,n){this.A=0|e,this.B=0|a,this.C=0|t,this.D=0|c,this.E=0|f,this.F=0|d,this.G=0|r,this.H=0|n}process(e,a){for(let t=0;t<16;t++,a+=4)i[t]=e.getUint32(a,!1);for(let e=16;e<64;e++){const a=i[e-15],t=i[e-2],c=(0,f.Ow)(a,7)^(0,f.Ow)(a,18)^a>>>3,d=(0,f.Ow)(t,17)^(0,f.Ow)(t,19)^t>>>10;i[e]=d+i[e-7]+c+i[e-16]|0}let{A:t,B:c,C:n,D:b,E:o,F:s,G:l,H:u}=this;for(let e=0;e<64;e++){const a=u+((0,f.Ow)(o,6)^(0,f.Ow)(o,11)^(0,f.Ow)(o,25))+((h=o)&s^~h&l)+r[e]+i[e]|0,p=((0,f.Ow)(t,2)^(0,f.Ow)(t,13)^(0,f.Ow)(t,22))+d(t,c,n)|0;u=l,l=s,s=o,o=b+a|0,b=n,n=c,c=t,t=a+p|0}var h;t=t+this.A|0,c=c+this.B|0,n=n+this.C|0,b=b+this.D|0,o=o+this.E|0,s=s+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(t,c,n,b,o,s,l,u)}roundClean(){i.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const o=(0,f.ld)((()=>new b))},10750:(e,a,t)=>{"use strict";t.d(a,{Vw:()=>l,$h:()=>b,tY:()=>h,Id:()=>s,O8:()=>r,po:()=>g,Ow:()=>n,ZJ:()=>o,DH:()=>d,ld:()=>p});const c="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,f=e=>e instanceof Uint8Array,d=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),r=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),n=(e,a)=>e<<32-a|e>>>a;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");const i=async()=>{};async function b(e,a,t){let c=Date.now();for(let f=0;f=0&&ee+a.length),0));let t=0;return e.forEach((e=>{if(!f(e))throw new Error("Uint8Array expected");a.set(e,t),t+=e.length})),a}class l{clone(){return this._cloneInto()}}const u={}.toString;function h(e,a){if(void 0!==a&&"[object Object]"!==u.call(a))throw new Error("Options should be object or undefined");return Object.assign(e,a)}function p(e){const a=a=>e().update(o(a)).digest(),t=e();return a.outputLen=t.outputLen,a.blockLen=t.blockLen,a.create=()=>e(),a}function g(e=32){if(c&&"function"==typeof c.getRandomValues)return c.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},63837:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},72079:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},3219:e=>{"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},62951:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},64589:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},23241:e=>{"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},1636:e=>{"use strict";e.exports={rE:"6.5.7"}},15579:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},__webpack_module_cache__={};function __webpack_require__(e){var a=__webpack_module_cache__[e];if(void 0!==a)return a.exports;var t=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(t.exports,t,t.exports,__webpack_require__),t.loaded=!0,t.exports}__webpack_require__.amdO={},__webpack_require__.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(a,{a}),a},__webpack_require__.d=(e,a)=>{for(var t in a)__webpack_require__.o(a,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{BatchBlockService:()=>d.B3,BatchEventsService:()=>d.JY,BatchTransactionService:()=>d.AF,Deposit:()=>r.dA,ENS__factory:()=>f.p2,ERC20__factory:()=>f.Xc,GET_DEPOSITS:()=>t.GET_DEPOSITS,GET_ECHO_EVENTS:()=>t.GET_ECHO_EVENTS,GET_ENCRYPTED_NOTES:()=>t.GET_ENCRYPTED_NOTES,GET_GOVERNANCE_APY:()=>t.GET_GOVERNANCE_APY,GET_GOVERNANCE_EVENTS:()=>t.GET_GOVERNANCE_EVENTS,GET_NOTE_ACCOUNTS:()=>t.GET_NOTE_ACCOUNTS,GET_REGISTERED:()=>t.GET_REGISTERED,GET_STATISTIC:()=>t.GET_STATISTIC,GET_WITHDRAWALS:()=>t.GET_WITHDRAWALS,INDEX_DB_ERROR:()=>b.Fl,IndexedDB:()=>b.mc,Invoice:()=>r.qO,MAX_FEE:()=>m.KN,MAX_TOVARISH_EVENTS:()=>y.o,MIN_FEE:()=>m.Ss,MIN_STAKE_BALANCE:()=>m.pO,MerkleTreeService:()=>o.s,Mimc:()=>s.p,Multicall__factory:()=>f.Q2,NetId:()=>u.zr,NoteAccount:()=>n.Ad,OffchainOracle__factory:()=>f.Hk,OvmGasPriceOracle__factory:()=>f.Ld,Pedersen:()=>h.Hr,RelayerClient:()=>m.OR,ReverseRecords__factory:()=>f.Rp,TokenPriceOracle:()=>p.T,TornadoBrowserProvider:()=>g.D2,TornadoFeeOracle:()=>i.o,TornadoRpcSigner:()=>g.Vr,TornadoVoidSigner:()=>g.Gd,TornadoWallet:()=>g.nA,TovarishClient:()=>y.E,_META:()=>t._META,addNetwork:()=>u.AE,addressSchemaType:()=>c.SC,ajv:()=>c.SS,base64ToBytes:()=>A.Kp,bigIntReplacer:()=>A.gn,bnSchemaType:()=>c.iL,bnToBytes:()=>A.jm,buffPedersenHash:()=>h.UB,bufferToBytes:()=>A.lY,bytes32BNSchemaType:()=>c.i1,bytes32SchemaType:()=>c.yF,bytesToBN:()=>A.Ju,bytesToBase64:()=>A.if,bytesToHex:()=>A.My,calculateScore:()=>m.zy,calculateSnarkProof:()=>v.i,chunk:()=>A.iv,concatBytes:()=>A.Id,convertETHToTokenAmount:()=>i.N,createDeposit:()=>r.Hr,crypto:()=>A.Et,customConfig:()=>u.cX,defaultConfig:()=>u.sb,defaultUserAgent:()=>g.mJ,depositsEventsSchema:()=>c.CI,digest:()=>A.br,downloadZip:()=>w._6,echoEventsSchema:()=>c.ME,enabledChains:()=>u.Af,encryptedNotesSchema:()=>c.XW,factories:()=>f.XB,fetch:()=>g.hd,fetchData:()=>g.Fd,fetchGetUrlFunc:()=>g.uY,getActiveTokenInstances:()=>u.oY,getActiveTokens:()=>u.h9,getAllDeposits:()=>t.getAllDeposits,getAllEncryptedNotes:()=>t.getAllEncryptedNotes,getAllGovernanceEvents:()=>t.getAllGovernanceEvents,getAllGraphEchoEvents:()=>t.getAllGraphEchoEvents,getAllRegisters:()=>t.getAllRegisters,getAllWithdrawals:()=>t.getAllWithdrawals,getConfig:()=>u.zj,getDeposits:()=>t.getDeposits,getEncryptedNotes:()=>t.getEncryptedNotes,getEventsSchemaValidator:()=>c.ZC,getGovernanceEvents:()=>t.getGovernanceEvents,getGraphEchoEvents:()=>t.getGraphEchoEvents,getHttpAgent:()=>g.WU,getIndexedDB:()=>b.W7,getInstanceByAddress:()=>u.Zh,getMeta:()=>t.getMeta,getNetworkConfig:()=>u.RY,getNoteAccounts:()=>t.getNoteAccounts,getProvider:()=>g.sO,getProviderWithNetId:()=>g.MF,getRegisters:()=>t.getRegisters,getRelayerEnsSubdomains:()=>u.o2,getStatistic:()=>t.getStatistic,getStatusSchema:()=>c.c_,getSupportedInstances:()=>m.XF,getTokenBalances:()=>x.H,getWeightRandom:()=>m.c$,getWithdrawals:()=>t.getWithdrawals,governanceEventsSchema:()=>c.FR,hexToBytes:()=>A.aT,initGroth16:()=>v.O,isNode:()=>A.Ll,jobsSchema:()=>c.Us,leBuff2Int:()=>A.ae,leInt2Buff:()=>A.EI,mimc:()=>s.f,multicall:()=>l.C,packEncryptedMessage:()=>n.Fr,pedersen:()=>h.NO,pickWeightedRandomRelayer:()=>m.sN,populateTransaction:()=>g.zr,proofSchemaType:()=>c.Y6,queryGraph:()=>t.queryGraph,rBigInt:()=>A.ib,registeredEventsSchema:()=>c.dX,sleep:()=>A.yy,substring:()=>A.uU,toFixedHex:()=>A.$W,toFixedLength:()=>A.sY,unpackEncryptedMessage:()=>n.ol,unzipAsync:()=>w.fY,validateUrl:()=>A.wv,withdrawalsEventsSchema:()=>c.$j,zipAsync:()=>w.a8});var e=__webpack_require__(94513),a={};for(const t in e)"default"!==t&&(a[t]=()=>e[t]);__webpack_require__.d(__webpack_exports__,a);var t=__webpack_require__(52049),c=__webpack_require__(59511),f=__webpack_require__(21278),d=__webpack_require__(9723),r=__webpack_require__(7240),n=__webpack_require__(33298),i=__webpack_require__(37182),b=__webpack_require__(83968),o=__webpack_require__(5217),s=__webpack_require__(22901),l=__webpack_require__(48486),u=__webpack_require__(59499),h=__webpack_require__(85111),p=__webpack_require__(34525),g=__webpack_require__(68434),m=__webpack_require__(57194),x=__webpack_require__(7393),y=__webpack_require__(96838),A=__webpack_require__(67418),v=__webpack_require__(26746),w=__webpack_require__(18995)})(),__webpack_exports__})())); \ No newline at end of file diff --git a/dist/tornadoContracts.umd.js b/dist/tornadoContracts.umd.js index 8e8558d..a47230f 100644 --- a/dist/tornadoContracts.umd.js +++ b/dist/tornadoContracts.umd.js @@ -641,7 +641,7 @@ const shake256 = /* @__PURE__ */ (/* unused pure expression or super */ null && /** * The current version of Ethers. */ -const version = "6.13.2"; +const version = "6.13.3"; //# sourceMappingURL=_version.js.map ;// ./node_modules/ethers/lib.esm/utils/properties.js /** diff --git a/dist/tornadoContracts.umd.min.js b/dist/tornadoContracts.umd.min.js index 6338f57..2546506 100644 --- a/dist/tornadoContracts.umd.min.js +++ b/dist/tornadoContracts.umd.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.TornadoContracts=t():e.TornadoContracts=t()}(self,(()=>(()=>{"use strict";var e={d:(t,a)=>{for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{AdminUpgradeableProxy__factory:()=>Gs,Aggregator__factory:()=>Qb,AirdropMock__factory:()=>Sf,Airdrop__factory:()=>ed,BadRecipient__factory:()=>tb,CTornado__factory:()=>Fb,Configuration__factory:()=>Ui,Core__factory:()=>Li,Delegation__factory:()=>Gi,Deployer__factory:()=>df,DummySecond__factory:()=>ri,Dummy__factory:()=>ii,ENSMock__factory:()=>Lf,ENS__factory:()=>Ef,ERC20Basic__factory:()=>Jn,ERC20Burnable__factory:()=>Cn,ERC20Mock__factory:()=>bb,ERC20Permit__factory:()=>ad,ERC20Tornado__factory:()=>Rb,ERC20__factory:()=>Pn,ETHTornado__factory:()=>Pb,Echoer__factory:()=>Nb,EnsResolve__factory:()=>kf,FeeManager__factory:()=>Hs,GasCompensationVault__factory:()=>Xs,GasCompensator__factory:()=>Xi,GovernanceAggregator__factory:()=>af,GovernanceExploitPatchUpgrade__factory:()=>ks,GovernanceGasUpgrade__factory:()=>ts,GovernanceProposalStateUpgrade__factory:()=>Us,GovernanceStakingUpgrade__factory:()=>ps,GovernanceVaultUpgrade__factory:()=>bs,Governance__factory:()=>Hi,IDeployer__factory:()=>db,IENSRegistry__factory:()=>jb,IENSResolver__factory:()=>zb,IENS__factory:()=>hf,IERC1155Errors__factory:()=>Za,IERC20Decimals__factory:()=>ai,IERC20Errors__factory:()=>en,IERC20Metadata__factory:()=>dn,IERC20__factory:()=>Dn,IERC721Errors__factory:()=>an,IFeeManager__factory:()=>wf,IGasCompensationVault__factory:()=>qi,IGovernance__factory:()=>oi,IHasher__factory:()=>Hn,IMetamorphicContractFactory__factory:()=>ys,IProxy__factory:()=>gi,IRelayerRegistry__factory:()=>Xb,ITornadoGovernance__factory:()=>xd,ITornadoInstance__factory:()=>Tb,ITornadoRouter__factory:()=>uf,ITornadoStakingRewards__factory:()=>is,ITornadoVault__factory:()=>Ed,IUSDT__factory:()=>Yn,IUniswapV3Factory__factory:()=>$d,IUniswapV3PoolActions__factory:()=>Cd,IUniswapV3PoolDerivedState__factory:()=>Dd,IUniswapV3PoolEvents__factory:()=>Ud,IUniswapV3PoolImmutables__factory:()=>Ld,IUniswapV3PoolOwnerActions__factory:()=>Gd,IUniswapV3PoolState__factory:()=>jd,IUniswapV3Pool__factory:()=>Wd,IVerifier__factory:()=>ub,InitialProposal__factory:()=>hs,InstanceRegistry__factory:()=>lf,LoopbackProxy__factory:()=>Js,MaliciousProposal__factory:()=>vs,MerkleTreeWithHistoryMock__factory:()=>cb,MerkleTreeWithHistory__factory:()=>Xn,MockGovernance__factory:()=>ki,Multicall:()=>a.Multicall,Multicall__factory:()=>dc,NewImplementation__factory:()=>Mi,OffchainOracle:()=>a.OffchainOracle,OffchainOracle__factory:()=>sc,OvmGasPriceOracle:()=>a.OvmGasPriceOracle,OvmGasPriceOracle__factory:()=>rc,Ownable__factory:()=>Tn,PatchProposal__factory:()=>Cs,Pausable__factory:()=>Ln,ProposalStateChangeGovernance__factory:()=>mi,ProposalUpgrade__factory:()=>Ii,Proposal__factory:()=>Ci,Proxy__factory:()=>wn,RelayerAggregator__factory:()=>Jb,RelayerRegistry__factory:()=>_f,Resolver__factory:()=>Af,ReverseRecords:()=>a.ReverseRecords,ReverseRecords__factory:()=>uc,TORNMock__factory:()=>Bf,TORN__factory:()=>fd,TestnetAdminProxy__factory:()=>ld,TestnetFeeManager__factory:()=>hd,TestnetGovernanceProxy__factory:()=>vd,Timestamp__factory:()=>zf,TornadoProxyLight__factory:()=>wb,TornadoRouter__factory:()=>Zs,TornadoStakingRewards__factory:()=>kd,TornadoVault__factory:()=>tc,Tornado__factory:()=>yb,TransparentUpgradeableProxy__factory:()=>_n,UpgradeableProxy__factory:()=>En,Verifier__factory:()=>Ub,VestingMock__factory:()=>Wf,Vesting__factory:()=>sd,VoucherMock__factory:()=>Kf,Voucher__factory:()=>pd,factories:()=>bc});var a={};function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function b(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function f(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}e.r(a),e.d(a,{Q2:()=>dc,Hk:()=>sc,Ld:()=>rc,Rp:()=>uc});const d=BigInt(2**32-1),i=BigInt(32);function s(e,t=!1){return t?{h:Number(e&d),l:Number(e>>i&d)}:{h:0|Number(e>>i&d),l:0|Number(e&d)}}function c(e,t=!1){let a=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let b=0;b>h)*w)%g,t&T&&(b^=m<<(m<a>32?((e,t,a)=>t<>>64-a)(e,t,a):((e,t,a)=>e<>>32-a)(e,t,a),x=(e,t,a)=>a>32?((e,t,a)=>e<>>64-a)(e,t,a):((e,t,a)=>t<>>32-a)(e,t,a);class I extends p{constructor(e,t,a,b=!1,f=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=a,this.enableXOF=b,this.rounds=f,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,n(a),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var d;this.state=new Uint8Array(200),this.state32=(d=this.state,new Uint32Array(d.buffer,d.byteOffset,Math.floor(d.byteLength/4)))}keccak(){!function(e,t=24){const a=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)a[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,b=(t+2)%10,f=a[b],d=a[b+1],i=_(f,d,1)^a[n],s=x(f,d,1)^a[n+1];for(let a=0;a<50;a+=10)e[t+a]^=i,e[t+a+1]^=s}let t=e[2],b=e[3];for(let a=0;a<24;a++){const n=o[a],f=_(t,b,n),d=x(t,b,n),i=u[a];t=e[i],b=e[i+1],e[i]=f,e[i+1]=d}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)a[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~a[(n+2)%10]&a[(n+4)%10]}e[0]^=v[n],e[1]^=M[n]}a.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){f(this);const{blockLen:t,state:a}=this,n=(e=r(e)).length;for(let b=0;b=a&&this.keccak();const f=Math.min(a-this.posOut,b-n);e.set(t.subarray(this.posOut,this.posOut+f),n),this.posOut+=f,n+=f}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return n(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(function(e,t){b(e);const a=t.outputLen;if(e.lengthfunction(e){const t=t=>e().update(r(t)).digest(),a=e();return t.outputLen=a.outputLen,t.blockLen=a.blockLen,t.create=()=>e(),t}((()=>new I(t,e,a))))(1,136,32);function R(e,t,a){const n=t.split("|").map((e=>e.trim()));for(let a=0;aPromise.resolve(e[t]))))).reduce(((e,a,n)=>(e[t[n]]=a,e)),{})}function k(e,t,a){for(let n in t){let b=t[n];const f=a?a[n]:null;f&&R(b,f,n),Object.defineProperty(e,n,{enumerable:!0,value:b,writable:!1})}}function P(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(P).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let a="0x";for(let n=0;n>4],a+=t[15&e[n]];return a}if("object"==typeof e&&"function"==typeof e.toJSON)return P(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{ "+t.map((t=>`${P(t)}: ${P(e[t])}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function A(e,t){return e&&e.code===t}function C(e){return A(e,"CALL_EXCEPTION")}function N(e,t,a){let n,b=e;{const n=[];if(a){if("message"in a||"code"in a||"name"in a)throw new Error(`value will overwrite populated values: ${P(a)}`);for(const e in a){if("shortMessage"===e)continue;const t=a[e];n.push(e+"="+P(t))}}n.push(`code=${t}`),n.push("version=6.13.2"),n.length&&(e+=" ("+n.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":n=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":n=new RangeError(e);break;default:n=new Error(e)}return k(n,{code:t}),a&&Object.assign(n,a),null==n.shortMessage&&k(n,{shortMessage:b}),n}function D(e,t,a,n){if(!e)throw N(t,a,n)}function S(e,t,a,n){D(e,t,"INVALID_ARGUMENT",{argument:a,value:n})}function U(e,t,a){null==a&&(a=""),a&&(a=": "+a),D(e>=t,"missing arguemnt"+a,"MISSING_ARGUMENT",{count:e,expectedCount:t}),D(e<=t,"too many arguments"+a,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})}const V=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(e){}return e}),[]);function L(e,t,a){if(null==a&&(a=""),e!==t){let e=a,t="new";a&&(e+=".",t+=" "+a),D(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}function F(e,t,a){if(e instanceof Uint8Array)return a?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let a=2;for(let n=0;n>4]+H[15&n]}return a}function $(e){return"0x"+e.map((e=>z(e).substring(2))).join("")}function X(e,t,a){const n=G(e);return null!=a&&a>n.length&&D(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:a}),z(n.slice(null==t?0:t,null==a?n.length:a))}function W(e,t,a){const n=G(e);D(t>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:t,offset:t+1});const b=new Uint8Array(t);return b.fill(0),a?b.set(n,t-n.length):b.set(n,0),z(b)}let q=!1;const J=function(e){return E(e)};let K=J;function Y(e){const t=G(e,"data");return z(K(t))}function Z(e,t,a,n,b){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return"OVERRUN"===e?a.length-t-1:0}Y._=J,Y.lock=function(){q=!0},Y.register=function(e){if(q)throw new TypeError("keccak256 is locked");K=e},Object.freeze(Y);const Q=Object.freeze({error:function(e,t,a,n,b){S(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",a)},ignore:Z,replace:function(e,t,a,n,b){return"OVERLONG"===e?(S("number"==typeof b,"invalid bad code point for replacement","badCodepoint",b),n.push(b),0):(n.push(65533),Z(e,t,a))}});function ee(e,t){S("string"==typeof e,"invalid string value","str",e),null!=t&&(function(e){D(V.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}(t),e=e.normalize(t));let a=[];for(let t=0;t>6|192),a.push(63&n|128);else if(55296==(64512&n)){t++;const b=e.charCodeAt(t);S(t>18|240),a.push(f>>12&63|128),a.push(f>>6&63|128),a.push(63&f|128)}else a.push(n>>12|224),a.push(n>>6&63|128),a.push(63&n|128)}return new Uint8Array(a)}function te(e,t){return function(e,t){null==t&&(t=Q.error);const a=G(e,"bytes"),n=[];let b=0;for(;b>7)){n.push(e);continue}let f=null,d=null;if(192==(224&e))f=1,d=127;else if(224==(240&e))f=2,d=2047;else{if(240!=(248&e)){b+=t(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",b-1,a,n);continue}f=3,d=65535}if(b-1+f>=a.length){b+=t("OVERRUN",b-1,a,n);continue}let i=e&(1<<8-f-1)-1;for(let e=0;e1114111?b+=t("OUT_OF_RANGE",b-1-f,a,n,i):i>=55296&&i<=57343?b+=t("UTF16_SURROGATE",b-1-f,a,n,i):i<=d?b+=t("OVERLONG",b-1-f,a,n,i):n.push(i))}return n}(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function ae(e){return Y(ee(e))}const ne=BigInt(0),be=BigInt(1),fe=9007199254740991;function de(e,t){const a=se(e,"value"),n=BigInt(pe(t,"bits"));return a&(be<=-fe&&e<=fe,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(a){S(!1,`invalid BigNumberish string: ${a.message}`,t||"value",e)}}S(!1,"invalid BigNumberish value",t||"value",e)}function se(e,t){const a=ie(e,t);return D(a>=ne,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),a}const ce="0123456789abcdef";function re(e){if(e instanceof Uint8Array){let t="0x0";for(const a of e)t+=ce[a>>4],t+=ce[15&a];return BigInt(t)}return ie(e)}function pe(e,t){switch(typeof e){case"bigint":return S(e>=-fe&&e<=fe,"overflow",t||"value",e),Number(e);case"number":return S(Number.isInteger(e),"underflow",t||"value",e),S(e>=-fe&&e<=fe,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return pe(BigInt(e),t)}catch(a){S(!1,`invalid numeric string: ${a.message}`,t||"value",e)}}S(!1,"invalid numeric value",t||"value",e)}function ue(e,t){let a=se(e,"value").toString(16);if(null==t)a.length%2&&(a="0"+a);else{const n=pe(t,"width");for(D(2*n>=a.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});a.length<2*n;)a="0"+a}return"0x"+a}const oe=32,ye=new Uint8Array(oe),le=["then"],me={},Te=new WeakMap;function he(e){return Te.get(e)}function ge(e,t){Te.set(e,t)}function we(e,t){const a=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw a.error=t,a}function ve(e,t,a){return e.indexOf(null)>=0?t.map(((e,t)=>e instanceof Me?ve(he(e),e,a):e)):e.reduce(((e,n,b)=>{let f=t.getValue(n);return n in e||(a&&f instanceof Me&&(f=ve(he(f),f,a)),e[n]=f),e}),{})}class Me extends Array{#e;constructor(...e){const t=e[0];let a=e[1],n=(e[2]||[]).slice(),b=!0;t!==me&&(a=e,n=[],b=!1),super(a.length),a.forEach(((e,t)=>{this[t]=e}));const f=n.reduce(((e,t)=>("string"==typeof t&&e.set(t,(e.get(t)||0)+1),e)),new Map);if(ge(this,Object.freeze(a.map(((e,t)=>{const a=n[t];return null!=a&&1===f.get(a)?a:null})))),this.#e=[],null==this.#e&&this.#e,!b)return;Object.freeze(this);const d=new Proxy(this,{get:(e,t,a)=>{if("string"==typeof t){if(t.match(/^[0-9]+$/)){const a=pe(t,"%index");if(a<0||a>=this.length)throw new RangeError("out of result range");const n=e[a];return n instanceof Error&&we(`index ${a}`,n),n}if(le.indexOf(t)>=0)return Reflect.get(e,t,a);const n=e[t];if(n instanceof Function)return function(...t){return n.apply(this===a?e:this,t)};if(!(t in e))return e.getValue.apply(this===a?e:this,[t])}return Reflect.get(e,t,a)}});return ge(d,he(this)),d}toArray(e){const t=[];return this.forEach(((a,n)=>{a instanceof Error&&we(`index ${n}`,a),e&&a instanceof Me&&(a=a.toArray(e)),t.push(a)})),t}toObject(e){const t=he(this);return t.reduce(((a,n,b)=>(D(null!=n,`value at index ${b} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),ve(t,this,e))),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const a=he(this),n=[],b=[];for(let f=e;f{this.#t[e]=_e(t)}}}class Ee{allowLoose;#t;#b;#f;#d;#i;constructor(e,t,a){k(this,{allowLoose:!!t}),this.#t=B(e),this.#f=0,this.#d=null,this.#i=null!=a?a:1024,this.#b=0}get data(){return z(this.#t)}get dataLength(){return this.#t.length}get consumed(){return this.#b}get bytes(){return new Uint8Array(this.#t)}#s(e){if(this.#d)return this.#d.#s(e);this.#f+=e,D(this.#i<1||this.#f<=this.#i*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#i} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:B(this.#t),offset:this.#b,length:e,info:{bytesRead:this.#f,dataLength:this.dataLength}})}#c(e,t,a){let n=Math.ceil(t/oe)*oe;return this.#b+n>this.#t.length&&(this.allowLoose&&a&&this.#b+t<=this.#t.length?n=t:D(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:B(this.#t),length:this.#t.length,offset:this.#b+n})),this.#t.slice(this.#b,this.#b+n)}subReader(e){const t=new Ee(this.#t.slice(this.#b+e),this.allowLoose,this.#i);return t.#d=this,t}readBytes(e,t){let a=this.#c(0,e,!!t);return this.#s(e),this.#b+=a.length,a.slice(0,e)}readValue(){return re(this.readBytes(oe))}readIndex(){return pe(re(this.readBytes(oe)))}}const Re=BigInt(0),Oe=BigInt(36);function ke(e){const t=(e=e.toLowerCase()).substring(2).split(""),a=new Uint8Array(40);for(let e=0;e<40;e++)a[e]=t[e].charCodeAt(0);const n=G(Y(a));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const Pe={};for(let e=0;e<10;e++)Pe[String(e)]=String(e);for(let e=0;e<26;e++)Pe[String.fromCharCode(65+e)]=String(10+e);const Ae=function(){const e={};for(let t=0;t<36;t++)e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t);return e}();function Ce(e){if(S("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=ke(e);return S(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){S(e.substring(2,4)===function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>Pe[e])).join("");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let a=String(98-parseInt(t,10)%97);for(;a.length<2;)a="0"+a;return a}(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=Re;for(let a=0;ae.format())).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#r}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#r?-1:!1===this.#r?this.value.length:null}static from(e,t){return new Ve(Ne,e,t)}static uint8(e){return De(e,8)}static uint16(e){return De(e,16)}static uint24(e){return De(e,24)}static uint32(e){return De(e,32)}static uint40(e){return De(e,40)}static uint48(e){return De(e,48)}static uint56(e){return De(e,56)}static uint64(e){return De(e,64)}static uint72(e){return De(e,72)}static uint80(e){return De(e,80)}static uint88(e){return De(e,88)}static uint96(e){return De(e,96)}static uint104(e){return De(e,104)}static uint112(e){return De(e,112)}static uint120(e){return De(e,120)}static uint128(e){return De(e,128)}static uint136(e){return De(e,136)}static uint144(e){return De(e,144)}static uint152(e){return De(e,152)}static uint160(e){return De(e,160)}static uint168(e){return De(e,168)}static uint176(e){return De(e,176)}static uint184(e){return De(e,184)}static uint192(e){return De(e,192)}static uint200(e){return De(e,200)}static uint208(e){return De(e,208)}static uint216(e){return De(e,216)}static uint224(e){return De(e,224)}static uint232(e){return De(e,232)}static uint240(e){return De(e,240)}static uint248(e){return De(e,248)}static uint256(e){return De(e,256)}static uint(e){return De(e,256)}static int8(e){return De(e,-8)}static int16(e){return De(e,-16)}static int24(e){return De(e,-24)}static int32(e){return De(e,-32)}static int40(e){return De(e,-40)}static int48(e){return De(e,-48)}static int56(e){return De(e,-56)}static int64(e){return De(e,-64)}static int72(e){return De(e,-72)}static int80(e){return De(e,-80)}static int88(e){return De(e,-88)}static int96(e){return De(e,-96)}static int104(e){return De(e,-104)}static int112(e){return De(e,-112)}static int120(e){return De(e,-120)}static int128(e){return De(e,-128)}static int136(e){return De(e,-136)}static int144(e){return De(e,-144)}static int152(e){return De(e,-152)}static int160(e){return De(e,-160)}static int168(e){return De(e,-168)}static int176(e){return De(e,-176)}static int184(e){return De(e,-184)}static int192(e){return De(e,-192)}static int200(e){return De(e,-200)}static int208(e){return De(e,-208)}static int216(e){return De(e,-216)}static int224(e){return De(e,-224)}static int232(e){return De(e,-232)}static int240(e){return De(e,-240)}static int248(e){return De(e,-248)}static int256(e){return De(e,-256)}static int(e){return De(e,-256)}static bytes1(e){return Se(e,1)}static bytes2(e){return Se(e,2)}static bytes3(e){return Se(e,3)}static bytes4(e){return Se(e,4)}static bytes5(e){return Se(e,5)}static bytes6(e){return Se(e,6)}static bytes7(e){return Se(e,7)}static bytes8(e){return Se(e,8)}static bytes9(e){return Se(e,9)}static bytes10(e){return Se(e,10)}static bytes11(e){return Se(e,11)}static bytes12(e){return Se(e,12)}static bytes13(e){return Se(e,13)}static bytes14(e){return Se(e,14)}static bytes15(e){return Se(e,15)}static bytes16(e){return Se(e,16)}static bytes17(e){return Se(e,17)}static bytes18(e){return Se(e,18)}static bytes19(e){return Se(e,19)}static bytes20(e){return Se(e,20)}static bytes21(e){return Se(e,21)}static bytes22(e){return Se(e,22)}static bytes23(e){return Se(e,23)}static bytes24(e){return Se(e,24)}static bytes25(e){return Se(e,25)}static bytes26(e){return Se(e,26)}static bytes27(e){return Se(e,27)}static bytes28(e){return Se(e,28)}static bytes29(e){return Se(e,29)}static bytes30(e){return Se(e,30)}static bytes31(e){return Se(e,31)}static bytes32(e){return Se(e,32)}static address(e){return new Ve(Ne,"address",e)}static bool(e){return new Ve(Ne,"bool",!!e)}static bytes(e){return new Ve(Ne,"bytes",e)}static string(e){return new Ve(Ne,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new Ve(Ne,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===Ue}static dereference(e,t){if(Ve.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}class Le extends xe{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let a=Ve.dereference(t,"string");try{a=Ce(a)}catch(e){return this._throwError(e.message,t)}return e.writeValue(a)}decode(e){return Ce(ue(e.readValue(),20))}}class Fe extends xe{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}function Ge(e,t,a){let n=[];if(Array.isArray(a))n=a;else if(a&&"object"==typeof a){let e={};n=t.map((t=>{const n=t.localName;return D(n,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:a}),D(!e[n],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:a}),e[n]=!0,a[n]}))}else S(!1,"invalid tuple value","tuple",a);S(t.length===n.length,"types/value length mismatch","tuple",a);let b=new Ie,f=new Ie,d=[];t.forEach(((e,t)=>{let a=n[t];if(e.dynamic){let t=f.length;e.encode(f,a);let n=b.writeUpdatableValue();d.push((e=>{n(e+t)}))}else e.encode(b,a)})),d.forEach((e=>{e(b.length)}));let i=e.appendWriter(b);return i+=e.appendWriter(f),i}function Be(e,t){let a=[],n=[],b=e.subReader(0);return t.forEach((t=>{let f=null;if(t.dynamic){let a=e.readIndex(),n=b.subReader(a);try{f=t.decode(n)}catch(e){if(A(e,"BUFFER_OVERRUN"))throw e;f=e,f.baseType=t.name,f.name=t.localName,f.type=t.type}}else try{f=t.decode(e)}catch(e){if(A(e,"BUFFER_OVERRUN"))throw e;f=e,f.baseType=t.name,f.name=t.localName,f.type=t.type}if(null==f)throw new Error("investigate");a.push(f),n.push(t.localName||null)})),Me.fromItems(a,n)}class je extends xe{coder;length;constructor(e,t,a){super("array",e.type+"["+(t>=0?t:"")+"]",a,-1===t||e.dynamic),k(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let a=0;ae||a<-(e+Ke))&&this._throwError("value out-of-bounds",t),a=function(e){let t=ie(e,"value");const a=BigInt(pe(256,"width")),n=be<de(n,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(a)}decode(e){let t=de(e.readValue(),8*this.size);return this.signed&&(t=function(e,t){const a=se(e,"value"),n=BigInt(pe(t,"width"));return D(a>>n===ne,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),a>>n-be?-((~a&(be<{e.dynamic&&(a=!0),n.push(e.type)})),super("tuple","tuple("+n.join(",")+")",t,a),k(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const a=t.localName;return a&&(e[a]||(e[a]=0),e[a]++),e}),{});return this.coders.forEach(((a,n)=>{let b=a.localName;b&&1===t[b]&&("length"===b&&(b="_length"),null==e[b]&&(e[b]=e[n]))})),Object.freeze(e)}encode(e,t){const a=Ve.dereference(t,"tuple");return Ge(e,this.coders,a)}decode(e){return Be(e,this.coders)}}function tt(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}const at=tt("external public payable override".split(" ")),nt="constant external internal payable private public pure view override",bt=tt(nt.split(" ")),ft="constructor error event fallback function receive struct",dt=tt(ft.split(" ")),it="calldata memory storage payable indexed",st=tt(it.split(" ")),ct=tt([ft,it,"tuple returns",nt].join(" ").split(" ")),rt={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},pt=new RegExp("^(\\s*)"),ut=new RegExp("^([0-9]+)"),ot=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),yt=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),lt=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class mt{#b;#p;get offset(){return this.#b}get length(){return this.#p.length-this.#b}constructor(e){this.#b=0,this.#p=e.slice()}clone(){return new mt(this.#p)}reset(){this.#b=0}#u(e=0,t=0){return new mt(this.#p.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#u(this.#b+1,e.match+1);return this.#b=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#b=this.#p.length)throw new Error("out-of-bounds");return this.#p[this.#b]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#b++,e}toString(){const e=[];for(let t=this.#b;t`}}function Tt(e){const t=[],a=t=>{const a=f0&&"NUMBER"===t[t.length-1].type){const a=t.pop().text;e=a+e,t[t.length-1].value=pe(a)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(i=d.match(ot),i){if(s.text=i[1],f+=s.text.length,ct.has(s.text)){s.type="KEYWORD";continue}if(s.text.match(lt)){s.type="TYPE";continue}s.type="ID"}else{if(i=d.match(ut),!i)throw new Error(`unexpected token ${JSON.stringify(d[0])} at position ${f}`);s.text=i[1],s.type="NUMBER",f+=s.text.length}}return new mt(t.map((e=>Object.freeze(e))))}function ht(e,t){let a=[];for(const n in t.keys())e.has(n)&&a.push(n);if(a.length>1)throw new Error(`conflicting types: ${a.join(", ")}`)}function gt(e,t){if(t.peekKeyword(dt)){const a=t.pop().text;if(a!==e)throw new Error(`expected ${e}, got ${a}`)}return t.popType("ID")}function wt(e,t){const a=new Set;for(;;){const n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),a.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);a.add(n)}return Object.freeze(a)}function vt(e){let t=wt(e,bt);return ht(t,tt("constant payable nonpayable".split(" "))),ht(t,tt("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function Mt(e,t){return e.popParams().map((e=>Ut.from(e,t)))}function _t(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return ie(e.pop().text);throw new Error("invalid gas")}return null}function xt(e){if(e.length)throw new Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}const It=new RegExp(/^(.*)\[([0-9]*)\]$/);function Et(e){const t=e.match(lt);if(S(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const a=parseInt(t[2]);S(0!==a&&a<=32,"invalid bytes length","type",e)}else if(t[3]){const a=parseInt(t[3]);S(0!==a&&a<=256&&a%8==0,"invalid numeric width","type",e)}return e}const Rt={},Ot=Symbol.for("_ethers_internal"),kt="_ParamTypeInternal",Pt="_ErrorInternal",At="_EventInternal",Ct="_ConstructorInternal",Nt="_FallbackInternal",Dt="_FunctionInternal",St="_StructInternal";class Ut{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,a,n,b,f,d,i){if(L(e,Rt,"ParamType"),Object.defineProperty(this,Ot,{value:kt}),f&&(f=Object.freeze(f.slice())),"array"===n){if(null==d||null==i)throw new Error("")}else if(null!=d||null!=i)throw new Error("");if("tuple"===n){if(null==f)throw new Error("")}else if(null!=f)throw new Error("");k(this,{name:t,type:a,baseType:n,indexed:b,components:f,arrayLength:d,arrayChildren:i})}format(e){if(null==e&&(e="sighash"),"json"===e){const t=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const a={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"==typeof this.indexed&&(a.indexed=this.indexed),this.isTuple()&&(a.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(a)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const a=this;return e.map((e=>a.arrayChildren.walk(e,t)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const a=this;return e.map(((e,n)=>a.components[n].walk(e,t)))}return t(this.type,e)}#o(e,t,a,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const b=this.arrayChildren,f=t.slice();return f.forEach(((t,n)=>{b.#o(e,t,a,(e=>{f[n]=e}))})),void n(f)}if(this.isTuple()){const b=this.components;let f;if(Array.isArray(t))f=t.slice();else{if(null==t||"object"!=typeof t)throw new Error("invalid tuple value");f=b.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(f.length!==this.components.length)throw new Error("array is wrong length");return f.forEach(((t,n)=>{b[n].#o(e,t,a,(e=>{f[n]=e}))})),void n(f)}const b=a(this.type,t);b.then?e.push(async function(){n(await b)}()):n(b)}async walkAsync(e,t){const a=[],n=[e];return this.#o(a,e,t,(e=>{n[0]=e})),a.length&&await Promise.all(a),n[0]}static from(e,t){if(Ut.isParamType(e))return e;if("string"==typeof e)try{return Ut.from(Tt(e),t)}catch(t){S(!1,"invalid param type","obj",e)}else if(e instanceof mt){let a="",n="",b=null;wt(e,tt(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",b=e.popParams().map((e=>Ut.from(e))),a=`tuple(${b.map((e=>e.format())).join(",")})`):(a=Et(e.popType("TYPE")),n=a);let f=null,d=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();f=new Ut(Rt,"",a,n,null,b,d,f),d=t.value,a+=t.text,n="array",b=null}let i=null;if(wt(e,st).has("indexed")){if(!t)throw new Error("");i=!0}const s=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Ut(Rt,s,a,n,i,b,d,f)}const a=e.name;S(!a||"string"==typeof a&&a.match(yt),"invalid name","obj.name",a);let n=e.indexed;null!=n&&(S(t,"parameter cannot be indexed","obj.indexed",e.indexed),n=!!n);let b=e.type,f=b.match(It);if(f){const t=parseInt(f[2]||"-1"),d=Ut.from({type:f[1],components:e.components});return new Ut(Rt,a||"",b,"array",n,null,t,d)}if("tuple"===b||b.startsWith("tuple(")||b.startsWith("(")){const t=null!=e.components?e.components.map((e=>Ut.from(e))):null;return new Ut(Rt,a||"",b,"tuple",n,t,null,null)}return b=Et(e.type),new Ut(Rt,a||"",b,b,n,null,null,null)}static isParamType(e){return e&&e[Ot]===kt}}class Vt{type;inputs;constructor(e,t,a){L(e,Rt,"Fragment"),k(this,{type:t,inputs:a=Object.freeze(a.slice())})}static from(e){if("string"==typeof e){try{Vt.from(JSON.parse(e))}catch(e){}return Vt.from(Tt(e))}if(e instanceof mt)switch(e.peekKeyword(dt)){case"constructor":return jt.from(e);case"error":return Gt.from(e);case"event":return Bt.from(e);case"fallback":case"receive":return Ht.from(e);case"function":return zt.from(e);case"struct":return $t.from(e)}else if("object"==typeof e){switch(e.type){case"constructor":return jt.from(e);case"error":return Gt.from(e);case"event":return Bt.from(e);case"fallback":case"receive":return Ht.from(e);case"function":return zt.from(e);case"struct":return $t.from(e)}D(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}S(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return jt.isFragment(e)}static isError(e){return Gt.isFragment(e)}static isEvent(e){return Bt.isFragment(e)}static isFunction(e){return zt.isFragment(e)}static isStruct(e){return $t.isFragment(e)}}class Lt extends Vt{name;constructor(e,t,a,n){super(e,t,n),S("string"==typeof a&&a.match(yt),"invalid identifier","name",a),n=Object.freeze(n.slice()),k(this,{name:a})}}function Ft(e,t){return"("+t.map((t=>t.format(e))).join("full"===e?", ":",")+")"}class Gt extends Lt{constructor(e,t,a){super(e,"error",t,a),Object.defineProperty(this,Ot,{value:Pt})}get selector(){return ae(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+Ft(e,this.inputs)),t.join(" ")}static from(e){if(Gt.isFragment(e))return e;if("string"==typeof e)return Gt.from(Tt(e));if(e instanceof mt){const t=gt("error",e),a=Mt(e);return xt(e),new Gt(Rt,t,a)}return new Gt(Rt,e.name,e.inputs?e.inputs.map(Ut.from):[])}static isFragment(e){return e&&e[Ot]===Pt}}class Bt extends Lt{anonymous;constructor(e,t,a,n){super(e,"event",t,a),Object.defineProperty(this,Ot,{value:At}),k(this,{anonymous:n})}get topicHash(){return ae(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+Ft(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){return t=(t||[]).map((e=>Ut.from(e))),new Bt(Rt,e,t,!1).topicHash}static from(e){if(Bt.isFragment(e))return e;if("string"==typeof e)try{return Bt.from(Tt(e))}catch(t){S(!1,"invalid event fragment","obj",e)}else if(e instanceof mt){const t=gt("event",e),a=Mt(e,!0),n=!!wt(e,tt(["anonymous"])).has("anonymous");return xt(e),new Bt(Rt,t,a,n)}return new Bt(Rt,e.name,e.inputs?e.inputs.map((e=>Ut.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[Ot]===At}}class jt extends Vt{payable;gas;constructor(e,t,a,n,b){super(e,t,a),Object.defineProperty(this,Ot,{value:Ct}),k(this,{payable:n,gas:b})}format(e){if(D(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[`constructor${Ft(e,this.inputs)}`];return this.payable&&t.push("payable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(jt.isFragment(e))return e;if("string"==typeof e)try{return jt.from(Tt(e))}catch(t){S(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof mt){wt(e,tt(["constructor"]));const t=Mt(e),a=!!wt(e,at).has("payable"),n=_t(e);return xt(e),new jt(Rt,"constructor",t,a,n)}return new jt(Rt,"constructor",e.inputs?e.inputs.map(Ut.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[Ot]===Ct}}class Ht extends Vt{payable;constructor(e,t,a){super(e,"fallback",t),Object.defineProperty(this,Ot,{value:Nt}),k(this,{payable:a})}format(e){const t=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?" payable":""}`}static from(e){if(Ht.isFragment(e))return e;if("string"==typeof e)try{return Ht.from(Tt(e))}catch(t){S(!1,"invalid fallback fragment","obj",e)}else if(e instanceof mt){const t=e.toString();if(S(e.peekKeyword(tt(["fallback","receive"])),"type must be fallback or receive","obj",t),"receive"===e.popKeyword(tt(["fallback","receive"]))){const t=Mt(e);return S(0===t.length,"receive cannot have arguments","obj.inputs",t),wt(e,tt(["payable"])),xt(e),new Ht(Rt,[],!0)}let a=Mt(e);a.length?S(1===a.length&&"bytes"===a[0].type,"invalid fallback inputs","obj.inputs",a.map((e=>e.format("minimal"))).join(", ")):a=[Ut.from("bytes")];const n=vt(e);if(S("nonpayable"===n||"payable"===n,"fallback cannot be constants","obj.stateMutability",n),wt(e,tt(["returns"])).has("returns")){const t=Mt(e);S(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map((e=>e.format("minimal"))).join(", "))}return xt(e),new Ht(Rt,a,"payable"===n)}if("receive"===e.type)return new Ht(Rt,[],!0);if("fallback"===e.type){const t=[Ut.from("bytes")],a="payable"===e.stateMutability;return new Ht(Rt,t,a)}S(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[Ot]===Nt}}class zt extends Lt{constant;outputs;stateMutability;payable;gas;constructor(e,t,a,n,b,f){super(e,"function",t,n),Object.defineProperty(this,Ot,{value:Dt}),k(this,{constant:"view"===a||"pure"===a,gas:f,outputs:b=Object.freeze(b.slice()),payable:"payable"===a,stateMutability:a})}get selector(){return ae(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+Ft(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(Ft(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){return t=(t||[]).map((e=>Ut.from(e))),new zt(Rt,e,"view",t,[],null).selector}static from(e){if(zt.isFragment(e))return e;if("string"==typeof e)try{return zt.from(Tt(e))}catch(t){S(!1,"invalid function fragment","obj",e)}else if(e instanceof mt){const t=gt("function",e),a=Mt(e),n=vt(e);let b=[];wt(e,tt(["returns"])).has("returns")&&(b=Mt(e));const f=_t(e);return xt(e),new zt(Rt,t,n,a,b,f)}let t=e.stateMutability;return null==t&&(t="payable","boolean"==typeof e.constant?(t="view",e.constant||(t="payable","boolean"!=typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(t="nonpayable")),new zt(Rt,e.name,t,e.inputs?e.inputs.map(Ut.from):[],e.outputs?e.outputs.map(Ut.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[Ot]===Dt}}class $t extends Lt{constructor(e,t,a){super(e,"struct",t,a),Object.defineProperty(this,Ot,{value:St})}format(){throw new Error("@TODO")}static from(e){if("string"==typeof e)try{return $t.from(Tt(e))}catch(t){S(!1,"invalid struct fragment","obj",e)}else if(e instanceof mt){const t=gt("struct",e),a=Mt(e);return xt(e),new $t(Rt,t,a)}return new $t(Rt,e.name,e.inputs?e.inputs.map(Ut.from):[])}static isFragment(e){return e&&e[Ot]===St}}const Xt=new Map;Xt.set(0,"GENERIC_PANIC"),Xt.set(1,"ASSERT_FALSE"),Xt.set(17,"OVERFLOW"),Xt.set(18,"DIVIDE_BY_ZERO"),Xt.set(33,"ENUM_RANGE_ERROR"),Xt.set(34,"BAD_STORAGE_DATA"),Xt.set(49,"STACK_UNDERFLOW"),Xt.set(50,"ARRAY_RANGE_ERROR"),Xt.set(65,"OUT_OF_MEMORY"),Xt.set(81,"UNINITIALIZED_FUNCTION_CALL");const Wt=new RegExp(/^bytes([0-9]*)$/),qt=new RegExp(/^(u?int)([0-9]*)$/);let Jt=null,Kt=1024;class Yt{#y(e){if(e.isArray())return new je(this.#y(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new et(e.components.map((e=>this.#y(e))),e.name);switch(e.baseType){case"address":return new Le(e.name);case"bool":return new He(e.name);case"string":return new Qe(e.name);case"bytes":return new $e(e.name);case"":return new qe(e.name)}let t=e.type.match(qt);if(t){let a=parseInt(t[2]||"256");return S(0!==a&&a<=256&&a%8==0,"invalid "+t[1]+" bit length","param",e),new Ze(a/8,"int"===t[1],e.name)}if(t=e.type.match(Wt),t){let a=parseInt(t[1]);return S(0!==a&&a<=32,"invalid bytes length","param",e),new Xe(a,e.name)}S(!1,"invalid type","type",e.type)}getDefaultValue(e){const t=e.map((e=>this.#y(Ut.from(e))));return new et(t,"_").defaultValue()}encode(e,t){U(t.length,e.length,"types/values length mismatch");const a=e.map((e=>this.#y(Ut.from(e)))),n=new et(a,"_"),b=new Ie;return n.encode(b,t),b.data}decode(e,t,a){const n=e.map((e=>this.#y(Ut.from(e))));return new et(n,"_").decode(new Ee(t,a,Kt))}static _setDefaultMaxInflation(e){S("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),Kt=e}static defaultAbiCoder(){return null==Jt&&(Jt=new Yt),Jt}static getBuiltinCallException(e,t,a){return function(e,t,a,n){let b="missing revert data",f=null,d=null;if(a){b="execution reverted";const e=G(a);if(a=z(a),0===e.length)b+=" (no data present; likely require(false) occurred",f="require(false)";else if(e.length%32!=4)b+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===z(e.slice(0,4)))try{f=n.decode(["string"],e.slice(4))[0],d={signature:"Error(string)",name:"Error",args:[f]},b+=`: ${JSON.stringify(f)}`}catch(e){b+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===z(e.slice(0,4)))try{const t=Number(n.decode(["uint256"],e.slice(4))[0]);d={signature:"Panic(uint256)",name:"Panic",args:[t]},f=`Panic due to ${Xt.get(t)||"UNKNOWN"}(${t})`,b+=`: ${f}`}catch(e){b+=" (could not decode panic code)"}else b+=" (unknown custom error)"}const i={to:t.to?Ce(t.to):null,data:t.data||"0x"};return t.from&&(i.from=Ce(t.from)),N(b,"CALL_EXCEPTION",{action:e,data:a,reason:f,transaction:i,invocation:null,revert:d})}(e,t,a,Yt.defaultAbiCoder())}}class Zt{fragment;name;signature;topic;args;constructor(e,t,a){const n=e.name,b=e.format();k(this,{fragment:e,name:n,signature:b,topic:t,args:a})}}class Qt{fragment;name;args;signature;selector;value;constructor(e,t,a,n){const b=e.name,f=e.format();k(this,{fragment:e,name:b,args:a,signature:f,selector:t,value:n})}}class ea{fragment;name;args;signature;selector;constructor(e,t,a){const n=e.name,b=e.format();k(this,{fragment:e,name:n,args:a,signature:b,selector:t})}}class ta{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){k(this,{hash:e,_isIndexed:!0})}}const aa={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},na={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&aa[e.toString()]&&(t=aa[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class ba{fragments;deploy;fallback;receive;#l;#m;#T;#h;constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,this.#T=new Map,this.#l=new Map,this.#m=new Map;const a=[];for(const e of t)try{a.push(Vt.from(e))}catch(t){console.log(`[Warning] Invalid Fragment ${JSON.stringify(e)}:`,t.message)}k(this,{fragments:Object.freeze(a)});let n=null,b=!1;this.#h=this.getAbiCoder(),this.fragments.forEach(((e,t)=>{let a;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void k(this,{deploy:e});case"fallback":return void(0===e.inputs.length?b=!0:(S(!n||e.payable!==n.payable,"conflicting fallback fragments",`fragments[${t}]`,e),n=e,b=n.payable));case"function":a=this.#T;break;case"event":a=this.#m;break;case"error":a=this.#l;break;default:return}const f=e.format();a.has(f)||a.set(f,e)})),this.deploy||k(this,{deploy:jt.from("constructor()")}),k(this,{fallback:n,receive:b})}format(e){const t=e?"minimal":"full";return this.fragments.map((e=>e.format(t)))}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return Yt.defaultAbiCoder()}#g(e,t,a){if(j(e)){const t=e.toLowerCase();for(const e of this.#T.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,a]of this.#T)t.split("(")[0]===e&&n.push(a);if(t){const e=t.length>0?t[t.length-1]:null;let a=t.length,b=!0;Ve.isTyped(e)&&"overrides"===e.type&&(b=!1,a--);for(let e=n.length-1;e>=0;e--){const t=n[e].inputs.length;t===a||b&&t===a-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){const a=n[e].inputs;for(let b=0;b=a.length){if("overrides"===t[b].type)continue;n.splice(e,1);break}if(t[b].type!==a[b].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&n.splice(0,1)}return 0===n.length?null:(n.length>1&&a&&S(!1,`ambiguous function description (i.e. matches ${n.map((e=>JSON.stringify(e.format()))).join(", ")})`,"key",e),n[0])}return this.#T.get(zt.from(e).format())||null}getFunctionName(e){const t=this.#g(e,null,!1);return S(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#g(e,null,!1)}getFunction(e,t){return this.#g(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#T.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let a=0;a=0;e--)n[e].inputs.length=0;e--){const a=n[e].inputs;for(let b=0;b1&&a&&S(!1,`ambiguous event description (i.e. matches ${n.map((e=>JSON.stringify(e.format()))).join(", ")})`,"key",e),n[0])}return this.#m.get(Bt.from(e).format())||null}getEventName(e){const t=this.#w(e,null,!1);return S(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#w(e,null,!1)}getEvent(e,t){return this.#w(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#m.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let a=0;a1&&S(!1,`ambiguous error description (i.e. ${t.map((e=>JSON.stringify(e.format()))).join(", ")})`,"name",e),t[0])}if("Error(string)"===(e=Gt.from(e).format()))return Gt.from("error Error(string)");if("Panic(uint256)"===e)return Gt.from("error Panic(uint256)");return this.#l.get(e)||null}forEachError(e){const t=Array.from(this.#l.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let a=0;a"string"===e.type?ae(t):"bytes"===e.type?Y(z(t)):("bool"===e.type&&"boolean"==typeof t?t=t?"0x01":"0x00":e.type.match(/^u?int/)?t=ue(t):e.type.match(/^bytes/)?t=W(t,32,!1):"address"===e.type&&this.#h.encode(["address"],[t]),W(z(t),32,!0));for(t.forEach(((t,b)=>{const f=e.inputs[b];f.indexed?null==t?a.push(null):"array"===f.baseType||"tuple"===f.baseType?S(!1,"filtering with tuples or arrays not supported","contract."+f.name,t):Array.isArray(t)?a.push(t.map((e=>n(f,e)))):a.push(n(f,t)):S(null==t,"cannot filter non-indexed parameters; must be null","contract."+f.name,t)}));a.length&&null===a[a.length-1];)a.pop();return a}encodeEventLog(e,t){if("string"==typeof e){const t=this.getEvent(e);S(t,"unknown event","eventFragment",e),e=t}const a=[],n=[],b=[];return e.anonymous||a.push(e.topicHash),S(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach(((e,f)=>{const d=t[f];if(e.indexed)if("string"===e.type)a.push(ae(d));else if("bytes"===e.type)a.push(Y(d));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");a.push(this.#h.encode([e.type],[d]))}else n.push(e),b.push(d)})),{data:this.#h.encode(n,b),topics:a}}decodeEventLog(e,t,a){if("string"==typeof e){const t=this.getEvent(e);S(t,"unknown event","eventFragment",e),e=t}if(null!=a&&!e.anonymous){const t=e.topicHash;S(j(a[0],32)&&a[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",a[0]),a=a.slice(1)}const n=[],b=[],f=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(Ut.from({type:"bytes32",name:e.name})),f.push(!0)):(n.push(e),f.push(!1)):(b.push(e),f.push(!1))}));const d=null!=a?this.#h.decode(n,$(a)):null,i=this.#h.decode(b,t,!0),s=[],c=[];let r=0,p=0;return e.inputs.forEach(((e,t)=>{let a=null;if(e.indexed)if(null==d)a=new ta(null);else if(f[t])a=new ta(d[p++]);else try{a=d[p++]}catch(e){a=e}else try{a=i[r++]}catch(e){a=e}s.push(a),c.push(e.name||null)})),Me.fromItems(s,c)}parseTransaction(e){const t=G(e.data,"tx.data"),a=ie(null!=e.value?e.value:0,"tx.value"),n=this.getFunction(z(t.slice(0,4)));if(!n)return null;const b=this.#h.decode(n.inputs,t.slice(4));return new Qt(n,n.selector,b,a)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Zt(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=z(e),a=this.getError(X(t,0,4));if(!a)return null;const n=this.#h.decode(a.inputs,X(t,4));return new ea(a,a.selector,n)}static from(e){return e instanceof ba?e:"string"==typeof e?new ba(JSON.parse(e)):"function"==typeof e.formatJson?new ba(e.formatJson()):"function"==typeof e.format?new ba(e.format("json")):new ba(e)}}function fa(e){return e&&"function"==typeof e.getAddress}async function da(e,t){const a=await t;return null!=a&&"0x0000000000000000000000000000000000000000"!==a||(D("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),S(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),Ce(a)}function ia(e,t){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?Ce(e):(D(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),da(e,t.resolveName(e))):fa(e)?da(e,e.getAddress()):e&&"function"==typeof e.then?da(e,e):void S(!1,"unsupported addressable value","target",e)}function sa(e,t){return{address:Ce(e),storageKeys:t.map(((e,t)=>(S(j(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase())))}}const ca=BigInt(0);function ra(e){return null==e?null:e.toString()}Symbol.iterator;class pa{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(e,t){this.provider=t;const a=Object.freeze(e.topics.slice());k(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:a,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:t,blockNumber:a,data:n,index:b,removed:f,topics:d,transactionHash:i,transactionIndex:s}=this;return{_type:"log",address:e,blockHash:t,blockNumber:a,data:n,index:b,removed:f,topics:d,transactionHash:i,transactionIndex:s}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return D(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return D(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return D(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return{orphan:"drop-log",log:{transactionHash:(e=this).transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,address:e.address,data:e.data,topics:Object.freeze(e.topics.slice()),index:e.index}};var e}}class ua{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#v;constructor(e,t){this.#v=Object.freeze(e.logs.map((e=>new pa(e,t))));let a=ca;null!=e.effectiveGasPrice?a=e.effectiveGasPrice:null!=e.gasPrice&&(a=e.gasPrice),k(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:a,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#v}toJSON(){const{to:e,from:t,contractAddress:a,hash:n,index:b,blockHash:f,blockNumber:d,logsBloom:i,logs:s,status:c,root:r}=this;return{_type:"TransactionReceipt",blockHash:f,blockNumber:d,contractAddress:a,cumulativeGasUsed:ra(this.cumulativeGasUsed),from:t,gasPrice:ra(this.gasPrice),blobGasUsed:ra(this.blobGasUsed),blobGasPrice:ra(this.blobGasPrice),gasUsed:ra(this.gasUsed),hash:n,index:b,logs:s,logsBloom:i,root:r,status:c,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(d)return null;const{blockNumber:e,nonce:t}=await O({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(t{if(null==e||0!==e.status)return e;D(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},c=await this.provider.getTransactionReceipt(this.hash);if(0===a)return s(c);if(c){if(await c.confirmations()>=a)return s(c)}else if(await i(),0===a)return null;const r=new Promise(((e,t)=>{const f=[],c=()=>{f.forEach((e=>e()))};if(f.push((()=>{d=!0})),n>0){const e=setTimeout((()=>{c(),t(N("wait for transaction timeout","TIMEOUT"))}),n);f.push((()=>{clearTimeout(e)}))}const r=async n=>{if(await n.confirmations()>=a){c();try{e(s(n))}catch(e){t(e)}}};if(f.push((()=>{this.provider.off(this.hash,r)})),this.provider.on(this.hash,r),b>=0){const e=async()=>{try{await i()}catch(e){if(A(e,"TRANSACTION_REPLACED"))return c(),void t(e)}d||this.provider.once("block",e)};f.push((()=>{this.provider.off("block",e)})),this.provider.once("block",e)}}));return await r}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return D(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),la(this)}reorderedEvent(e){return D(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),D(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ya(this,e)}replaceableTransaction(e){S(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new oa(this,this.provider);return t.#M=e,t}}function ya(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function la(e){return{orphan:"drop-transaction",tx:e}}class ma{filter;emitter;#_;constructor(e,t,a){this.#_=t,k(this,{emitter:e,filter:a})}async removeListener(){null!=this.#_&&await this.emitter.off(this.filter,this.#_)}}class Ta extends pa{interface;fragment;args;constructor(e,t,a){super(e,e.provider),k(this,{args:t.decodeEventLog(a,e.data,e.topics),fragment:a,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class ha extends pa{error;constructor(e,t){super(e,e.provider),k(this,{error:t})}}class ga extends ua{#x;constructor(e,t,a){super(a,t),this.#x=e}get logs(){return super.logs.map((e=>{const t=e.topics.length?this.#x.getEvent(e.topics[0]):null;if(t)try{return new Ta(e,this.#x,t)}catch(t){return new ha(e,t)}return e}))}}class wa extends oa{#x;constructor(e,t,a){super(a,t),this.#x=e}async wait(e,t){const a=await super.wait(e,t);return null==a?null:new ga(this.#x,this.provider,a)}}class va extends ma{log;constructor(e,t,a,n){super(e,t,a),k(this,{log:n})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class Ma extends va{constructor(e,t,a,n,b){super(e,t,a,new Ta(b,e.interface,n)),k(this,{args:e.interface.decodeEventLog(n,this.log.data,this.log.topics),fragment:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const _a=BigInt(0);function xa(e){return e&&"function"==typeof e.call}function Ia(e){return e&&"function"==typeof e.estimateGas}function Ea(e){return e&&"function"==typeof e.resolveName}function Ra(e){return e&&"function"==typeof e.sendTransaction}function Oa(e){if(null!=e){if(Ea(e))return e;if(e.provider)return e.provider}}class ka{#I;fragment;constructor(e,t,a){if(k(this,{fragment:t}),t.inputs.lengthnull==a[t]?null:e.walkAsync(a[t],((e,t)=>"address"===e?Array.isArray(t)?Promise.all(t.map((e=>ia(e,b)))):ia(t,b):t)))));return e.interface.encodeFilterTopics(t,n)}()}getTopicFilter(){return this.#I}}function Pa(e,t){return null==e?null:"function"==typeof e[t]?e:e.provider&&"function"==typeof e.provider[t]?e.provider:null}function Aa(e){return null==e?null:e.provider||null}async function Ca(e,t){const a=Ve.dereference(e,"overrides");S("object"==typeof a,"invalid overrides parameter","overrides",e);const n=function(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=z(e.data));const a="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const n of a)n in e&&null!=e[n]&&(t[n]=ie(e[n],`request.${n}`));const n="type,nonce".split(/,/);for(const a of n)a in e&&null!=e[a]&&(t[a]=pe(e[a],`request.${a}`));return e.accessList&&(t.accessList=function(e){if(Array.isArray(e))return e.map(((t,a)=>Array.isArray(t)?(S(2===t.length,"invalid slot set",`value[${a}]`,t),sa(t[0],t[1])):(S(null!=t&&"object"==typeof t,"invalid address-slot set","value",e),sa(t.address,t.storageKeys))));S(null!=e&&"object"==typeof e,"invalid access list","value",e);const t=Object.keys(e).map((t=>{const a=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return sa(t,Object.keys(a).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}(e.accessList)),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map((e=>{return j(t=e,!0)||t instanceof Uint8Array?z(e):Object.assign({},e);var t}))),t}(a);return S(null==n.to||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),S(null==n.data||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function Na(e,t,a){const n=Pa(e,"resolveName"),b=Ea(n)?n:null;return await Promise.all(t.map(((e,t)=>e.walkAsync(a[t],((e,t)=>(t=Ve.dereference(t,e),"address"===e?ia(t,b):t))))))}function Da(e){const t=async function(t){const a=await Ca(t,["data"]);a.to=await e.getAddress(),a.from&&(a.from=await ia(a.from,Oa(e.runner)));const n=e.interface,b=ie(a.value||_a,"overrides.value")===_a,f="0x"===(a.data||"0x");return!n.fallback||n.fallback.payable||!n.receive||f||b||S(!1,"cannot send data to receive or send value to non-payable fallback","overrides",t),S(n.fallback||f,"cannot send data to receive-only contract","overrides.data",a.data),S(n.receive||n.fallback&&n.fallback.payable||b,"cannot send value to non-payable fallback","overrides.value",a.value),S(n.fallback||f,"cannot send data to receive-only contract","overrides.data",a.data),a},a=async function(a){const n=e.runner;D(Ra(n),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const b=await n.sendTransaction(await t(a)),f=Aa(e.runner);return new wa(e.interface,f,b)},n=async e=>await a(e);return k(n,{_contract:e,estimateGas:async function(a){const n=Pa(e.runner,"estimateGas");return D(Ia(n),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await n.estimateGas(await t(a))},populateTransaction:t,send:a,staticCall:async function(a){const n=Pa(e.runner,"call");D(xa(n),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const b=await t(a);try{return await n.call(b)}catch(t){if(C(t)&&t.data)throw e.interface.makeError(t.data,b);throw t}}}),n}const Sa=Symbol.for("_ethersInternal_contract"),Ua=new WeakMap;function Va(e){return Ua.get(e[Sa])}async function La(e,t){let a,n=null;if(Array.isArray(t)){const n=function(t){if(j(t,32))return t;const a=e.interface.getEvent(t);return S(a,"unknown fragment","name",t),a.topicHash};a=t.map((e=>null==e?null:Array.isArray(e)?e.map(n):n(e)))}else"*"===t?a=[null]:"string"==typeof t?j(t,32)?a=[t]:(n=e.interface.getEvent(t),S(n,"unknown fragment","event",t),a=[n.topicHash]):(b=t)&&"object"==typeof b&&"getTopicFilter"in b&&"function"==typeof b.getTopicFilter&&b.fragment?a=await t.getTopicFilter():"fragment"in t?(n=t.fragment,a=[n.topicHash]):S(!1,"unknown event name","event",t);var b;return a=a.map((e=>{if(null==e)return null;if(Array.isArray(e)){const t=Array.from(new Set(e.map((e=>e.toLowerCase()))).values());return 1===t.length?t[0]:(t.sort(),t)}return e.toLowerCase()})),{fragment:n,tag:a.map((e=>null==e?"null":Array.isArray(e)?e.join("|"):e)).join("&"),topics:a}}async function Fa(e,t){const{subs:a}=Va(e);return a.get((await La(e,t)).tag)||null}async function Ga(e,t,a){const n=Aa(e.runner);D(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:b,tag:f,topics:d}=await La(e,a),{addr:i,subs:s}=Va(e);let c=s.get(f);if(!c){const t={address:i||e,topics:d},r=t=>{let n=b;if(null==n)try{n=e.interface.getEvent(t.topics[0])}catch(e){}if(n){const f=n,d=b?e.interface.decodeEventLog(b,t.data,t.topics):[];ja(e,a,d,(n=>new Ma(e,n,a,f,t)))}else ja(e,a,[],(n=>new va(e,n,a,t)))};let p=[];c={tag:f,listeners:[],start:()=>{p.length||p.push(n.on(t,r))},stop:async()=>{if(0==p.length)return;let e=p;p=[],await Promise.all(e),n.off(t,r)}},s.set(f,c)}return c}let Ba=Promise.resolve();async function ja(e,t,a,n){try{await Ba}catch(e){}const b=async function(e,t,a,n){await Ba;const b=await Fa(e,t);if(!b)return!1;const f=b.listeners.length;return b.listeners=b.listeners.filter((({listener:t,once:b})=>{const f=Array.from(a);n&&f.push(n(b?null:t));try{t.call(e,...f)}catch(e){}return!b})),0===b.listeners.length&&(b.stop(),Va(e).subs.delete(b.tag)),f>0}(e,t,a,n);return Ba=b,await b}const Ha=["then"];class za{target;interface;runner;filters;[Sa];fallback;constructor(e,t,a,n){S("string"==typeof e||fa(e),"invalid value for Contract target","target",e),null==a&&(a=null);const b=ba.from(t);let f;k(this,{target:e,runner:a,interface:b}),Object.defineProperty(this,Sa,{value:{}});let d=null,i=null;if(n){const e=Aa(a);i=new wa(this.interface,e,n)}let s=new Map;if("string"==typeof e)if(j(e))d=e,f=Promise.resolve(e);else{const t=Pa(a,"resolveName");if(!Ea(t))throw N("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});f=t.resolveName(e).then((t=>{if(null==t)throw N("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Va(this).addr=t,t}))}else f=e.getAddress().then((e=>{if(null==e)throw new Error("TODO");return Va(this).addr=e,e}));var c;c={addrPromise:f,addr:d,deployTx:i,subs:s},Ua.set(this[Sa],c);const r=new Proxy({},{get:(e,t,a)=>{if("symbol"==typeof t||Ha.indexOf(t)>=0)return Reflect.get(e,t,a);try{return this.getEvent(t)}catch(e){if(!A(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>Ha.indexOf(t)>=0?Reflect.has(e,t):Reflect.has(e,t)||this.interface.hasEvent(String(t))});return k(this,{filters:r}),k(this,{fallback:b.receive||b.fallback?Da(this):null}),new Proxy(this,{get:(e,t,a)=>{if("symbol"==typeof t||t in e||Ha.indexOf(t)>=0)return Reflect.get(e,t,a);try{return e.getFunction(t)}catch(e){if(!A(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>"symbol"==typeof t||t in e||Ha.indexOf(t)>=0?Reflect.has(e,t):e.interface.hasFunction(t)})}connect(e){return new za(this.target,this.interface,e)}attach(e){return new za(e,this.interface,this.runner)}async getAddress(){return await Va(this).addrPromise}async getDeployedCode(){const e=Aa(this.runner);D(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return"0x"===t?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;const t=Aa(this.runner);return D(null!=t,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise(((e,a)=>{const n=async()=>{try{if(null!=await this.getDeployedCode())return e(this);t.once("block",n)}catch(e){a(e)}};n()}))}deploymentTransaction(){return Va(this).deployTx}getFunction(e){"string"!=typeof e&&(e=e.format());const t=function(e,t){const a=function(...a){const n=e.interface.getFunction(t,a);return D(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:a}}),n},n=async function(...t){const n=a(...t);let b={};if(n.inputs.length+1===t.length&&(b=await Ca(t.pop()),b.from&&(b.from=await ia(b.from,Oa(e.runner)))),n.inputs.length!==t.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const f=await Na(e.runner,n.inputs,t);return Object.assign({},b,await O({to:e.getAddress(),data:e.interface.encodeFunctionData(n,f)}))},b=async function(...e){const t=await d(...e);return 1===t.length?t[0]:t},f=async function(...t){const a=e.runner;D(Ra(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const b=await a.sendTransaction(await n(...t)),f=Aa(e.runner);return new wa(e.interface,f,b)},d=async function(...t){const b=Pa(e.runner,"call");D(xa(b),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await n(...t);let d="0x";try{d=await b.call(f)}catch(t){if(C(t)&&t.data)throw e.interface.makeError(t.data,f);throw t}const i=a(...t);return e.interface.decodeFunctionResult(i,d)},i=async(...e)=>a(...e).constant?await b(...e):await f(...e);return k(i,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:a,estimateGas:async function(...t){const a=Pa(e.runner,"estimateGas");return D(Ia(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await n(...t))},populateTransaction:n,send:f,staticCall:b,staticCallResult:d}),Object.defineProperty(i,"fragment",{configurable:!1,enumerable:!0,get:()=>{const a=e.interface.getFunction(t);return D(a,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),a}}),i}(this,e);return t}getEvent(e){return"string"!=typeof e&&(e=e.format()),function(e,t){const a=function(...a){const n=e.interface.getEvent(t,a);return D(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:a}}),n},n=function(...t){return new ka(e,a(...t),t)};return k(n,{name:e.interface.getEventName(t),_contract:e,_key:t,getFragment:a}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const a=e.interface.getEvent(t);return D(a,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),a}}),n}(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,a){null==t&&(t=0),null==a&&(a="latest");const{addr:n,addrPromise:b}=Va(this),f=n||await b,{fragment:d,topics:i}=await La(this,e),s={address:f,topics:i,fromBlock:t,toBlock:a},c=Aa(this.runner);return D(c,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await c.getLogs(s)).map((e=>{let t=d;if(null==t)try{t=this.interface.getEvent(e.topics[0])}catch(e){}if(t)try{return new Ta(e,this.interface,t)}catch(t){return new ha(e,t)}return new pa(e,c)}))}async on(e,t){const a=await Ga(this,"on",e);return a.listeners.push({listener:t,once:!1}),a.start(),this}async once(e,t){const a=await Ga(this,"once",e);return a.listeners.push({listener:t,once:!0}),a.start(),this}async emit(e,...t){return await ja(this,e,t,null)}async listenerCount(e){if(e){const t=await Fa(this,e);return t?t.listeners.length:0}const{subs:t}=Va(this);let a=0;for(const{listeners:e}of t.values())a+=e.length;return a}async listeners(e){if(e){const t=await Fa(this,e);return t?t.listeners.map((({listener:e})=>e)):[]}const{subs:t}=Va(this);let a=[];for(const{listeners:e}of t.values())a=a.concat(e.map((({listener:e})=>e)));return a}async off(e,t){const a=await Fa(this,e);if(!a)return this;if(t){const e=a.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&a.listeners.splice(e,1)}return null!=t&&0!==a.listeners.length||(a.stop(),Va(this).subs.delete(a.tag)),this}async removeAllListeners(e){if(e){const t=await Fa(this,e);if(!t)return this;t.stop(),Va(this).subs.delete(t.tag)}else{const{subs:e}=Va(this);for(const{tag:t,stop:a}of e.values())a(),e.delete(t)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){return class extends za{constructor(t,a=null){super(t,e,a)}}}static from(e,t,a){return null==a&&(a=null),new this(e,t,a)}}class $a extends(function(){return za}()){}function Xa(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function Wa(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(Wa(e))})),t.length<=55)return t.unshift(192+t.length),t;const a=Xa(t.length);return a.unshift(247+a.length),a.concat(t)}const t=Array.prototype.slice.call(G(e,"object"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const a=Xa(t.length);return a.unshift(183+a.length),a.concat(t)}const qa="0123456789abcdef";function Ja(e){let t="0x";for(const a of Wa(e))t+=qa[a>>4],t+=qa[15&a];return t}class Ka{interface;bytecode;runner;constructor(e,t,a){const n=ba.from(e);t instanceof Uint8Array||("object"==typeof t&&(t=t.object),t.startsWith("0x")||(t="0x"+t)),k(this,{bytecode:t=z(G(t)),interface:n,runner:a||null})}attach(e){return new za(e,this.interface,this.runner)}async getDeployTransaction(...e){let t={};const a=this.interface.deploy;if(a.inputs.length+1===e.length&&(t=await Ca(e.pop())),a.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const n=await Na(this.runner,a.inputs,e),b=$([this.bytecode,this.interface.encodeDeploy(n)]);return Object.assign({},t,{data:b})}async deploy(...e){const t=await this.getDeployTransaction(...e);D(this.runner&&"function"==typeof this.runner.sendTransaction,"factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const a=await this.runner.sendTransaction(t),n=function(e){const t=Ce(e.from);let a=ie(e.nonce,"tx.nonce").toString(16);return a="0"===a?"0x":a.length%2?"0x0"+a:"0x"+a,Ce(X(Y(Ja([t,a])),12))}(a);return new za(n,this.interface,this.runner,a)}connect(e){return new Ka(this.interface,this.bytecode,e)}static fromSolidity(e,t){S(null!=e,"bad compiler output","output",e),"string"==typeof e&&(e=JSON.parse(e));const a=e.abi;let n="";return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(a,n,t)}}const Ya=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"}];class Za{static createInterface(){return new ba(Ya)}static connect(e,t){return new $a(e,Ya,t)}}Za.abi=Ya;const Qa=[{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"allowance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientAllowance",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC20InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC20InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC20InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"spender",type:"address"}],name:"ERC20InvalidSpender",type:"error"}];class en{static createInterface(){return new ba(Qa)}static connect(e,t){return new $a(e,Qa,t)}}en.abi=Qa;const tn=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"}];class an{static createInterface(){return new ba(tn)}static connect(e,t){return new $a(e,tn,t)}}an.abi=tn;var nn=Object.freeze({__proto__:null,IERC1155Errors__factory:Za,IERC20Errors__factory:en,IERC721Errors__factory:an}),bn=Object.freeze({__proto__:null,draftIerc6093Sol:nn});const fn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class dn{static createInterface(){return new ba(fn)}static connect(e,t){return new $a(e,fn,t)}}dn.abi=fn;var sn=Object.freeze({__proto__:null,IERC20Metadata__factory:dn});const cn=[{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"allowance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientAllowance",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC20InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC20InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC20InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"spender",type:"address"}],name:"ERC20InvalidSpender",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];let rn=class{static createInterface(){return new ba(cn)}static connect(e,t){return new $a(e,cn,t)}};rn.abi=cn;const pn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];let un=class{static createInterface(){return new ba(pn)}static connect(e,t){return new $a(e,pn,t)}};un.abi=pn;var on=Object.freeze({__proto__:null,ERC20__factory:rn,IERC20__factory:un,extensions:sn}),yn=Object.freeze({__proto__:null,erc20:on}),ln=Object.freeze({__proto__:null,interfaces:bn,token:yn});const mn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class Tn{static createInterface(){return new ba(mn)}static connect(e,t){return new $a(e,mn,t)}}Tn.abi=mn;var hn=Object.freeze({__proto__:null,Ownable__factory:Tn});const gn=[{stateMutability:"payable",type:"fallback"},{stateMutability:"payable",type:"receive"}];class wn{static createInterface(){return new ba(gn)}static connect(e,t){return new $a(e,gn,t)}}wn.abi=gn;const vn=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"_admin",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],Mn="0x60806040526040516108dc3803806108dc8339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b50604052508491508290506100ee826101bf565b8051156101a6576000826001600160a01b0316826040518082805190602001908083835b602083106101315780518252601f199092019160209182019101610112565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610191576040519150601f19603f3d011682016040523d82523d6000602084013e610196565b606091505b50509050806101a457600080fd5b505b506101ae9050565b6101b782610231565b50505061025b565b6101d28161025560201b6103b41760201c565b61020d5760405162461bcd60e51b81526004018080602001828103825260368152602001806108a66036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b3b151590565b61063c8061026a6000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b815260040180806020018281038252603a815260200180610555603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260428152602001806105c56042913960600191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603681526020018061058f6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163745472616e73706172656e745570677261646561626c6550726f78793a2061646d696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172676574a26469706673582212200bf5c74f32000c92994fb0de053047d19f9c526eb1b1953df8bcb7d7e0df8d2864736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class _n extends Ka{constructor(...e){e.length>1?super(...e):super(vn,Mn,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(vn)}static connect(e,t){return new $a(e,vn,t)}}_n.bytecode=Mn,_n.abi=vn;const xn=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{stateMutability:"payable",type:"receive"}],In="0x60806040526040516103123803806103128339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052506100e3915050565b6100ec826101ab565b8051156101a4576000826001600160a01b0316826040518082805190602001908083835b6020831061012f5780518252601f199092019160209182019101610110565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461018f576040519150601f19603f3d011682016040523d82523d6000602084013e610194565b606091505b50509050806101a257600080fd5b505b5050610223565b6101be8161021d60201b6100271760201c565b6101f95760405162461bcd60e51b81526004018080602001828103825260368152602001806102dc6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b3b151590565b60ab806102316000396000f3fe608060405236601057600e6013565b005b600e5b60196025565b60256021602d565b6052565b565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156070573d6000f35b3d6000fdfea2646970667358221220621b7042bfb847b4073a3c58bdbea5295ce2e761b4e2307ca010caaac996d80c64736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class En extends Ka{constructor(...e){e.length>1?super(...e):super(xn,In,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(xn)}static connect(e,t){return new $a(e,xn,t)}}En.bytecode=In,En.abi=xn;var Rn=Object.freeze({__proto__:null,Proxy__factory:wn,TransparentUpgradeableProxy__factory:_n,UpgradeableProxy__factory:En});const On=[{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],kn="0x608060405234801561001057600080fd5b5060405162000c6238038062000c628339818101604052604081101561003557600080fd5b810190808051604051939291908464010000000082111561005557600080fd5b90830190602082018581111561006a57600080fd5b825164010000000081118282018810171561008457600080fd5b82525081516020918201929091019080838360005b838110156100b1578181015183820152602001610099565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b506040526020018051604051939291908464010000000082111561010157600080fd5b90830190602082018581111561011657600080fd5b825164010000000081118282018810171561013057600080fd5b82525081516020918201929091019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b50604052505082516101a4915060039060208501906101cd565b5080516101b89060049060208401906101cd565b50506005805460ff1916601217905550610260565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061020e57805160ff191683800117855561023b565b8280016001018555821561023b579182015b8281111561023b578251825591602001919060010190610220565b5061024792915061024b565b5090565b5b80821115610247576000815560010161024c565b6109f280620002706000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b61017361036c565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610372565b6101c36103f9565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b038135169060200135610402565b6101736004803603602081101561021b57600080fd5b50356001600160a01b0316610450565b6100b661046b565b6101576004803603604081101561024957600080fd5b506001600160a01b0381351690602001356104cc565b6101576004803603604081101561027557600080fd5b506001600160a01b038135169060200135610534565b610173600480360360408110156102a157600080fd5b506001600160a01b0381358116916020013516610548565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c610573565b8484610577565b50600192915050565b60025490565b600061037f848484610663565b6103ef8461038b610573565b6103ea85604051806060016040528060288152602001610927602891396001600160a01b038a166000908152600160205260408120906103c9610573565b6001600160a01b0316815260208101919091526040016000205491906107be565b610577565b5060019392505050565b60055460ff1690565b600061036361040f610573565b846103ea8560016000610420610573565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610855565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b60006103636104d9610573565b846103ea856040518060600160405280602581526020016109986025913960016000610503610573565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906107be565b6000610363610541610573565b8484610663565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166105bc5760405162461bcd60e51b81526004018080602001828103825260248152602001806109746024913960400191505060405180910390fd5b6001600160a01b0382166106015760405162461bcd60e51b81526004018080602001828103825260228152602001806108df6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106a85760405162461bcd60e51b815260040180806020018281038252602581526020018061094f6025913960400191505060405180910390fd5b6001600160a01b0382166106ed5760405162461bcd60e51b81526004018080602001828103825260238152602001806108bc6023913960400191505060405180910390fd5b6106f88383836108b6565b61073581604051806060016040528060268152602001610901602691396001600160a01b03861660009081526020819052604090205491906107be565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107649082610855565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561084d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108125781810151838201526020016107fa565b50505050905090810190601f16801561083f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156108af576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220347718b9db0288208ab5957df73278c6f781963df0e13918151971217fc2827964736f6c634300060c0033";class Pn extends Ka{constructor(...e){e.length>1?super(...e):super(On,kn,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(On)}static connect(e,t){return new $a(e,On,t)}}Pn.bytecode=kn,Pn.abi=On;const An=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class Cn{static createInterface(){return new ba(An)}static connect(e,t){return new $a(e,An,t)}}Cn.abi=An;const Nn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];let Dn=class{static createInterface(){return new ba(Nn)}static connect(e,t){return new $a(e,Nn,t)}};Dn.abi=Nn;var Sn=Object.freeze({__proto__:null,ERC20Burnable__factory:Cn,ERC20__factory:Pn,IERC20__factory:Dn}),Un=Object.freeze({__proto__:null,erc20:Sn});const Vn=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class Ln{static createInterface(){return new ba(Vn)}static connect(e,t){return new $a(e,Vn,t)}}Ln.abi=Vn;var Fn=Object.freeze({__proto__:null,Pausable__factory:Ln}),Gn=Object.freeze({__proto__:null,access:hn,proxy:Rn,token:Un,utils:Fn}),Bn=Object.freeze({__proto__:null,contracts:ln,contractsV3:Gn});const jn=[{inputs:[{internalType:"uint256",name:"in_xL",type:"uint256"},{internalType:"uint256",name:"in_xR",type:"uint256"}],name:"MiMCSponge",outputs:[{internalType:"uint256",name:"xL",type:"uint256"},{internalType:"uint256",name:"xR",type:"uint256"}],stateMutability:"pure",type:"function"}];class Hn{static createInterface(){return new ba(jn)}static connect(e,t){return new $a(e,jn,t)}}Hn.abi=jn;const zn=[{inputs:[{internalType:"uint32",name:"_levels",type:"uint32"},{internalType:"contract IHasher",name:"_hasher",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],$n="0x60c0604052600380546001600160401b031916905534801561002057600080fd5b50604051610a10380380610a1083398101604081905261003f91610385565b60008263ffffffff16116100a65760405162461bcd60e51b815260206004820152602360248201527f5f6c6576656c732073686f756c642062652067726561746572207468616e207a60448201526265726f60e81b60648201526084015b60405180910390fd5b60208263ffffffff16106100fc5760405162461bcd60e51b815260206004820152601e60248201527f5f6c6576656c732073686f756c64206265206c657373207468616e2033320000604482015260640161009d565b63ffffffff821660a0526001600160a01b0381166080527f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60005b8363ffffffff168163ffffffff1610156101845763ffffffff8116600090815260016020908152604080832085905590829052902082905561017a8383806101b8565b9150600101610137565b506000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b55506103f89050565b60006000805160206109f083398151915283106102175760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015260640161009d565b6000805160206109f0833981519152821061027e5760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b606482015260840161009d565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156102cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f191906103d4565b90925090506000805160206109f083398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037a91906103d4565b509695505050505050565b6000806040838503121561039857600080fd5b825163ffffffff811681146103ac57600080fd5b60208401519092506001600160a01b03811681146103c957600080fd5b809150509250929050565b600080604083850312156103e757600080fd5b505080516020909101519092909150565b60805160a0516105d361041d60003960006101010152600061020f01526105d36000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063c2b40ae41161008c578063ec73295911610066578063ec732959146101e3578063ed33639f1461020a578063f178e47c14610249578063fc7e9c6f1461026957600080fd5b8063c2b40ae41461019b578063cd87a3b4146101bb578063e8295588146101c357600080fd5b8063414a37ba146100d45780634ecf518b146100fc5780636d9833e3146101385780638ea3099e1461015b57806390eeb02b1461016e578063ba70f7571461017e575b600080fd5b6100e960008051602061057e83398151915281565b6040519081526020015b60405180910390f35b6101237f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016100f3565b61014b6101463660046104d1565b610281565b60405190151581526020016100f3565b6100e96101693660046104ea565b6102ff565b6003546101239063ffffffff1681565b60035463ffffffff166000908152600260205260409020546100e9565b6100e96101a93660046104d1565b60026020526000908152604090205481565b610123601e81565b6100e96101d13660046104d1565b60016020526000908152604090205481565b6100e97f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b6102317f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100f3565b6100e96102573660046104d1565b60006020819052908152604090205481565b60035461012390640100000000900463ffffffff1681565b600081810361029257506000919050565b60035463ffffffff16805b63ffffffff811660009081526002602052604090205484036102c3575060019392505050565b8063ffffffff166000036102d55750601e5b806102df8161052b565b9150508163ffffffff168163ffffffff160361029d575060009392505050565b600060008051602061057e83398151915283106103635760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c6460448201526064015b60405180910390fd5b60008051602061057e83398151915282106103ca5760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b606482015260840161035a565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610559565b909250905060008051602061057e83398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190610559565b509695505050505050565b6000602082840312156104e357600080fd5b5035919050565b6000806000606084860312156104ff57600080fd5b83356001600160a01b038116811461051657600080fd5b95602085013595506040909401359392505050565b600063ffffffff82168061054f57634e487b7160e01b600052601160045260246000fd5b6000190192915050565b6000806040838503121561056c57600080fd5b50508051602090910151909290915056fe30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001a26469706673582212208761f09aabb074ee2c2a755f38291cbc57ea6dac47bc37dfa948986c4481869c64736f6c6343000819003330644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001";class Xn extends Ka{constructor(...e){e.length>1?super(...e):super(zn,$n,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(zn)}static connect(e,t){return new $a(e,zn,t)}}Xn.bytecode=$n,Xn.abi=zn;var Wn=Object.freeze({__proto__:null,IHasher__factory:Hn,MerkleTreeWithHistory__factory:Xn});const qn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"_totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"who",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"}];class Jn{static createInterface(){return new ba(qn)}static connect(e,t){return new $a(e,qn,t)}}Jn.abi=qn;const Kn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"_totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"who",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}];class Yn{static createInterface(){return new ba(Kn)}static connect(e,t){return new $a(e,Kn,t)}}Yn.abi=Kn;var Zn=Object.freeze({__proto__:null,ERC20Basic__factory:Jn,IUSDT__factory:Yn});const Qn=[{stateMutability:"nonpayable",type:"fallback"}],eb="0x6080604052348015600f57600080fd5b50609c80601d6000396000f3fe6080604052348015600f57600080fd5b5060405162461bcd60e51b815260206004820152602160248201527f7468697320636f6e747261637420646f6573206e6f74206163636570742045546044820152600960fb1b606482015260840160405180910390fdfea264697066735822122034c2432feedadd0f30a6f66555381c20922b6ab7c9b3ede4c27896b23e802a8264736f6c63430008190033";class tb extends Ka{constructor(...e){e.length>1?super(...e):super(Qn,eb,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Qn)}static connect(e,t){return new $a(e,Qn,t)}}tb.bytecode=eb,tb.abi=Qn;const ab=[{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"allowance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientAllowance",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC20InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC20InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC20InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"spender",type:"address"}],name:"ERC20InvalidSpender",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],nb="0x608060405234801561001057600080fd5b50604051806040016040528060078152602001664441494d6f636b60c81b815250604051806040016040528060048152602001634441494d60e01b815250816003908161005d9190610113565b50600461006a8282610113565b5050506101d2565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061009c57607f821691505b6020821081036100bc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561010e576000816000526020600020601f850160051c810160208610156100eb5750805b601f850160051c820191505b8181101561010a578281556001016100f7565b5050505b505050565b81516001600160401b0381111561012c5761012c610072565b6101408161013a8454610088565b846100c2565b602080601f831160018114610175576000841561015d5750858301515b600019600386901b1c1916600185901b17855561010a565b600085815260208120601f198616915b828110156101a457888601518255948401946001909101908401610185565b50858210156101c25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610785806101e16000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806340c10f191161006657806340c10f191461011857806370a082311461012d57806395d89b4114610156578063a9059cbb1461015e578063dd62ed3e1461017157600080fd5b806306fdde03146100a3578063095ea7b3146100c157806318160ddd146100e457806323b872dd146100f6578063313ce56714610109575b600080fd5b6100ab6101aa565b6040516100b891906105ce565b60405180910390f35b6100d46100cf366004610639565b61023c565b60405190151581526020016100b8565b6002545b6040519081526020016100b8565b6100d4610104366004610663565b610256565b604051601281526020016100b8565b61012b610126366004610639565b61027a565b005b6100e861013b36600461069f565b6001600160a01b031660009081526020819052604090205490565b6100ab610288565b6100d461016c366004610639565b610297565b6100e861017f3660046106c1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101b9906106f4565b80601f01602080910402602001604051908101604052809291908181526020018280546101e5906106f4565b80156102325780601f1061020757610100808354040283529160200191610232565b820191906000526020600020905b81548152906001019060200180831161021557829003601f168201915b5050505050905090565b60003361024a8185856102a5565b60019150505b92915050565b6000336102648582856102b7565b61026f85858561033a565b506001949350505050565b6102848282610399565b5050565b6060600480546101b9906106f4565b60003361024a81858561033a565b6102b283838360016103cf565b505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610334578181101561032557604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b610334848484840360006103cf565b50505050565b6001600160a01b03831661036457604051634b637e8f60e11b81526000600482015260240161031c565b6001600160a01b03821661038e5760405163ec442f0560e01b81526000600482015260240161031c565b6102b28383836104a4565b6001600160a01b0382166103c35760405163ec442f0560e01b81526000600482015260240161031c565b610284600083836104a4565b6001600160a01b0384166103f95760405163e602df0560e01b81526000600482015260240161031c565b6001600160a01b03831661042357604051634a1406b160e11b81526000600482015260240161031c565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561033457826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161049691815260200190565b60405180910390a350505050565b6001600160a01b0383166104cf5780600260008282546104c4919061072e565b909155506105419050565b6001600160a01b038316600090815260208190526040902054818110156105225760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640161031c565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661055d5760028054829003905561057c565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516105c191815260200190565b60405180910390a3505050565b60006020808352835180602085015260005b818110156105fc578581018301518582016040015282016105e0565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461063457600080fd5b919050565b6000806040838503121561064c57600080fd5b6106558361061d565b946020939093013593505050565b60008060006060848603121561067857600080fd5b6106818461061d565b925061068f6020850161061d565b9150604084013590509250925092565b6000602082840312156106b157600080fd5b6106ba8261061d565b9392505050565b600080604083850312156106d457600080fd5b6106dd8361061d565b91506106eb6020840161061d565b90509250929050565b600181811c9082168061070857607f821691505b60208210810361072857634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561025057634e487b7160e01b600052601160045260246000fdfea264697066735822122058942fcc650d3670455590fabbf6c5726b3ae7df7b57e75bc02cb2c66259d45b64736f6c63430008190033";class bb extends Ka{constructor(...e){e.length>1?super(...e):super(ab,nb,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(ab)}static connect(e,t){return new $a(e,ab,t)}}bb.bytecode=nb,bb.abi=ab;const fb=[{inputs:[{internalType:"bytes",name:"_initCode",type:"bytes"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"deploy",outputs:[{internalType:"address payable",name:"createdContract",type:"address"}],stateMutability:"nonpayable",type:"function"}];let db=class{static createInterface(){return new ba(fb)}static connect(e,t){return new $a(e,fb,t)}};db.abi=fb;const ib=[{inputs:[{internalType:"uint32",name:"_treeLevels",type:"uint32"},{internalType:"contract IHasher",name:"_hasher",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_leaf",type:"bytes32"}],name:"insert",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],sb="0x60c0604052600380546001600160401b031916905534801561002057600080fd5b50604051610e3c380380610e3c83398101604081905261003f91610389565b818160008263ffffffff16116100a85760405162461bcd60e51b815260206004820152602360248201527f5f6c6576656c732073686f756c642062652067726561746572207468616e207a60448201526265726f60e81b60648201526084015b60405180910390fd5b60208263ffffffff16106100fe5760405162461bcd60e51b815260206004820152601e60248201527f5f6c6576656c732073686f756c64206265206c657373207468616e2033320000604482015260640161009f565b63ffffffff821660a0526001600160a01b0381166080527f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60005b8363ffffffff168163ffffffff1610156101865763ffffffff8116600090815260016020908152604080832085905590829052902082905561017c8383806101bc565b9150600101610139565b506000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b55506103fc92505050565b6000600080516020610e1c833981519152831061021b5760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015260640161009f565b600080516020610e1c83398151915282106102825760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b606482015260840161009f565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156102d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f591906103d8565b9092509050600080516020610e1c83398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa15801561035a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037e91906103d8565b509695505050505050565b6000806040838503121561039c57600080fd5b825163ffffffff811681146103b057600080fd5b60208401519092506001600160a01b03811681146103cd57600080fd5b809150509250929050565b600080604083850312156103eb57600080fd5b505080516020909101519092909150565b60805160a0516109e6610436600039600081816101310152818161052701526105c901526000818161023f015261066101526109e66000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063c2b40ae41161008c578063ec73295911610066578063ec73295914610213578063ed33639f1461023a578063f178e47c14610279578063fc7e9c6f1461029957600080fd5b8063c2b40ae4146101cb578063cd87a3b4146101eb578063e8295588146101f357600080fd5b80636d9833e3116100c85780636d9833e3146101685780638ea3099e1461018b57806390eeb02b1461019e578063ba70f757146101ae57600080fd5b80632d287e43146100ef578063414a37ba146101045780634ecf518b1461012c575b600080fd5b6101026100fd36600461072c565b6102b1565b005b61011960008051602061099183398151915281565b6040519081526020015b60405180910390f35b6101537f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610123565b61017b61017636600461072c565b6102be565b6040519015158152602001610123565b610119610199366004610745565b61033c565b6003546101539063ffffffff1681565b60035463ffffffff16600090815260026020526040902054610119565b6101196101d936600461072c565b60026020526000908152604090205481565b610153601e81565b61011961020136600461072c565b60016020526000908152604090205481565b6101197f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b6102617f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610123565b61011961028736600461072c565b60006020819052908152604090205481565b60035461015390640100000000900463ffffffff1681565b6102ba8161050e565b5050565b60008181036102cf57506000919050565b60035463ffffffff16805b63ffffffff81166000908152600260205260409020548403610300575060019392505050565b8063ffffffff166000036103125750601e5b8061031c8161079c565b9150508163ffffffff168163ffffffff16036102da575060009392505050565b600060008051602061099183398151915283106103a05760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c6460448201526064015b60405180910390fd5b60008051602061099183398151915282106104075760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b6064820152608401610397565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610456573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047a91906107bc565b909250905060008051602061099183398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156104df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050391906107bc565b509695505050505050565b600354600090640100000000900463ffffffff1661054d7f00000000000000000000000000000000000000000000000000000000000000006002610909565b63ffffffff168163ffffffff16036105c05760405162461bcd60e51b815260206004820152603060248201527f4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656160448201526f1d995cc818d85b88189948185919195960821b6064820152608401610397565b8083600080805b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168163ffffffff16101561069e57610606600286610926565b63ffffffff166000036106405763ffffffff811660009081526001602090815260408083205491839052909120859055849350915061065c565b63ffffffff811660009081526020819052604090205492508391505b6106877f0000000000000000000000000000000000000000000000000000000000000000848461033c565b9350610694600286610949565b94506001016105c7565b50600354600090601e906106b99063ffffffff16600161096c565b6106c39190610926565b6003805463ffffffff191663ffffffff8316908117909155600090815260026020526040902085905590506106f986600161096c565b6003805463ffffffff929092166401000000000267ffffffff000000001990921691909117905550939695505050505050565b60006020828403121561073e57600080fd5b5035919050565b60008060006060848603121561075a57600080fd5b83356001600160a01b038116811461077157600080fd5b95602085013595506040909401359392505050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8216806107b2576107b2610786565b6000190192915050565b600080604083850312156107cf57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601260045260246000fd5b600181815b80851115610833578163ffffffff0482111561081957610819610786565b8085161561082657918102915b93841c93908002906107fb565b509250929050565b60008261084a57506001610903565b8161085757506000610903565b816001811461086d5760028114610877576108a8565b6001915050610903565b60ff84111561088857610888610786565b6001841b915063ffffffff8211156108a2576108a2610786565b50610903565b5060208310610133831016604e8410600b84101617156108df575081810a63ffffffff8111156108da576108da610786565b610903565b6108e983836107f6565b8063ffffffff048211156108ff576108ff610786565b0290505b92915050565b600063ffffffff61091e81851682851661083b565b949350505050565b600063ffffffff8084168061093d5761093d6107e0565b92169190910692915050565b600063ffffffff80841680610960576109606107e0565b92169190910492915050565b63ffffffff81811683821601908082111561098957610989610786565b509291505056fe30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001a2646970667358221220157f8209ab2f77037d0684fb5023c7036cedb727123539b4e3a1f03c335900f264736f6c6343000819003330644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001";class cb extends Ka{constructor(...e){e.length>1?super(...e):super(ib,sb,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(ib)}static connect(e,t){return new $a(e,ib,t)}}cb.bytecode=sb,cb.abi=ib;var rb=Object.freeze({__proto__:null,BadRecipient__factory:tb,ERC20Mock__factory:bb,IDeployer__factory:db,MerkleTreeWithHistoryMock__factory:cb,iusdtSol:Zn});const pb=[{inputs:[{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"uint256[6]",name:"_input",type:"uint256[6]"}],name:"verifyProof",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class ub{static createInterface(){return new ba(pb)}static connect(e,t){return new $a(e,pb,t)}}ub.abi=pb;const ob=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"commitment",type:"bytes32"},{indexed:!1,internalType:"uint32",name:"leafIndex",type:"uint32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"}],name:"Withdrawal",type:"event"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"commitments",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"}],name:"isSpent",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_nullifierHashes",type:"bytes32[]"}],name:"isSpentArray",outputs:[{internalType:"bool[]",name:"spent",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"nullifierHashes",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"verifier",outputs:[{internalType:"contract IVerifier",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}];class yb{static createInterface(){return new ba(ob)}static connect(e,t){return new $a(e,ob,t)}}yb.abi=ob;var lb=Object.freeze({__proto__:null,IVerifier__factory:ub,Tornado__factory:yb});const mb=[{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"proof",type:"bytes"},{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"address payable",name:"relayer",type:"address"},{internalType:"uint256",name:"fee",type:"uint256"},{internalType:"uint256",name:"refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"}];let Tb=class{static createInterface(){return new ba(mb)}static connect(e,t){return new $a(e,mb,t)}};Tb.abi=mb;const hb=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bytes",name:"encryptedNote",type:"bytes"}],name:"EncryptedNote",type:"event"},{inputs:[{internalType:"bytes[]",name:"_encryptedNotes",type:"bytes[]"}],name:"backupNotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_tornado",type:"address"},{internalType:"bytes32",name:"_commitment",type:"bytes32"},{internalType:"bytes",name:"_encryptedNote",type:"bytes"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_tornado",type:"address"},{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"}],gb="0x608060405234801561001057600080fd5b506104f6806100206000396000f3fe6080604052600436106100345760003560e01c806313d98d13146100395780636485ba2a1461004e578063b438689f1461006e575b600080fd5b61004c6100473660046102c7565b610081565b005b34801561005a57600080fd5b5061004c610069366004610258565b61012a565b61004c61007c366004610321565b610198565b60405163b214faa560e01b81526001600160a01b0385169063b214faa59034906100af9087906004016103ec565b6000604051808303818588803b1580156100c857600080fd5b505af11580156100dc573d6000803e3d6000fd5b5050505050336001600160a01b03167ffa28df43db3553771f7209dcef046f3bdfea15870ab625dcda30ac58b82b4008838360405161011c9291906103f5565b60405180910390a250505050565b60005b8181101561019357337ffa28df43db3553771f7209dcef046f3bdfea15870ab625dcda30ac58b82b400884848481811061016357fe5b90506020028101906101759190610463565b6040516101839291906103f5565b60405180910390a260010161012d565b505050565b6040516310d056db60e11b81526001600160a01b038a16906321a0adb69034906101d4908c908c908c908c908c908c908c908c90600401610411565b6000604051808303818588803b1580156101ed57600080fd5b505af1158015610201573d6000803e3d6000fd5b5050505050505050505050505050565b60008083601f840112610222578182fd5b50813567ffffffffffffffff811115610239578182fd5b60208301915083602082850101111561025157600080fd5b9250929050565b6000806020838503121561026a578182fd5b823567ffffffffffffffff80821115610281578384fd5b818501915085601f830112610294578384fd5b8135818111156102a2578485fd5b86602080830285010111156102b5578485fd5b60209290920196919550909350505050565b600080600080606085870312156102dc578182fd5b84356102e7816104a8565b935060208501359250604085013567ffffffffffffffff811115610309578283fd5b61031587828801610211565b95989497509550505050565b60008060008060008060008060006101008a8c03121561033f578485fd5b893561034a816104a8565b985060208a013567ffffffffffffffff811115610365578586fd5b6103718c828d01610211565b90995097505060408a0135955060608a0135945060808a0135610393816104a8565b935060a08a01356103a3816104a8565b8093505060c08a0135915060e08a013590509295985092959850929598565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b90815260200190565b6000602082526104096020830184866103c2565b949350505050565b600060e0825261042560e083018a8c6103c2565b60208301989098525060408101959095526001600160a01b03938416606086015291909216608084015260a083019190915260c09091015292915050565b6000808335601e19843603018112610479578283fd5b83018035915067ffffffffffffffff821115610493578283fd5b60200191503681900382131561025157600080fd5b6001600160a01b03811681146104bd57600080fd5b5056fea2646970667358221220a833625c5e7cc02dff95b380fd1e6d47b08cffea90c70cfe6739960deee47b8364736f6c634300060c0033";class wb extends Ka{constructor(...e){e.length>1?super(...e):super(hb,gb,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(hb)}static connect(e,t){return new $a(e,hb,t)}}wb.bytecode=gb,wb.abi=hb;var vb=Object.freeze({__proto__:null,ITornadoInstance__factory:Tb,TornadoProxyLight__factory:wb});const Mb=[{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class _b{static createInterface(){return new ba(Mb)}static connect(e,t){return new $a(e,Mb,t)}}_b.abi=Mb;var xb=Object.freeze({__proto__:null,IERC20__factory:_b});const Ib=[{inputs:[{internalType:"contract IVerifier",name:"_verifier",type:"address"},{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"uint256",name:"_denomination",type:"uint256"},{internalType:"uint32",name:"_merkleTreeHeight",type:"uint32"},{internalType:"contract IERC20",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"commitment",type:"bytes32"},{indexed:!1,internalType:"uint32",name:"leafIndex",type:"uint32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"}],name:"Withdrawal",type:"event"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"commitments",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"}],name:"isSpent",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_nullifierHashes",type:"bytes32[]"}],name:"isSpentArray",outputs:[{internalType:"bool[]",name:"spent",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"nullifierHashes",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"verifier",outputs:[{internalType:"contract IVerifier",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],Eb="0x610120604052600380546001600160401b031916905534801561002157600080fd5b50604051611db8380380611db883398101604081905261004091610420565b84848484808360008263ffffffff16116100ad5760405162461bcd60e51b815260206004820152602360248201527f5f6c6576656c732073686f756c642062652067726561746572207468616e207a60448201526265726f60e81b60648201526084015b60405180910390fd5b60208263ffffffff16106101035760405162461bcd60e51b815260206004820152601e60248201527f5f6c6576656c732073686f756c64206265206c657373207468616e203332000060448201526064016100a4565b63ffffffff821660a0526001600160a01b0381166080527f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60005b8363ffffffff168163ffffffff16101561018b5763ffffffff8116600090815260016020908152604080832085905590829052902082905561018183838061023b565b915060010161013e565b506000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b5550506001600455816102195760405162461bcd60e51b815260206004820152602560248201527f64656e6f6d696e6174696f6e2073686f756c6420626520677265617465722074604482015264068616e20360dc1b60648201526084016100a4565b506001600160a01b0392831660c05260e052501661010052506104b892505050565b6000600080516020611d98833981519152831061029a5760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c6460448201526064016100a4565b600080516020611d9883398151915282106103015760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b60648201526084016100a4565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610350573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103749190610494565b9092509050600080516020611d9883398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156103d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fd9190610494565b509695505050505050565b6001600160a01b038116811461041d57600080fd5b50565b600080600080600060a0868803121561043857600080fd5b855161044381610408565b602087015190955061045481610408565b60408701516060880151919550935063ffffffff8116811461047557600080fd5b608087015190925061048681610408565b809150509295509295909350565b600080604083850312156104a757600080fd5b505080516020909101519092909150565b60805160a05160c05160e05161010051611856610542600039600081816104ca01528181610cfa01528181610d34015261108e0152600081816102bb0152818161056f01528181610ccc01526110b20152600081816101a601526106d801526000818161022201528181610e150152610eb70152600081816104690152610f4f01526118566000f3fe6080604052600436106101355760003560e01c8063b214faa5116100ab578063e82955881161006f578063e8295588146103f6578063ec73295914610423578063ed33639f14610457578063f178e47c1461048b578063fc0c546a146104b8578063fc7e9c6f146104ec57600080fd5b8063b214faa514610347578063ba70f7571461035a578063c2b40ae414610384578063cd87a3b4146103b1578063e5285dcc146103c657600080fd5b80636d9833e3116100fd5780636d9833e314610259578063839df945146102795780638bca6d16146102a95780638ea3099e146102dd57806390eeb02b146102fd5780639fa12d0b1461031a57600080fd5b806317cc915c1461013a57806321a0adb61461017f5780632b7ac3f314610194578063414a37ba146101e05780634ecf518b14610210575b600080fd5b34801561014657600080fd5b5061016a61015536600461131d565b60056020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61019261018d36600461135e565b610511565b005b3480156101a057600080fd5b506101c87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610176565b3480156101ec57600080fd5b5061020260008051602061180183398151915281565b604051908152602001610176565b34801561021c57600080fd5b506102447f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610176565b34801561026557600080fd5b5061016a61027436600461131d565b61081c565b34801561028557600080fd5b5061016a61029436600461131d565b60066020526000908152604090205460ff1681565b3480156102b557600080fd5b506102027f000000000000000000000000000000000000000000000000000000000000000081565b3480156102e957600080fd5b506102026102f8366004611414565b61089a565b34801561030957600080fd5b506003546102449063ffffffff1681565b34801561032657600080fd5b5061033a610335366004611449565b610a67565b60405161017691906114be565b61019261035536600461131d565b610b23565b34801561036657600080fd5b5060035463ffffffff16600090815260026020526040902054610202565b34801561039057600080fd5b5061020261039f36600461131d565b60026020526000908152604090205481565b3480156103bd57600080fd5b50610244601e81565b3480156103d257600080fd5b5061016a6103e136600461131d565b60009081526005602052604090205460ff1690565b34801561040257600080fd5b5061020261041136600461131d565b60016020526000908152604090205481565b34801561042f57600080fd5b506102027f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b34801561046357600080fd5b506101c87f000000000000000000000000000000000000000000000000000000000000000081565b34801561049757600080fd5b506102026104a636600461131d565b60006020819052908152604090205481565b3480156104c457600080fd5b506101c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f857600080fd5b5060035461024490640100000000900463ffffffff1681565b6002600454036105685760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026004557f00000000000000000000000000000000000000000000000000000000000000008211156105dd5760405162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015260640161055f565b60008581526005602052604090205460ff161561063c5760405162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015260640161055f565b6106458661081c565b6106915760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015260640161055f565b6040805160c081018252878152602081018790526001600160a01b038681168284015285811660608301526080820185905260a08201849052915163695ef6f960e01b81527f00000000000000000000000000000000000000000000000000000000000000009092169163695ef6f991610711918c918c91600401611504565b6020604051808303816000875af1158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190611562565b6107995760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015260640161055f565b6000858152600560205260409020805460ff191660011790556107be84848484610c5a565b604080516001600160a01b03868116825260208201889052918101849052908416907fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319060600160405180910390a250506001600455505050505050565b600081810361082d57506000919050565b60035463ffffffff16805b63ffffffff8116600090815260026020526040902054840361085e575060019392505050565b8063ffffffff166000036108705750601e5b8061087a816115a1565b9150508163ffffffff168163ffffffff1603610838575060009392505050565b600060008051602061180183398151915283106108f95760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015260640161055f565b60008051602061180183398151915282106109605760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b606482015260840161055f565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156109af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d391906115c1565b909250905060008051602061180183398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610a38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5c91906115c1565b509695505050505050565b60608167ffffffffffffffff811115610a8257610a826115fb565b604051908082528060200260200182016040528015610aab578160200160208202803683370190505b50905060005b82811015610b1c57610aea848483818110610ace57610ace611611565b9050602002013560009081526005602052604090205460ff1690565b15610b14576001828281518110610b0357610b03611611565b911515602092830291909101909101525b600101610ab1565b5092915050565b600260045403610b755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161055f565b600260045560008181526006602052604090205460ff1615610be35760405162461bcd60e51b815260206004820152602160248201527f54686520636f6d6d69746d656e7420686173206265656e207375626d697474656044820152601960fa1b606482015260840161055f565b6000610bee82610dfc565b6000838152600660205260409020805460ff191660011790559050610c1161101a565b6040805163ffffffff8316815242602082015283917fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196910160405180910390a250506001600455565b803414610cc25760405162461bcd60e51b815260206004820152603060248201527f496e636f727265637420726566756e6420616d6f756e7420726563656976656460448201526f08189e481d1a194818dbdb9d1c9858dd60821b606482015260840161055f565b610d2184610cf0847f0000000000000000000000000000000000000000000000000000000000000000611627565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691906110d8565b8115610d5b57610d5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684846110d8565b8015610df6576000846001600160a01b03168260405160006040518083038185875af1925050503d8060008114610dae576040519150601f19603f3d011682016040523d82523d6000602084013e610db3565b606091505b5050905080610df4576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015610df2573d6000803e3d6000fd5b505b505b50505050565b600354600090640100000000900463ffffffff16610e3b7f00000000000000000000000000000000000000000000000000000000000000006002611751565b63ffffffff168163ffffffff1603610eae5760405162461bcd60e51b815260206004820152603060248201527f4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656160448201526f1d995cc818d85b88189948185919195960821b606482015260840161055f565b8083600080805b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168163ffffffff161015610f8c57610ef460028661176e565b63ffffffff16600003610f2e5763ffffffff8116600090815260016020908152604080832054918390529091208590558493509150610f4a565b63ffffffff811660009081526020819052604090205492508391505b610f757f0000000000000000000000000000000000000000000000000000000000000000848461089a565b9350610f82600286611791565b9450600101610eb5565b50600354600090601e90610fa79063ffffffff1660016117b4565b610fb1919061176e565b6003805463ffffffff191663ffffffff831690811790915560009081526002602052604090208590559050610fe78660016117b4565b6003805463ffffffff929092166401000000000267ffffffff000000001990921691909117905550939695505050505050565b34156110815760405162461bcd60e51b815260206004820152603060248201527f4554482076616c756520697320737570706f73656420746f206265203020666f60448201526f7220455243323020696e7374616e636560801b606482015260840161055f565b6110d66001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633307f00000000000000000000000000000000000000000000000000000000000000006111f1565b565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161113491906117d1565b6000604051808303816000865af19150503d8060008114611171576040519150601f19603f3d011682016040523d82523d6000602084013e611176565b606091505b50915091508161118857805181602001fd5b805115806111a55750808060200190518101906111a59190611562565b610df45760405162461bcd60e51b815260206004820152601e60248201527f5361666545524332303a20736166655472616e73666572206661696c65640000604482015260640161055f565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161125591906117d1565b6000604051808303816000865af19150503d8060008114611292576040519150601f19603f3d011682016040523d82523d6000602084013e611297565b606091505b5091509150816112a957805181602001fd5b805115806112c65750808060200190518101906112c69190611562565b610df25760405162461bcd60e51b815260206004820152602260248201527f5361666545524332303a20736166655472616e7366657246726f6d206661696c604482015261195960f21b606482015260840161055f565b60006020828403121561132f57600080fd5b5035919050565b6001600160a01b038116811461134b57600080fd5b50565b803561135981611336565b919050565b60008060008060008060008060e0898b03121561137a57600080fd5b883567ffffffffffffffff8082111561139257600080fd5b818b0191508b601f8301126113a657600080fd5b8135818111156113b557600080fd5b8c60208285010111156113c757600080fd5b60209283019a509850508901359550604089013594506113e960608a0161134e565b93506113f760808a0161134e565b925060a0890135915060c089013590509295985092959890939650565b60008060006060848603121561142957600080fd5b833561143481611336565b95602085013595506040909401359392505050565b6000806020838503121561145c57600080fd5b823567ffffffffffffffff8082111561147457600080fd5b818501915085601f83011261148857600080fd5b81358181111561149757600080fd5b8660208260051b85010111156114ac57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156114f85783511515835292840192918401916001016114da565b50909695505050505050565b60e081528260e08201526000610100848682850137600081868501015280601f19601f87011684010191505060208083018460005b600681101561155657815183529183019190830190600101611539565b50505050949350505050565b60006020828403121561157457600080fd5b8151801515811461158457600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8216806115b7576115b761158b565b6000190192915050565b600080604083850312156115d457600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8181038181111561163a5761163a61158b565b92915050565b600181815b8085111561167d578163ffffffff048211156116635761166361158b565b8085161561167057918102915b93841c9390800290611645565b509250929050565b6000826116945750600161163a565b816116a15750600061163a565b81600181146116b757600281146116c1576116f2565b600191505061163a565b60ff8411156116d2576116d261158b565b6001841b915063ffffffff8211156116ec576116ec61158b565b5061163a565b5060208310610133831016604e8410600b8410161715611729575081810a63ffffffff8111156117245761172461158b565b61163a565b6117338383611640565b8063ffffffff048211156117495761174961158b565b029392505050565b600063ffffffff611766818516828516611685565b949350505050565b600063ffffffff80841680611785576117856115e5565b92169190910692915050565b600063ffffffff808416806117a8576117a86115e5565b92169190910492915050565b63ffffffff818116838216019080821115610b1c57610b1c61158b565b6000825160005b818110156117f257602081860181015185830152016117d8565b50600092019182525091905056fe30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001a26469706673582212207a10ff661aea94ed5894f53cfa2fee06318fa49138057f7bd1b36d8fe228d9da64736f6c6343000819003330644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001";class Rb extends Ka{constructor(...e){e.length>1?super(...e):super(Ib,Eb,e[0])}getDeployTransaction(e,t,a,n,b,f){return super.getDeployTransaction(e,t,a,n,b,f||{})}deploy(e,t,a,n,b,f){return super.deploy(e,t,a,n,b,f||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ib)}static connect(e,t){return new $a(e,Ib,t)}}Rb.bytecode=Eb,Rb.abi=Ib;const Ob=[{inputs:[{internalType:"contract IVerifier",name:"_verifier",type:"address"},{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"uint256",name:"_denomination",type:"uint256"},{internalType:"uint32",name:"_merkleTreeHeight",type:"uint32"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"commitment",type:"bytes32"},{indexed:!1,internalType:"uint32",name:"leafIndex",type:"uint32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"}],name:"Withdrawal",type:"event"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"commitments",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"}],name:"isSpent",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_nullifierHashes",type:"bytes32[]"}],name:"isSpentArray",outputs:[{internalType:"bool[]",name:"spent",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"nullifierHashes",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"verifier",outputs:[{internalType:"contract IVerifier",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],kb="0x610100604052600380546001600160401b031916905534801561002157600080fd5b50604051611b68380380611b688339810160408190526100409161041b565b83838383808360008263ffffffff16116100ad5760405162461bcd60e51b815260206004820152602360248201527f5f6c6576656c732073686f756c642062652067726561746572207468616e207a60448201526265726f60e81b60648201526084015b60405180910390fd5b60208263ffffffff16106101035760405162461bcd60e51b815260206004820152601e60248201527f5f6c6576656c732073686f756c64206265206c657373207468616e203332000060448201526064016100a4565b63ffffffff821660a0526001600160a01b0381166080527f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60005b8363ffffffff168163ffffffff16101561018b5763ffffffff81166000908152600160209081526040808320859055908290529020829055610181838380610236565b915060010161013e565b506000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b5550506001600455816102195760405162461bcd60e51b815260206004820152602560248201527f64656e6f6d696e6174696f6e2073686f756c6420626520677265617465722074604482015264068616e20360dc1b60648201526084016100a4565b506001600160a01b0390921660c0525060e0525061049d92505050565b6000600080516020611b4883398151915283106102955760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c6460448201526064016100a4565b600080516020611b4883398151915282106102fc5760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b60648201526084016100a4565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa15801561034b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036f9190610479565b9092509050600080516020611b4883398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156103d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f89190610479565b509695505050505050565b6001600160a01b038116811461041857600080fd5b50565b6000806000806080858703121561043157600080fd5b845161043c81610403565b602086015190945061044d81610403565b60408601516060870151919450925063ffffffff8116811461046e57600080fd5b939692955090935050565b6000806040838503121561048c57600080fd5b505080516020909101519092909150565b60805160a05160c05160e051611641610507600039600081816102b00152818161053001528181610d0401526110a201526000818161019b015261069901526000818161021701528181610e9b0152610f3d01526000818161045e0152610fd501526116416000f3fe60806040526004361061012a5760003560e01c80639fa12d0b116100ab578063e5285dcc1161006f578063e5285dcc146103bb578063e8295588146103eb578063ec73295914610418578063ed33639f1461044c578063f178e47c14610480578063fc7e9c6f146104ad57600080fd5b80639fa12d0b1461030f578063b214faa51461033c578063ba70f7571461034f578063c2b40ae414610379578063cd87a3b4146103a657600080fd5b80636d9833e3116100f25780636d9833e31461024e578063839df9451461026e5780638bca6d161461029e5780638ea3099e146102d257806390eeb02b146102f257600080fd5b806317cc915c1461012f57806321a0adb6146101745780632b7ac3f314610189578063414a37ba146101d55780634ecf518b14610205575b600080fd5b34801561013b57600080fd5b5061015f61014a366004611137565b60056020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b610187610182366004611178565b6104d2565b005b34801561019557600080fd5b506101bd7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161016b565b3480156101e157600080fd5b506101f76000805160206115ec83398151915281565b60405190815260200161016b565b34801561021157600080fd5b506102397f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff909116815260200161016b565b34801561025a57600080fd5b5061015f610269366004611137565b6107dd565b34801561027a57600080fd5b5061015f610289366004611137565b60066020526000908152604090205460ff1681565b3480156102aa57600080fd5b506101f77f000000000000000000000000000000000000000000000000000000000000000081565b3480156102de57600080fd5b506101f76102ed36600461122e565b61085b565b3480156102fe57600080fd5b506003546102399063ffffffff1681565b34801561031b57600080fd5b5061032f61032a366004611263565b610a28565b60405161016b91906112d8565b61018761034a366004611137565b610ae4565b34801561035b57600080fd5b5060035463ffffffff166000908152600260205260409020546101f7565b34801561038557600080fd5b506101f7610394366004611137565b60026020526000908152604090205481565b3480156103b257600080fd5b50610239601e81565b3480156103c757600080fd5b5061015f6103d6366004611137565b60009081526005602052604090205460ff1690565b3480156103f757600080fd5b506101f7610406366004611137565b60016020526000908152604090205481565b34801561042457600080fd5b506101f77f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b34801561045857600080fd5b506101bd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561048c57600080fd5b506101f761049b366004611137565b60006020819052908152604090205481565b3480156104b957600080fd5b5060035461023990640100000000900463ffffffff1681565b6002600454036105295760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026004557f000000000000000000000000000000000000000000000000000000000000000082111561059e5760405162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c75650000000000006044820152606401610520565b60008581526005602052604090205460ff16156105fd5760405162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e74006044820152606401610520565b610606866107dd565b6106525760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f74000000006044820152606401610520565b6040805160c081018252878152602081018790526001600160a01b038681168284015285811660608301526080820185905260a08201849052915163695ef6f960e01b81527f00000000000000000000000000000000000000000000000000000000000000009092169163695ef6f9916106d2918c918c9160040161131e565b6020604051808303816000875af11580156106f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610715919061137c565b61075a5760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b6044820152606401610520565b6000858152600560205260409020805460ff1916600117905561077f84848484610c1b565b604080516001600160a01b03868116825260208201889052918101849052908416907fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319060600160405180910390a250506001600455505050505050565b60008181036107ee57506000919050565b60035463ffffffff16805b63ffffffff8116600090815260026020526040902054840361081f575060019392505050565b8063ffffffff166000036108315750601e5b8061083b816113bb565b9150508163ffffffff168163ffffffff16036107f9575060009392505050565b60006000805160206115ec83398151915283106108ba5760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c646044820152606401610520565b6000805160206115ec83398151915282106109215760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b6064820152608401610520565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610970573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099491906113db565b90925090506000805160206115ec83398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156109f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1d91906113db565b509695505050505050565b60608167ffffffffffffffff811115610a4357610a43611415565b604051908082528060200260200182016040528015610a6c578160200160208202803683370190505b50905060005b82811015610add57610aab848483818110610a8f57610a8f61142b565b9050602002013560009081526005602052604090205460ff1690565b15610ad5576001828281518110610ac457610ac461142b565b911515602092830291909101909101525b600101610a72565b5092915050565b600260045403610b365760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610520565b600260045560008181526006602052604090205460ff1615610ba45760405162461bcd60e51b815260206004820152602160248201527f54686520636f6d6d69746d656e7420686173206265656e207375626d697474656044820152601960fa1b6064820152608401610520565b6000610baf82610e82565b6000838152600660205260409020805460ff191660011790559050610bd26110a0565b6040805163ffffffff8316815242602082015283917fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196910160405180910390a250506001600455565b3415610c875760405162461bcd60e51b815260206004820152603560248201527f4d6573736167652076616c756520697320737570706f73656420746f206265206044820152747a65726f20666f722045544820696e7374616e636560581b6064820152608401610520565b8015610cf25760405162461bcd60e51b815260206004820152603460248201527f526566756e642076616c756520697320737570706f73656420746f206265207a60448201527365726f20666f722045544820696e7374616e636560601b6064820152608401610520565b60006001600160a01b038516610d28847f0000000000000000000000000000000000000000000000000000000000000000611441565b604051600081818185875af1925050503d8060008114610d64576040519150601f19603f3d011682016040523d82523d6000602084013e610d69565b606091505b5050905080610dc85760405162461bcd60e51b815260206004820152602560248201527f7061796d656e7420746f205f726563697069656e7420646964206e6f7420676f604482015264207468727560d81b6064820152608401610520565b8215610e7b576040516001600160a01b038516908490600081818185875af1925050503d8060008114610e17576040519150601f19603f3d011682016040523d82523d6000602084013e610e1c565b606091505b50508091505080610e7b5760405162461bcd60e51b815260206004820152602360248201527f7061796d656e7420746f205f72656c6179657220646964206e6f7420676f207460448201526268727560e81b6064820152608401610520565b5050505050565b600354600090640100000000900463ffffffff16610ec17f0000000000000000000000000000000000000000000000000000000000000000600261156b565b63ffffffff168163ffffffff1603610f345760405162461bcd60e51b815260206004820152603060248201527f4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656160448201526f1d995cc818d85b88189948185919195960821b6064820152608401610520565b8083600080805b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168163ffffffff16101561101257610f7a600286611588565b63ffffffff16600003610fb45763ffffffff8116600090815260016020908152604080832054918390529091208590558493509150610fd0565b63ffffffff811660009081526020819052604090205492508391505b610ffb7f0000000000000000000000000000000000000000000000000000000000000000848461085b565b93506110086002866115ab565b9450600101610f3b565b50600354600090601e9061102d9063ffffffff1660016115ce565b6110379190611588565b6003805463ffffffff191663ffffffff83169081179091556000908152600260205260409020859055905061106d8660016115ce565b6003805463ffffffff929092166401000000000267ffffffff000000001990921691909117905550939695505050505050565b7f000000000000000000000000000000000000000000000000000000000000000034146111355760405162461bcd60e51b815260206004820152603860248201527f506c656173652073656e6420606d697844656e6f6d696e6174696f6e6020455460448201527f4820616c6f6e672077697468207472616e73616374696f6e00000000000000006064820152608401610520565b565b60006020828403121561114957600080fd5b5035919050565b6001600160a01b038116811461116557600080fd5b50565b803561117381611150565b919050565b60008060008060008060008060e0898b03121561119457600080fd5b883567ffffffffffffffff808211156111ac57600080fd5b818b0191508b601f8301126111c057600080fd5b8135818111156111cf57600080fd5b8c60208285010111156111e157600080fd5b60209283019a5098505089013595506040890135945061120360608a01611168565b935061121160808a01611168565b925060a0890135915060c089013590509295985092959890939650565b60008060006060848603121561124357600080fd5b833561124e81611150565b95602085013595506040909401359392505050565b6000806020838503121561127657600080fd5b823567ffffffffffffffff8082111561128e57600080fd5b818501915085601f8301126112a257600080fd5b8135818111156112b157600080fd5b8660208260051b85010111156112c657600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156113125783511515835292840192918401916001016112f4565b50909695505050505050565b60e081528260e08201526000610100848682850137600081868501015280601f19601f87011684010191505060208083018460005b600681101561137057815183529183019190830190600101611353565b50505050949350505050565b60006020828403121561138e57600080fd5b8151801515811461139e57600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8216806113d1576113d16113a5565b6000190192915050565b600080604083850312156113ee57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b81810381811115611454576114546113a5565b92915050565b600181815b80851115611497578163ffffffff0482111561147d5761147d6113a5565b8085161561148a57918102915b93841c939080029061145f565b509250929050565b6000826114ae57506001611454565b816114bb57506000611454565b81600181146114d157600281146114db5761150c565b6001915050611454565b60ff8411156114ec576114ec6113a5565b6001841b915063ffffffff821115611506576115066113a5565b50611454565b5060208310610133831016604e8410600b8410161715611543575081810a63ffffffff81111561153e5761153e6113a5565b611454565b61154d838361145a565b8063ffffffff04821115611563576115636113a5565b029392505050565b600063ffffffff61158081851682851661149f565b949350505050565b600063ffffffff8084168061159f5761159f6113ff565b92169190910692915050565b600063ffffffff808416806115c2576115c26113ff565b92169190910492915050565b63ffffffff818116838216019080821115610add57610add6113a556fe30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001a2646970667358221220b7ae6fa49d2dc33b05a35e194c48ba72870663895936d093d6708dda191f86f164736f6c6343000819003330644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001";class Pb extends Ka{constructor(...e){e.length>1?super(...e):super(Ob,kb,e[0])}getDeployTransaction(e,t,a,n,b){return super.getDeployTransaction(e,t,a,n,b||{})}deploy(e,t,a,n,b){return super.deploy(e,t,a,n,b||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ob)}static connect(e,t){return new $a(e,Ob,t)}}Pb.bytecode=kb,Pb.abi=Ob;const Ab=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"}],name:"Echo",type:"event"},{inputs:[{internalType:"bytes",name:"_data",type:"bytes"}],name:"echo",outputs:[],stateMutability:"nonpayable",type:"function"}],Cb="0x6080604052348015600f57600080fd5b506101638061001f6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063624fbfdc14610030575b600080fd5b61004361003e36600461008c565b610045565b005b336001600160a01b03167f50d6f3fc915efd1695d8a4cb50da185984f50d256834b9cb308295eb3c872c9c83836040516100809291906100fe565b60405180910390a25050565b6000806020838503121561009f57600080fd5b823567ffffffffffffffff808211156100b757600080fd5b818501915085601f8301126100cb57600080fd5b8135818111156100da57600080fd5b8660208285010111156100ec57600080fd5b60209290920196919550909350505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fea2646970667358221220cadc2288aafcfeb373ae536503c025419ca51a0b1642ad003ff215a6bff8658464736f6c63430008190033";class Nb extends Ka{constructor(...e){e.length>1?super(...e):super(Ab,Cb,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ab)}static connect(e,t){return new $a(e,Ab,t)}}Nb.bytecode=Cb,Nb.abi=Ab;const Db=[{inputs:[{internalType:"bytes",name:"proof",type:"bytes"},{internalType:"uint256[6]",name:"input",type:"uint256[6]"}],name:"verifyProof",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],Sb="0x6080604052348015600f57600080fd5b506110d08061001f6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063695ef6f914610030575b600080fd5b61004361003e366004610eca565b610057565b604051901515815260200160405180910390f35b6000808380602001905181019061006e9190610f71565b905060005b60088160ff161015610129577f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47828260ff16600881106100b5576100b5610ff0565b6020020151106101175760405162461bcd60e51b815260206004820152602260248201527f76657269666965722d70726f6f662d656c656d656e742d6774652d7072696d656044820152612d7160f01b60648201526084015b60405180910390fd5b806101218161101c565b915050610073565b50610132610ca2565b6040805180820182528351815260208085015181830152908352815160808082018452858401518285019081526060808801519084015282528351808501855290860151815260a08601518184015281830152838201528151808301835260c0850151815260e0850151918101919091529082015260006101b1610321565b90506000604051806040016040528060008152602001600081525090506101f38183608001516000600781106101e9576101e9610ff0565b60200201516107ec565b905060005b60068110156102df577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000187826006811061023457610234610ff0565b6020020151106102865760405162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c6400604482015260640161010e565b6102d5826102d0856080015184600161029f919061103b565b600781106102af576102af610ff0565b60200201518a85600681106102c6576102c6610ff0565b602002015161088d565b6107ec565b91506001016101f8565b506103146102f0846000015161091b565b846020015184600001518560200151858760400151896040015189606001516109d5565b9450505050505b92915050565b610329610cf3565b6040805180820182527f2dbfc3ec62a3eee5a3b4b464bcf1f8527bbca12adea0f1f12033cd4f61b0e09181527f19e55bd0b72c126da18665039556776642ff82e2f347f24fcea2475f4db087df6020808301919091529083528151608080820184527f1ae724ab134e5a7c6bd8a116fa5505b259522c0f164a5e8126e3ec7d34465f6e8285019081527e9f1bcdc853f8e3531756bb625b0d1dc014f4ab57c3f79f4f4e2e7ef7e0ead6606080850191909152908352845180860186527f23a8ca5760457e726365b92fd0ceb486665797cd68c35dcffd8e4ae8066691e981527f13ec7182c9fd68331a10f8be0fe885d730de5c7f89aa7d0b7bafaa009bbc9e3e818601528385015285840192909252835180820185527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28186019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed828501528152845180860186527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b81527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa818601528185015285850152835180820185527f2f0c63d0c53b3dfbca27b6b43ae7fbf55a38d78a21470996485b03128accc2088186019081527e556502356e37ed150db2e36531b0f275fd6835c0fc1945922e270b48c48a86828501528152845180860186527f02644c27b5dbd793592a70b735e22c798a5e309fa17a992a7dc2a050e01b298f81527f194776b6a53439d7336f389d2a8f6651e40885f5ca2538b0dc9cb534fb23f7fa818601528185015282860152835180850185527f23df1bc9165e9c1c9b2bc036d8ebdd10e7aeae7e5e8019fde68aec7c818bb23e81527f0b6c92080d37c5fb2ddf30892a33665e5478432ef3f71ac8768ecbbe62c7789281850152818601805191909152845180860186527f1c7b2adf45e046caea000956b2ecb2d8617e710d2a7bb201a95ea276f92307b481527f2b15f07536f45948cf4abe6596637d902ffabb18c8c2f5c151544c294ce4a672818601528151850152845180860186527f1cecfe92882a8c835a47bf01bfa655cf628cbba7f81cf4042179fd13edcd6a3981527f0154bfbb2cb786ca247d4b69183d1751f267bbc7656be8d0f0e7a5a47e2c1101818601528151860152845180860186527f1584616a7423efcc72f69ea84fa0b2bc01433677297f4e8351bebfc15bcd0cda81527f0623755b1488526daa9fecf0e11b110dd6df12c461579d792e1db65af523c8be81860152815190930192909252835180850185527f12fbb5bfca9d61357ba2d641604cf4852e21ef54faa180fe539c18994dc1da5a81527f2f09dd9972a1af5f7bcfccf3d7ab600c9d898ea6d6933150ba0ae228ece17e5f81850152825190910152825180840184527f0adb513796fdf2103022c64151ce05f7c7a6d9200e8d819fa59e654fc4bfe83c81527f2d64f72ef4eddf9ca032058ed2bf691758387e913a77cf99d6a3cfb37c8ba7ee81840152815160a0015282518084019093527f21e7c9bffda74bfd2c4393b6803d775545de6fa89145f4a23476241d9881b66183527f0bbe41e52237ac13eb7b01f3cb999b7394d08734e71b1c3ada62713e17eb560c918301919091525160c0015290565b6040805180820190915260008082526020820152610808610d44565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa9050808061084257fe5b50806108855760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b604482015260640161010e565b505092915050565b60408051808201909152600080825260208201526108a9610d62565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa905080806108d857fe5b50806108855760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b604482015260640161010e565b6040805180820190915260008082526020820152815115801561094057506020820151155b1561095e575050604080518082019091526000808252602082015290565b6040518060400160405280836000015181526020017f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4784602001516109a3919061104e565b6109cd907f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47611070565b905292915050565b60408051608080820183528a825260208083018a90528284018890526060808401879052845192830185528b83528282018a9052828501889052820185905283516018808252610320820190955260009491859190839082016103008036833701905050905060005b6004811015610c1f576000610a54826006611083565b9050858260048110610a6857610a68610ff0565b60200201515183610a7a83600061103b565b81518110610a8a57610a8a610ff0565b602002602001018181525050858260048110610aa857610aa8610ff0565b60200201516020015183826001610abf919061103b565b81518110610acf57610acf610ff0565b602002602001018181525050848260048110610aed57610aed610ff0565b6020020151515183610b0083600261103b565b81518110610b1057610b10610ff0565b602002602001018181525050848260048110610b2e57610b2e610ff0565b6020020151516001602002015183610b4783600361103b565b81518110610b5757610b57610ff0565b602002602001018181525050848260048110610b7557610b75610ff0565b602002015160200151600060028110610b9057610b90610ff0565b602002015183610ba183600461103b565b81518110610bb157610bb1610ff0565b602002602001018181525050848260048110610bcf57610bcf610ff0565b602002015160200151600160028110610bea57610bea610ff0565b602002015183610bfb83600561103b565b81518110610c0b57610c0b610ff0565b602090810291909101015250600101610a3e565b50610c28610d80565b6000602082602086026020860160086107d05a03fa90508080610c4757fe5b5080610c8d5760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b604482015260640161010e565b505115159d9c50505050505050505050505050565b6040805160a081019091526000606082018181526080830191909152815260208101610ccc610d9e565b8152602001610cee604051806040016040528060008152602001600081525090565b905290565b6040805160e08101909152600060a0820181815260c0830191909152815260208101610d1d610d9e565b8152602001610d2a610d9e565b8152602001610d37610d9e565b8152602001610cee610dbe565b60405180608001604052806004906020820280368337509192915050565b60405180606001604052806003906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060400160405280610db1610df7565b8152602001610cee610df7565b6040518060e001604052806007905b6040805180820190915260008082526020820152815260200190600190039081610dcd5790505090565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610e5457610e54610e15565b604052919050565b600082601f830112610e6d57600080fd5b60405160c0810181811067ffffffffffffffff82111715610e9057610e90610e15565b6040528060c0840185811115610ea557600080fd5b845b81811015610ebf578035835260209283019201610ea7565b509195945050505050565b60008060e08385031215610edd57600080fd5b823567ffffffffffffffff80821115610ef557600080fd5b818501915085601f830112610f0957600080fd5b8135602082821115610f1d57610f1d610e15565b610f2f601f8301601f19168201610e2b565b92508183528781838601011115610f4557600080fd5b81818501828501376000818385010152829550610f6488828901610e5c565b9450505050509250929050565b6000610100808385031215610f8557600080fd5b83601f840112610f9457600080fd5b60405181810181811067ffffffffffffffff82111715610fb657610fb6610e15565b604052908301908085831115610fcb57600080fd5b845b83811015610fe5578051825260209182019101610fcd565b509095945050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff810361103257611032611006565b60010192915050565b8082018082111561031b5761031b611006565b60008261106b57634e487b7160e01b600052601260045260246000fd5b500690565b8181038181111561031b5761031b611006565b808202811582820484141761031b5761031b61100656fea2646970667358221220f45b9b217fe8de0faa784c9b47a788ed44f7beab2c4749dda027f1862d4a28df64736f6c63430008190033";class Ub extends Ka{constructor(...e){e.length>1?super(...e):super(Db,Sb,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Db)}static connect(e,t){return new $a(e,Db,t)}}Ub.bytecode=Sb,Ub.abi=Db;const Vb=[{inputs:[{internalType:"address",name:"_governance",type:"address"},{internalType:"contract IERC20",name:"_comp",type:"address"},{internalType:"contract IVerifier",name:"_verifier",type:"address"},{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"uint256",name:"_denomination",type:"uint256"},{internalType:"uint32",name:"_merkleTreeHeight",type:"uint32"},{internalType:"contract IERC20",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"commitment",type:"bytes32"},{indexed:!1,internalType:"uint32",name:"leafIndex",type:"uint32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"}],name:"Withdrawal",type:"event"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"claimComp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"commitments",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"comp",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"}],name:"isSpent",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_nullifierHashes",type:"bytes32[]"}],name:"isSpentArray",outputs:[{internalType:"bool[]",name:"spent",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"nullifierHashes",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"verifier",outputs:[{internalType:"contract IVerifier",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],Lb="0x610160604052600380546001600160401b031916905534801561002157600080fd5b5060405161205a38038061205a8339810160408190526100409161048f565b848484848484848484808360008263ffffffff16116100b25760405162461bcd60e51b815260206004820152602360248201527f5f6c6576656c732073686f756c642062652067726561746572207468616e207a60448201526265726f60e81b60648201526084015b60405180910390fd5b60208263ffffffff16106101085760405162461bcd60e51b815260206004820152601e60248201527f5f6c6576656c732073686f756c64206265206c657373207468616e203332000060448201526064016100a9565b63ffffffff821660a0526001600160a01b0381166080527f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60005b8363ffffffff168163ffffffff1610156101905763ffffffff811660009081526001602090815260408083208590559082905290208290556101868383806102aa565b9150600101610143565b506000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b55505060016004558161021e5760405162461bcd60e51b815260206004820152602560248201527f64656e6f6d696e6174696f6e2073686f756c6420626520677265617465722074604482015264068616e20360dc1b60648201526084016100a9565b506001600160a01b0392831660c05260e05250908116610100528a16935061028c925050505760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420434f4d5020746f6b656e206164647265737300000000000060448201526064016100a9565b5050506001600160a01b03938416610120525050166101405261054e565b600060008051602061203a83398151915283106103095760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c6460448201526064016100a9565b60008051602061203a83398151915282106103705760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b60648201526084016100a9565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156103bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e3919061052a565b909250905060008051602061203a83398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610448573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046c919061052a565b509695505050505050565b6001600160a01b038116811461048c57600080fd5b50565b600080600080600080600060e0888a0312156104aa57600080fd5b87516104b581610477565b60208901519097506104c681610477565b60408901519096506104d781610477565b60608901519095506104e881610477565b608089015160a08a0151919550935063ffffffff8116811461050957600080fd5b60c089015190925061051a81610477565b8091505092959891949750929550565b6000806040838503121561053d57600080fd5b505080516020909101519092909150565b60805160a05160c05160e051610100516101205161014051611a3e6105fc6000396000818161017d01526105d40152600081816102e5015261060501526000818161057801528181610ecc01528181610f0601526112600152600081816103690152818161074101528181610e9e015261128401526000818161023801526108aa01526000818161029c01528181610fe7015261108901526000818161051701526111210152611a3e6000f3fe6080604052600436106101665760003560e01c806390eeb02b116100d1578063e5285dcc1161008a578063ed33639f11610064578063ed33639f14610505578063f178e47c14610539578063fc0c546a14610566578063fc7e9c6f1461059a57600080fd5b8063e5285dcc14610474578063e8295588146104a4578063ec732959146104d157600080fd5b806390eeb02b146103ab5780639fa12d0b146103c8578063b214faa5146103f5578063ba70f75714610408578063c2b40ae414610432578063cd87a3b41461045f57600080fd5b80634ecf518b116101235780634ecf518b1461028a5780635aa6e675146102d35780636d9833e314610307578063839df945146103275780638bca6d16146103575780638ea3099e1461038b57600080fd5b8063109d0af81461016b57806317cc915c146101bc5780631bd85bdb146101fc57806321a0adb6146102135780632b7ac3f314610226578063414a37ba1461025a575b600080fd5b34801561017757600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101c857600080fd5b506101ec6101d73660046114ef565b60056020526000908152604090205460ff1681565b60405190151581526020016101b3565b34801561020857600080fd5b506102116105bf565b005b61021161022136600461152d565b6106e3565b34801561023257600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561026657600080fd5b5061027c6000805160206119e983398151915281565b6040519081526020016101b3565b34801561029657600080fd5b506102be7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016101b3565b3480156102df57600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561031357600080fd5b506101ec6103223660046114ef565b6109ee565b34801561033357600080fd5b506101ec6103423660046114ef565b60066020526000908152604090205460ff1681565b34801561036357600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561039757600080fd5b5061027c6103a63660046115e3565b610a6c565b3480156103b757600080fd5b506003546102be9063ffffffff1681565b3480156103d457600080fd5b506103e86103e3366004611618565b610c39565b6040516101b3919061168d565b6102116104033660046114ef565b610cf5565b34801561041457600080fd5b5060035463ffffffff1660009081526002602052604090205461027c565b34801561043e57600080fd5b5061027c61044d3660046114ef565b60026020526000908152604090205481565b34801561046b57600080fd5b506102be601e81565b34801561048057600080fd5b506101ec61048f3660046114ef565b60009081526005602052604090205460ff1690565b3480156104b057600080fd5b5061027c6104bf3660046114ef565b60016020526000908152604090205481565b3480156104dd57600080fd5b5061027c7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b34801561051157600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054557600080fd5b5061027c6105543660046114ef565b60006020819052908152604090205481565b34801561057257600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a657600080fd5b506003546102be90640100000000900463ffffffff1681565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb907f00000000000000000000000000000000000000000000000000000000000000009083906370a0823190602401602060405180830381865afa15801561064d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067191906116d3565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156106bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e091906116ec565b50565b60026004540361073a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026004557f00000000000000000000000000000000000000000000000000000000000000008211156107af5760405162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c75650000000000006044820152606401610731565b60008581526005602052604090205460ff161561080e5760405162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e74006044820152606401610731565b610817866109ee565b6108635760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f74000000006044820152606401610731565b6040805160c081018252878152602081018790526001600160a01b038681168284015285811660608301526080820185905260a08201849052915163695ef6f960e01b81527f00000000000000000000000000000000000000000000000000000000000000009092169163695ef6f9916108e3918c918c91600401611715565b6020604051808303816000875af1158015610902573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092691906116ec565b61096b5760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b6044820152606401610731565b6000858152600560205260409020805460ff1916600117905561099084848484610e2c565b604080516001600160a01b03868116825260208201889052918101849052908416907fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319060600160405180910390a250506001600455505050505050565b60008181036109ff57506000919050565b60035463ffffffff16805b63ffffffff81166000908152600260205260409020548403610a30575060019392505050565b8063ffffffff16600003610a425750601e5b80610a4c81611789565b9150508163ffffffff168163ffffffff1603610a0a575060009392505050565b60006000805160206119e98339815191528310610acb5760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c646044820152606401610731565b6000805160206119e98339815191528210610b325760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b6064820152608401610731565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba591906117a9565b90925090506000805160206119e983398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610c0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2e91906117a9565b509695505050505050565b60608167ffffffffffffffff811115610c5457610c546117e3565b604051908082528060200260200182016040528015610c7d578160200160208202803683370190505b50905060005b82811015610cee57610cbc848483818110610ca057610ca06117f9565b9050602002013560009081526005602052604090205460ff1690565b15610ce6576001828281518110610cd557610cd56117f9565b911515602092830291909101909101525b600101610c83565b5092915050565b600260045403610d475760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610731565b600260045560008181526006602052604090205460ff1615610db55760405162461bcd60e51b815260206004820152602160248201527f54686520636f6d6d69746d656e7420686173206265656e207375626d697474656044820152601960fa1b6064820152608401610731565b6000610dc082610fce565b6000838152600660205260409020805460ff191660011790559050610de36111ec565b6040805163ffffffff8316815242602082015283917fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196910160405180910390a250506001600455565b803414610e945760405162461bcd60e51b815260206004820152603060248201527f496e636f727265637420726566756e6420616d6f756e7420726563656976656460448201526f08189e481d1a194818dbdb9d1c9858dd60821b6064820152608401610731565b610ef384610ec2847f000000000000000000000000000000000000000000000000000000000000000061180f565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691906112aa565b8115610f2d57610f2d6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684846112aa565b8015610fc8576000846001600160a01b03168260405160006040518083038185875af1925050503d8060008114610f80576040519150601f19603f3d011682016040523d82523d6000602084013e610f85565b606091505b5050905080610fc6576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015610fc4573d6000803e3d6000fd5b505b505b50505050565b600354600090640100000000900463ffffffff1661100d7f00000000000000000000000000000000000000000000000000000000000000006002611939565b63ffffffff168163ffffffff16036110805760405162461bcd60e51b815260206004820152603060248201527f4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656160448201526f1d995cc818d85b88189948185919195960821b6064820152608401610731565b8083600080805b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168163ffffffff16101561115e576110c6600286611956565b63ffffffff166000036111005763ffffffff811660009081526001602090815260408083205491839052909120859055849350915061111c565b63ffffffff811660009081526020819052604090205492508391505b6111477f00000000000000000000000000000000000000000000000000000000000000008484610a6c565b9350611154600286611979565b9450600101611087565b50600354600090601e906111799063ffffffff16600161199c565b6111839190611956565b6003805463ffffffff191663ffffffff8316908117909155600090815260026020526040902085905590506111b986600161199c565b6003805463ffffffff929092166401000000000267ffffffff000000001990921691909117905550939695505050505050565b34156112535760405162461bcd60e51b815260206004820152603060248201527f4554482076616c756520697320737570706f73656420746f206265203020666f60448201526f7220455243323020696e7374616e636560801b6064820152608401610731565b6112a86001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633307f00000000000000000000000000000000000000000000000000000000000000006113c3565b565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161130691906119b9565b6000604051808303816000865af19150503d8060008114611343576040519150601f19603f3d011682016040523d82523d6000602084013e611348565b606091505b50915091508161135a57805181602001fd5b8051158061137757508080602001905181019061137791906116ec565b610fc65760405162461bcd60e51b815260206004820152601e60248201527f5361666545524332303a20736166655472616e73666572206661696c656400006044820152606401610731565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161142791906119b9565b6000604051808303816000865af19150503d8060008114611464576040519150601f19603f3d011682016040523d82523d6000602084013e611469565b606091505b50915091508161147b57805181602001fd5b8051158061149857508080602001905181019061149891906116ec565b610fc45760405162461bcd60e51b815260206004820152602260248201527f5361666545524332303a20736166655472616e7366657246726f6d206661696c604482015261195960f21b6064820152608401610731565b60006020828403121561150157600080fd5b5035919050565b6001600160a01b03811681146106e057600080fd5b803561152881611508565b919050565b60008060008060008060008060e0898b03121561154957600080fd5b883567ffffffffffffffff8082111561156157600080fd5b818b0191508b601f83011261157557600080fd5b81358181111561158457600080fd5b8c602082850101111561159657600080fd5b60209283019a509850508901359550604089013594506115b860608a0161151d565b93506115c660808a0161151d565b925060a0890135915060c089013590509295985092959890939650565b6000806000606084860312156115f857600080fd5b833561160381611508565b95602085013595506040909401359392505050565b6000806020838503121561162b57600080fd5b823567ffffffffffffffff8082111561164357600080fd5b818501915085601f83011261165757600080fd5b81358181111561166657600080fd5b8660208260051b850101111561167b57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156116c75783511515835292840192918401916001016116a9565b50909695505050505050565b6000602082840312156116e557600080fd5b5051919050565b6000602082840312156116fe57600080fd5b8151801515811461170e57600080fd5b9392505050565b60e081528260e08201526000610100848682850137600081868501015280601f19601f87011684010191505060208083018460005b60068110156117675781518352918301919083019060010161174a565b50505050949350505050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff82168061179f5761179f611773565b6000190192915050565b600080604083850312156117bc57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8181038181111561182257611822611773565b92915050565b600181815b80851115611865578163ffffffff0482111561184b5761184b611773565b8085161561185857918102915b93841c939080029061182d565b509250929050565b60008261187c57506001611822565b8161188957506000611822565b816001811461189f57600281146118a9576118da565b6001915050611822565b60ff8411156118ba576118ba611773565b6001841b915063ffffffff8211156118d4576118d4611773565b50611822565b5060208310610133831016604e8410600b8410161715611911575081810a63ffffffff81111561190c5761190c611773565b611822565b61191b8383611828565b8063ffffffff0482111561193157611931611773565b029392505050565b600063ffffffff61194e81851682851661186d565b949350505050565b600063ffffffff8084168061196d5761196d6117cd565b92169190910692915050565b600063ffffffff80841680611990576119906117cd565b92169190910492915050565b63ffffffff818116838216019080821115610cee57610cee611773565b6000825160005b818110156119da57602081860181015185830152016119c0565b50600092019182525091905056fe30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001a26469706673582212207136b381e40b7e1e84fceaba3022a28e73ab509289c831db484f05c7303d32a464736f6c6343000819003330644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001";class Fb extends Ka{constructor(...e){e.length>1?super(...e):super(Vb,Lb,e[0])}getDeployTransaction(e,t,a,n,b,f,d,i){return super.getDeployTransaction(e,t,a,n,b,f,d,i||{})}deploy(e,t,a,n,b,f,d,i){return super.deploy(e,t,a,n,b,f,d,i||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Vb)}static connect(e,t){return new $a(e,Vb,t)}}Fb.bytecode=Lb,Fb.abi=Vb;var Gb=Object.freeze({__proto__:null,CTornado__factory:Fb,ERC20Tornado__factory:Rb,ETHTornado__factory:Pb,Echoer__factory:Nb,Verifier__factory:Ub,interfaces:xb,merkleTreeWithHistorySol:Wn,mocks:rb,tornadoProxyLightSol:vb,tornadoSol:lb});const Bb=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"label",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint64",name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setRecord",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"resolver",type:"address"}],name:"setResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setSubnodeRecord",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"ttl",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"}];class jb{static createInterface(){return new ba(Bb)}static connect(e,t){return new $a(e,Bb,t)}}jb.abi=Bb;const Hb=[{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"}],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class zb{static createInterface(){return new ba(Hb)}static connect(e,t){return new $a(e,Hb,t)}}zb.abi=Hb;const $b=[{inputs:[{internalType:"address",name:"relayer",type:"address"}],name:"getRelayerBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"address",name:"toResolve",type:"address"}],name:"isRelayerRegistered",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class Xb{static createInterface(){return new ba($b)}static connect(e,t){return new $a(e,$b,t)}}Xb.abi=$b;const Wb=[{inputs:[{internalType:"address",name:"_IENSRegistry",type:"address"},{internalType:"address",name:"_IRelayerRegistry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ENSRegistry",outputs:[{internalType:"contract IENSRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"RelayerRegistry",outputs:[{internalType:"contract IRelayerRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_relayers",type:"bytes32[]"},{internalType:"string[]",name:"_subdomains",type:"string[]"}],name:"relayersData",outputs:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bool",name:"isRegistered",type:"bool"},{internalType:"string[20]",name:"records",type:"string[20]"}],internalType:"struct Relayer[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"}],qb="0x60c060405234801561001057600080fd5b50604051610b74380380610b7483398101604081905261002f9161004d565b6001600160601b0319606092831b8116608052911b1660a05261009e565b6000806040838503121561005f578182fd5b825161006a81610086565b602084015190925061007b81610086565b809150509250929050565b6001600160a01b038116811461009b57600080fd5b50565b60805160601c60a05160601c610a9b6100d96000398060b2528061040352806104f1525080608e528061013a528061021b5250610a9b6000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80631cb120d61461004657806339c16356146100645780634d47d7751461006c575b600080fd5b61004e61008c565b60405161005b9190610891565b60405180910390f35b61004e6100b0565b61007f61007a366004610702565b6100d4565b60405161005b91906108bf565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b606080835167ffffffffffffffff811180156100ef57600080fd5b5060405190808252806020026020018201604052801561012957816020015b6101166105cd565b81526020019060019003908161010e5790505b50905060005b84518110156105c5577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166302571be386838151811061017357fe5b60200260200101516040518263ffffffff1660e01b8152600401610197919061099d565b60206040518083038186803b1580156101af57600080fd5b505afa1580156101c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e791906106d4565b8282815181106101f357fe5b6020026020010151600001906001600160a01b031690816001600160a01b03168152505060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630178b8bf87848151811061025457fe5b60200260200101516040518263ffffffff1660e01b8152600401610278919061099d565b60206040518083038186803b15801561029057600080fd5b505afa1580156102a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c891906106d4565b905060005b85518110156104005760008784815181106102e457fe5b60200260200101518783815181106102f857fe5b60200260200101516040516020016103109190610875565b60405160208183030381529060405280519060200120604051602001610337929190610867565b60408051601f19818403018152908290528051602090910120631674750f60e21b825291506001600160a01b038416906359d1d43c9061037b9084906004016109a6565b60006040518083038186803b15801561039357600080fd5b505afa1580156103a7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103cf91908101906107dc565b8585815181106103db57fe5b60200260200101516060015183601481106103f257fe5b6020020152506001016102cd565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b69fd4ab84848151811061043c57fe5b60200260200101516000015185858151811061045457fe5b6020026020010151600001516040518363ffffffff1660e01b815260040161047d9291906108a5565b60206040518083038186803b15801561049557600080fd5b505afa1580156104a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cd91906107bc565b8383815181106104d957fe5b602002602001015160400190151590811515815250507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b971a6bf84848151811061052a57fe5b6020026020010151600001516040518263ffffffff1660e01b81526004016105529190610891565b60206040518083038186803b15801561056a57600080fd5b505afa15801561057e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a2919061084f565b8383815181106105ae57fe5b60209081029190910181015101525060010161012f565b509392505050565b604051806080016040528060006001600160a01b0316815260200160008152602001600015158152602001610600610605565b905290565b6040518061028001604052806014905b60608152602001906001900390816106155790505090565b600082601f83011261063d578081fd5b813561065061064b826109f1565b6109ca565b818152915060208083019084810160005b848110156106c9578135870188603f82011261067c57600080fd5b8381013561068c61064b82610a11565b81815260408b818486010111156106a257600080fd5b82818501888401375060009181018601919091528552509282019290820190600101610661565b505050505092915050565b6000602082840312156106e5578081fd5b81516001600160a01b03811681146106fb578182fd5b9392505050565b60008060408385031215610714578081fd5b823567ffffffffffffffff8082111561072b578283fd5b818501915085601f83011261073e578283fd5b813561074c61064b826109f1565b80828252602080830192508086018a82838702890101111561076c578788fd5b8796505b8487101561078e578035845260019690960195928101928101610770565b5090965087013593505050808211156107a5578283fd5b506107b28582860161062d565b9150509250929050565b6000602082840312156107cd578081fd5b815180151581146106fb578182fd5b6000602082840312156107ed578081fd5b815167ffffffffffffffff811115610803578182fd5b8201601f81018413610813578182fd5b805161082161064b82610a11565b818152856020838501011115610835578384fd5b610846826020830160208601610a35565b95945050505050565b600060208284031215610860578081fd5b5051919050565b918252602082015260400190565b60008251610887818460208701610a35565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6000602080830181845280855180835260408601915060408482028701019250838701855b8281101561099057878503603f19018452815180516001600160a01b03168652868101518787015260408082015115159087015260609081015160809187018290529086016103008701895b601481101561097b57888203607f1901835283518051610950818561099d565b61095d82828f8601610a35565b958c0195948c0194601f91909101601f191601925050600101610930565b509650505092850192908501906001016108e4565b5092979650505050505050565b90815260200190565b908152604060208201819052600390820152621d5c9b60ea1b606082015260800190565b60405181810167ffffffffffffffff811182821017156109e957600080fd5b604052919050565b600067ffffffffffffffff821115610a07578081fd5b5060209081020190565b600067ffffffffffffffff821115610a27578081fd5b50601f01601f191660200190565b60005b83811015610a50578181015183820152602001610a38565b83811115610a5f576000848401525b5050505056fea2646970667358221220628a366714cdda82fe91d785ad928e44e4b9f7976ed987e5fef72d207582dbaf64736f6c634300060c0033";class Jb extends Ka{constructor(...e){e.length>1?super(...e):super(Wb,qb,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Wb)}static connect(e,t){return new $a(e,Wb,t)}}Jb.bytecode=qb,Jb.abi=Wb;var Kb=Object.freeze({__proto__:null,IENSRegistry__factory:jb,IENSResolver__factory:zb,IRelayerRegistry__factory:Xb,RelayerAggregator__factory:Jb});const Yb=[{inputs:[{internalType:"address",name:"_ensRegistry",type:"address"},{internalType:"address",name:"_relayerRegistry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ENSRegistry",outputs:[{internalType:"contract IENSRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"RelayerRegistry",outputs:[{internalType:"contract IRelayerRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract Governance",name:"governance",type:"address"}],name:"getAllProposals",outputs:[{components:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"},{internalType:"enum Governance.ProposalState",name:"state",type:"uint8"}],internalType:"struct GovernanceAggregator.Proposal[]",name:"proposals",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract Governance",name:"governance",type:"address"},{internalType:"address[]",name:"accs",type:"address[]"}],name:"getGovernanceBalances",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract Governance",name:"governance",type:"address"},{internalType:"address",name:"account",type:"address"}],name:"getUserData",outputs:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"latestProposalId",type:"uint256"},{internalType:"uint256",name:"latestProposalIdState",type:"uint256"},{internalType:"uint256",name:"timelock",type:"uint256"},{internalType:"address",name:"delegatee",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_relayers",type:"bytes32[]"},{internalType:"string[]",name:"_subdomains",type:"string[]"}],name:"relayersData",outputs:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bool",name:"isRegistered",type:"bool"},{internalType:"string[20]",name:"records",type:"string[20]"}],internalType:"struct Relayer[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"}],Zb="0x60c060405234801561001057600080fd5b5060405161155d38038061155d83398101604081905261002f9161004d565b6001600160601b0319606092831b8116608052911b1660a05261009e565b6000806040838503121561005f578182fd5b825161006a81610086565b602084015190925061007b81610086565b809150509250929050565b6001600160a01b038116811461009b57600080fd5b50565b60805160601c60a05160601c6114826100db6000398061024b528061059c528061068a52508061022752806102d352806103b452506114826000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063029fcae7146100675780631cb120d61461009057806339c16356146100a55780634d47d775146100ad5780639853d922146100cd578063f4eeefe9146100ed575b600080fd5b61007a610075366004610fa1565b610111565b60405161008791906112ee565b60405180910390f35b610098610225565b6040516100879190611118565b610098610249565b6100c06100bb366004610e93565b61026d565b6040516100879190611210565b6100e06100db366004610dcc565b61075e565b6040516100879190611146565b6101006100fb366004610f69565b6109dd565b60405161008795949392919061135f565b60608167ffffffffffffffff8111801561012a57600080fd5b50604051908082528060200260200182016040528015610154578160200160208202803683370190505b50905060005b8281101561021d57846001600160a01b0316639ae697bf85858481811061017d57fe5b90506020020160208101906101929190610dcc565b6040518263ffffffff1660e01b81526004016101ae9190611118565b60206040518083038186803b1580156101c657600080fd5b505afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906110b5565b82828151811061020a57fe5b602090810291909101015260010161015a565b509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b606080835167ffffffffffffffff8111801561028857600080fd5b506040519080825280602002602001820160405280156102c257816020015b6102af610c79565b8152602001906001900390816102a75790505b50905060005b845181101561021d577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166302571be386838151811061030c57fe5b60200260200101516040518263ffffffff1660e01b81526004016103309190611332565b60206040518083038186803b15801561034857600080fd5b505afa15801561035c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103809190610def565b82828151811061038c57fe5b6020026020010151600001906001600160a01b031690816001600160a01b03168152505060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630178b8bf8784815181106103ed57fe5b60200260200101516040518263ffffffff1660e01b81526004016104119190611332565b60206040518083038186803b15801561042957600080fd5b505afa15801561043d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104619190610def565b905060005b855181101561059957600087848151811061047d57fe5b602002602001015187838151811061049157fe5b60200260200101516040516020016104a991906110fc565b604051602081830303815290604052805190602001206040516020016104d09291906110ee565b60408051601f19818403018152908290528051602090910120631674750f60e21b825291506001600160a01b038416906359d1d43c9061051490849060040161133b565b60006040518083038186803b15801561052c57600080fd5b505afa158015610540573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105689190810190611042565b85858151811061057457fe5b602002602001015160600151836014811061058b57fe5b602002015250600101610466565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b69fd4ab8484815181106105d557fe5b6020026020010151600001518585815181106105ed57fe5b6020026020010151600001516040518363ffffffff1660e01b815260040161061692919061112c565b60206040518083038186803b15801561062e57600080fd5b505afa158015610642573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106669190610f4d565b83838151811061067257fe5b602002602001015160400190151590811515815250507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b971a6bf8484815181106106c357fe5b6020026020010151600001516040518263ffffffff1660e01b81526004016106eb9190611118565b60206040518083038186803b15801561070357600080fd5b505afa158015610717573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073b91906110b5565b83838151811061074757fe5b6020908102919091018101510152506001016102c8565b6060816001600160a01b031663da35c6646040518163ffffffff1660e01b815260040160206040518083038186803b15801561079957600080fd5b505afa1580156107ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d191906110b5565b67ffffffffffffffff811180156107e757600080fd5b5060405190808252806020026020018201604052801561082157816020015b61080e610cb1565b8152602001906001900390816108065790505b50905060005b81518110156109d7576000806000806000806000808a6001600160a01b031663013cf08b8a6001016040518263ffffffff1660e01b815260040161086b9190611332565b6101006040518083038186803b15801561088457600080fd5b505afa158015610898573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bc9190610e0b565b97509750975097509750975097509750604051806101200160405280896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001831515815260200182151581526020018c6001600160a01b0316633e4f49e68c6001016040518263ffffffff1660e01b815260040161094d9190611332565b60206040518083038186803b15801561096557600080fd5b505afa158015610979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099d9190611023565b60068111156109a857fe5b8152508a8a815181106109b757fe5b602002602001018190525050505050505050508080600101915050610827565b50919050565b6000806000806000866001600160a01b0316639ae697bf876040518263ffffffff1660e01b8152600401610a119190611118565b60206040518083038186803b158015610a2957600080fd5b505afa158015610a3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6191906110b5565b6040516317977c6160e01b81529095506001600160a01b038816906317977c6190610a90908990600401611118565b60206040518083038186803b158015610aa857600080fd5b505afa158015610abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae091906110b5565b93508315610b7257604051631f27a4f360e11b81526001600160a01b03881690633e4f49e690610b14908790600401611332565b60206040518083038186803b158015610b2c57600080fd5b505afa158015610b40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b649190611023565b6006811115610b6f57fe5b92505b60405163a72edda360e01b81526001600160a01b0388169063a72edda390610b9e908990600401611118565b60206040518083038186803b158015610bb657600080fd5b505afa158015610bca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bee91906110b5565b604051631976849960e21b81529092506001600160a01b038816906365da126490610c1d908990600401611118565b60206040518083038186803b158015610c3557600080fd5b505afa158015610c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6d9190610def565b90509295509295909350565b604051806080016040528060006001600160a01b0316815260200160008152602001600015158152602001610cac610cfd565b905290565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905290610100820190610cac565b6040518061028001604052806014905b6060815260200190600190039081610d0d5790505090565b600082601f830112610d35578081fd5b8135610d48610d43826113b2565b61138b565b818152915060208083019084810160005b84811015610dc1578135870188603f820112610d7457600080fd5b83810135610d84610d43826113d2565b81815260408b81848601011115610d9a57600080fd5b82818501888401375060009181018601919091528552509282019290820190600101610d59565b505050505092915050565b600060208284031215610ddd578081fd5b8135610de881611426565b9392505050565b600060208284031215610e00578081fd5b8151610de881611426565b600080600080600080600080610100898b031215610e27578384fd5b8851610e3281611426565b60208a0151909850610e4381611426565b8097505060408901519550606089015194506080890151935060a0890151925060c0890151610e718161143e565b60e08a0151909250610e828161143e565b809150509295985092959890939650565b60008060408385031215610ea5578182fd5b823567ffffffffffffffff80821115610ebc578384fd5b818501915085601f830112610ecf578384fd5b8135610edd610d43826113b2565b80828252602080830192508086018a828387028901011115610efd578889fd5b8896505b84871015610f1f578035845260019690960195928101928101610f01565b509096508701359350505080821115610f36578283fd5b50610f4385828601610d25565b9150509250929050565b600060208284031215610f5e578081fd5b8151610de88161143e565b60008060408385031215610f7b578182fd5b8235610f8681611426565b91506020830135610f9681611426565b809150509250929050565b600080600060408486031215610fb5578283fd5b8335610fc081611426565b9250602084013567ffffffffffffffff80821115610fdc578384fd5b818601915086601f830112610fef578384fd5b813581811115610ffd578485fd5b8760208083028501011115611010578485fd5b6020830194508093505050509250925092565b600060208284031215611034578081fd5b815160078110610de8578182fd5b600060208284031215611053578081fd5b815167ffffffffffffffff811115611069578182fd5b8201601f81018413611079578182fd5b8051611087610d43826113d2565b81815285602083850101111561109b578384fd5b6110ac8260208301602086016113f6565b95945050505050565b6000602082840312156110c6578081fd5b5051919050565b6001600160a01b03169052565b15159052565b600781106110ea57fe5b9052565b918252602082015260400190565b6000825161110e8184602087016113f6565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b602080825282518282018190526000919060409081850190868401855b8281101561120357815180516001600160a01b031685528681015161118a888701826110cd565b508086015185870152606080820151908601526080808201519086015260a0808201519086015260c0808201516111c3828801826110da565b505060e0808201516111d7828801826110da565b505061010090810151906111ed868201836110e0565b5050610120939093019290850190600101611163565b5091979650505050505050565b6000602080830181845280855180835260408601915060408482028701019250838701855b828110156112e157878503603f19018452815180516001600160a01b03168652868101518787015260408082015115159087015260609081015160809187018290529086016103008701895b60148110156112cc57888203607f19018352835180516112a18185611332565b6112ae82828f86016113f6565b958c0195948c0194601f91909101601f191601925050600101611281565b50965050509285019290850190600101611235565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156113265783518352928401929184019160010161130a565b50909695505050505050565b90815260200190565b908152604060208201819052600390820152621d5c9b60ea1b606082015260800190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b60405181810167ffffffffffffffff811182821017156113aa57600080fd5b604052919050565b600067ffffffffffffffff8211156113c8578081fd5b5060209081020190565b600067ffffffffffffffff8211156113e8578081fd5b50601f01601f191660200190565b60005b838110156114115781810151838201526020016113f9565b83811115611420576000848401525b50505050565b6001600160a01b038116811461143b57600080fd5b50565b801515811461143b57600080fdfea26469706673582212209edead2cf5d16a9f09d7d75c5aa042cb00130c9febd0bf0e908fbf9c3f34f1a164736f6c634300060c0033";class Qb extends Ka{constructor(...e){e.length>1?super(...e):super(Yb,Zb,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Yb)}static connect(e,t){return new $a(e,Yb,t)}}Qb.bytecode=Zb,Qb.abi=Yb;const ef=[{inputs:[{internalType:"contract Governance",name:"governance",type:"address"}],name:"getAllProposals",outputs:[{components:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"},{internalType:"enum Governance.ProposalState",name:"state",type:"uint8"}],internalType:"struct GovernanceAggregator.Proposal[]",name:"proposals",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract Governance",name:"governance",type:"address"},{internalType:"address[]",name:"accs",type:"address[]"}],name:"getGovernanceBalances",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract Governance",name:"governance",type:"address"},{internalType:"address",name:"account",type:"address"}],name:"getUserData",outputs:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"latestProposalId",type:"uint256"},{internalType:"uint256",name:"latestProposalIdState",type:"uint256"},{internalType:"uint256",name:"timelock",type:"uint256"},{internalType:"address",name:"delegatee",type:"address"}],stateMutability:"view",type:"function"}],tf="0x608060405234801561001057600080fd5b50610ab8806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063029fcae7146100465780639853d9221461006f578063f4eeefe91461008f575b600080fd5b61005961005436600461082b565b6100b3565b60405161006691906109e3565b60405180910390f35b61008261007d36600461072c565b6101c7565b6040516100669190610919565b6100a261009d3660046107f3565b610446565b604051610066959493929190610a30565b60608167ffffffffffffffff811180156100cc57600080fd5b506040519080825280602002602001820160405280156100f6578160200160208202803683370190505b50905060005b828110156101bf57846001600160a01b0316639ae697bf85858481811061011f57fe5b9050602002016020810190610134919061072c565b6040518263ffffffff1660e01b81526004016101509190610905565b60206040518083038186803b15801561016857600080fd5b505afa15801561017c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a091906108cc565b8282815181106101ac57fe5b60209081029190910101526001016100fc565b509392505050565b6060816001600160a01b031663da35c6646040518163ffffffff1660e01b815260040160206040518083038186803b15801561020257600080fd5b505afa158015610216573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023a91906108cc565b67ffffffffffffffff8111801561025057600080fd5b5060405190808252806020026020018201604052801561028a57816020015b6102776106e2565b81526020019060019003908161026f5790505b50905060005b8151811015610440576000806000806000806000808a6001600160a01b031663013cf08b8a6001016040518263ffffffff1660e01b81526004016102d49190610a27565b6101006040518083038186803b1580156102ed57600080fd5b505afa158015610301573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610325919061076b565b97509750975097509750975097509750604051806101200160405280896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001831515815260200182151581526020018c6001600160a01b0316633e4f49e68c6001016040518263ffffffff1660e01b81526004016103b69190610a27565b60206040518083038186803b1580156103ce57600080fd5b505afa1580156103e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040691906108ad565b600681111561041157fe5b8152508a8a8151811061042057fe5b602002602001018190525050505050505050508080600101915050610290565b50919050565b6000806000806000866001600160a01b0316639ae697bf876040518263ffffffff1660e01b815260040161047a9190610905565b60206040518083038186803b15801561049257600080fd5b505afa1580156104a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ca91906108cc565b6040516317977c6160e01b81529095506001600160a01b038816906317977c61906104f9908990600401610905565b60206040518083038186803b15801561051157600080fd5b505afa158015610525573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054991906108cc565b935083156105db57604051631f27a4f360e11b81526001600160a01b03881690633e4f49e69061057d908790600401610a27565b60206040518083038186803b15801561059557600080fd5b505afa1580156105a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cd91906108ad565b60068111156105d857fe5b92505b60405163a72edda360e01b81526001600160a01b0388169063a72edda390610607908990600401610905565b60206040518083038186803b15801561061f57600080fd5b505afa158015610633573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065791906108cc565b604051631976849960e21b81529092506001600160a01b038816906365da126490610686908990600401610905565b60206040518083038186803b15801561069e57600080fd5b505afa1580156106b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d6919061074f565b90509295509295909350565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290529061010082015290565b60006020828403121561073d578081fd5b813561074881610a5c565b9392505050565b600060208284031215610760578081fd5b815161074881610a5c565b600080600080600080600080610100898b031215610787578384fd5b885161079281610a5c565b60208a01519098506107a381610a5c565b8097505060408901519550606089015194506080890151935060a0890151925060c08901516107d181610a74565b60e08a01519092506107e281610a74565b809150509295985092959890939650565b60008060408385031215610805578182fd5b823561081081610a5c565b9150602083013561082081610a5c565b809150509250929050565b60008060006040848603121561083f578283fd5b833561084a81610a5c565b9250602084013567ffffffffffffffff80821115610866578384fd5b818601915086601f830112610879578384fd5b813581811115610887578485fd5b876020808302850101111561089a578485fd5b6020830194508093505050509250925092565b6000602082840312156108be578081fd5b815160078110610748578182fd5b6000602082840312156108dd578081fd5b5051919050565b6001600160a01b03169052565b15159052565b6007811061090157fe5b9052565b6001600160a01b0391909116815260200190565b602080825282518282018190526000919060409081850190868401855b828110156109d657815180516001600160a01b031685528681015161095d888701826108e4565b508086015185870152606080820151908601526080808201519086015260a0808201519086015260c080820151610996828801826108f1565b505060e0808201516109aa828801826108f1565b505061010090810151906109c0868201836108f7565b5050610120939093019290850190600101610936565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610a1b578351835292840192918401916001016109ff565b50909695505050505050565b90815260200190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b6001600160a01b0381168114610a7157600080fd5b50565b8015158114610a7157600080fdfea2646970667358221220c68e065ff95a2c91c1e5904ff4ba8c709291d5227b10049b437e89d35c33af4d64736f6c634300060c0033";class af extends Ka{constructor(...e){e.length>1?super(...e):super(ef,tf,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(ef)}static connect(e,t){return new $a(e,ef,t)}}af.bytecode=tf,af.abi=ef;var nf=Object.freeze({__proto__:null,Aggregator__factory:Qb,GovernanceAggregator__factory:af,relayerAggregatorSol:Kb});const bf=[{inputs:[{internalType:"contract IDeployer",name:"_deployer",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"addr",type:"address"}],name:"Deployed",type:"event"},{inputs:[{internalType:"bytes",name:"_initCode",type:"bytes"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"deploy",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"contract IDeployer",name:"",type:"address"}],stateMutability:"view",type:"function"}],ff="0x60a060405234801561001057600080fd5b506040516103a93803806103a98339818101604052602081101561003357600080fd5b50516001600160a01b0381161561004a5780610060565b73ce0042b868300000d44a59004da54a005ffdcf9f5b60601b6001600160601b031916608052604051309032907f09e48df7857bd0c1e0d31bb8a85d42cf1874817895f171c917f6ee2cea73ec2090600090a35060805160601c6102e96100c06000398061010d528061029152506102e96000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634af63f021461003b578063d5f39488146100e5575b600080fd5b6100e36004803603604081101561005157600080fd5b81019060208101813564010000000081111561006c57600080fd5b82018360208201111561007e57600080fd5b803590602001918460018302840111640100000000831117156100a057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610109915050565b005b6100ed61028f565b604080516001600160a01b039092168252519081900360200190f35b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634af63f0284846040518363ffffffff1660e01b81526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561018e578181015183820152602001610176565b50505050905090810190601f1680156101bb5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156101db57600080fd5b505af11580156101ef573d6000803e3d6000fd5b505050506040513d602081101561020557600080fd5b505190506001600160a01b038116610254576040805162461bcd60e51b815260206004820152600d60248201526c11195c1b1bde4819985a5b1959609a1b604482015290519081900360640190fd5b6040516001600160a01b0382169033907f09e48df7857bd0c1e0d31bb8a85d42cf1874817895f171c917f6ee2cea73ec2090600090a3505050565b7f00000000000000000000000000000000000000000000000000000000000000008156fea26469706673582212209824ac82969e56106968b899123a2ecac48f942b4ed3dcae2ced58022879d32364736f6c634300060c0033";class df extends Ka{constructor(...e){e.length>1?super(...e):super(bf,ff,e[0])}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}deploy(e,t){return super.deploy(e,t||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(bf)}static connect(e,t){return new $a(e,bf,t)}}df.bytecode=ff,df.abi=bf;const sf=[{inputs:[{internalType:"bytes",name:"_initCode",type:"bytes"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"deploy",outputs:[{internalType:"address payable",name:"createdContract",type:"address"}],stateMutability:"nonpayable",type:"function"}];class cf{static createInterface(){return new ba(sf)}static connect(e,t){return new $a(e,sf,t)}}cf.abi=sf;var rf=Object.freeze({__proto__:null,Deployer__factory:df,IDeployer__factory:cf});const pf=[{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address",name:"_spender",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveExactToken",outputs:[],stateMutability:"nonpayable",type:"function"}];class uf{static createInterface(){return new ba(pf)}static connect(e,t){return new $a(e,pf,t)}}uf.abi=pf;const of=[{inputs:[{internalType:"address",name:"_governance",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract ITornadoInstance",name:"instance",type:"address"},{indexed:!1,internalType:"enum InstanceRegistry.InstanceState",name:"state",type:"uint8"}],name:"InstanceStateUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tornadoRouter",type:"address"}],name:"RouterRegistered",type:"event"},{inputs:[],name:"getAllInstanceAddresses",outputs:[{internalType:"contract ITornadoInstance[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAllInstances",outputs:[{components:[{internalType:"contract ITornadoInstance",name:"addr",type:"address"},{components:[{internalType:"bool",name:"isERC20",type:"bool"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"enum InstanceRegistry.InstanceState",name:"state",type:"uint8"},{internalType:"uint24",name:"uniswapPoolSwappingFee",type:"uint24"},{internalType:"uint32",name:"protocolFeePercentage",type:"uint32"}],internalType:"struct InstanceRegistry.Instance",name:"instance",type:"tuple"}],internalType:"struct InstanceRegistry.Tornado[]",name:"result",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"instance",type:"address"}],name:"getPoolToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"contract ITornadoInstance",name:"addr",type:"address"},{components:[{internalType:"bool",name:"isERC20",type:"bool"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"enum InstanceRegistry.InstanceState",name:"state",type:"uint8"},{internalType:"uint24",name:"uniswapPoolSwappingFee",type:"uint24"},{internalType:"uint32",name:"protocolFeePercentage",type:"uint32"}],internalType:"struct InstanceRegistry.Instance",name:"instance",type:"tuple"}],internalType:"struct InstanceRegistry.Tornado[]",name:"_instances",type:"tuple[]"},{internalType:"address",name:"_router",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"instanceIds",outputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],name:"instances",outputs:[{internalType:"bool",name:"isERC20",type:"bool"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"enum InstanceRegistry.InstanceState",name:"state",type:"uint8"},{internalType:"uint24",name:"uniswapPoolSwappingFee",type:"uint24"},{internalType:"uint32",name:"protocolFeePercentage",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_instanceId",type:"uint256"}],name:"removeInstance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"router",outputs:[{internalType:"contract ITornadoRouter",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"instance",type:"address"},{internalType:"uint32",name:"newFee",type:"uint32"}],name:"setProtocolFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"routerAddress",type:"address"}],name:"setTornadoRouter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract ITornadoInstance",name:"addr",type:"address"},{components:[{internalType:"bool",name:"isERC20",type:"bool"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"enum InstanceRegistry.InstanceState",name:"state",type:"uint8"},{internalType:"uint24",name:"uniswapPoolSwappingFee",type:"uint24"},{internalType:"uint32",name:"protocolFeePercentage",type:"uint32"}],internalType:"struct InstanceRegistry.Instance",name:"instance",type:"tuple"}],internalType:"struct InstanceRegistry.Tornado",name:"_tornado",type:"tuple"}],name:"updateInstance",outputs:[],stateMutability:"nonpayable",type:"function"}],yf="0x60a060405234801561001057600080fd5b5060405161146738038061146783398101604081905261002f91610044565b60601b6001600160601b031916608052610072565b600060208284031215610055578081fd5b81516001600160a01b038116811461006b578182fd5b9392505050565b60805160601c6113c46100a3600039806103e552806105c052806105ed528061073a52806107e652506113c46000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80636c9be937116100715780636c9be9371461014d578063908e3b371461016057806392b65a4114610173578063b5b899b714610186578063cf552c8914610199578063f887ea40146101ac576100b4565b8063032bb443146100b957806310c13ac3146100e65780631ad058a9146100fb5780634ba16d9d1461011057806352c228e3146101235780635aa6e67514610138575b600080fd5b6100cc6100c7366004610e89565b6101b4565b6040516100dd959493929190611194565b60405180910390f35b6100ee6101fe565b6040516100dd9190611097565b61010e610109366004610ec8565b6102af565b005b61010e61011e366004610e89565b6103da565b61012b61047f565b6040516100dd91906110e4565b6101406105be565b6040516100dd9190611069565b61010e61015b366004610fd3565b6105e2565b61014061016e366004610e89565b610709565b61010e610181366004610f80565b61072f565b610140610194366004611005565b6107b4565b61010e6101a7366004611005565b6107db565b610140610a77565b60016020526000908152604090205460ff8082169161010081046001600160a01b031691600160a81b82041690600160b01b810462ffffff1690600160c81b900463ffffffff1685565b60025460609067ffffffffffffffff8111801561021a57600080fd5b50604051908082528060200260200182016040528015610244578160200160208202803683370190505b50905060005b6002548110156102ab576002818154811061026157fe5b9060005260206000200160009054906101000a90046001600160a01b031682828151811061028b57fe5b6001600160a01b039092166020928302919091019091015260010161024a565b5090565b600054610100900460ff16806102c857506102c8610a8c565b806102d6575060005460ff16155b6102fb5760405162461bcd60e51b81526004016102f290611214565b60405180910390fd5b600054610100900460ff16158015610326576000805460ff1961ff0019909116610100171660011790555b6000805462010000600160b01b031916620100006001600160a01b038516021781555b83518110156103c25761036e84828151811061036157fe5b6020026020010151610a92565b600284828151811061037c57fe5b6020908102919091018101515182546001808201855560009485529290932090920180546001600160a01b0319166001600160a01b039093169290921790915501610349565b5080156103d5576000805461ff00191690555b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104225760405162461bcd60e51b81526004016102f2906112c2565b6000805462010000600160b01b031916620100006001600160a01b038416021790556040517f94df8c3a8087dce110e5fbc5acf380c83c94bbd31b2c8ed4c08e1396a696e1a890610474908390611069565b60405180910390a150565b60025460609067ffffffffffffffff8111801561049b57600080fd5b506040519080825280602002602001820160405280156104d557816020015b6104c2610d64565b8152602001906001900390816104ba5790505b50905060005b6002548110156102ab576000600282815481106104f457fe5b60009182526020808320909101546040805180820182526001600160a01b03928316808252808652600180865295839020835160a081018552815460ff8082161515835261010082049097168289015292985092969587019592949093850192600160a81b909204169081111561056757fe5b600181111561057257fe5b81529054600160b01b810462ffffff166020830152600160c81b900463ffffffff16604090910152905283518490849081106105aa57fe5b6020908102919091010152506001016104db565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461062a5760405162461bcd60e51b81526004016102f2906112c2565b600061063c6080830160608401610fb8565b600181111561064757fe5b14156106655760405162461bcd60e51b81526004016102f29061128b565b6000600160006106786020850185610e89565b6001600160a01b03168152602081019190915260400160002054600160a81b900460ff1660018111156106a757fe5b14156106ef5760026106bc6020830183610e89565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b039092169190911790555b61070661070136839003830183610fea565b610a92565b50565b6001600160a01b038082166000908152600160205260409020546101009004165b919050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107775760405162461bcd60e51b81526004016102f2906112c2565b6001600160a01b039091166000908152600160205260409020805463ffffffff909216600160c81b0263ffffffff60c81b19909216919091179055565b600281815481106107c157fe5b6000918252602090912001546001600160a01b0316905081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108235760405162461bcd60e51b81526004016102f2906112c2565b60006002828154811061083257fe5b60009182526020808320909101546001600160a01b03908116808452600190925260409092205490925060ff8116916101009091041681156109705760008054604051636eb1769f60e11b81526001600160a01b038085169263dd62ed3e926108aa926201000090920490911690889060040161107d565b60206040518083038186803b1580156108c257600080fd5b505afa1580156108d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fa919061101d565b9050801561096e5760008054604051633ef1078360e01b8152620100009091046001600160a01b031691633ef107839161093b9186918991906004016111db565b600060405180830381600087803b15801561095557600080fd5b505af1158015610969573d6000803e3d6000fd5b505050505b505b6001600160a01b038316600090815260016020526040902080546001600160e81b03191690556002805460001981019081106109a857fe5b600091825260209091200154600280546001600160a01b0390921691869081106109ce57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506002805480610a0757fe5b6001900381819060005260206000200160006101000a8154906001600160a01b0302191690559055826001600160a01b03167f02826f62d88a4d9f1978eb9c06f8663f642d032908e65a915d5898f3585421c06000604051610a6991906111ff565b60405180910390a250505050565b6000546201000090046001600160a01b031681565b303b1590565b60208181015182516001600160a01b0390811660009081526001808552604091829020845181549686015160ff1990971690151517610100600160a81b0319166101009690941695909502929092178085559083015192939291839160ff60a81b191690600160a81b908490811115610b0757fe5b02179055506060820151815460809093015163ffffffff16600160c81b0263ffffffff60c81b1962ffffff909216600160b01b0262ffffff60b01b19909416939093171691909117905560208101515115610d1457600081600001516001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b9b57600080fd5b505afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190610eac565b90508160200151602001516001600160a01b0316816001600160a01b031614610c0e5760405162461bcd60e51b81526004016102f290611262565b600080548351604051636eb1769f60e11b81526001600160a01b038086169363dd62ed3e93610c4b9362010000909204909216919060040161107d565b60206040518083038186803b158015610c6357600080fd5b505afa158015610c77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9b919061101d565b905080610d11576000548351604051633ef1078360e01b8152620100009092046001600160a01b031691633ef1078391610cde91869190600019906004016111db565b600060405180830381600087803b158015610cf857600080fd5b505af1158015610d0c573d6000803e3d6000fd5b505050505b50505b80600001516001600160a01b03167f02826f62d88a4d9f1978eb9c06f8663f642d032908e65a915d5898f3585421c0826020015160400151604051610d5991906111ff565b60405180910390a250565b604051806040016040528060006001600160a01b03168152602001610d87610d8c565b905290565b6040805160a0810182526000808252602082018190529091820190815260006020820181905260409091015290565b8035610dc681611348565b92915050565b803560028110610dc657600080fd5b600081830360c0811215610ded578182fd5b610df760406112ea565b91508235610e0481611348565b825260a0601f1982011215610e1857600080fd5b50610e2360a06112ea565b6020830135610e318161135d565b81526040830135610e4181611348565b6020820152610e538460608501610dcc565b60408201526080830135610e668161136b565b606082015260a0830135610e798161137c565b6080820152602082015292915050565b600060208284031215610e9a578081fd5b8135610ea581611348565b9392505050565b600060208284031215610ebd578081fd5b8151610ea581611348565b60008060408385031215610eda578081fd5b823567ffffffffffffffff811115610ef0578182fd5b8301601f81018513610f00578182fd5b8035610f13610f0e82611311565b6112ea565b808282526020808301925080850160c08a838288028901011115610f35578788fd5b8796505b85871015610f6157610f4b8b83610ddb565b8552600196909601959382019390810190610f39565b5050819650610f7289828a01610dbb565b955050505050509250929050565b60008060408385031215610f92578182fd5b8235610f9d81611348565b91506020830135610fad8161137c565b809150509250929050565b600060208284031215610fc9578081fd5b610ea58383610dcc565b600060c08284031215610fe4578081fd5b50919050565b600060c08284031215610ffb578081fd5b610ea58383610ddb565b600060208284031215611016578081fd5b5035919050565b60006020828403121561102e578081fd5b5051919050565b15159052565b6001600160a01b03169052565b6002811061105257fe5b9052565b62ffffff169052565b63ffffffff169052565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156110d85783516001600160a01b0316835292840192918401916001016110b3565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b828110156111875781516111158151611331565b855286015180516111299088870190611035565b868101516111398787018261103b565b5085810151606061114c81880183611048565b8201519050608061115f87820183611056565b9190910151905061117360a086018261105f565b5060c0939093019290850190600101611101565b5091979650505050505050565b85151581526001600160a01b038516602082015260a081016111b58561133d565b604083015262ffffff8416606083015263ffffffff831660808301529695505050505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020810161120c8361133d565b825292915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600f908201526e24b731b7b93932b1ba103a37b5b2b760891b604082015260600190565b6020808252601f908201527f5573652072656d6f7665496e7374616e6365282920666f722072656d6f766500604082015260600190565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b60405181810167ffffffffffffffff8111828210171561130957600080fd5b604052919050565b600067ffffffffffffffff821115611327578081fd5b5060209081020190565b6001600160a01b031690565b806002811061072a57fe5b6001600160a01b038116811461070657600080fd5b801515811461070657600080fd5b62ffffff8116811461070657600080fd5b63ffffffff8116811461070657600080fdfea26469706673582212207c46c875176b62100d16a46c273e615cd9eb5336dbcd238b33b227f39ff9106564736f6c634300060c0033";class lf extends Ka{constructor(...e){e.length>1?super(...e):super(of,yf,e[0])}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}deploy(e,t){return super.deploy(e,t||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(of)}static connect(e,t){return new $a(e,of,t)}}lf.bytecode=yf,lf.abi=of;var mf=Object.freeze({__proto__:null,ITornadoRouter__factory:uf,InstanceRegistry__factory:lf});const Tf=[{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}];class hf{static createInterface(){return new ba(Tf)}static connect(e,t){return new $a(e,Tf,t)}}hf.abi=Tf;const gf=[{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"instanceFeeWithUpdate",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"nonpayable",type:"function"}];class wf{static createInterface(){return new ba(gf)}static connect(e,t){return new $a(e,gf,t)}}wf.abi=gf;const vf=[{inputs:[{internalType:"address",name:"_torn",type:"address"},{internalType:"address",name:"_governance",type:"address"},{internalType:"address",name:"_ens",type:"address"},{internalType:"address",name:"_staking",type:"address"},{internalType:"address",name:"_feeManager",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"minStakeAmount",type:"uint256"}],name:"MinimumStakeAmount",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"}],name:"RelayerBalanceNullified",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"relayer",type:"bytes32"},{indexed:!1,internalType:"string",name:"ensName",type:"string"},{indexed:!1,internalType:"address",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"uint256",name:"stakedAmount",type:"uint256"}],name:"RelayerRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"}],name:"RelayerUnregistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tornadoRouter",type:"address"}],name:"RouterRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"amountStakeAdded",type:"uint256"}],name:"StakeAddedToRelayer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"amountBurned",type:"uint256"}],name:"StakeBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"address",name:"worker",type:"address"}],name:"WorkerRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"address",name:"worker",type:"address"}],name:"WorkerUnregistered",type:"event"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"relayer",type:"address"},{internalType:"contract ITornadoInstance",name:"pool",type:"address"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ens",outputs:[{internalType:"contract IENS",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeManager",outputs:[{internalType:"contract IFeeManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"}],name:"getRelayerBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"}],name:"getRelayerEnsHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tornadoRouter",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"toResolve",type:"address"}],name:"isRelayer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"address",name:"toResolve",type:"address"}],name:"isRelayerRegistered",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"minStakeAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"}],name:"nullifyBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"ensName",type:"string"},{internalType:"uint256",name:"stake",type:"uint256"},{internalType:"address[]",name:"workersToRegister",type:"address[]"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"ensName",type:"string"},{internalType:"uint256",name:"stake",type:"uint256"},{internalType:"address[]",name:"workersToRegister",type:"address[]"},{internalType:"address",name:"relayer",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"registerPermit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"address",name:"worker",type:"address"}],name:"registerWorker",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"relayers",outputs:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bytes32",name:"ensHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"minAmount",type:"uint256"}],name:"setMinStakeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tornadoRouterAddress",type:"address"}],name:"setTornadoRouter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"uint256",name:"stake",type:"uint256"}],name:"stakeToRelayer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"uint256",name:"stake",type:"uint256"},{internalType:"address",name:"staker",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"stakeToRelayerPermit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"staking",outputs:[{internalType:"contract TornadoStakingRewards",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"tornadoRouter",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"}],name:"unregisterRelayer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"worker",type:"address"}],name:"unregisterWorker",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"workers",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Mf="0x6101206040523480156200001257600080fd5b5060405162001fab38038062001fab83398101604081905262000035916200006d565b6001600160601b0319606095861b811660805293851b841660a05291841b831660c052831b821660e05290911b166101005262000105565b600080600080600060a0868803121562000085578081fd5b85516200009281620000ec565b6020870151909550620000a581620000ec565b6040870151909450620000b881620000ec565b6060870151909350620000cb81620000ec565b6080870151909250620000de81620000ec565b809150509295509295909350565b6001600160a01b03811681146200010257600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c611e1662000195600039806106785280610bf352508061075452806108af5280610ea852806111685250806105625280610f99525080610351528061080952806108dc52806109e75280610ce4525080610a205280610aa95280610c375280610e8552806111455250611e166000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80635aa6e675116100de578063c4d66de811610097578063e37e8bcc11610071578063e37e8bcc14610305578063e43fdb3c14610318578063eb4af0451461032b578063f18876841461033e57610173565b8063c4d66de8146102d7578063d0fb0203146102ea578063d990231d146102f257610173565b80635aa6e6751461026e57806385a2968314610276578063adf898a414610289578063ae53941c14610291578063b69fd4ab146102b1578063b971a6bf146102c457610173565b80634ba16d9d116101305780634ba16d9d146101f75780634cb16c2e1461020a5780634cf088d9146102125780634d4efd041461021a5780635300f8411461022d578063541d55481461024e57610173565b806314d92307146101785780632e6506491461018d5780633523dc85146101a05780633f15457f146101b35780634048a257146101d157806345a11cec146101e4575b600080fd5b61018b610186366004611612565b610346565b005b61018b61019b36600461164a565b610414565b61018b6101ae366004611612565b610460565b6101bb610560565b6040516101c891906118f5565b60405180910390f35b6101bb6101df366004611612565b610584565b61018b6101f2366004611682565b61059f565b61018b610205366004611612565b6107fe565b6101bb610898565b6101bb6108ad565b61018b610228366004611612565b6108d1565b61024061023b366004611612565b6109ac565b6040516101c89291906118cb565b61026161025c366004611612565b6109c5565b6040516101c891906119a1565b6101bb6109e5565b61018b6102843660046116f7565b610a09565b6101bb610aa7565b6102a461029f366004611612565b610acb565b6040516101c891906119ac565b6102616102bf36600461164a565b610af9565b6102a46102d2366004611612565b610b20565b61018b6102e5366004611612565b610b4b565b6101bb610bf1565b61018b6103003660046116cc565b610c15565b61018b6103133660046117fc565b610c20565b61018b610326366004611785565b610cc4565b61018b6103393660046118b3565b610cd9565b6102a4610d56565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103975760405162461bcd60e51b815260040161038e90611ae4565b60405180910390fd5b6103a0816108d1565b6001600160a01b038116600090815260026020908152604080832083815560010183905560039091529081902080546001600160a01b0319169055517f490a66cc56c789979052c7052fc0c10a6c4627d8e6165caec80db97a4c383521906104099083906118f5565b60405180910390a150565b3360008181526003602052604090205483906001600160a01b038083169116146104505760405162461bcd60e51b815260040161038e90611c83565b61045a8484610d5c565b50505050565b6001600160a01b03811633146104a9576001600160a01b038181166000908152600360205260409020541633146104a95760405162461bcd60e51b815260040161038e90611cd8565b6001600160a01b0380821660008181526003602052604090205490911614156104e45760405162461bcd60e51b815260040161038e90611b8b565b6001600160a01b03808216600090815260036020526040908190205490517fb2a8e18b9e887f502d65c1683e60b723fa582a6903ea4e8eb23907a19c1ce8a0926105319216908490611909565b60405180910390a16001600160a01b0316600090815260036020526040902080546001600160a01b0319169055565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052600090815260409020546001600160a01b031681565b6000546201000090046001600160a01b031633146105cf5760405162461bcd60e51b815260040161038e90611a64565b6001600160a01b03808416600090815260036020526040902054168061062d576001600160a01b0383811660009081526003602052604090205416156106275760405162461bcd60e51b815260040161038e90611be8565b506107f9565b826001600160a01b0316816001600160a01b03161461065e5760405162461bcd60e51b815260040161038e90611c83565b604051630bbefce160e21b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632efbf384906106ad9086906004016118f5565b602060405180830381600087803b1580156106c757600080fd5b505af11580156106db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ff919061162e565b6001600160a01b03858116600090815260026020526040902054911691506107279082610df5565b6001600160a01b038086166000908152600260205260409081902092909255905163338610af60e01b81527f00000000000000000000000000000000000000000000000000000000000000009091169063338610af9061078b9084906004016119ac565b600060405180830381600087803b1580156107a557600080fd5b505af11580156107b9573d6000803e3d6000fd5b505050507f659f33fc6677bebf3a9bf3101092792e31f35766d0358e54577bdd91a655f6a084826040516107ee929190611988565b60405180910390a150505b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108465760405162461bcd60e51b815260040161038e90611ae4565b6000805462010000600160b01b031916620100006001600160a01b038416021790556040517f94df8c3a8087dce110e5fbc5acf380c83c94bbd31b2c8ed4c08e1396a696e1a8906104099083906118f5565b6000546201000090046001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109195760405162461bcd60e51b815260040161038e90611ae4565b6001600160a01b038082166000818152600360205260409020549091169081146109555760405162461bcd60e51b815260040161038e90611d74565b6001600160a01b03811660009081526002602052604080822091909155517fafa759fb3c68e89eaaba359f0930ab40c24875b73cc9e2f6a38b0180019eb8f3906109a09084906118f5565b60405180910390a15050565b6002602052600090815260409020805460019091015482565b6001600160a01b0390811660009081526003602052604090205416151590565b7f000000000000000000000000000000000000000000000000000000000000000081565b60405163d505accf60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d505accf90610a6190889030908b908a908a908a908a90600401611947565b600060405180830381600087803b158015610a7b57600080fd5b505af1158015610a8f573d6000803e3d6000fd5b50505050610a9e858888610e3e565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b03908116600090815260036020908152604080832054909316825260029052206001015490565b6001600160a01b038181166000908152600360205260409020548116908316145b92915050565b6001600160a01b03908116600090815260036020908152604080832054909316825260029052205490565b600054610100900460ff1680610b645750610b64610f4c565b80610b72575060005460ff16155b610b8e5760405162461bcd60e51b815260040161038e90611b3d565b600054610100900460ff16158015610bb9576000805460ff1961ff0019909116610100171660011790555b6000805462010000600160b01b031916620100006001600160a01b038516021790558015610bed576000805461ff00191690555b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b610bed338383610e3e565b60405163d505accf60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d505accf90610c7890889030908d908a908a908a908a90600401611947565b600060405180830381600087803b158015610c9257600080fd5b505af1158015610ca6573d6000803e3d6000fd5b50505050610cb8858b8b8b8b8b610f52565b50505050505050505050565b610cd2338686868686610f52565b5050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d215760405162461bcd60e51b815260040161038e90611ae4565b60018190556040517f404663163d528ec45288abc4389b81bd96fabf858ff57577ebd4ee7f15d7b0a6906104099083906119ac565b60015481565b6001600160a01b038181166000908152600360205260409020541615610d945760405162461bcd60e51b815260040161038e90611b0d565b6001600160a01b038181166000908152600360205260409081902080546001600160a01b03191692851692909217909155517fcde75bd02c5f739608c891bcd9aa6809e6c4a7035ac7b9f3fd5fea756db74724906109a09084908490611909565b6000610e3783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611287565b9392505050565b6001600160a01b0380831660008181526003602052604090205490911614610e785760405162461bcd60e51b815260040161038e90611abf565b610ecd6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016847f0000000000000000000000000000000000000000000000000000000000000000846112b3565b6001600160a01b038216600090815260026020526040902054610ef190829061130b565b6001600160a01b0383166000908152600260205260409081902091909155517f1275dbe2a271b2b822e60f1d44894fa5fb337e7e2dc6a200205b1a5b17c07d6490610f3f9084908490611988565b60405180910390a1505050565b303b1590565b6000610f9386868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061133092505050565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166302571be3836040518263ffffffff1660e01b8152600401610fe391906119ac565b60206040518083038186803b158015610ffb57600080fd5b505afa15801561100f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611033919061162e565b905073d4416b13d2b3a9abae7acd5d6c2bbdbe256864016001600160a01b0382168114156110735760405162461bcd60e51b815260040161038e90611c15565b816001600160a01b0316896001600160a01b0316146110a45760405162461bcd60e51b815260040161038e90611ca9565b6001600160a01b0389811660009081526003602052604090205416156110dc5760405162461bcd60e51b815260040161038e90611bbb565b6001600160a01b03891660009081526002602052604090206001810154156111165760405162461bcd60e51b815260040161038e90611a38565b6001548710156111385760405162461bcd60e51b815260040161038e90611d50565b61118d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168b7f00000000000000000000000000000000000000000000000000000000000000008a6112b3565b7f1275dbe2a271b2b822e60f1d44894fa5fb337e7e2dc6a200205b1a5b17c07d648a886040516111be929190611988565b60405180910390a1868155600181018490556001600160a01b038a16600081815260036020526040812080546001600160a01b0319169092179091555b8581101561123b57600087878381811061121157fe5b90506020020160208101906112269190611612565b90506112328c82610d5c565b506001016111fb565b507f9ca7c9c762eff27b021608f232b4c4b8f9b8bf9a3d322297e47cc4209a67d5e2848a8a8d8b6040516112739594939291906119b5565b60405180910390a150505050505050505050565b600081848411156112ab5760405162461bcd60e51b815260040161038e9190611a05565b505050900390565b61045a846323b872dd60e01b8585856040516024016112d493929190611923565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261133d565b600082820183811015610e375760405162461bcd60e51b815260040161038e90611a88565b6000610b1a8260006113cc565b6060611392826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114369092919063ffffffff16565b8051909150156107f957808060200190518101906113b09190611765565b6107f95760405162461bcd60e51b815260040161038e90611d06565b6000818351116113de57506000610b1a565b60006113ea848461144d565b90506113fb848285016001016113cc565b611406858584611492565b6040516020016114179291906118cb565b6040516020818303038152906040528051906020012091505092915050565b606061144584846000856114ae565b949350505050565b6000805b8351818401141580156114855750838184018151811061146d57fe5b6020910101516001600160f81b031916601760f91b14155b15610e3757600101611451565b6000835182840111156114a457600080fd5b5091016020012090565b60606114b985611572565b6114d55760405162461bcd60e51b815260040161038e90611c4c565b60006060866001600160a01b031685876040516114f291906118d9565b60006040518083038185875af1925050503d806000811461152f576040519150601f19603f3d011682016040523d82523d6000602084013e611534565b606091505b509150915081156115485791506114459050565b8051156115585780518082602001fd5b8360405162461bcd60e51b815260040161038e9190611a05565b3b151590565b60008083601f840112611589578182fd5b50813567ffffffffffffffff8111156115a0578182fd5b60208301915083602080830285010111156115ba57600080fd5b9250929050565b60008083601f8401126115d2578182fd5b50813567ffffffffffffffff8111156115e9578182fd5b6020830191508360208285010111156115ba57600080fd5b803560ff81168114610b1a57600080fd5b600060208284031215611623578081fd5b8135610e3781611dc8565b60006020828403121561163f578081fd5b8151610e3781611dc8565b6000806040838503121561165c578081fd5b823561166781611dc8565b9150602083013561167781611dc8565b809150509250929050565b600080600060608486031215611696578081fd5b83356116a181611dc8565b925060208401356116b181611dc8565b915060408401356116c181611dc8565b809150509250925092565b600080604083850312156116de578182fd5b82356116e981611dc8565b946020939093013593505050565b600080600080600080600060e0888a031215611711578283fd5b873561171c81611dc8565b965060208801359550604088013561173381611dc8565b9450606088013593506117498960808a01611601565b925060a0880135915060c0880135905092959891949750929550565b600060208284031215611776578081fd5b81518015158114610e37578182fd5b60008060008060006060868803121561179c578081fd5b853567ffffffffffffffff808211156117b3578283fd5b6117bf89838a016115c1565b90975095506020880135945060408801359150808211156117de578283fd5b506117eb88828901611578565b969995985093965092949392505050565b6000806000806000806000806000806101008b8d03121561181b578283fd5b8a3567ffffffffffffffff80821115611832578485fd5b61183e8e838f016115c1565b909c509a5060208d0135995060408d013591508082111561185d578485fd5b5061186a8d828e01611578565b90985096505060608b013561187e81611dc8565b945060808b013593506118948c60a08d01611601565b925060c08b0135915060e08b013590509295989b9194979a5092959850565b6000602082840312156118c4578081fd5b5035919050565b918252602082015260400190565b600082516118eb818460208701611d9c565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b600086825260806020830152846080830152848660a084013760a08583018101919091526001600160a01b039390931660408201526060810191909152601f909201601f19169091010192915050565b6000602082528251806020840152611a24816040850160208701611d9c565b601f01601f19169190910160400192915050565b6020808252601290820152717265676973746572656420616c726561647960701b604082015260600190565b6020808252600a90820152696f6e6c792070726f787960b01b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252600b908201526a085c9959da5cdd195c995960aa1b604082015260600190565b6020808252600f908201526e6f6e6c7920676f7665726e616e636560881b604082015260600190565b60208082526016908201527563616e277420737465616c20616e206164647265737360501b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526016908201527531b0b73a103ab73932b3b4b9ba32b91036b0b9ba32b960511b604082015260600190565b60208082526013908201527231b0b73a103932b3b4b9ba32b91030b3b0b4b760691b604082015260600190565b60208082526013908201527227b7363c9031bab9ba37b6903932b630bcb2b960691b604082015260600190565b6020808252601a908201527f6f6e6c7920756e7772617070656420656e7320646f6d61696e73000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252600c908201526b37b7363c903932b630bcb2b960a11b604082015260600190565b60208082526015908201527437b7363c9032b739903237b6b0b4b71037bbb732b960591b604082015260600190565b60208082526014908201527337b7363c9037bbb732b91037b3103bb7b935b2b960611b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252600a9082015269216d696e5f7374616b6560b01b604082015260600190565b6020808252600e908201526d36bab9ba1031329036b0b9ba32b960911b604082015260600190565b60005b83811015611db7578181015183820152602001611d9f565b8381111561045a5750506000910152565b6001600160a01b0381168114611ddd57600080fd5b5056fea26469706673582212206f4cc4f67dba9ba55aab193d3511cc31e3b32c37cef7bd7df74b3ebff2b3ca5b64736f6c634300060c0033";class _f extends Ka{constructor(...e){e.length>1?super(...e):super(vf,Mf,e[0])}getDeployTransaction(e,t,a,n,b,f){return super.getDeployTransaction(e,t,a,n,b,f||{})}deploy(e,t,a,n,b,f){return super.deploy(e,t,a,n,b,f||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(vf)}static connect(e,t){return new $a(e,vf,t)}}_f.bytecode=Mf,_f.abi=vf;var xf=Object.freeze({__proto__:null,IENS__factory:hf,IFeeManager__factory:wf,RelayerRegistry__factory:_f});const If=[{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolver",outputs:[{internalType:"contract Resolver",name:"",type:"address"}],stateMutability:"view",type:"function"}];class Ef{static createInterface(){return new ba(If)}static connect(e,t){return new $a(e,If,t)}}Ef.abi=If;const Rf=[{inputs:[{internalType:"bytes32[]",name:"domains",type:"bytes32[]"}],name:"bulkResolve",outputs:[{internalType:"address[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolve",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Of="0x608060405234801561001057600080fd5b5061036d806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635c23bdf51461003b578063f9e5423414610074575b600080fd5b6100586004803603602081101561005157600080fd5b5035610167565b604080516001600160a01b039092168252519081900360200190f35b6101176004803603602081101561008a57600080fd5b8101906020810181356401000000008111156100a557600080fd5b8201836020820111156100b757600080fd5b803590602001918460208302840111640100000000831117156100d957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610292945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561015357818101518382015260200161013b565b505050509050019250505060405180910390f35b600080610172610333565b60011461019357738595bfb0d940dfedc98943fa8a907091203f25ee6101a4565b6e0c2e074ec69a0dfb2997ba6c7d2e1e5b9050806001600160a01b0316630178b8bf846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156101ea57600080fd5b505afa1580156101fe573d6000803e3d6000fd5b505050506040513d602081101561021457600080fd5b505160408051631d9dabef60e11b81526004810186905290516001600160a01b0390921691633b3b57de91602480820192602092909190829003018186803b15801561025f57600080fd5b505afa158015610273573d6000803e3d6000fd5b505050506040513d602081101561028957600080fd5b50519392505050565b6060815167ffffffffffffffff811180156102ac57600080fd5b506040519080825280602002602001820160405280156102d6578160200160208202803683370190505b50905060005b825181101561032d576103018382815181106102f457fe5b6020026020010151610167565b82828151811061030d57fe5b6001600160a01b03909216602092830291909101909101526001016102dc565b50919050565b469056fea26469706673582212201849a5e31df8347ec61f3d54e8cef603101becea24443df7d4e43cc42ff12a7564736f6c634300060c0033";class kf extends Ka{constructor(...e){e.length>1?super(...e):super(Rf,Of,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Rf)}static connect(e,t){return new $a(e,Rf,t)}}kf.bytecode=Of,kf.abi=Rf;const Pf=[{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}];class Af{static createInterface(){return new ba(Pf)}static connect(e,t){return new $a(e,Pf,t)}}Af.abi=Pf;var Cf=Object.freeze({__proto__:null,ENS__factory:Ef,EnsResolve__factory:kf,Resolver__factory:Af});const Nf=[{inputs:[{internalType:"bytes32",name:"tokenAddress",type:"bytes32"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Airdrop.Recipient[]",name:"targets",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"bytes32[]",name:"domains",type:"bytes32[]"}],name:"bulkResolve",outputs:[{internalType:"address[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"addr",type:"bytes32"}],name:"resolve",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Df="0x608060405234801561001057600080fd5b5060405161039938038061039983398101604081905261002f91610220565b8181600061003c836101aa565b90506000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161006c91906102e4565b60206040518083038186803b15801561008457600080fd5b505afa158015610098573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100bc91906102cc565b116100e25760405162461bcd60e51b81526004016100d990610311565b60405180910390fd5b60005b82518110156101a557816001600160a01b031663a9059cbb84838151811061010957fe5b60200260200101516000015185848151811061012157fe5b6020026020010151602001516040518363ffffffff1660e01b815260040161014a9291906102f8565b602060405180830381600087803b15801561016457600080fd5b505af1158015610178573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019c91906101f9565b506001016100e5565b506000ff5b60601c90565b6000604082840312156101c1578081fd5b6101cb6040610353565b82519091506001600160a01b03811681146101e557600080fd5b808252506020820151602082015292915050565b60006020828403121561020a578081fd5b81518015158114610219578182fd5b9392505050565b6000806040808486031215610233578182fd5b8351602080860151919450906001600160401b03811115610252578384fd5b8501601f81018713610262578384fd5b805161027561027082610379565b610353565b81815283810190838501868402850186018b1015610291578788fd5b8794505b838510156102bb576102a78b826101b0565b835260019490940193918501918601610295565b508096505050505050509250929050565b6000602082840312156102dd578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526022908201527f42616c616e636520697320302c2061697264726f7020616c726561647920646f6040820152616e6560f01b606082015260800190565b6040518181016001600160401b038111828210171561037157600080fd5b604052919050565b60006001600160401b0382111561038e578081fd5b506020908102019056fe";class Sf extends Ka{constructor(...e){e.length>1?super(...e):super(Nf,Df,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Nf)}static connect(e,t){return new $a(e,Nf,t)}}Sf.bytecode=Df,Sf.abi=Nf;const Uf=[{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"registry",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"resolver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"address",name:"_addr",type:"address"}],name:"setAddr",outputs:[],stateMutability:"nonpayable",type:"function"}],Vf="0x608060405234801561001057600080fd5b5061044b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80630178b8bf1461005c5780633b3b57de146100855780637ef5029814610098578063ac9650d8146100ab578063d5fa2b00146100cb575b600080fd5b61006f61006a3660046102bc565b6100e0565b60405161007c919061031e565b60405180910390f35b61006f6100933660046102bc565b6100e5565b61006f6100a63660046102bc565b610100565b6100be6100b936600461024d565b61011b565b60405161007c9190610332565b6100de6100d93660046102d4565b61021f565b005b503090565b6000908152602081905260409020546001600160a01b031690565b6000602081905290815260409020546001600160a01b031681565b60608167ffffffffffffffff8111801561013457600080fd5b5060405190808252806020026020018201604052801561016857816020015b60608152602001906001900390816101535790505b50905060005b8281101561021857600060603086868581811061018757fe5b905060200281019061019991906103c9565b6040516101a792919061030e565b600060405180830381855af49150503d80600081146101e2576040519150601f19603f3d011682016040523d82523d6000602084013e6101e7565b606091505b5091509150816101f657600080fd5b8084848151811061020357fe5b6020908102919091010152505060010161016e565b5092915050565b60009182526020829052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b6000806020838503121561025f578182fd5b823567ffffffffffffffff80821115610276578384fd5b818501915085601f830112610289578384fd5b813581811115610297578485fd5b86602080830285010111156102aa578485fd5b60209290920196919550909350505050565b6000602082840312156102cd578081fd5b5035919050565b600080604083850312156102e6578182fd5b8235915060208301356001600160a01b0381168114610303578182fd5b809150509250929050565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b6000602080830181845280855180835260408601915060408482028701019250838701855b828110156103bc57878503603f1901845281518051808752885b8181101561038c578281018901518882018a01528801610371565b8181111561039c578989838a0101525b50601f01601f191695909501860194509285019290850190600101610357565b5092979650505050505050565b6000808335601e198436030181126103df578283fd5b83018035915067ffffffffffffffff8211156103f9578283fd5b60200191503681900382131561040e57600080fd5b925092905056fea26469706673582212202e44de42b72aec6265acc191876b290bc887c846ffca216ac5d28a16fd49092564736f6c634300060c0033";class Lf extends Ka{constructor(...e){e.length>1?super(...e):super(Uf,Vf,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Uf)}static connect(e,t){return new $a(e,Uf,t)}}Lf.bytecode=Vf,Lf.abi=Uf;const Ff=[{inputs:[{internalType:"address",name:"_governance",type:"address"},{internalType:"uint256",name:"_pausePeriod",type:"uint256"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct TORN.Recipient[]",name:"_vesting",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"}],name:"Allowed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"}],name:"Disallowed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[{internalType:"address[]",name:"target",type:"address[]"}],name:"addToAllowedList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"allowedTransferee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"canUnpauseAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"chainID",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"chainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"decision",type:"bool"}],name:"changeTransferability",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"fakeTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"target",type:"address[]"}],name:"removeFromAllowedList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address payable",name:"_to",type:"address"},{internalType:"uint256",name:"_balance",type:"uint256"}],name:"rescueTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"setChainId",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_fakeTimestamp",type:"uint256"}],name:"setFakeTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Gf="0x60c06040523480156200001157600080fd5b506040516200298e3803806200298e8339810160408190526200003491620006d6565b604080518082018252600b81526a0a8dee4dcc2c8de86c2e6d60ab1b6020808301918252835180850190945260048452632a27a92760e11b90840152815186938693869390926200008891600391620005e4565b5080516200009e906004906020840190620005e4565b50506005805460ff1916601217905550620000b8620001f8565b506008805460ff199081169091556001600160601b0319606085901b1660a0526001600160a01b0384166000908152600960205260408120805490921660011790915583905b82518110156200017b5760008382815181106200011757fe5b60200260200101516000015190506200014f818584815181106200013757fe5b602002602001015160200151620002b460201b60201c565b6001600160a01b03166000908152600960205260409020805460ff1916600190811790915501620000fe565b506200019f836200018b62000397565b620003b360201b62000d721790919060201c565b608052620001ac620003e4565b620001b66200045b565b6a084595161401484a00000014620001eb5760405162461bcd60e51b8152600401620001e290620008a8565b60405180910390fd5b5050505050505062000946565b6000806200020562000461565b905060007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6200023462000467565b805160209182012060408051808201825260018152603160f81b90840152516200028693927fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6918791309101620007be565b60408051601f1981840301815291815281516020928301206000948552600790925290922082905550905090565b6001600160a01b038216620002dd5760405162461bcd60e51b8152600401620001e290620008df565b620002eb6000838362000501565b6200030781600254620003b360201b62000d721790919060201c565b6002556001600160a01b038216600090815260208181526040909120546200033a91839062000d72620003b3821b17901c565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906200038b90859062000916565b60405180910390a35050565b6000620003ae620005bc60201b62000d9e1760201c565b905090565b600082820183811015620003db5760405162461bcd60e51b8152600401620001e290620007ea565b90505b92915050565b60085460ff16156200040a5760405162461bcd60e51b8152600401620001e2906200087e565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25862000442620005d7565b604051620004519190620007aa565b60405180910390a1565b60025490565b600b5490565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015620004f75780601f10620004cb57610100808354040283529160200191620004f7565b820191906000526020600020905b815481529060010190602001808311620004d957829003601f168201915b5050505050905090565b62000519838383620005b760201b620007421760201c565b62000523620005db565b15806200054857506001600160a01b03831660009081526009602052604090205460ff165b806200056c57506001600160a01b03821660009081526009602052604090205460ff165b6200058b5760405162461bcd60e51b8152600401620001e29062000858565b6001600160a01b038216301415620005b75760405162461bcd60e51b8152600401620001e29062000821565b505050565b6000600a54600014620005d257600a54620003ae565b504290565b3390565b60085460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200062757805160ff191683800117855562000657565b8280016001018555821562000657579182015b82811115620006575782518255916020019190600101906200063a565b506200066592915062000669565b5090565b5b808211156200066557600081556001016200066a565b80516001600160a01b0381168114620003de57600080fd5b600060408284031215620006aa578081fd5b620006b660406200091f565b9050620006c4838362000680565b81526020820151602082015292915050565b600080600060608486031215620006eb578283fd5b620006f7858562000680565b9250602080850151925060408086015160018060401b03808211156200071b578485fd5b818801915088601f8301126200072f578485fd5b8151818111156200073e578586fd5b6200074d85868302016200091f565b8181528581019250838601858302850187018c10156200076b578788fd5b8794505b828510156200079957620007848c8262000698565b8452600194909401939286019285016200076f565b508096505050505050509250925092565b6001600160a01b0391909116815260200190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526017908201527f544f524e3a20696e76616c696420726563697069656e74000000000000000000604082015260600190565b6020808252600c908201526b1513d4938e881c185d5cd95960a21b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601c908201527f544f524e3a20696e636f727265637420646973747269627574696f6e00000000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b6040518181016001600160401b03811182821017156200093e57600080fd5b604052919050565b60805160a05160601c612008620009866000398061056f52806106975280610764528061081d5280610a215250806107bc5280610d2052506120086000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637ecebe0011610104578063adb61832116100a2578063d505accf11610071578063d505accf1461038d578063dc0f0d12146103a0578063dd62ed3e146103a8578063ef0e2ff4146103bb576101cf565b8063adb6183214610357578063adc879e91461035f578063c565882714610367578063cea9d26f1461037a576101cf565b806395d89b41116100de57806395d89b41146103215780639a8a059214610329578063a457c2d714610331578063a9059cbb14610344576101cf565b80637ecebe00146102e857806381893c7c146102fb578063885ad0cf1461030e576101cf565b80633c8d76d1116101715780635c975abb1161014b5780635c975abb146102a75780635d4545a0146102af57806370a08231146102c257806379cc6790146102d5576101cf565b80633c8d76d11461026a57806342966c681461027f5780635aa6e67514610292576101cf565b806318160ddd116101ad57806318160ddd1461022757806323b872dd1461022f578063313ce567146102425780633950935114610257576101cf565b806301ec0fab146101d457806306fdde03146101f2578063095ea7b314610207575b600080fd5b6101dc6103ce565b6040516101e99190611e68565b60405180910390f35b6101fa6103d4565b6040516101e99190611943565b61021a610215366004611708565b61046b565b6040516101e991906118ba565b6101dc610489565b61021a61023d366004611653565b61048f565b61024a610516565b6040516101e99190611e71565b61021a610265366004611708565b61051f565b61027d610278366004611733565b61056d565b005b61027d61028d36600461181c565b610681565b61029a610695565b6040516101e9919061188d565b61021a6106b9565b61021a6102bd3660046115ff565b6106c2565b6101dc6102d03660046115ff565b6106d7565b61027d6102e3366004611708565b6106f2565b6101dc6102f63660046115ff565b610747565b61027d6103093660046117d0565b610762565b61027d61031c366004611733565b61081b565b6101fa610922565b6101dc610983565b61021a61033f366004611708565b610989565b61021a610352366004611708565b6109f1565b6101dc610a05565b6101dc610a14565b61027d61037536600461181c565b610a1a565b61027d610388366004611808565b610a1f565b61027d61039b366004611693565b610bdd565b6101dc610d1e565b6101dc6103b636600461161b565b610d42565b61027d6103c936600461181c565b610d6d565b600a5481565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104605780601f1061043557610100808354040283529160200191610460565b820191906000526020600020905b81548152906001019060200180831161044357829003601f168201915b505050505090505b90565b600061047f610478610db7565b8484610dbb565b5060015b92915050565b60025490565b600061049c848484610e6f565b61050c846104a8610db7565b61050785604051806060016040528060288152602001611f62602891396001600160a01b038a166000908152600160205260408120906104e6610db7565b6001600160a01b031681526020810191909152604001600020549190610f84565b610dbb565b5060019392505050565b60055460ff1690565b600061047f61052c610db7565b84610507856001600061053d610db7565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610d72565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661059f610db7565b6001600160a01b0316146105ce5760405162461bcd60e51b81526004016105c590611de4565b60405180910390fd5b60005b815181101561067d576000600960008484815181106105ec57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f9ef90a89b00db1a1891a357dc96b2a273add9d883e378c350d22bad87a9d7d3082828151811061065857fe5b602002602001015160405161066d919061188d565b60405180910390a16001016105d1565b5050565b61069261068c610db7565b82610fb0565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60085460ff1690565b60096020526000908152604090205460ff1681565b6001600160a01b031660009081526020819052604090205490565b600061072482604051806060016040528060248152602001611f8a6024913961071d866103b6610db7565b9190610f84565b905061073883610732610db7565b83610dbb565b6107428383610fb0565b505050565b6001600160a01b031660009081526006602052604090205490565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610794610db7565b6001600160a01b0316146107ba5760405162461bcd60e51b81526004016105c590611de4565b7f00000000000000000000000000000000000000000000000000000000000000006107e3610a05565b116108005760405162461bcd60e51b81526004016105c590611bd9565b80156108135761080e611092565b610692565b6106926110fe565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661084d610db7565b6001600160a01b0316146108735760405162461bcd60e51b81526004016105c590611de4565b60005b815181101561067d5760016009600084848151811061089157fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f77a7dbc6ad97703ad411a8d5edfcd1df382fb34b076a90898b11884f7ebdcc058282815181106108fd57fe5b6020026020010151604051610912919061188d565b60405180910390a1600101610876565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104605780601f1061043557610100808354040283529160200191610460565b600b5481565b600061047f610996610db7565b8461050785604051806060016040528060258152602001611fae60259139600160006109c0610db7565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610f84565b600061047f6109fe610db7565b8484610e6f565b6000610a0f610d9e565b905090565b600b5490565b600a55565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610a51610db7565b6001600160a01b031614610a775760405162461bcd60e51b81526004016105c590611de4565b6001600160a01b038216610a9d5760405162461bcd60e51b81526004016105c590611d58565b6001600160a01b038316610b06574760008215610ac357610abe8284611157565b610ac5565b815b6040519091506001600160a01b0385169082156108fc029083906000818181858888f19350505050158015610afe573d6000803e3d6000fd5b505050610742565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190610b3590309060040161188d565b60206040518083038186803b158015610b4d57600080fd5b505afa158015610b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b859190611834565b905060008215610b9e57610b998284611157565b610ba0565b815b905060008111610bc25760405162461bcd60e51b81526004016105c590611e31565b610bd66001600160a01b038616858361116d565b5050505050565b83610be6610a05565b1115610c045760405162461bcd60e51b81526004016105c590611ace565b6001600160a01b0387166000908152600660209081526040808320549051610c57927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928c928c928c92918c91016118c5565b6040516020818303038152906040528051906020012090506000611901610c7c6111c3565b83604051602001610c8f93929190611868565b6040516020818303038152906040528051906020012090506000610cb582878787611202565b9050896001600160a01b0316816001600160a01b031614610ce85760405162461bcd60e51b81526004016105c590611c20565b6001600160a01b038a16600090815260066020526040902080546001019055610d128a8a8a610dbb565b50505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600b55565b600082820183811015610d975760405162461bcd60e51b81526004016105c590611a60565b9392505050565b6000600a54600014610db257600a54610a0f565b504290565b3390565b6001600160a01b038316610de15760405162461bcd60e51b81526004016105c590611cdd565b6001600160a01b038216610e075760405162461bcd60e51b81526004016105c590611a1e565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610e62908590611e68565b60405180910390a3505050565b6001600160a01b038316610e955760405162461bcd60e51b81526004016105c590611c98565b6001600160a01b038216610ebb5760405162461bcd60e51b81526004016105c5906119ad565b610ec68383836112fa565b610f0381604051806060016040528060268152602001611f3c602691396001600160a01b0386166000908152602081905260409020549190610f84565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610f329082610d72565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610e62908590611e68565b60008184841115610fa85760405162461bcd60e51b81526004016105c59190611943565b505050900390565b6001600160a01b038216610fd65760405162461bcd60e51b81526004016105c590611c57565b610fe2826000836112fa565b61101f81604051806060016040528060228152602001611f1a602291396001600160a01b0385166000908152602081905260409020549190610f84565b6001600160a01b0383166000908152602081905260409020556002546110459082611399565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611086908590611e68565b60405180910390a35050565b60085460ff166110b45760405162461bcd60e51b81526004016105c5906119f0565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6110e7610db7565b6040516110f4919061188d565b60405180910390a1565b60085460ff16156111215760405162461bcd60e51b81526004016105c590611b6d565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110e7610db7565b60008183106111665781610d97565b5090919050565b6107428363a9059cbb60e01b848460405160240161118c9291906118a1565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526113db565b600080600760006111d2610a14565b8152602081019190915260400160002054905080156111f2579050610468565b6111fa61146a565b915050610468565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156112445760405162461bcd60e51b81526004016105c590611b2b565b8360ff16601b148061125957508360ff16601c145b6112755760405162461bcd60e51b81526004016105c590611b97565b60006001868686866040516000815260200160405260405161129a9493929190611925565b6020604051602081039080840390855afa1580156112bc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166112ef5760405162461bcd60e51b81526004016105c590611976565b90505b949350505050565b611305838383610742565b61130d6106b9565b158061133157506001600160a01b03831660009081526009602052604090205460ff165b8061135457506001600160a01b03821660009081526009602052604090205460ff165b6113705760405162461bcd60e51b81526004016105c590611b05565b6001600160a01b0382163014156107425760405162461bcd60e51b81526004016105c590611a97565b6000610d9783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f84565b6060611430826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115209092919063ffffffff16565b805190915015610742578080602001905181019061144e91906117ec565b6107425760405162461bcd60e51b81526004016105c590611d9a565b600080611475610a14565b905060007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6114a26103d4565b805160209182012060408051808201825260018152603160f81b90840152516114f293927fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc69187913091016118f9565b60408051601f1981840301815291815281516020928301206000948552600790925290922082905550905090565b60606112f284846000856060611535856115ee565b6115515760405162461bcd60e51b81526004016105c590611d21565b60006060866001600160a01b0316858760405161156e919061184c565b60006040518083038185875af1925050503d80600081146115ab576040519150601f19603f3d011682016040523d82523d6000602084013e6115b0565b606091505b509150915081156115c45791506112f29050565b8051156115d45780518082602001fd5b8360405162461bcd60e51b81526004016105c59190611943565b3b151590565b803561048381611ef6565b600060208284031215611610578081fd5b8135610d9781611ef6565b6000806040838503121561162d578081fd5b823561163881611ef6565b9150602083013561164881611ef6565b809150509250929050565b600080600060608486031215611667578081fd5b833561167281611ef6565b9250602084013561168281611ef6565b929592945050506040919091013590565b600080600080600080600060e0888a0312156116ad578283fd5b87356116b881611ef6565b965060208801356116c881611ef6565b95506040880135945060608801359350608088013560ff811681146116eb578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561171a578182fd5b823561172581611ef6565b946020939093013593505050565b60006020808385031215611745578182fd5b823567ffffffffffffffff81111561175b578283fd5b8301601f8101851361176b578283fd5b803561177e61177982611ea6565b611e7f565b818152838101908385018584028501860189101561179a578687fd5b8694505b838510156117c4576117b089826115f4565b83526001949094019391850191850161179e565b50979650505050505050565b6000602082840312156117e1578081fd5b8135610d9781611f0b565b6000602082840312156117fd578081fd5b8151610d9781611f0b565b600080600060608486031215611667578283fd5b60006020828403121561182d578081fd5b5035919050565b600060208284031215611845578081fd5b5051919050565b6000825161185e818460208701611ec6565b9190910192915050565b60f09390931b6001600160f01b03191683526002830191909152602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082528251806020840152611962816040850160208701611ec6565b601f01601f19169190910160400192915050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526017908201527f544f524e3a20696e76616c696420726563697069656e74000000000000000000604082015260600190565b6020808252601d908201527f45524332305065726d69743a206578706972656420646561646c696e65000000604082015260600190565b6020808252600c908201526b1513d4938e881c185d5cd95960a21b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b60208082526027908201527f544f524e3a2063616e6e6f74206368616e6765207472616e736665726162696c6040820152661a5d1e481e595d60ca1b606082015260800190565b6020808252601e908201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526022908201527f544f524e3a2063616e206e6f742073656e6420746f207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252602d908201527f544f524e3a206f6e6c7920676f7665726e616e63652063616e20706572666f7260408201526c36903a3434b99030b1ba34b7b760991b606082015260800190565b6020808252601e908201527f544f524e3a20747279696e6720746f2073656e6420302062616c616e63650000604082015260600190565b90815260200190565b60ff91909116815260200190565b60405181810167ffffffffffffffff81118282101715611e9e57600080fd5b604052919050565b600067ffffffffffffffff821115611ebc578081fd5b5060209081020190565b60005b83811015611ee1578181015183820152602001611ec9565b83811115611ef0576000848401525b50505050565b6001600160a01b038116811461069257600080fd5b801515811461069257600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220c25cb2cef98080abbebec9b5719a4f46d638fbe559a3ab7a9de64272855c3c1064736f6c634300060c0033";class Bf extends Ka{constructor(...e){e.length>1?super(...e):super(Ff,Gf,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ff)}static connect(e,t){return new $a(e,Ff,t)}}Bf.bytecode=Gf,Bf.abi=Ff;const jf=[{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"fakeTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fakeTimestamp",type:"uint256"}],name:"setFakeTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"}],Hf="0x608060405234801561001057600080fd5b5060d28061001f6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c806301ec0fab146041578063adb61832146059578063c565882714605f575b600080fd5b6047607b565b60408051918252519081900360200190f35b60476081565b607960048036036020811015607357600080fd5b50356097565b005b60005481565b60008054156090576000546092565b425b905090565b60005556fea2646970667358221220b2410460a5b24aec9983bcf8349aa3b589a0dff9120af5b704feae536a65813064736f6c634300060c0033";class zf extends Ka{constructor(...e){e.length>1?super(...e):super(jf,Hf,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(jf)}static connect(e,t){return new $a(e,jf,t)}}zf.bytecode=Hf,zf.abi=jf;const $f=[{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_beneficiary",type:"address"},{internalType:"uint256",name:"_startTimestamp",type:"uint256"},{internalType:"uint256",name:"_cliffInMonths",type:"uint256"},{internalType:"uint256",name:"_durationInMonths",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Released",type:"event"},{inputs:[],name:"SECONDS_PER_MONTH",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"beneficiary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"cliffInMonths",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"durationInMonths",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"fakeTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"release",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"released",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fakeTimestamp",type:"uint256"}],name:"setFakeTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"vestedAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Xf="0x61012060405234801561001157600080fd5b50604051610d2e380380610d2e833981810160405260a081101561003457600080fd5b5080516020820151604083015160608401516080909401519293919290919084848484846001600160a01b0384166100b3576040805162461bcd60e51b815260206004820152601b60248201527f42656e65666963696172792063616e6e6f7420626520656d7074790000000000604482015290519081900360640190fd5b80821115610108576040805162461bcd60e51b815260206004820152601e60248201527f436c6966662069732067726561746572207468616e206475726174696f6e0000604482015290519081900360640190fd5b6001600160601b0319606086811b821660a05285901b1660805261010081905260c082905282156101395782610141565b610141610154565b60e0525061018698505050505050505050565b600061016861016d60201b6105b81760201c565b905090565b600060015460001461018157600154610168565b504290565b60805160601c60a05160601c60c05160e05161010051610b366101f86000398061024452806103bc528061041e52508061019352806101cf52806105725250806102115280610534525080610289528061030952806104b5528061059652508061016d52806104d75250610b366000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063928d89ae11610071578063928d89ae146101195780639613252114610121578063adb6183214610129578063c565882714610131578063e6fd48bc1461014e578063fc0c546a14610156576100b4565b806301ec0fab146100b957806310786deb146100d357806338af3eed146100db57806344b1231f146100ff57806367097a4b1461010757806386d1a69f1461010f575b600080fd5b6100c161015e565b60408051918252519081900360200190f35b6100c1610164565b6100e361016b565b604080516001600160a01b039092168252519081900360200190f35b6100c161018f565b6100c161041c565b610117610440565b005b6100c1610532565b6100c1610556565b6100c161055c565b6101176004803603602081101561014757600080fd5b503561056b565b6100c1610570565b6100e3610594565b60015481565b62278d0081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000006101ba61055c565b10156101c857506000610419565b60006101fc7f00000000000000000000000000000000000000000000000000000000000000006101f661055c565b906105d1565b9050600061020d8262278d0061061c565b90507f000000000000000000000000000000000000000000000000000000000000000081101561024257600092505050610419565b7f0000000000000000000000000000000000000000000000000000000000000000811061030557604080516370a0823160e01b815230600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b1580156102cf57600080fd5b505afa1580156102e3573d6000803e3d6000fd5b505050506040513d60208110156102f957600080fd5b50519250610419915050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561037457600080fd5b505afa158015610388573d6000803e3d6000fd5b505050506040513d602081101561039e57600080fd5b505160008054919250906103b390839061065e565b905060006103eb7f00000000000000000000000000000000000000000000000000000000000000006103e584876106b8565b9061061c565b90506000610404600054836105d190919063ffffffff16565b90506104108482610711565b96505050505050505b90565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061044a61018f565b905060008111610498576040805162461bcd60e51b81526020600482015260146024820152734e6f20746f6b656e7320746f2072656c6561736560601b604482015290519081900360640190fd5b6000546104a5908261065e565b6000556104fc6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083610727565b6040805182815290517ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c5659181900360200190a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005481565b60006105666105b8565b905090565b600155565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006001546000146105cc57600154610566565b504290565b600061061383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061077e565b90505b92915050565b600061061383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610815565b600082820183811015610613576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826106c757506000610616565b828202828482816106d457fe5b04146106135760405162461bcd60e51b8152600401808060200182810382526021815260200180610ab66021913960400191505060405180910390fd5b60008183106107205781610613565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261077990849061087a565b505050565b6000818484111561080d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107d25781810151838201526020016107ba565b50505050905090810190601f1680156107ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836108645760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107d25781810151838201526020016107ba565b50600083858161087057fe5b0495945050505050565b60606108cf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661092b9092919063ffffffff16565b805190915015610779578080602001905160208110156108ee57600080fd5b50516107795760405162461bcd60e51b815260040180806020018281038252602a815260200180610ad7602a913960400191505060405180910390fd5b606061093a8484600085610942565b949350505050565b606061094d85610aaf565b61099e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106109dd5780518252601f1990920191602091820191016109be565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a3f576040519150601f19603f3d011682016040523d82523d6000602084013e610a44565b606091505b50915091508115610a5857915061093a9050565b805115610a685780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156107d25781810151838201526020016107ba565b3b15159056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220852e02606e74d747094138d7e10fc9f005278a953559d85ca961b67f95c9fa8f64736f6c634300060c0033";class Wf extends Ka{constructor(...e){e.length>1?super(...e):super($f,Xf,e[0])}getDeployTransaction(e,t,a,n,b,f){return super.getDeployTransaction(e,t,a,n,b,f||{})}deploy(e,t,a,n,b,f){return super.deploy(e,t,a,n,b,f||{})}connect(e){return super.connect(e)}static createInterface(){return new ba($f)}static connect(e,t){return new $a(e,$f,t)}}Wf.bytecode=Xf,Wf.abi=$f;const qf=[{inputs:[{internalType:"bytes32",name:"_torn",type:"bytes32"},{internalType:"bytes32",name:"_governance",type:"bytes32"},{internalType:"uint256",name:"_duration",type:"uint256"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Voucher.Recipient[]",name:"_airdrops",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"allowedTransferee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"domains",type:"bytes32[]"}],name:"bulkResolve",outputs:[{internalType:"address[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"expiresAt",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"fakeTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"redeem",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"rescueExpiredTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"addr",type:"bytes32"}],name:"resolve",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fakeTimestamp",type:"uint256"}],name:"setFakeTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Jf="0x60e06040523480156200001157600080fd5b5060405162001b7838038062001b78833981016040819052620000349162000476565b8383838360405180606001604052806026815260200162001b5260269139604051806040016040528060058152602001643b2a27a92760d91b8152508160039080519060200190620000889291906200038d565b5080516200009e9060049060208401906200038d565b50506005805460ff1916601217905550620000b984620001b7565b60601b6001600160601b031916608052620000d483620001b7565b60601b6001600160601b03191660c0526200010782620000f3620001bd565b620001d960201b6200089d1790919060201c565b60a05260005b8151811015620001a857620001598282815181106200012857fe5b6020026020010151600001518383815181106200014157fe5b6020026020010151602001516200021160201b60201c565b6001600660008484815181106200016c57fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020805460ff19169115159190911790556001016200010d565b5050505050505050506200061d565b60601c90565b6000620001d4620002f460201b620008c91760201c565b905090565b6000828201838110156200020a5760405162461bcd60e51b8152600401620002019062000548565b60405180910390fd5b9392505050565b6001600160a01b0382166200023a5760405162461bcd60e51b81526004016200020190620005b6565b62000248600083836200030f565b6200026481600254620001d960201b6200089d1790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620002979183906200089d620001d9821b17901c565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90620002e8908590620005ed565b60405180910390a35050565b60006007546000146200030a57600754620001d4565b504290565b620003278383836200038860201b620008e21760201c565b6001600160a01b03821615806200034557506001600160a01b038316155b806200036957506001600160a01b03831660009081526006602052604090205460ff165b620003885760405162461bcd60e51b815260040162000201906200057f565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620003d057805160ff191683800117855562000400565b8280016001018555821562000400579182015b8281111562000400578251825591602001919060010190620003e3565b506200040e92915062000412565b5090565b5b808211156200040e576000815560010162000413565b6000604082840312156200043b578081fd5b620004476040620005f6565b82519091506001600160a01b03811681146200046257600080fd5b808252506020820151602082015292915050565b600080600080608085870312156200048c578384fd5b8451935060208086015193506040808701519350606087015160018060401b0380821115620004b9578485fd5b818901915089601f830112620004cd578485fd5b815181811115620004dc578586fd5b620004eb8586830201620005f6565b8181528581019250838601858302850187018d101562000509578788fd5b8794505b828510156200053757620005228d8262000429565b8452600194909401939286019285016200050d565b50989b979a50959850505050505050565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f45524332303a207472616e73666572206973206e6f7420616c6c6f7765640000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b6040518181016001600160401b03811182821017156200061557600080fd5b604052919050565b60805160601c60a05160c05160601c6114e46200066e6000398061046952806106de5250806104c352806105f752806106945250806105d3528061066852806106ff52806107a352506114e46000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80638622a689116100b8578063adf898a41161007c578063adf898a414610269578063be040fb014610271578063c39ef8551461027b578063c565882714610283578063dd62ed3e14610296578063f9e54234146102a957610142565b80638622a6891461022b57806395d89b4114610233578063a457c2d71461023b578063a9059cbb1461024e578063adb618321461026157610142565b8063313ce5671161010a578063313ce567146101b557806339509351146101ca5780635aa6e675146101dd5780635c23bdf5146101f25780635d4545a01461020557806370a082311461021857610142565b806301ec0fab1461014757806306fdde0314610165578063095ea7b31461017a57806318160ddd1461019a57806323b872dd146101a2575b600080fd5b61014f6102c9565b60405161015c9190611376565b60405180910390f35b61016d6102cf565b60405161015c9190611087565b61018d610188366004610ed7565b610365565b60405161015c919061107c565b61014f610383565b61018d6101b0366004610e97565b610389565b6101bd610410565b60405161015c919061137f565b61018d6101d8366004610ed7565b610419565b6101e5610467565b60405161015c9190611002565b6101e5610200366004610fb6565b61048b565b61018d610213366004610e48565b610491565b61014f610226366004610e48565b6104a6565b61014f6104c1565b61016d6104e5565b61018d610249366004610ed7565b610546565b61018d61025c366004610ed7565b6105ae565b61014f6105c2565b6101e56105d1565b6102796105f5565b005b610279610692565b610279610291366004610fb6565b6107cc565b61014f6102a4366004610e63565b6107d1565b6102bc6102b7366004610f01565b6107fc565b60405161015c919061102f565b60075481565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561035b5780601f106103305761010080835404028352916020019161035b565b820191906000526020600020905b81548152906001019060200180831161033e57829003601f168201915b5050505050905090565b60006103796103726108e7565b84846108eb565b5060015b92915050565b60025490565b600061039684848461099f565b610406846103a26108e7565b61040185604051806060016040528060288152602001611462602891396001600160a01b038a166000908152600160205260408120906103e06108e7565b6001600160a01b031681526020810191909152604001600020549190610ab4565b6108eb565b5060019392505050565b60055460ff1690565b60006103796104266108e7565b8461040185600160006104376108e7565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061089d565b7f000000000000000000000000000000000000000000000000000000000000000081565b60601c90565b60066020526000908152604090205460ff1681565b6001600160a01b031660009081526020819052604090205490565b7f000000000000000000000000000000000000000000000000000000000000000081565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561035b5780601f106103305761010080835404028352916020019161035b565b60006103796105536108e7565b846104018560405180606001604052806025815260200161148a602591396001600061057d6108e7565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610ab4565b60006103796105bb6108e7565b848461099f565b60006105cc6108c9565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000061061e6105c2565b106106445760405162461bcd60e51b815260040161063b90611176565b60405180910390fd5b600061064f336104a6565b905061065b3382610ae0565b61068f6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383610bc2565b50565b7f00000000000000000000000000000000000000000000000000000000000000006106bb6105c2565b10156106d95760405162461bcd60e51b815260040161063b906111ad565b6107ca7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016107499190611002565b60206040518083038186803b15801561076157600080fd5b505afa158015610775573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107999190610fce565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190610bc2565b565b600755565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060815167ffffffffffffffff8111801561081657600080fd5b50604051908082528060200260200182016040528015610840578160200160208202803683370190505b50905060005b82518110156108975761086b83828151811061085e57fe5b602002602001015161048b565b82828151811061087757fe5b6001600160a01b0390921660209283029190910190910152600101610846565b50919050565b6000828201838110156108c25760405162461bcd60e51b815260040161063b9061113f565b9392505050565b60006007546000146108dd576007546105cc565b504290565b505050565b3390565b6001600160a01b0383166109115760405162461bcd60e51b815260040161063b906112b1565b6001600160a01b0382166109375760405162461bcd60e51b815260040161063b906110fd565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610992908590611376565b60405180910390a3505050565b6001600160a01b0383166109c55760405162461bcd60e51b815260040161063b9061126c565b6001600160a01b0382166109eb5760405162461bcd60e51b815260040161063b906110ba565b6109f6838383610c18565b610a338160405180606001604052806026815260200161143c602691396001600160a01b0386166000908152602081905260409020549190610ab4565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610a62908261089d565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610992908590611376565b60008184841115610ad85760405162461bcd60e51b815260040161063b9190611087565b505050900390565b6001600160a01b038216610b065760405162461bcd60e51b815260040161063b9061122b565b610b1282600083610c18565b610b4f8160405180606001604052806022815260200161141a602291396001600160a01b0385166000908152602081905260409020549190610ab4565b6001600160a01b038316600090815260208190526040902055600254610b759082610c7f565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610bb6908590611376565b60405180910390a35050565b6108e28363a9059cbb60e01b8484604051602401610be1929190611016565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610cc1565b610c238383836108e2565b6001600160a01b0382161580610c4057506001600160a01b038316155b80610c6357506001600160a01b03831660009081526006602052604090205460ff165b6108e25760405162461bcd60e51b815260040161063b906111f4565b60006108c283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ab4565b6060610d16826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d509092919063ffffffff16565b8051909150156108e25780806020019051810190610d349190610f96565b6108e25760405162461bcd60e51b815260040161063b9061132c565b6060610d5f8484600085610d67565b949350505050565b6060610d7285610e2b565b610d8e5760405162461bcd60e51b815260040161063b906112f5565b60006060866001600160a01b03168587604051610dab9190610fe6565b60006040518083038185875af1925050503d8060008114610de8576040519150601f19603f3d011682016040523d82523d6000602084013e610ded565b606091505b50915091508115610e01579150610d5f9050565b805115610e115780518082602001fd5b8360405162461bcd60e51b815260040161063b9190611087565b3b151590565b80356001600160a01b038116811461037d57600080fd5b600060208284031215610e59578081fd5b6108c28383610e31565b60008060408385031215610e75578081fd5b610e7f8484610e31565b9150610e8e8460208501610e31565b90509250929050565b600080600060608486031215610eab578081fd5b8335610eb681611404565b92506020840135610ec681611404565b929592945050506040919091013590565b60008060408385031215610ee9578182fd5b610ef38484610e31565b946020939093013593505050565b60006020808385031215610f13578182fd5b823567ffffffffffffffff811115610f29578283fd5b8301601f81018513610f39578283fd5b8035610f4c610f47826113b4565b61138d565b8181528381019083850185840285018601891015610f68578687fd5b8694505b83851015610f8a578035835260019490940193918501918501610f6c565b50979650505050505050565b600060208284031215610fa7578081fd5b815180151581146108c2578182fd5b600060208284031215610fc7578081fd5b5035919050565b600060208284031215610fdf578081fd5b5051919050565b60008251610ff88184602087016113d4565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156110705783516001600160a01b03168352928401929184019160010161104b565b50909695505050505050565b901515815260200190565b60006020825282518060208401526110a68160408501602087016113d4565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601f908201527f41697264726f702072656465656d20706572696f642068617320656e64656400604082015260600190565b60208082526027908201527f41697264726f702072656465656d20706572696f6420686173206e6f7420656e604082015266191959081e595d60ca1b606082015260800190565b6020808252601e908201527f45524332303a207472616e73666572206973206e6f7420616c6c6f7765640000604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b90815260200190565b60ff91909116815260200190565b60405181810167ffffffffffffffff811182821017156113ac57600080fd5b604052919050565b600067ffffffffffffffff8211156113ca578081fd5b5060209081020190565b60005b838110156113ef5781810151838201526020016113d7565b838111156113fe576000848401525b50505050565b6001600160a01b038116811461068f57600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220794126baf4ea3c44b9afb84b4d8a20535aca899e75471e5d9bb4c8e671aabde664736f6c634300060c0033546f726e61646f4361736820766f756368657220666f72206561726c792061646f7074657273";class Kf extends Ka{constructor(...e){e.length>1?super(...e):super(qf,Jf,e[0])}getDeployTransaction(e,t,a,n,b){return super.getDeployTransaction(e,t,a,n,b||{})}deploy(e,t,a,n,b){return super.deploy(e,t,a,n,b||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(qf)}static connect(e,t){return new $a(e,qf,t)}}Kf.bytecode=Jf,Kf.abi=qf;var Yf=Object.freeze({__proto__:null,AirdropMock__factory:Sf,ENSMock__factory:Lf,TORNMock__factory:Bf,Timestamp__factory:zf,VestingMock__factory:Wf,VoucherMock__factory:Kf});const Zf=[{inputs:[{internalType:"bytes32",name:"tokenAddress",type:"bytes32"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Airdrop.Recipient[]",name:"targets",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"bytes32[]",name:"domains",type:"bytes32[]"}],name:"bulkResolve",outputs:[{internalType:"address[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolve",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Qf="0x60806040523480156200001157600080fd5b506040516200054038038062000540833981016040819052620000349162000396565b60006200004183620001c2565b90506000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040162000073919062000467565b60206040518083038186803b1580156200008c57600080fd5b505afa158015620000a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000c791906200044e565b11620000f05760405162461bcd60e51b8152600401620000e7906200049d565b60405180910390fd5b60005b8251811015620001bd57816001600160a01b031663a9059cbb8483815181106200011957fe5b6020026020010151600001518584815181106200013257fe5b6020026020010151602001516040518363ffffffff1660e01b81526004016200015d9291906200047b565b602060405180830381600087803b1580156200017857600080fd5b505af11580156200018d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001b3919062000374565b50600101620000f3565b506000ff5b600080620001cf62000310565b600114620001f257738595bfb0d940dfedc98943fa8a907091203f25ee62000203565b6e0c2e074ec69a0dfb2997ba6c7d2e1e5b604051630178b8bf60e01b81529091506001600160a01b03821690630178b8bf906200023490869060040162000494565b60206040518083038186803b1580156200024d57600080fd5b505afa15801562000262573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000288919062000355565b6001600160a01b0316633b3b57de846040518263ffffffff1660e01b8152600401620002b5919062000494565b60206040518083038186803b158015620002ce57600080fd5b505afa158015620002e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000309919062000355565b9392505050565b4690565b60006040828403121562000326578081fd5b620003326040620004df565b90508151620003418162000526565b808252506020820151602082015292915050565b60006020828403121562000367578081fd5b8151620003098162000526565b60006020828403121562000386578081fd5b8151801515811462000309578182fd5b6000806040808486031215620003aa578182fd5b8351602080860151919450906001600160401b03811115620003ca578384fd5b8501601f81018713620003db578384fd5b8051620003f2620003ec8262000506565b620004df565b81815283810190838501868402850186018b10156200040f578788fd5b8794505b838510156200043d57620004288b8262000314565b83526001949094019391850191860162000413565b508096505050505050509250929050565b60006020828403121562000460578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b90815260200190565b60208082526022908201527f42616c616e636520697320302c2061697264726f7020616c726561647920646f6040820152616e6560f01b606082015260800190565b6040518181016001600160401b0381118282101715620004fe57600080fd5b604052919050565b60006001600160401b038211156200051c578081fd5b5060209081020190565b6001600160a01b03811681146200053c57600080fd5b5056fe";class ed extends Ka{constructor(...e){e.length>1?super(...e):super(Zf,Qf,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Zf)}static connect(e,t){return new $a(e,Zf,t)}}ed.bytecode=Qf,ed.abi=Zf;const td=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"chainID",outputs:[{internalType:"uint256",name:"_chainID",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class ad{static createInterface(){return new ba(td)}static connect(e,t){return new $a(e,td,t)}}ad.abi=td;const nd=[{inputs:[{internalType:"address",name:"_governance",type:"address"},{internalType:"uint256",name:"_pausePeriod",type:"uint256"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct TORN.Recipient[]",name:"_vestings",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"}],name:"Allowed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"}],name:"Disallowed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[{internalType:"address[]",name:"target",type:"address[]"}],name:"addToAllowedList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"allowedTransferee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"canUnpauseAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"chainID",outputs:[{internalType:"uint256",name:"_chainID",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"decision",type:"bool"}],name:"changeTransferability",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"target",type:"address[]"}],name:"removeFromAllowedList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address payable",name:"_to",type:"address"},{internalType:"uint256",name:"_balance",type:"uint256"}],name:"rescueTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],bd="0x60c06040523480156200001157600080fd5b506040516200288338038062002883833981016040819052620000349162000699565b604080518082018252600b81526a0a8dee4dcc2c8de86c2e6d60ab1b6020808301918252835180850190945260048452632a27a92760e11b9084015281519192916200008391600391620005a7565b50805162000099906004906020840190620005a7565b50506005805460ff1916601217905550620000b3620001f0565b506008805460ff199081169091556001600160601b0319606085901b1660a0526001600160a01b0384166000908152600960205260408120805490921660011790915583905b8251811015620001765760008382815181106200011257fe5b60200260200101516000015190506200014a818584815181106200013257fe5b602002602001015160200151620002ac60201b60201c565b6001600160a01b03166000908152600960205260409020805460ff1916600190811790915501620000f9565b506200019a83620001866200038f565b6200039360201b62000cbd1790919060201c565b608052620001a7620003c4565b620001b16200043b565b6a084595161401484a00000014620001e65760405162461bcd60e51b8152600401620001dd906200086b565b60405180910390fd5b5050505062000909565b600080620001fd62000441565b905060007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6200022c62000445565b805160209182012060408051808201825260018152603160f81b90840152516200027e93927fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc691879130910162000781565b60408051601f1981840301815291815281516020928301206000948552600790925290922082905550905090565b6001600160a01b038216620002d55760405162461bcd60e51b8152600401620001dd90620008a2565b620002e360008383620004df565b620002ff816002546200039360201b62000cbd1790919060201c565b6002556001600160a01b038216600090815260208181526040909120546200033291839062000cbd62000393821b17901c565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9062000383908590620008d9565b60405180910390a35050565b4290565b600082820183811015620003bb5760405162461bcd60e51b8152600401620001dd90620007ad565b90505b92915050565b60085460ff1615620003ea5760405162461bcd60e51b8152600401620001dd9062000841565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620004226200059a565b6040516200043191906200076d565b60405180910390a1565b60025490565b4690565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015620004d55780601f10620004a957610100808354040283529160200191620004d5565b820191906000526020600020905b815481529060010190602001808311620004b757829003601f168201915b5050505050905090565b620004f78383836200059560201b620006aa1760201c565b620005016200059e565b15806200052657506001600160a01b03831660009081526009602052604090205460ff165b806200054a57506001600160a01b03821660009081526009602052604090205460ff165b620005695760405162461bcd60e51b8152600401620001dd906200081b565b6001600160a01b038216301415620005955760405162461bcd60e51b8152600401620001dd90620007e4565b505050565b3390565b60085460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620005ea57805160ff19168380011785556200061a565b828001600101855582156200061a579182015b828111156200061a578251825591602001919060010190620005fd565b50620006289291506200062c565b5090565b5b808211156200062857600081556001016200062d565b80516001600160a01b0381168114620003be57600080fd5b6000604082840312156200066d578081fd5b620006796040620008e2565b905062000687838362000643565b81526020820151602082015292915050565b600080600060608486031215620006ae578283fd5b620006ba858562000643565b9250602080850151925060408086015160018060401b0380821115620006de578485fd5b818801915088601f830112620006f2578485fd5b81518181111562000701578586fd5b620007108586830201620008e2565b8181528581019250838601858302850187018c10156200072e578788fd5b8794505b828510156200075c57620007478c826200065b565b84526001949094019392860192850162000732565b508096505050505050509250925092565b6001600160a01b0391909116815260200190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526017908201527f544f524e3a20696e76616c696420726563697069656e74000000000000000000604082015260600190565b6020808252600c908201526b1513d4938e881c185d5cd95960a21b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601c908201527f544f524e3a20696e636f727265637420646973747269627574696f6e00000000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b6040518181016001600160401b03811182821017156200090157600080fd5b604052919050565b60805160a05160601c611f3a62000949600039806104d752806105ff52806106cc528061078552806109715250806107245280610c705250611f3a6000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806379cc6790116100de578063a9059cbb11610097578063cea9d26f11610071578063cea9d26f146102fb578063d505accf1461030e578063dc0f0d1214610321578063dd62ed3e1461032957610173565b8063a9059cbb146102d8578063adb61832146102eb578063adc879e9146102f357610173565b806379cc6790146102715780637ecebe001461028457806381893c7c14610297578063885ad0cf146102aa57806395d89b41146102bd578063a457c2d7146102c557610173565b80633c8d76d1116101305780633c8d76d11461020657806342966c681461021b5780635aa6e6751461022e5780635c975abb146102435780635d4545a01461024b57806370a082311461025e57610173565b806306fdde0314610178578063095ea7b31461019657806318160ddd146101b657806323b872dd146101cb578063313ce567146101de57806339509351146101f3575b600080fd5b61018061033c565b60405161018d9190611875565b60405180910390f35b6101a96101a436600461163a565b6103d3565b60405161018d91906117ec565b6101be6103f1565b60405161018d9190611d9a565b6101a96101d9366004611585565b6103f7565b6101e661047e565b60405161018d9190611da3565b6101a961020136600461163a565b610487565b610219610214366004611665565b6104d5565b005b61021961022936600461174e565b6105e9565b6102366105fd565b60405161018d91906117bf565b6101a9610621565b6101a9610259366004611531565b61062a565b6101be61026c366004611531565b61063f565b61021961027f36600461163a565b61065a565b6101be610292366004611531565b6106af565b6102196102a5366004611702565b6106ca565b6102196102b8366004611665565b610783565b61018061088a565b6101a96102d336600461163a565b6108eb565b6101a96102e636600461163a565b610953565b6101be610967565b6101be61096b565b61021961030936600461173a565b61096f565b61021961031c3660046115c5565b610b2d565b6101be610c6e565b6101be61033736600461154d565b610c92565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c85780601f1061039d576101008083540402835291602001916103c8565b820191906000526020600020905b8154815290600101906020018083116103ab57829003601f168201915b505050505090505b90565b60006103e76103e0610ce9565b8484610ced565b5060015b92915050565b60025490565b6000610404848484610da1565b61047484610410610ce9565b61046f85604051806060016040528060288152602001611e94602891396001600160a01b038a1660009081526001602052604081209061044e610ce9565b6001600160a01b031681526020810191909152604001600020549190610eb6565b610ced565b5060019392505050565b60055460ff1690565b60006103e7610494610ce9565b8461046f85600160006104a5610ce9565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610cbd565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610507610ce9565b6001600160a01b0316146105365760405162461bcd60e51b815260040161052d90611d16565b60405180910390fd5b60005b81518110156105e55760006009600084848151811061055457fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f9ef90a89b00db1a1891a357dc96b2a273add9d883e378c350d22bad87a9d7d308282815181106105c057fe5b60200260200101516040516105d591906117bf565b60405180910390a1600101610539565b5050565b6105fa6105f4610ce9565b82610ee2565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60085460ff1690565b60096020526000908152604090205460ff1681565b6001600160a01b031660009081526020819052604090205490565b600061068c82604051806060016040528060248152602001611ebc6024913961068586610337610ce9565b9190610eb6565b90506106a08361069a610ce9565b83610ced565b6106aa8383610ee2565b505050565b6001600160a01b031660009081526006602052604090205490565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106fc610ce9565b6001600160a01b0316146107225760405162461bcd60e51b815260040161052d90611d16565b7f000000000000000000000000000000000000000000000000000000000000000061074b610967565b116107685760405162461bcd60e51b815260040161052d90611b0b565b801561077b57610776610fc4565b6105fa565b6105fa611030565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107b5610ce9565b6001600160a01b0316146107db5760405162461bcd60e51b815260040161052d90611d16565b60005b81518110156105e5576001600960008484815181106107f957fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f77a7dbc6ad97703ad411a8d5edfcd1df382fb34b076a90898b11884f7ebdcc0582828151811061086557fe5b602002602001015160405161087a91906117bf565b60405180910390a16001016107de565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c85780601f1061039d576101008083540402835291602001916103c8565b60006103e76108f8610ce9565b8461046f85604051806060016040528060258152602001611ee06025913960016000610922610ce9565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610eb6565b60006103e7610960610ce9565b8484610da1565b4290565b4690565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166109a1610ce9565b6001600160a01b0316146109c75760405162461bcd60e51b815260040161052d90611d16565b6001600160a01b0382166109ed5760405162461bcd60e51b815260040161052d90611c8a565b6001600160a01b038316610a56574760008215610a1357610a0e8284611089565b610a15565b815b6040519091506001600160a01b0385169082156108fc029083906000818181858888f19350505050158015610a4e573d6000803e3d6000fd5b5050506106aa565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190610a859030906004016117bf565b60206040518083038186803b158015610a9d57600080fd5b505afa158015610ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad59190611766565b905060008215610aee57610ae98284611089565b610af0565b815b905060008111610b125760405162461bcd60e51b815260040161052d90611d63565b610b266001600160a01b038616858361109f565b5050505050565b83610b36610967565b1115610b545760405162461bcd60e51b815260040161052d90611a00565b6001600160a01b0387166000908152600660209081526040808320549051610ba7927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928c928c928c92918c91016117f7565b6040516020818303038152906040528051906020012090506000611901610bcc6110f5565b83604051602001610bdf9392919061179a565b6040516020818303038152906040528051906020012090506000610c0582878787611134565b9050896001600160a01b0316816001600160a01b031614610c385760405162461bcd60e51b815260040161052d90611b52565b6001600160a01b038a16600090815260066020526040902080546001019055610c628a8a8a610ced565b50505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600082820183811015610ce25760405162461bcd60e51b815260040161052d90611992565b9392505050565b3390565b6001600160a01b038316610d135760405162461bcd60e51b815260040161052d90611c0f565b6001600160a01b038216610d395760405162461bcd60e51b815260040161052d90611950565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610d94908590611d9a565b60405180910390a3505050565b6001600160a01b038316610dc75760405162461bcd60e51b815260040161052d90611bca565b6001600160a01b038216610ded5760405162461bcd60e51b815260040161052d906118df565b610df883838361122c565b610e3581604051806060016040528060268152602001611e6e602691396001600160a01b0386166000908152602081905260409020549190610eb6565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610e649082610cbd565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610d94908590611d9a565b60008184841115610eda5760405162461bcd60e51b815260040161052d9190611875565b505050900390565b6001600160a01b038216610f085760405162461bcd60e51b815260040161052d90611b89565b610f148260008361122c565b610f5181604051806060016040528060228152602001611e4c602291396001600160a01b0385166000908152602081905260409020549190610eb6565b6001600160a01b038316600090815260208190526040902055600254610f7790826112cb565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610fb8908590611d9a565b60405180910390a35050565b60085460ff16610fe65760405162461bcd60e51b815260040161052d90611922565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611019610ce9565b60405161102691906117bf565b60405180910390a1565b60085460ff16156110535760405162461bcd60e51b815260040161052d90611a9f565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611019610ce9565b60008183106110985781610ce2565b5090919050565b6106aa8363a9059cbb60e01b84846040516024016110be9291906117d3565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261130d565b6000806007600061110461096b565b8152602081019190915260400160002054905080156111245790506103d0565b61112c61139c565b9150506103d0565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156111765760405162461bcd60e51b815260040161052d90611a5d565b8360ff16601b148061118b57508360ff16601c145b6111a75760405162461bcd60e51b815260040161052d90611ac9565b6000600186868686604051600081526020016040526040516111cc9493929190611857565b6020604051602081039080840390855afa1580156111ee573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166112215760405162461bcd60e51b815260040161052d906118a8565b90505b949350505050565b6112378383836106aa565b61123f610621565b158061126357506001600160a01b03831660009081526009602052604090205460ff165b8061128657506001600160a01b03821660009081526009602052604090205460ff165b6112a25760405162461bcd60e51b815260040161052d90611a37565b6001600160a01b0382163014156106aa5760405162461bcd60e51b815260040161052d906119c9565b6000610ce283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610eb6565b6060611362826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114529092919063ffffffff16565b8051909150156106aa5780806020019051810190611380919061171e565b6106aa5760405162461bcd60e51b815260040161052d90611ccc565b6000806113a761096b565b905060007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6113d461033c565b805160209182012060408051808201825260018152603160f81b908401525161142493927fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc691879130910161182b565b60408051601f1981840301815291815281516020928301206000948552600790925290922082905550905090565b60606112248484600085606061146785611520565b6114835760405162461bcd60e51b815260040161052d90611c53565b60006060866001600160a01b031685876040516114a0919061177e565b60006040518083038185875af1925050503d80600081146114dd576040519150601f19603f3d011682016040523d82523d6000602084013e6114e2565b606091505b509150915081156114f65791506112249050565b8051156115065780518082602001fd5b8360405162461bcd60e51b815260040161052d9190611875565b3b151590565b80356103eb81611e28565b600060208284031215611542578081fd5b8135610ce281611e28565b6000806040838503121561155f578081fd5b823561156a81611e28565b9150602083013561157a81611e28565b809150509250929050565b600080600060608486031215611599578081fd5b83356115a481611e28565b925060208401356115b481611e28565b929592945050506040919091013590565b600080600080600080600060e0888a0312156115df578283fd5b87356115ea81611e28565b965060208801356115fa81611e28565b95506040880135945060608801359350608088013560ff8116811461161d578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561164c578182fd5b823561165781611e28565b946020939093013593505050565b60006020808385031215611677578182fd5b823567ffffffffffffffff81111561168d578283fd5b8301601f8101851361169d578283fd5b80356116b06116ab82611dd8565b611db1565b81815283810190838501858402850186018910156116cc578687fd5b8694505b838510156116f6576116e28982611526565b8352600194909401939185019185016116d0565b50979650505050505050565b600060208284031215611713578081fd5b8135610ce281611e3d565b60006020828403121561172f578081fd5b8151610ce281611e3d565b600080600060608486031215611599578283fd5b60006020828403121561175f578081fd5b5035919050565b600060208284031215611777578081fd5b5051919050565b60008251611790818460208701611df8565b9190910192915050565b60f09390931b6001600160f01b03191683526002830191909152602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082528251806020840152611894816040850160208701611df8565b601f01601f19169190910160400192915050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526017908201527f544f524e3a20696e76616c696420726563697069656e74000000000000000000604082015260600190565b6020808252601d908201527f45524332305065726d69743a206578706972656420646561646c696e65000000604082015260600190565b6020808252600c908201526b1513d4938e881c185d5cd95960a21b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b60208082526027908201527f544f524e3a2063616e6e6f74206368616e6765207472616e736665726162696c6040820152661a5d1e481e595d60ca1b606082015260800190565b6020808252601e908201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526022908201527f544f524e3a2063616e206e6f742073656e6420746f207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252602d908201527f544f524e3a206f6e6c7920676f7665726e616e63652063616e20706572666f7260408201526c36903a3434b99030b1ba34b7b760991b606082015260800190565b6020808252601e908201527f544f524e3a20747279696e6720746f2073656e6420302062616c616e63650000604082015260600190565b90815260200190565b60ff91909116815260200190565b60405181810167ffffffffffffffff81118282101715611dd057600080fd5b604052919050565b600067ffffffffffffffff821115611dee578081fd5b5060209081020190565b60005b83811015611e13578181015183820152602001611dfb565b83811115611e22576000848401525b50505050565b6001600160a01b03811681146105fa57600080fd5b80151581146105fa57600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fd515804eca384cb14c99861e60dc5364ae65ba9ddfdfe00d195788ee631d01064736f6c634300060c0033";class fd extends Ka{constructor(...e){e.length>1?super(...e):super(nd,bd,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(nd)}static connect(e,t){return new $a(e,nd,t)}}fd.bytecode=bd,fd.abi=nd;const dd=[{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_beneficiary",type:"address"},{internalType:"uint256",name:"_startTimestamp",type:"uint256"},{internalType:"uint256",name:"_cliffInMonths",type:"uint256"},{internalType:"uint256",name:"_durationInMonths",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Released",type:"event"},{inputs:[],name:"SECONDS_PER_MONTH",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"beneficiary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"cliffInMonths",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"durationInMonths",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"release",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"released",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"startTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"vestedAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],id="0x61012060405234801561001157600080fd5b50604051610c8c380380610c8c833981810160405260a081101561003457600080fd5b508051602082015160408301516060840151608090940151929391929091906001600160a01b0384166100ae576040805162461bcd60e51b815260206004820152601b60248201527f42656e65666963696172792063616e6e6f7420626520656d7074790000000000604482015290519081900360640190fd5b80821115610103576040805162461bcd60e51b815260206004820152601e60248201527f436c6966662069732067726561746572207468616e206475726174696f6e0000604482015290519081900360640190fd5b6001600160601b0319606086811b821660a05285901b1660805261010081905260c08290528215610134578261013c565b61013c61014a565b60e0525061014e9350505050565b4290565b60805160601c60a05160601c60c05160e05161010051610acc6101c060003980610203528061037b52806103dd525080610152528061018e52806105215250806101d052806104f352508061024852806102c85280610474528061054552508061012c52806104965250610acc6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063928d89ae11610066578063928d89ae146100fb5780639613252114610103578063adb618321461010b578063e6fd48bc14610113578063fc0c546a1461011b5761009e565b806310786deb146100a357806338af3eed146100bd57806344b1231f146100e157806367097a4b146100e957806386d1a69f146100f1575b600080fd5b6100ab610123565b60408051918252519081900360200190f35b6100c561012a565b604080516001600160a01b039092168252519081900360200190f35b6100ab61014e565b6100ab6103db565b6100f96103ff565b005b6100ab6104f1565b6100ab610515565b6100ab61051b565b6100ab61051f565b6100c5610543565b62278d0081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000061017961051b565b1015610187575060006103d8565b60006101bb7f00000000000000000000000000000000000000000000000000000000000000006101b561051b565b90610567565b905060006101cc8262278d006105b2565b90507f0000000000000000000000000000000000000000000000000000000000000000811015610201576000925050506103d8565b7f000000000000000000000000000000000000000000000000000000000000000081106102c457604080516370a0823160e01b815230600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b15801561028e57600080fd5b505afa1580156102a2573d6000803e3d6000fd5b505050506040513d60208110156102b857600080fd5b505192506103d8915050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561033357600080fd5b505afa158015610347573d6000803e3d6000fd5b505050506040513d602081101561035d57600080fd5b505160008054919250906103729083906105f4565b905060006103aa7f00000000000000000000000000000000000000000000000000000000000000006103a4848761064e565b906105b2565b905060006103c36000548361056790919063ffffffff16565b90506103cf84826106a7565b96505050505050505b90565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061040961014e565b905060008111610457576040805162461bcd60e51b81526020600482015260146024820152734e6f20746f6b656e7320746f2072656c6561736560601b604482015290519081900360640190fd5b60005461046490826105f4565b6000556104bb6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836106bd565b6040805182815290517ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c5659181900360200190a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005481565b4290565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006105a983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610714565b90505b92915050565b60006105a983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506107ab565b6000828201838110156105a9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008261065d575060006105ac565b8282028284828161066a57fe5b04146105a95760405162461bcd60e51b8152600401808060200182810382526021815260200180610a4c6021913960400191505060405180910390fd5b60008183106106b657816105a9565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261070f908490610810565b505050565b600081848411156107a35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610768578181015183820152602001610750565b50505050905090810190601f1680156107955780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836107fa5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610768578181015183820152602001610750565b50600083858161080657fe5b0495945050505050565b6060610865826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108c19092919063ffffffff16565b80519091501561070f5780806020019051602081101561088457600080fd5b505161070f5760405162461bcd60e51b815260040180806020018281038252602a815260200180610a6d602a913960400191505060405180910390fd5b60606108d084846000856108d8565b949350505050565b60606108e385610a45565b610934576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106109735780518252601f199092019160209182019101610954565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146109d5576040519150601f19603f3d011682016040523d82523d6000602084013e6109da565b606091505b509150915081156109ee5791506108d09050565b8051156109fe5780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610768578181015183820152602001610750565b3b15159056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212203b3e8370e345374172efb9e3693b20807c318ecfcc569df94f28df8a94f2727a64736f6c634300060c0033";class sd extends Ka{constructor(...e){e.length>1?super(...e):super(dd,id,e[0])}getDeployTransaction(e,t,a,n,b,f){return super.getDeployTransaction(e,t,a,n,b,f||{})}deploy(e,t,a,n,b,f){return super.deploy(e,t,a,n,b,f||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(dd)}static connect(e,t){return new $a(e,dd,t)}}sd.bytecode=id,sd.abi=dd;const cd=[{inputs:[{internalType:"bytes32",name:"_torn",type:"bytes32"},{internalType:"bytes32",name:"_governance",type:"bytes32"},{internalType:"uint256",name:"_duration",type:"uint256"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Voucher.Recipient[]",name:"_airdrops",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"allowedTransferee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"domains",type:"bytes32[]"}],name:"bulkResolve",outputs:[{internalType:"address[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"expiresAt",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"redeem",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"rescueExpiredTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolve",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],rd="0x60e06040523480156200001157600080fd5b5060405162001d8d38038062001d8d833981016040819052620000349162000593565b60405180606001604052806026815260200162001d6760269139604051806040016040528060058152602001643b2a27a92760d91b81525081600390805190602001906200008492919062000497565b5080516200009a90600490602084019062000497565b50506005805460ff1916601217905550620000b584620001af565b60601b6001600160601b031916608052620000d083620001af565b60601b6001600160601b03191660c0526200010382620000ef620002fd565b6200030160201b6200098d1790919060201c565b60a05260005b8151811015620001a457620001558282815181106200012457fe5b6020026020010151600001518383815181106200013d57fe5b6020026020010151602001516200033260201b60201c565b6001600660008484815181106200016857fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020805460ff191691151591909117905560010162000109565b505050505062000753565b600080620001bc62000415565b600114620001df57738595bfb0d940dfedc98943fa8a907091203f25ee620001f0565b6e0c2e074ec69a0dfb2997ba6c7d2e1e5b604051630178b8bf60e01b81529091506001600160a01b03821690630178b8bf906200022190869060040162000665565b60206040518083038186803b1580156200023a57600080fd5b505afa1580156200024f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000275919062000574565b6001600160a01b0316633b3b57de846040518263ffffffff1660e01b8152600401620002a2919062000665565b60206040518083038186803b158015620002bb57600080fd5b505afa158015620002d0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002f6919062000574565b9392505050565b4290565b600082820183811015620002f65760405162461bcd60e51b815260040162000329906200066e565b60405180910390fd5b6001600160a01b0382166200035b5760405162461bcd60e51b81526004016200032990620006dc565b620003696000838362000419565b62000385816002546200030160201b6200098d1790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620003b89183906200098d62000301821b17901c565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906200040990859062000665565b60405180910390a35050565b4690565b620004318383836200049260201b620009b21760201c565b6001600160a01b03821615806200044f57506001600160a01b038316155b806200047357506001600160a01b03831660009081526006602052604090205460ff165b620004925760405162461bcd60e51b81526004016200032990620006a5565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004da57805160ff19168380011785556200050a565b828001600101855582156200050a579182015b828111156200050a578251825591602001919060010190620004ed565b50620005189291506200051c565b5090565b5b808211156200051857600081556001016200051d565b60006040828403121562000545578081fd5b62000551604062000713565b9050815162000560816200073a565b808252506020820151602082015292915050565b60006020828403121562000586578081fd5b8151620002f6816200073a565b60008060008060808587031215620005a9578283fd5b8451935060208086015193506040808701519350606087015160018060401b0380821115620005d6578485fd5b818901915089601f830112620005ea578485fd5b815181811115620005f9578586fd5b62000608858683020162000713565b8181528581019250838601858302850187018d101562000626578788fd5b8794505b8285101562000654576200063f8d8262000533565b8452600194909401939286019285016200062a565b50989b979a50959850505050505050565b90815260200190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f45524332303a207472616e73666572206973206e6f7420616c6c6f7765640000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b6040518181016001600160401b03811182821017156200073257600080fd5b604052919050565b6001600160a01b03811681146200075057600080fd5b50565b60805160601c60a05160c05160601c6115c3620007a46000398061043152806107d35250806105c352806106ec52806107895250806106c8528061075d52806107f4528061089852506115c36000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80638622a689116100ad578063adf898a411610071578063adf898a41461024b578063be040fb014610253578063c39ef8551461025d578063dd62ed3e14610265578063f9e54234146102785761012c565b80638622a6891461020d57806395d89b4114610215578063a457c2d71461021d578063a9059cbb14610230578063adb61832146102435761012c565b806339509351116100f457806339509351146101ac5780635aa6e675146101bf5780635c23bdf5146101d45780635d4545a0146101e757806370a08231146101fa5761012c565b806306fdde0314610131578063095ea7b31461014f57806318160ddd1461016f57806323b872dd14610184578063313ce56714610197575b600080fd5b610139610298565b604051610146919061116f565b60405180910390f35b61016261015d366004610fb5565b61032e565b604051610146919061115b565b61017761034b565b6040516101469190611166565b610162610192366004610f75565b610351565b61019f6103d8565b604051610146919061145e565b6101626101ba366004610fb5565b6103e1565b6101c761042f565b60405161014691906110e1565b6101c76101e2366004611095565b610453565b6101626101f5366004610f05565b610591565b610177610208366004610f05565b6105a6565b6101776105c1565b6101396105e5565b61016261022b366004610fb5565b610646565b61016261023e366004610fb5565b6106ae565b6101776106c2565b6101c76106c6565b61025b6106ea565b005b61025b610787565b610177610273366004610f3d565b6108c1565b61028b610286366004610fe0565b6108ec565b604051610146919061110e565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103245780601f106102f957610100808354040283529160200191610324565b820191906000526020600020905b81548152906001019060200180831161030757829003601f168201915b5050505050905090565b600061034261033b6109b7565b84846109bb565b50600192915050565b60025490565b600061035e848484610a6f565b6103ce8461036a6109b7565b6103c985604051806060016040528060288152602001611541602891396001600160a01b038a166000908152600160205260408120906103a86109b7565b6001600160a01b031681526020810191909152604001600020549190610b84565b6109bb565b5060019392505050565b60055460ff1690565b60006103426103ee6109b7565b846103c985600160006103ff6109b7565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061098d565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008061045e610bb0565b60011461047f57738595bfb0d940dfedc98943fa8a907091203f25ee610490565b6e0c2e074ec69a0dfb2997ba6c7d2e1e5b604051630178b8bf60e01b81529091506001600160a01b03821690630178b8bf906104bf908690600401611166565b60206040518083038186803b1580156104d757600080fd5b505afa1580156104eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050f9190610f21565b6001600160a01b0316633b3b57de846040518263ffffffff1660e01b815260040161053a9190611166565b60206040518083038186803b15801561055257600080fd5b505afa158015610566573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058a9190610f21565b9392505050565b60066020526000908152604090205460ff1681565b6001600160a01b031660009081526020819052604090205490565b7f000000000000000000000000000000000000000000000000000000000000000081565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103245780601f106102f957610100808354040283529160200191610324565b60006103426106536109b7565b846103c985604051806060016040528060258152602001611569602591396001600061067d6109b7565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610b84565b60006103426106bb6109b7565b8484610a6f565b4290565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006107136106c2565b106107395760405162461bcd60e51b81526004016107309061125e565b60405180910390fd5b6000610744336105a6565b90506107503382610bb4565b6107846001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383610c96565b50565b7f00000000000000000000000000000000000000000000000000000000000000006107b06106c2565b10156107ce5760405162461bcd60e51b815260040161073090611295565b6108bf7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161083e91906110e1565b60206040518083038186803b15801561085657600080fd5b505afa15801561086a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088e91906110ad565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190610c96565b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060815167ffffffffffffffff8111801561090657600080fd5b50604051908082528060200260200182016040528015610930578160200160208202803683370190505b50905060005b82518110156109875761095b83828151811061094e57fe5b6020026020010151610453565b82828151811061096757fe5b6001600160a01b0390921660209283029190910190910152600101610936565b50919050565b60008282018381101561058a5760405162461bcd60e51b815260040161073090611227565b505050565b3390565b6001600160a01b0383166109e15760405162461bcd60e51b815260040161073090611399565b6001600160a01b038216610a075760405162461bcd60e51b8152600401610730906111e5565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610a62908590611166565b60405180910390a3505050565b6001600160a01b038316610a955760405162461bcd60e51b815260040161073090611354565b6001600160a01b038216610abb5760405162461bcd60e51b8152600401610730906111a2565b610ac6838383610cec565b610b038160405180606001604052806026815260200161151b602691396001600160a01b0386166000908152602081905260409020549190610b84565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610b32908261098d565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610a62908590611166565b60008184841115610ba85760405162461bcd60e51b8152600401610730919061116f565b505050900390565b4690565b6001600160a01b038216610bda5760405162461bcd60e51b815260040161073090611313565b610be682600083610cec565b610c23816040518060600160405280602281526020016114f9602291396001600160a01b0385166000908152602081905260409020549190610b84565b6001600160a01b038316600090815260208190526040902055600254610c499082610d53565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610c8a908590611166565b60405180910390a35050565b6109b28363a9059cbb60e01b8484604051602401610cb59291906110f5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610d95565b610cf78383836109b2565b6001600160a01b0382161580610d1457506001600160a01b038316155b80610d3757506001600160a01b03831660009081526006602052604090205460ff165b6109b25760405162461bcd60e51b8152600401610730906112dc565b600061058a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610b84565b6060610dea826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610e249092919063ffffffff16565b8051909150156109b25780806020019051810190610e089190611075565b6109b25760405162461bcd60e51b815260040161073090611414565b6060610e338484600085610e3b565b949350505050565b6060610e4685610eff565b610e625760405162461bcd60e51b8152600401610730906113dd565b60006060866001600160a01b03168587604051610e7f91906110c5565b60006040518083038185875af1925050503d8060008114610ebc576040519150601f19603f3d011682016040523d82523d6000602084013e610ec1565b606091505b50915091508115610ed5579150610e339050565b805115610ee55780518082602001fd5b8360405162461bcd60e51b8152600401610730919061116f565b3b151590565b600060208284031215610f16578081fd5b813561058a816114e3565b600060208284031215610f32578081fd5b815161058a816114e3565b60008060408385031215610f4f578081fd5b8235610f5a816114e3565b91506020830135610f6a816114e3565b809150509250929050565b600080600060608486031215610f89578081fd5b8335610f94816114e3565b92506020840135610fa4816114e3565b929592945050506040919091013590565b60008060408385031215610fc7578182fd5b8235610fd2816114e3565b946020939093013593505050565b60006020808385031215610ff2578182fd5b823567ffffffffffffffff811115611008578283fd5b8301601f81018513611018578283fd5b803561102b61102682611493565b61146c565b8181528381019083850185840285018601891015611047578687fd5b8694505b8385101561106957803583526001949094019391850191850161104b565b50979650505050505050565b600060208284031215611086578081fd5b8151801515811461058a578182fd5b6000602082840312156110a6578081fd5b5035919050565b6000602082840312156110be578081fd5b5051919050565b600082516110d78184602087016114b3565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b8181101561114f5783516001600160a01b03168352928401929184019160010161112a565b50909695505050505050565b901515815260200190565b90815260200190565b600060208252825180602084015261118e8160408501602087016114b3565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601f908201527f41697264726f702072656465656d20706572696f642068617320656e64656400604082015260600190565b60208082526027908201527f41697264726f702072656465656d20706572696f6420686173206e6f7420656e604082015266191959081e595d60ca1b606082015260800190565b6020808252601e908201527f45524332303a207472616e73666572206973206e6f7420616c6c6f7765640000604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60ff91909116815260200190565b60405181810167ffffffffffffffff8111828210171561148b57600080fd5b604052919050565b600067ffffffffffffffff8211156114a9578081fd5b5060209081020190565b60005b838110156114ce5781810151838201526020016114b6565b838111156114dd576000848401525b50505050565b6001600160a01b038116811461078457600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212209b2d6f14167bc062b61418b8fca6b7946d243420e3df874c9632acb30079c69b64736f6c634300060c0033546f726e61646f4361736820766f756368657220666f72206561726c792061646f7074657273";class pd extends Ka{constructor(...e){e.length>1?super(...e):super(cd,rd,e[0])}getDeployTransaction(e,t,a,n,b){return super.getDeployTransaction(e,t,a,n,b||{})}deploy(e,t,a,n,b){return super.deploy(e,t,a,n,b||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(cd)}static connect(e,t){return new $a(e,cd,t)}}pd.bytecode=rd,pd.abi=cd;var ud=Object.freeze({__proto__:null,Airdrop__factory:ed,ERC20Permit__factory:ad,TORN__factory:fd,Vesting__factory:sd,Voucher__factory:pd,ensSol:Cf,mocks:Yf});const od=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"_admin",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"callToOwner",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"changeOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"delegateToOwner",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"getCurrentOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeToOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],yd="0x608060405260405162000e6738038062000e67833981810160405260608110156200002957600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200005557600080fd5b9083019060208201858111156200006b57600080fd5b82516401000000008111828201881017156200008657600080fd5b82525081516020918201929091019080838360005b83811015620000b55781810151838201526020016200009b565b50505050905090810190601f168015620000e35780820380516001836020036101000a031916815260200191505b5060405250849150839050828282828281620000ff82620001f6565b805115620001bd576000826001600160a01b0316826040518082805190602001908083835b60208310620001455780518252601f19909201916020918201910162000124565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114620001a7576040519150601f19603f3d011682016040523d82523d6000602084013e620001ac565b606091505b5050905080620001bb57600080fd5b505b50620001c69050565b620001d1826200026d565b505050505050620001ed336200029160201b620008ab1760201c565b50505062000308565b6200020c81620002bd60201b620008d51760201c565b620002495760405162461bcd60e51b815260040180806020018281038252603681526020018062000e316036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b806200029c620002c3565b80546001600160a01b0319166001600160a01b039290921691909117905550565b3b151590565b604080517fb4d03667d60278cc15e9a68fa7679dc39ebe71350c4566a2c23c26580da4e0b3602080830191909152825180830382018152918301909252805191012090565b610b1980620003186000396000f3fe6080604052600436106100955760003560e01c80635c60da1b116100595780635c60da1b146102fe5780638f2839701461032f578063a18a186b14610362578063a6f9dae114610377578063f851a440146103aa576100a4565b806323711ab1146100ac57806323c735f1146101625780632e44e0e0146101955780633659cfe61461024b5780634f1ef2861461027e576100a4565b366100a4576100a26103bf565b005b6100a26103bf565b6100a2600480360360408110156100c257600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100ed57600080fd5b8201836020820111156100ff57600080fd5b8035906020019184600183028401116401000000008311171561012157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103d9945050505050565b34801561016e57600080fd5b506100a26004803603602081101561018557600080fd5b50356001600160a01b03166104e7565b6100a2600480360360408110156101ab57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156101d657600080fd5b8201836020820111156101e857600080fd5b8035906020019184600183028401116401000000008311171561020a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610546945050505050565b34801561025757600080fd5b506100a26004803603602081101561026e57600080fd5b50356001600160a01b031661063a565b6100a26004803603604081101561029457600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156102bf57600080fd5b8201836020820111156102d157600080fd5b803590602001918460018302840111640100000000831117156102f357600080fd5b509092509050610671565b34801561030a57600080fd5b5061031361071e565b604080516001600160a01b039092168252519081900360200190f35b34801561033b57600080fd5b506100a26004803603602081101561035257600080fd5b50356001600160a01b031661075b565b34801561036e57600080fd5b50610313610815565b34801561038357600080fd5b506100a26004803603602081101561039a57600080fd5b50356001600160a01b0316610824565b3480156103b657600080fd5b50610313610880565b6103c76103d7565b6103d76103d26108db565b610900565b565b336103e2610924565b6001600160a01b03161461042c576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b6020831061046a5780518252601f19909201916020918201910161044b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146104ca576040519150601f19603f3d011682016040523d82523d6000602084013e6104cf565b606091505b5091509150816104e157805181602001fd5b50505050565b336104f0610924565b6001600160a01b03161461053a576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b6105438161093d565b50565b3361054f610924565b6001600160a01b031614610599576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b60006060836001600160a01b031634846040518082805190602001908083835b602083106105d85780518252601f1990920191602091820191016105b9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146104ca576040519150601f19603f3d011682016040523d82523d6000602084013e6104cf565b61064261097d565b6001600160a01b0316336001600160a01b03161415610669576106648161093d565b610543565b6105436103bf565b61067961097d565b6001600160a01b0316336001600160a01b031614156107115761069b8361093d565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146106f8576040519150601f19603f3d011682016040523d82523d6000602084013e6106fd565b606091505b505090508061070b57600080fd5b50610719565b6107196103bf565b505050565b600061072861097d565b6001600160a01b0316336001600160a01b03161415610750576107496108db565b9050610758565b6107586103bf565b90565b61076361097d565b6001600160a01b0316336001600160a01b03161415610669576001600160a01b0381166107c15760405162461bcd60e51b815260040180806020018281038252603a815260200180610a74603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6107ea61097d565b604080516001600160a01b03928316815291841660208301528051918290030190a1610664816109a2565b600061081f610924565b905090565b3361082d610924565b6001600160a01b031614610877576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b610543816108ab565b600061088a61097d565b6001600160a01b0316336001600160a01b031614156107505761074961097d565b806108b46109c6565b80546001600160a01b0319166001600160a01b039290921691909117905550565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561091f573d6000f35b3d6000fd5b600061092e6109c6565b546001600160a01b0316919050565b61094681610a0b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b604080517fb4d03667d60278cc15e9a68fa7679dc39ebe71350c4566a2c23c26580da4e0b3602080830191909152825180830382018152918301909252805191012090565b610a14816108d5565b610a4f5760405162461bcd60e51b8152600401808060200182810382526036815260200180610aae6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a264697066735822122001f07e10d1eeadbd61da070e50227b529a3ec4b8f2e780a0e6bc1dc6028ba95764736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class ld extends Ka{constructor(...e){e.length>1?super(...e):super(od,yd,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(od)}static connect(e,t){return new $a(e,od,t)}}ld.bytecode=yd,ld.abi=od;const md=[{inputs:[{internalType:"address",name:"_torn",type:"address"},{internalType:"address",name:"_governance",type:"address"},{internalType:"address",name:"_registry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"instance",type:"address"},{indexed:!1,internalType:"uint256",name:"newFee",type:"uint256"}],name:"FeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint24",name:"newFee",type:"uint24"}],name:"UniswapTornPoolSwappingFeeChanged",type:"event"},{inputs:[],name:"PROTOCOL_FEE_DIVIDER",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"calculatePoolFee",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeDeviations",outputs:[{components:[{internalType:"address",name:"instance",type:"address"},{internalType:"int256",name:"deviation",type:"int256"}],internalType:"struct FeeManager.Deviation[]",name:"results",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint24",name:"_uniswapPoolSwappingFee",type:"uint24"}],name:"getTokenPriceRatio",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],name:"instanceFee",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],name:"instanceFeeUpdated",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"instanceFeeWithUpdate",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"registry",outputs:[{internalType:"contract InstanceRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"newPeriod",type:"uint32"}],name:"setPeriodForTWAPOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_price",type:"uint256"}],name:"setTokenPrice",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"_uniswapTornPoolSwappingFee",type:"uint24"}],name:"setUniswapTornPoolSwappingFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"newLimit",type:"uint24"}],name:"setUpdateFeeTimeLimit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"uniswapTimePeriod",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"uniswapTornPoolSwappingFee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"updateAllFees",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"updateFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateFeeTimeLimit",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance[]",name:"_instances",type:"address[]"}],name:"updateFees",outputs:[],stateMutability:"nonpayable",type:"function"}],Td="0x60e06040523480156200001157600080fd5b5060405162001ca738038062001ca783398101604081905262000034916200005c565b6001600160601b0319606093841b811660805291831b821660a05290911b1660c052620000c8565b60008060006060848603121562000071578283fd5b83516200007e81620000af565b60208501519093506200009181620000af565b6040850151909250620000a481620000af565b809150509250925092565b6001600160a01b0381168114620000c557600080fd5b50565b60805160601c60a05160601c60c05160601c611b866200012160003980610350528061061452806108915280610a42525080610539528061064c528061072d528061082252508061059852806107ad5250611b866000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806380eb7bf0116100ad578063bcc5ee6411610071578063bcc5ee641461024b578063c51c229714610253578063d8718fb114610266578063e1f121561461027b578063f522d6d61461028e5761012c565b806380eb7bf014610202578063a028752014610215578063adf898a414610228578063aeb3077a14610230578063b19a2972146102385761012c565b8063603a54fe116100f4578063603a54fe146101ac57806369574fef146101bf5780637b103999146101d25780637ccd2f48146101da57806380679eb3146101ef5761012c565b806305e34364146101315780632efbf3841461015a578063431f63c91461017a5780634bf0a5421461018f5780635aa6e675146101a4575b600080fd5b61014461013f366004611848565b610296565b6040516101519190611ab4565b60405180910390f35b61016d610168366004611848565b6102a8565b60405161015191906118d5565b61018d6101883660046115bc565b610305565b005b61019761034b565b6040516101519190611911565b61016d610537565b61016d6101ba366004611848565b61055b565b6101446101cd366004611584565b610576565b61016d610612565b6101e2610636565b6040516101519190611aa4565b61018d6101fd366004611898565b610641565b61018d610210366004611848565b61069c565b61018d610223366004611864565b610722565b61016d6107ab565b6101446107cf565b61018d6102463660046115e7565b6107d5565b6101e2610805565b61018d610261366004611864565b610817565b61026e610874565b6040516101519190611abd565b61016d610289366004611848565b610887565b61018d610a3d565b60026020526000908152604090205481565b600080546001600160a01b038316825260026020526040822054600160381b90910462ffffff16429190910311156102e3576102e38261069c565b506001600160a01b03808216600090815260016020526040902054165b919050565b3361030e610ad7565b6001600160a01b03161461033d5760405162461bcd60e51b815260040161033490611a06565b60405180910390fd5b6103478282610af0565b5050565b6060807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166310c13ac36040518163ffffffff1660e01b815260040160006040518083038186803b1580156103a757600080fd5b505afa1580156103bb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103e3919081019061167f565b9050805167ffffffffffffffff811180156103fd57600080fd5b5060405190808252806020026020018201604052801561043757816020015b6104246114b2565b81526020019060019003908161041c5790505b50915060005b815181101561053257600061046483838151811061045757fe5b6020026020010151610887565b6001600160a01b03169050600081156104e0576103e8826001600087878151811061048b57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b03166103e8026001600160a01b0316816104db57fe5b040390505b60405180604001604052808585815181106104f757fe5b60200260200101516001600160a01b031681526020018281525085848151811061051d57fe5b6020908102919091010152505060010161043d565b505090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001602052600090815260409020546001600160a01b031681565b600061058183610b19565b610600576040805180820182526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682528516602080830191909152825180840190935260005462ffffff80821685528616918401919091526105fb929063ffffffff630100000090910416610b44565b610609565b61060983610b19565b90505b92915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005462ffffff1681565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461067657600080fd5b6000805463ffffffff90921663010000000266ffffffff00000019909216919091179055565b60006106a782610887565b6001600160a01b03838116600081815260016020908152604080832080546001600160a01b03191695871695909517909455600290528290204290559051919250907f6f0eaf2c2f89fb4cfe96a1dee5e764d60b52c7f48aaa590f0850e308aa1b953a906107169084906118d5565b60405180910390a25050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461075757600080fd5b6000805462ffffff191662ffffff83811691909117918290556040517fbfe65cfc2359076c4468c9b895156c309c78f94fb09f6d2fc0463c4ca9a71ac2926107a0921690611aa4565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b61271081565b60005b8151811015610347576107fd8282815181106107f057fe5b602002602001015161069c565b6001016107d8565b600054600160381b900462ffffff1681565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461084c57600080fd5b6000805462ffffff909216600160381b0269ffffff0000000000000019909216919091179055565b6000546301000000900463ffffffff1681565b60008060008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663032bb443876040518263ffffffff1660e01b81526004016108db91906118d5565b60a06040518083038186803b1580156108f357600080fd5b505afa158015610907573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092b91906117cd565b9450945050935093508063ffffffff1660001415610950576000945050505050610300565b6001600160a01b038316158015610965575083155b61096f5782610985565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b925060006109938484610576565b9050610a32612710610a2c8463ffffffff16610a2685610a2c670de0b6b3a76400008e6001600160a01b0316638bca6d166040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ee57600080fd5b505afa158015610a02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a269190611880565b90610b90565b90610bca565b979650505050505050565b610ad57f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166310c13ac36040518163ffffffff1660e01b815260040160006040518083038186803b158015610a9957600080fd5b505afa158015610aad573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610246919081019061167f565b565b6000610ae1610c0c565b546001600160a01b0316919050565b6000610afa610c61565b6001600160a01b03909316600090815260209390935250604090912055565b600080610b24610c61565b6001600160a01b0390931660009081526020939093525050604090205490565b60208084015190830151600091610b5b9184610c98565b84518451610b7e91670de0b6b3a764000091610b78919087610c98565b90610cc2565b81610b8557fe5b0490505b9392505050565b600082610b9f5750600061060c565b82820282848281610bac57fe5b04146106095760405162461bcd60e51b815260040161033490611a63565b600061060983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610ce6565b6000807fb4d03667d60278cc15e9a68fa7679dc39ebe71350c4566a2c23c26580da4e0b360001c604051602001610c439190611ab4565b60408051601f19818403018152919052805160209091012092915050565b6000807f6521c13ddfc30471ec629848a30b01f73c36737d417c11843e7a9afa6985e84860001c604051602001610c439190611ab4565b6000610cba8473c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28585610d1d565b949350505050565b6000821580610cdd57505081810281838281610cda57fe5b04145b61060c57600080fd5b60008183610d075760405162461bcd60e51b815260040161033491906119b3565b506000838581610d1357fe5b0495945050505050565b600080846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5957600080fd5b505afa158015610d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9191906118b4565b60ff16600a0a90506001600160a01b038681169086161415610dbd576001600160801b03169050610cba565b604051630b4c774160e11b8152610e5e90610e5690731f98431c8ad98523631ae4a59f267346ea31f98490631698ee8290610e00908b908b908b906004016118e9565b60206040518083038186803b158015610e1857600080fd5b505afa158015610e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e509190611568565b85610e6f565b828888611004565b915050610cba565b50949350505050565b600063ffffffff8216610e945760405162461bcd60e51b815260040161033490611a2c565b60408051600280825260608083018452926020830190803683370190505090508281600081518110610ec257fe5b602002602001019063ffffffff16908163ffffffff1681525050600081600181518110610eeb57fe5b63ffffffff9092166020928302919091019091015260405163883bdbfd60e01b81526060906001600160a01b0386169063883bdbfd90610f2f908590600401611969565b60006040518083038186803b158015610f4757600080fd5b505afa158015610f5b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f83919081019061170b565b509050600081600081518110610f9557fe5b602002602001015182600181518110610faa57fe5b60200260200101510390508463ffffffff168160060b81610fc757fe5b05935060008160060b128015610fee57508463ffffffff168160060b81610fea57fe5b0715155b15610ffb57600019909301925b50505092915050565b600080611010866110ee565b90506001600160801b036001600160a01b0382161161107f576001600160a01b038082168002908481169086161061105f5761105a600160c01b876001600160801b031683611407565b611077565b61107781876001600160801b0316600160c01b611407565b925050610e66565b600061109e6001600160a01b0383168068010000000000000000611407565b9050836001600160a01b0316856001600160a01b0316106110d6576110d1600160801b876001600160801b031683611407565b610a32565b610a3281876001600160801b0316600160801b611407565b60008060008360020b12611105578260020b61110d565b8260020b6000035b9050620d89e88111156111325760405162461bcd60e51b815260040161033490611a48565b60006001821661114657600160801b611158565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff169050600282161561118c576ffff97272373d413259a46990580e213a0260801c5b60048216156111ab576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b60088216156111ca576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b60108216156111e9576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615611208576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615611227576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615611246576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615611266576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615611286576ff987a7253ac413176f2b074cf7815e540260801c5b6104008216156112a6576ff3392b0822b70005940c7a398e4b70f30260801c5b6108008216156112c6576fe7159475a2c29b7443b29c7fa6e889d90260801c5b6110008216156112e6576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615611306576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615611326576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615611346576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615611367576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b62020000821615611387576e5d6af8dedb81196699c329225ee6040260801c5b620400008216156113a6576d2216e584f5fa1ea926041bedfe980260801c5b620800008216156113c3576b048a170391f7dc42444e8fa20260801c5b60008460020b13156113de5780600019816113da57fe5b0490505b6401000000008106156113f25760016113f5565b60005b60ff16602082901c0192505050919050565b600080806000198587098686029250828110908390030390508061143d576000841161143257600080fd5b508290049050610b89565b80841161144957600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b604080518082019091526000808252602082015290565b600082601f8301126114d9578081fd5b81516114ec6114e782611af5565b611ace565b81815291506020808301908481018184028601820187101561150d57600080fd5b60005b8481101561153557815161152381611b15565b84529282019290820190600101611510565b505050505092915050565b803561060c81611b15565b805161060c81611b15565b8051600681900b811461060c57600080fd5b600060208284031215611579578081fd5b815161060981611b15565b60008060408385031215611596578081fd5b82356115a181611b15565b915060208301356115b181611b2d565b809150509250929050565b600080604083850312156115ce578182fd5b82356115d981611b15565b946020939093013593505050565b600060208083850312156115f9578182fd5b823567ffffffffffffffff81111561160f578283fd5b8301601f8101851361161f578283fd5b803561162d6114e782611af5565b8181528381019083850185840285018601891015611649578687fd5b8694505b838510156116735761165f8982611540565b83526001949094019391850191850161164d565b50979650505050505050565b60006020808385031215611691578182fd5b825167ffffffffffffffff8111156116a7578283fd5b8301601f810185136116b7578283fd5b80516116c56114e782611af5565b81815283810190838501858402850186018910156116e1578687fd5b8694505b83851015611673576116f7898261154b565b8352600194909401939185019185016116e5565b6000806040838503121561171d578182fd5b825167ffffffffffffffff80821115611734578384fd5b818501915085601f830112611747578384fd5b81516117556114e782611af5565b80828252602080830192508086018a828387028901011115611775578889fd5b8896505b8487101561179f5761178b8b82611556565b845260019690960195928101928101611779565b5088015190965093505050808211156117b6578283fd5b506117c3858286016114c9565b9150509250929050565b600080600080600060a086880312156117e4578081fd5b855180151581146117f3578182fd5b602087015190955061180481611b15565b604087015190945060028110611818578182fd5b606087015190935061182981611b2d565b608087015190925061183a81611b3e565b809150509295509295909350565b600060208284031215611859578081fd5b813561060981611b15565b600060208284031215611875578081fd5b813561060981611b2d565b600060208284031215611891578081fd5b5051919050565b6000602082840312156118a9578081fd5b813561060981611b3e565b6000602082840312156118c5578081fd5b815160ff81168114610609578182fd5b6001600160a01b0391909116815260200190565b6001600160a01b03938416815291909216602082015262ffffff909116604082015260600190565b602080825282518282018190526000919060409081850190868401855b8281101561195c57815180516001600160a01b0316855286015186850152928401929085019060010161192e565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156119a757835163ffffffff1683529284019291840191600101611985565b50909695505050505050565b6000602080835283518082850152825b818110156119df578581018301518582016040015282016119c3565b818111156119f05783604083870101525b50601f01601f1916929092016040019392505050565b6020808252600c908201526b2737ba1030b71037bbb732b960a11b604082015260600190565b602080825260029082015261042560f41b604082015260600190565b6020808252600190820152601560fa1b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b62ffffff91909116815260200190565b90815260200190565b63ffffffff91909116815260200190565b60405181810167ffffffffffffffff81118282101715611aed57600080fd5b604052919050565b600067ffffffffffffffff821115611b0b578081fd5b5060209081020190565b6001600160a01b0381168114611b2a57600080fd5b50565b62ffffff81168114611b2a57600080fd5b63ffffffff81168114611b2a57600080fdfea2646970667358221220e716ce7751ca9331e897d31f3744c6916e2f742be6df42551b069b566751df4c64736f6c634300060c0033";class hd extends Ka{constructor(...e){e.length>1?super(...e):super(md,Td,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(md)}static connect(e,t){return new $a(e,md,t)}}hd.bytecode=Td,hd.abi=md;const gd=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"callToOwner",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"changeOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"delegateToOwner",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"getCurrentOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeToOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],wd="0x608060405260405162000e6038038062000e60833981810160405260408110156200002957600080fd5b8151602083018051604051929492938301929190846401000000008211156200005157600080fd5b9083019060208201858111156200006757600080fd5b82516401000000008111828201881017156200008257600080fd5b82525081516020918201929091019080838360005b83811015620000b157818101518382015260200162000097565b50505050905090810190601f168015620000df5780820380516001836020036101000a031916815260200191505b50604052508391508290508130828281620000fa82620001ef565b805115620001b8576000826001600160a01b0316826040518082805190602001908083835b60208310620001405780518252601f1990920191602091820191016200011f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114620001a2576040519150601f19603f3d011682016040523d82523d6000602084013e620001a7565b606091505b5050905080620001b657600080fd5b505b50620001c19050565b620001cc8262000266565b5050505050620001e7336200028a60201b620008ab1760201c565b505062000301565b6200020581620002b660201b620008d51760201c565b620002425760405162461bcd60e51b815260040180806020018281038252603681526020018062000e2a6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b8062000295620002bc565b80546001600160a01b0319166001600160a01b039290921691909117905550565b3b151590565b604080517fb4d03667d60278cc15e9a68fa7679dc39ebe71350c4566a2c23c26580da4e0b3602080830191909152825180830382018152918301909252805191012090565b610b1980620003116000396000f3fe6080604052600436106100955760003560e01c80635c60da1b116100595780635c60da1b146102fe5780638f2839701461032f578063a18a186b14610362578063a6f9dae114610377578063f851a440146103aa576100a4565b806323711ab1146100ac57806323c735f1146101625780632e44e0e0146101955780633659cfe61461024b5780634f1ef2861461027e576100a4565b366100a4576100a26103bf565b005b6100a26103bf565b6100a2600480360360408110156100c257600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100ed57600080fd5b8201836020820111156100ff57600080fd5b8035906020019184600183028401116401000000008311171561012157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103d9945050505050565b34801561016e57600080fd5b506100a26004803603602081101561018557600080fd5b50356001600160a01b03166104e7565b6100a2600480360360408110156101ab57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156101d657600080fd5b8201836020820111156101e857600080fd5b8035906020019184600183028401116401000000008311171561020a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610546945050505050565b34801561025757600080fd5b506100a26004803603602081101561026e57600080fd5b50356001600160a01b031661063a565b6100a26004803603604081101561029457600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156102bf57600080fd5b8201836020820111156102d157600080fd5b803590602001918460018302840111640100000000831117156102f357600080fd5b509092509050610671565b34801561030a57600080fd5b5061031361071e565b604080516001600160a01b039092168252519081900360200190f35b34801561033b57600080fd5b506100a26004803603602081101561035257600080fd5b50356001600160a01b031661075b565b34801561036e57600080fd5b50610313610815565b34801561038357600080fd5b506100a26004803603602081101561039a57600080fd5b50356001600160a01b0316610824565b3480156103b657600080fd5b50610313610880565b6103c76103d7565b6103d76103d26108db565b610900565b565b336103e2610924565b6001600160a01b03161461042c576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b6020831061046a5780518252601f19909201916020918201910161044b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146104ca576040519150601f19603f3d011682016040523d82523d6000602084013e6104cf565b606091505b5091509150816104e157805181602001fd5b50505050565b336104f0610924565b6001600160a01b03161461053a576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b6105438161093d565b50565b3361054f610924565b6001600160a01b031614610599576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b60006060836001600160a01b031634846040518082805190602001908083835b602083106105d85780518252601f1990920191602091820191016105b9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146104ca576040519150601f19603f3d011682016040523d82523d6000602084013e6104cf565b61064261097d565b6001600160a01b0316336001600160a01b03161415610669576106648161093d565b610543565b6105436103bf565b61067961097d565b6001600160a01b0316336001600160a01b031614156107115761069b8361093d565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146106f8576040519150601f19603f3d011682016040523d82523d6000602084013e6106fd565b606091505b505090508061070b57600080fd5b50610719565b6107196103bf565b505050565b600061072861097d565b6001600160a01b0316336001600160a01b03161415610750576107496108db565b9050610758565b6107586103bf565b90565b61076361097d565b6001600160a01b0316336001600160a01b03161415610669576001600160a01b0381166107c15760405162461bcd60e51b815260040180806020018281038252603a815260200180610a74603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6107ea61097d565b604080516001600160a01b03928316815291841660208301528051918290030190a1610664816109a2565b600061081f610924565b905090565b3361082d610924565b6001600160a01b031614610877576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b610543816108ab565b600061088a61097d565b6001600160a01b0316336001600160a01b031614156107505761074961097d565b806108b46109c6565b80546001600160a01b0319166001600160a01b039290921691909117905550565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561091f573d6000f35b3d6000fd5b600061092e6109c6565b546001600160a01b0316919050565b61094681610a0b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b604080517fb4d03667d60278cc15e9a68fa7679dc39ebe71350c4566a2c23c26580da4e0b3602080830191909152825180830382018152918301909252805191012090565b610a14816108d5565b610a4f5760405162461bcd60e51b8152600401808060200182810382526036815260200180610aae6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a2646970667358221220486b8f46c84e133fdcdf09d6e85ae28603a923477471dc965d4d7f5f3634234c64736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class vd extends Ka{constructor(...e){e.length>1?super(...e):super(gd,wd,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(gd)}static connect(e,t){return new $a(e,gd,t)}}vd.bytecode=wd,vd.abi=gd;var Md=Object.freeze({__proto__:null,TestnetAdminProxy__factory:ld,TestnetFeeManager__factory:hd,TestnetGovernanceProxy__factory:vd});const _d=[{inputs:[{internalType:"address",name:"account",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"}];class xd{static createInterface(){return new ba(_d)}static connect(e,t){return new $a(e,_d,t)}}xd.abi=_d;const Id=[{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawTorn",outputs:[],stateMutability:"nonpayable",type:"function"}];let Ed=class{static createInterface(){return new ba(Id)}static connect(e,t){return new $a(e,Id,t)}};Ed.abi=Id;const Rd=[{inputs:[{internalType:"address",name:"governanceAddress",type:"address"},{internalType:"address",name:"tornAddress",type:"address"},{internalType:"address",name:"_relayerRegistry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardsClaimed",type:"uint256"}],name:"RewardsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!1,internalType:"uint256",name:"rewards",type:"uint256"}],name:"RewardsUpdated",type:"event"},{inputs:[],name:"Governance",outputs:[{internalType:"contract ITornadoGovernance",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"accumulatedRewardPerTorn",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"accumulatedRewardRateOnLastUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"accumulatedRewards",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"addBurnRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"checkReward",outputs:[{internalType:"uint256",name:"rewards",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ratioConstant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"relayerRegistry",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"setReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amountLockedBeforehand",type:"uint256"}],name:"updateRewardsOnLockedBalanceChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawTorn",outputs:[],stateMutability:"nonpayable",type:"function"}],Od="0x6101006040523480156200001257600080fd5b50604051620011e4380380620011e48339810160408190526200003591620000e0565b6001600160601b0319606084811b821660a05283811b821660c05282901b1660e052604080516318160ddd60e01b815290516001600160a01b038416916318160ddd916004808301926020929190829003018186803b1580156200009857600080fd5b505afa158015620000ad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d3919062000133565b6080525062000165915050565b600080600060608486031215620000f5578283fd5b835162000102816200014c565b602085015190935062000115816200014c565b604085015190925062000128816200014c565b809150509250925092565b60006020828403121562000145578081fd5b5051919050565b6001600160a01b03811681146200016257600080fd5b50565b60805160a05160601c60c05160601c60e05160601c610ff0620001f4600039806101eb52806104f652508061023a52806104815280610574528061084252806108d75250806101b9528061026952806103ab5280610550528061059b52806106e5528061078052806107e452806108f952508061036a528061052c528061065f52806109f55250610ff06000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063adf898a41161008c578063e0d3265211610066578063e0d326521461016d578063e113335f14610175578063eacccaf014610188578063f58073b11461019b576100cf565b8063adf898a41461013f578063c3c90e6414610147578063d7ada20d1461015a576100cf565b8063338610af146100d45780633d18b912146100e957806347ff589d146100f157806373f273fc1461010f57806380a120411461012f5780639453911214610137575b600080fd5b6100e76100e2366004610d78565b6101ae565b005b6100e76103a3565b6100f96104f4565b6040516101069190610dc4565b60405180910390f35b61012261011d366004610cf5565b610518565b6040516101069190610f6c565b61012261052a565b6100f961054e565b6100f9610572565b610122610155366004610cf5565b610596565b610122610168366004610cf5565b6106c2565b6101226106d4565b6100e7610183366004610d11565b6106da565b6100e7610196366004610d11565b610775565b6100e76101a9366004610d78565b6107d9565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061020d5750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b6102325760405162461bcd60e51b815260040161022990610ec5565b60405180910390fd5b61039d6103947f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a082317f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639daafec76040518163ffffffff1660e01b815260040160206040518083038186803b1580156102c057600080fd5b505afa1580156102d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f89190610d5c565b6040518263ffffffff1660e01b81526004016103149190610dc4565b60206040518083038186803b15801561032c57600080fd5b505afa158015610340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103649190610d90565b61038e847f0000000000000000000000000000000000000000000000000000000000000000610921565b90610964565b600154906109a6565b60015550565b600061044a337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639ae697bf336040518263ffffffff1660e01b81526004016103f59190610dc4565b60206040518083038186803b15801561040d57600080fd5b505afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104459190610d90565b6109cb565b336000908152600360205260409020549091506104689082906109a6565b336000818152600360205260408120559091506104b0907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083610a85565b336001600160a01b03167ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe826040516104e99190610f6c565b60405180910390a250565b7f000000000000000000000000000000000000000000000000000000000000000081565b60036020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639ae697bf846040518263ffffffff1660e01b81526004016105e59190610dc4565b60206040518083038186803b1580156105fd57600080fd5b505afa158015610611573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106359190610d90565b90508015610697576001600160a01b038316600090815260026020526040902054600154610694917f00000000000000000000000000000000000000000000000000000000000000009161038e91859161068e91610ae0565b90610921565b91505b6001600160a01b0383166000908152600360205260409020546106bb9083906109a6565b9392505050565b60026020526000908152604090205481565b60015481565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107225760405162461bcd60e51b815260040161022990610e5b565b600061072e83836109cb565b6001600160a01b03841660009081526003602052604090205490915061075490826109a6565b6001600160a01b039093166000908152600360205260409020929092555050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107bd5760405162461bcd60e51b815260040161022990610e5b565b6001600160a01b03909116600090815260036020526040902055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108215760405162461bcd60e51b815260040161022990610e5b565b6000198114156108ca576040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610877903090600401610dc4565b60206040518083038186803b15801561088f57600080fd5b505afa1580156108a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c79190610d90565b90505b61091e6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083610a85565b50565b6000826109305750600061095e565b8282028284828161093d57fe5b041461095b5760405162461bcd60e51b815260040161022990610e84565b90505b92915050565b600061095b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610b22565b60008282018381101561095b5760405162461bcd60e51b815260040161022990610e24565b60008115610a27576001600160a01b038316600090815260026020526040902054600154610a24917f00000000000000000000000000000000000000000000000000000000000000009161038e91869161068e91610ae0565b90505b6001546001600160a01b038416600081815260026020526040908190209290925590517f39fe62076cf7adf3c60e355a2da5a4f17a958ca319e8eba385a6c09a8b64901690610a77908490610f6c565b60405180910390a292915050565b610adb8363a9059cbb60e01b8484604051602401610aa4929190610dd8565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b59565b505050565b600061095b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610be8565b60008183610b435760405162461bcd60e51b81526004016102299190610df1565b506000838581610b4f57fe5b0495945050505050565b6060610bae826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c149092919063ffffffff16565b805190915015610adb5780806020019051810190610bcc9190610d3c565b610adb5760405162461bcd60e51b815260040161022990610f22565b60008184841115610c0c5760405162461bcd60e51b81526004016102299190610df1565b505050900390565b6060610c238484600085610c2b565b949350505050565b6060610c3685610cef565b610c525760405162461bcd60e51b815260040161022990610eeb565b60006060866001600160a01b03168587604051610c6f9190610da8565b60006040518083038185875af1925050503d8060008114610cac576040519150601f19603f3d011682016040523d82523d6000602084013e610cb1565b606091505b50915091508115610cc5579150610c239050565b805115610cd55780518082602001fd5b8360405162461bcd60e51b81526004016102299190610df1565b3b151590565b600060208284031215610d06578081fd5b813561095b81610fa5565b60008060408385031215610d23578081fd5b8235610d2e81610fa5565b946020939093013593505050565b600060208284031215610d4d578081fd5b8151801515811461095b578182fd5b600060208284031215610d6d578081fd5b815161095b81610fa5565b600060208284031215610d89578081fd5b5035919050565b600060208284031215610da1578081fd5b5051919050565b60008251610dba818460208701610f75565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6000602082528251806020840152610e10816040850160208701610f75565b601f01601f19169190910160400192915050565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252600f908201526e6f6e6c7920676f7665726e616e636560881b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600c908201526b1d5b985d5d1a1bdc9a5e995960a21b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b90815260200190565b60005b83811015610f90578181015183820152602001610f78565b83811115610f9f576000848401525b50505050565b6001600160a01b038116811461091e57600080fdfea2646970667358221220007ef4aab133b842800388614e081de933a2da981d94088bca1e1a924db5174764736f6c634300060c0033";class kd extends Ka{constructor(...e){e.length>1?super(...e):super(Rd,Od,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Rd)}static connect(e,t){return new $a(e,Rd,t)}}kd.bytecode=Od,kd.abi=Rd;var Pd=Object.freeze({__proto__:null,ITornadoGovernance__factory:xd,ITornadoVault__factory:Ed,TornadoStakingRewards__factory:kd});const Ad=[{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"}];class Cd{static createInterface(){return new ba(Ad)}static connect(e,t){return new $a(e,Ad,t)}}Cd.abi=Ad;const Nd=[{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"}];class Dd{static createInterface(){return new ba(Nd)}static connect(e,t){return new $a(e,Nd,t)}}Dd.abi=Nd;const Sd=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"feeProtocol0Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol0New",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1New",type:"uint8"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Swap",type:"event"}];class Ud{static createInterface(){return new ba(Sd)}static connect(e,t){return new $a(e,Sd,t)}}Ud.abi=Sd;const Vd=[{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}];class Ld{static createInterface(){return new ba(Vd)}static connect(e,t){return new $a(e,Vd,t)}}Ld.abi=Vd;const Fd=[{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"feeProtocol0",type:"uint8"},{internalType:"uint8",name:"feeProtocol1",type:"uint8"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"}];class Gd{static createInterface(){return new ba(Fd)}static connect(e,t){return new $a(e,Fd,t)}}Gd.abi=Fd;const Bd=[{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"_liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint8",name:"feeProtocol",type:"uint8"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int16",name:"wordPosition",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tick",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"}];class jd{static createInterface(){return new ba(Bd)}static connect(e,t){return new $a(e,Bd,t)}}jd.abi=Bd;var Hd=Object.freeze({__proto__:null,IUniswapV3PoolActions__factory:Cd,IUniswapV3PoolDerivedState__factory:Dd,IUniswapV3PoolEvents__factory:Ud,IUniswapV3PoolImmutables__factory:Ld,IUniswapV3PoolOwnerActions__factory:Gd,IUniswapV3PoolState__factory:jd});const zd=[{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!0,internalType:"int24",name:"tickSpacing",type:"int24"}],name:"FeeAmountEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"int24",name:"tickSpacing",type:"int24"},{indexed:!1,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"createPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],name:"enableFeeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"}],name:"feeAmountTickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"getPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"}];class $d{static createInterface(){return new ba(zd)}static connect(e,t){return new $a(e,zd,t)}}$d.abi=zd;const Xd=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"feeProtocol0Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol0New",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1New",type:"uint8"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Swap",type:"event"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"_liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"feeProtocol0",type:"uint8"},{internalType:"uint8",name:"feeProtocol1",type:"uint8"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint8",name:"feeProtocol",type:"uint8"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int16",name:"wordPosition",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tick",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}];class Wd{static createInterface(){return new ba(Xd)}static connect(e,t){return new $a(e,Xd,t)}}Wd.abi=Xd;var qd=Object.freeze({__proto__:null,IUniswapV3Factory__factory:$d,IUniswapV3Pool__factory:Wd,pool:Hd}),Jd=Object.freeze({__proto__:null,interfaces:qd}),Kd=Object.freeze({__proto__:null,contracts:Jd}),Yd=Object.freeze({__proto__:null,v3Core:Kd});const Zd=[{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"proof",type:"bytes"},{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"address payable",name:"relayer",type:"address"},{internalType:"uint256",name:"fee",type:"uint256"},{internalType:"uint256",name:"refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"}];class Qd{static createInterface(){return new ba(Zd)}static connect(e,t){return new $a(e,Zd,t)}}Qd.abi=Zd;var ei=Object.freeze({__proto__:null,ITornadoInstance__factory:Qd});const ti=[{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"}];class ai{static createInterface(){return new ba(ti)}static connect(e,t){return new $a(e,ti,t)}}ai.abi=ti;var ni=Object.freeze({__proto__:null,IERC20Decimals__factory:ai}),bi=Object.freeze({__proto__:null,uniswapV3OracleHelperSol:ni});const fi=[{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"value",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],di="0x608060405234801561001057600080fd5b50610278806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80631f1bd692146100465780633fa4f245146100c35780638129fc1c146100dd575b600080fd5b61004e6100e7565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100cb610174565b60408051918252519081900360200190f35b6100e561017a565b005b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561016c5780601f106101415761010080835404028352916020019161016c565b820191906000526020600020905b81548152906001019060200180831161014f57829003601f168201915b505050505081565b60005481565b600160008190556040805180820190915260058082526464756d6d7960d81b60209092019182526101ac9291906101af565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101f057805160ff191683800117855561021d565b8280016001018555821561021d579182015b8281111561021d578251825591602001919060010190610202565b5061022992915061022d565b5090565b5b80821115610229576000815560010161022e56fea26469706673582212204b4d54284aeff9c7c570415da4a9efb9bf7115fe94a322210f9981c1c7ae107a64736f6c634300060c0033";class ii extends Ka{constructor(...e){e.length>1?super(...e):super(fi,di,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(fi)}static connect(e,t){return new $a(e,fi,t)}}ii.bytecode=di,ii.abi=fi;const si=[{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"value",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],ci="0x608060405234801561001057600080fd5b50610278806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80631f1bd692146100465780633fa4f245146100c35780638129fc1c146100dd575b600080fd5b61004e6100e7565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100cb610174565b60408051918252519081900360200190f35b6100e561017a565b005b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561016c5780601f106101415761010080835404028352916020019161016c565b820191906000526020600020905b81548152906001019060200180831161014f57829003601f168201915b505050505081565b60005481565b600260005560408051808201909152600680825265323ab6b6bc9960d11b60209092019182526101ac916001916101af565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101f057805160ff191683800117855561021d565b8280016001018555821561021d579182015b8281111561021d578251825591602001919060010190610202565b5061022992915061022d565b5090565b5b80821115610229576000815560010161022e56fea2646970667358221220056d994e19772e421a19f4bcf8cb09061d5645867c4c352106bf6b809fb5de3664736f6c634300060c0033";class ri extends Ka{constructor(...e){e.length>1?super(...e):super(si,ci,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(si)}static connect(e,t){return new $a(e,si,t)}}ri.bytecode=ci,ri.abi=si;var pi=Object.freeze({__proto__:null,DummySecond__factory:ri,Dummy__factory:ii});const ui=[{inputs:[{internalType:"uint256",name:"delay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"}];class oi{static createInterface(){return new ba(ui)}static connect(e,t){return new $a(e,ui,t)}}oi.abi=ui;const yi=[{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"}],li="0x608060405234801561001057600080fd5b5060c48061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063373058b814602d575b600080fd5b60336035565b005b6040805163e4917d9f60e01b81526203f48060048201529051309163e4917d9f91602480830192600092919082900301818387803b158015607557600080fd5b505af11580156088573d6000803e3d6000fd5b5050505056fea264697066735822122080cc4a797d58ff69ba6d6a0d2a3849574ef67da2d75c41e66a86d3f6e162209d64736f6c634300060c0033";class mi extends Ka{constructor(...e){e.length>1?super(...e):super(yi,li,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(yi)}static connect(e,t){return new $a(e,yi,t)}}mi.bytecode=li,mi.abi=yi;var Ti=Object.freeze({__proto__:null,IGovernance__factory:oi,ProposalStateChangeGovernance__factory:mi});const hi=[{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"}];class gi{static createInterface(){return new ba(hi)}static connect(e,t){return new $a(e,hi,t)}}gi.abi=hi;const wi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"x",type:"uint256"}],name:"Overriden",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"newVariable",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"time_",type:"uint256"}],name:"setTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"torna",type:"address"}],name:"setTorn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"time",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],vi="0x6080604052426041553480156200001557600080fd5b50600054610100900460ff168062000032575062000032620000cd565b8062000041575060005460ff16155b620000695760405162461bcd60e51b8152600401620000609062000114565b60405180910390fd5b600054610100900460ff1615801562000095576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000b3620000d3565b8015620000c6576000805461ff00191690555b5062000162565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6123ac80620001726000396000f3fe60806040526004361061023b5760003560e01c8063a0a2b5731161012e578063ce25d71c116100ab578063e4917d9f1161006f578063e4917d9f14610664578063ea0217cf14610684578063ece40cc1146106a4578063f0b76892146106c4578063fe0d94c1146106e45761023b565b8063ce25d71c146105d8578063d6159fe5146105ed578063d6f0948c14610602578063da35c66414610622578063e23a9a52146106375761023b565b8063b54426c8116100f2578063b54426c814610538578063b5f6a74314610558578063b859f11b14610578578063c0c0e82014610598578063c4d66de8146105b85761023b565b8063a0a2b573146104b9578063a6c26603146104d9578063a72edda3146104ee578063adf898a41461050e578063b1610d7e146105235761023b565b80636198e339116101bc57806370b0f6601161018057806370b0f6601461042f5780638d7a72f31461044f57806392ab89bb146104645780639a9e3b6e146104795780639ae697bf146104995761023b565b80636198e3391461039857806365da1264146103b8578063671dd275146103e55780636a661755146103fa5780636dc2dc6c1461040f5761023b565b806337f135d71161020357806337f135d7146103015780633e4f49e614610316578063587a6ecb1461034357806358e9fff0146103585780635c19a95c146103785761023b565b8063013cf08b1461024057806302ec8f9e1461027d57806315373e3d1461029f57806316ada547146102bf57806317977c61146102e1575b600080fd5b34801561024c57600080fd5b5061026061025b366004611cd6565b6106f7565b604051610274989796959493929190611de5565b60405180910390f35b34801561028957600080fd5b5061029d610298366004611cd6565b61075c565b005b3480156102ab57600080fd5b5061029d6102ba366004611d1a565b610789565b3480156102cb57600080fd5b506102d4610798565b6040516102749190612323565b3480156102ed57600080fd5b506102d46102fc366004611acd565b61079e565b34801561030d57600080fd5b506102d46107b0565b34801561032257600080fd5b50610336610331366004611cd6565b6107b6565b6040516102749190611ea3565b34801561034f57600080fd5b506102d46108f9565b34801561036457600080fd5b506102d4610373366004611ae8565b6108ff565b34801561038457600080fd5b5061029d610393366004611acd565b61094d565b3480156103a457600080fd5b5061029d6103b3366004611cd6565b610a6f565b3480156103c457600080fd5b506103d86103d3366004611acd565b610ba6565b6040516102749190611d94565b3480156103f157600080fd5b506102d4610bc1565b34801561040657600080fd5b506102d4610bc7565b34801561041b57600080fd5b5061029d61042a366004611cd6565b610bcd565b34801561043b57600080fd5b5061029d61044a366004611cd6565b610c12565b34801561045b57600080fd5b506102d4610c36565b34801561047057600080fd5b5061029d610c3c565b34801561048557600080fd5b5061029d610494366004611cd6565b610cc3565b3480156104a557600080fd5b506102d46104b4366004611acd565b610ce7565b3480156104c557600080fd5b5061029d6104d4366004611cd6565b610cf9565b3480156104e557600080fd5b506102d4610cfe565b3480156104fa57600080fd5b506102d4610509366004611acd565b610d04565b34801561051a57600080fd5b506103d8610d16565b34801561052f57600080fd5b506102d4610d25565b34801561054457600080fd5b5061029d610553366004611cd6565b610d2b565b34801561056457600080fd5b5061029d610573366004611acd565b610d35565b34801561058457600080fd5b5061029d610593366004611bf5565b610d57565b3480156105a457600080fd5b5061029d6105b3366004611cd6565b610e0e565b3480156105c457600080fd5b5061029d6105d3366004611acd565b610e32565b3480156105e457600080fd5b506102d4611075565b3480156105f957600080fd5b506102d461107b565b34801561060e57600080fd5b506102d461061d366004611b48565b611081565b34801561062e57600080fd5b506102d4611097565b34801561064357600080fd5b50610657610652366004611cee565b6110a1565b60405161027491906122fe565b34801561067057600080fd5b5061029d61067f366004611cd6565b611113565b34801561069057600080fd5b5061029d61069f366004611cd6565b611137565b3480156106b057600080fd5b5061029d6106bf366004611cd6565b61115b565b3480156106d057600080fd5b5061029d6106df366004611b96565b61117f565b61029d6106f2366004611cd6565b6111ff565b603d818154811061070457fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b3330146107845760405162461bcd60e51b815260040161077b90612101565b60405180910390fd5b603555565b610794338383611240565b5050565b60415481565b603e6020526000908152604090205481565b60335481565b60006107c0611097565b82111580156107cf5750600082115b6107eb5760405162461bcd60e51b815260040161077b90612237565b6000603d83815481106107fa57fe5b906000526020600020906008020190508060020154610817611471565b116108265760009150506108f4565b8060030154610833611471565b116108425760019150506108f4565b8060050154816004015411158061086457506035548160050154826004015401105b156108735760029150506108f4565b600681015460ff161561088a5760059150506108f4565b6108af6034546108a9603354846003015461147790919063ffffffff16565b90611477565b6108b7611471565b106108c65760069150506108f4565b60335460038201546108d791611477565b6108df611471565b106108ee5760049150506108f4565b60039150505b919050565b603a5481565b6001600160a01b038381166000908152603c6020526040812054909116331461093a5760405162461bcd60e51b815260040161077b906122c7565b61094584848461149c565b949350505050565b336000818152603c60205260409020546001600160a01b03908116919083161480159061098357506001600160a01b0382163014155b801561099757506001600160a01b03821615155b80156109b55750806001600160a01b0316826001600160a01b031614155b6109d15760405162461bcd60e51b815260040161077b90612138565b6001600160a01b03811615610a17576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000908152603f6020526040902054610a87611471565b11610aa45760405162461bcd60e51b815260040161077b90612064565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054610af29183906117ea565b336000818152603b602052604090819020929092558154915163a9059cbb60e01b81526001600160a01b039092169163a9059cbb91610b35918590600401611da8565b602060405180830381600087803b158015610b4f57600080fd5b505af1158015610b63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b879190611cba565b610ba35760405162461bcd60e51b815260040161077b9061209b565b50565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610bec5760405162461bcd60e51b815260040161077b90612101565b6033548110610c0d5760405162461bcd60e51b815260040161077b90612020565b603a55565b333014610c315760405162461bcd60e51b815260040161077b90612101565b603755565b60425481565b336000908152603c60205260409020546001600160a01b031680610c725760405162461bcd60e51b815260040161077b9061227d565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b333014610ce25760405162461bcd60e51b815260040161077b90612101565b603455565b603b6020526000908152604090205481565b604155565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b610ba33382611816565b604080546001600160a01b0319166001600160a01b0392909216919091179055565b60005b8351811015610de857336001600160a01b0316603c6000868481518110610d7d57fe5b6020908102919091018101516001600160a01b03908116835290820192909252604001600020541614610dc25760405162461bcd60e51b815260040161077b906122c7565b610de0848281518110610dd157fe5b60200260200101518484611240565b600101610d5a565b50336000908152603b602052604090205415610e0957610e09338383611240565b505050565b333014610e2d5760405162461bcd60e51b815260040161077b90612101565b603955565b600054610100900460ff1680610e4b5750610e4b6118fb565b80610e59575060005460ff16155b610e755760405162461bcd60e51b815260040161077b906121e9565b600054610100900460ff16158015610ea0576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff199094169390931716919091179055611060611901565b8015610794576000805461ff00191690555050565b60395481565b60375481565b600061108e33848461149c565b90505b92915050565b603d546000190190565b6110a96119c7565b603d83815481106110b657fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146111325760405162461bcd60e51b815260040161077b90612101565b603355565b3330146111565760405162461bcd60e51b815260040161077b90612101565b603855565b33301461117a5760405162461bcd60e51b815260040161077b90612101565b603655565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf906111bb90899030908a908a908a908a908a90600401611e2b565b600060405180830381600087803b1580156111d557600080fd5b505af11580156111e9573d6000803e3d6000fd5b505050506111f78686611816565b505050505050565b6103e76042556040517fc22c84ebcf25b30190d2b53474def7b552efd2018ef8acaf6bed1b67e8d2be7c90611235908390612323565b60405180910390a150565b600161124b836107b6565b600681111561125657fe5b146112735760405162461bcd60e51b815260040161077b90611f45565b6000603d838154811061128257fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b9094529190942054929450101590806112e15760405162461bcd60e51b815260040161077b9061216f565b825460ff1615611330578254610100900460ff1615611317576001830154600485015461130d91611942565b6004850155611330565b6001830154600585015461132a91611942565b60058501555b841561134f5760048401546113459082611477565b6004850155611364565b600584015461135e9082611477565b60058501555b6006840154610100900460ff161580156113945750603954611392611387611471565b600387015490611942565b105b156113d85760058401546004850154111582151581146113d65760068501805461ff001916610100179055603a5460038601546113d091611477565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a546003870154611423938b9361141e9391926108a992839190611477565b611984565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b5846040516114609190612323565b60405180910390a450505050505050565b60415490565b60008282018381101561108e5760405162461bcd60e51b815260040161077b90611fe9565b6001600160a01b0383166000908152603b60205260408120546036548110156114d75760405162461bcd60e51b815260040161077b90611f8c565b6114e0846119c1565b6114fc5760405162461bcd60e51b815260040161077b906121a6565b6001600160a01b0385166000908152603e6020526040902054801561156e576000611526826107b6565b9050600181600681111561153657fe5b141580156115505750600081600681111561154d57fe5b14155b61156c5760405162461bcd60e51b815260040161077b90611eca565b505b600061157e6037546108a9611471565b905060006115976038548361147790919063ffffffff16565b90506115a16119e7565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff19909316929092179490941617905590611753611097565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350611795928d9261141e9290916108a9919082908a90611477565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516117d59493929190611e6c565b60405180910390a39998505050505050505050565b6000818484111561180e5760405162461bcd60e51b815260040161077b9190611eb7565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd9061184a90859030908690600401611dc1565b602060405180830381600087803b15801561186457600080fd5b505af1158015611878573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061189c9190611cba565b6118b85760405162461bcd60e51b815260040161077b906120ca565b6001600160a01b0382166000908152603b60205260409020546118db9082611477565b6001600160a01b039092166000908152603b602052604090209190915550565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b600061108e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506117ea565b6001600160a01b0382166000908152603f6020526040902054811115610794576001600160a01b03919091166000908152603f6020526040902055565b3b151590565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b038116811461109157600080fd5b803561109181612368565b600082601f830112611a74578081fd5b813567ffffffffffffffff811115611a8a578182fd5b611a9d601f8201601f191660200161232c565b9150808252836020828501011115611ab457600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611ade578081fd5b61108e8383611a42565b600080600060608486031215611afc578182fd5b8335611b0781612353565b92506020840135611b1781612353565b9150604084013567ffffffffffffffff811115611b32578182fd5b611b3e86828701611a64565b9150509250925092565b60008060408385031215611b5a578182fd5b8235611b6581612353565b9150602083013567ffffffffffffffff811115611b80578182fd5b611b8c85828601611a64565b9150509250929050565b60008060008060008060c08789031215611bae578182fd5b611bb88888611a42565b95506020870135945060408701359350606087013560ff81168114611bdb578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215611c09578283fd5b833567ffffffffffffffff80821115611c20578485fd5b818601915086601f830112611c33578485fd5b813581811115611c41578586fd5b60209150818102611c5383820161232c565b8281528381019085850183870186018c1015611c6d57898afd5b8996505b84871015611c9757611c838c82611a42565b835260019690960195918501918501611c71565b5097505050508501359250611cb190508560408601611a59565b90509250925092565b600060208284031215611ccb578081fd5b815161108e81612368565b600060208284031215611ce7578081fd5b5035919050565b60008060408385031215611d00578182fd5b82359150611d118460208501611a42565b90509250929050565b60008060408385031215611d2c578182fd5b823591506020830135611d3e81612368565b809150509250929050565b60008151808452815b81811015611d6e57602081850181015186830182015201611d52565b81811115611d7f5782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152611e996080830184611d49565b9695505050505050565b6020810160078310611eb157fe5b91905290565b60006020825261108e6020830184611d49565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b6020808252601590820152741513d4938e881d1c985b9cd9995c8819985a5b1959605a1b604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561234b57600080fd5b604052919050565b6001600160a01b0381168114610ba357600080fd5b8015158114610ba357600080fdfea264697066735822122077147b2d24ffd383c4a2d0eb254eb72ba4274421278e284354c4848ff7c9df0164736f6c634300060c0033";class Mi extends Ka{constructor(...e){e.length>1?super(...e):super(wi,vi,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(wi)}static connect(e,t){return new $a(e,wi,t)}}Mi.bytecode=vi,Mi.abi=wi;const _i=[{inputs:[{internalType:"address",name:"_newLogic",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"newLogic",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],xi="0x60a060405234801561001057600080fd5b506040516101da3803806101da83398101604081905261002f91610044565b60601b6001600160601b031916608052610072565b600060208284031215610055578081fd5b81516001600160a01b038116811461006b578182fd5b9392505050565b60805160601c610148610092600039806065528060a252506101486000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806305ccb23e1461003b578063373058b814610059575b600080fd5b610043610063565b60405161005091906100fe565b60405180910390f35b610061610087565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b604051631b2ce7f360e11b81523090633659cfe6906100ca907f0000000000000000000000000000000000000000000000000000000000000000906004016100fe565b600060405180830381600087803b1580156100e457600080fd5b505af11580156100f8573d6000803e3d6000fd5b50505050565b6001600160a01b039190911681526020019056fea26469706673582212207d2c2c988cd8f64fa7efb7ef33cfeee3b01f81a501e4a71ae8a63d6a5e269eb664736f6c634300060c0033";class Ii extends Ka{constructor(...e){e.length>1?super(...e):super(_i,xi,e[0])}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}deploy(e,t){return super.deploy(e,t||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(_i)}static connect(e,t){return new $a(e,_i,t)}}Ii.bytecode=xi,Ii.abi=_i;var Ei=Object.freeze({__proto__:null,IProxy__factory:gi,NewImplementation__factory:Mi,ProposalUpgrade__factory:Ii});const Ri=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"time_",type:"uint256"}],name:"setTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"torna",type:"address"}],name:"setTorn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"time",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi="0x6080604052426041553480156200001557600080fd5b50600054610100900460ff168062000032575062000032620000cd565b8062000041575060005460ff16155b620000695760405162461bcd60e51b8152600401620000609062000114565b60405180910390fd5b600054610100900460ff1615801562000095576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000b3620000d3565b8015620000c6576000805461ff00191690555b5062000162565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6125c980620001726000396000f3fe6080604052600436106102305760003560e01c8063a0a2b5731161012e578063ce25d71c116100ab578063e4917d9f1161006f578063e4917d9f14610644578063ea0217cf14610664578063ece40cc114610684578063f0b76892146106a4578063fe0d94c1146106c457610230565b8063ce25d71c146105b8578063d6159fe5146105cd578063d6f0948c146105e2578063da35c66414610602578063e23a9a521461061757610230565b8063b54426c8116100f2578063b54426c814610518578063b5f6a74314610538578063b859f11b14610558578063c0c0e82014610578578063c4d66de81461059857610230565b8063a0a2b57314610499578063a6c26603146104b9578063a72edda3146104ce578063adf898a4146104ee578063b1610d7e1461050357610230565b80635c19a95c116101bc5780636dc2dc6c116101805780636dc2dc6c1461040457806370b0f6601461042457806392ab89bb146104445780639a9e3b6e146104595780639ae697bf1461047957610230565b80635c19a95c1461036d5780636198e3391461038d57806365da1264146103ad578063671dd275146103da5780636a661755146103ef57610230565b806317977c611161020357806317977c61146102d657806337f135d7146102f65780633e4f49e61461030b578063587a6ecb1461033857806358e9fff01461034d57610230565b8063013cf08b1461023557806302ec8f9e1461027257806315373e3d1461029457806316ada547146102b4575b600080fd5b34801561024157600080fd5b50610255610250366004611e01565b6106d7565b604051610269989796959493929190611f0d565b60405180910390f35b34801561027e57600080fd5b5061029261028d366004611e01565b61073c565b005b3480156102a057600080fd5b506102926102af366004611e45565b610769565b3480156102c057600080fd5b506102c9610778565b6040516102699190612510565b3480156102e257600080fd5b506102c96102f1366004611bf8565b61077e565b34801561030257600080fd5b506102c9610790565b34801561031757600080fd5b5061032b610326366004611e01565b610796565b6040516102699190611fcb565b34801561034457600080fd5b506102c96108d9565b34801561035957600080fd5b506102c9610368366004611c13565b6108df565b34801561037957600080fd5b50610292610388366004611bf8565b61092d565b34801561039957600080fd5b506102926103a8366004611e01565b610a4f565b3480156103b957600080fd5b506103cd6103c8366004611bf8565b610b86565b6040516102699190611ebc565b3480156103e657600080fd5b506102c9610ba1565b3480156103fb57600080fd5b506102c9610ba7565b34801561041057600080fd5b5061029261041f366004611e01565b610bad565b34801561043057600080fd5b5061029261043f366004611e01565b610bf2565b34801561045057600080fd5b50610292610c16565b34801561046557600080fd5b50610292610474366004611e01565b610c9d565b34801561048557600080fd5b506102c9610494366004611bf8565b610cc1565b3480156104a557600080fd5b506102926104b4366004611e01565b610cd3565b3480156104c557600080fd5b506102c9610cd8565b3480156104da57600080fd5b506102c96104e9366004611bf8565b610cde565b3480156104fa57600080fd5b506103cd610cf0565b34801561050f57600080fd5b506102c9610cff565b34801561052457600080fd5b50610292610533366004611e01565b610d05565b34801561054457600080fd5b50610292610553366004611bf8565b610d0f565b34801561056457600080fd5b50610292610573366004611d20565b610d31565b34801561058457600080fd5b50610292610593366004611e01565b610de8565b3480156105a457600080fd5b506102926105b3366004611bf8565b610e0c565b3480156105c457600080fd5b506102c961104f565b3480156105d957600080fd5b506102c9611055565b3480156105ee57600080fd5b506102c96105fd366004611c73565b61105b565b34801561060e57600080fd5b506102c9611071565b34801561062357600080fd5b50610637610632366004611e19565b61107b565b60405161026991906124eb565b34801561065057600080fd5b5061029261065f366004611e01565b6110ed565b34801561067057600080fd5b5061029261067f366004611e01565b611111565b34801561069057600080fd5b5061029261069f366004611e01565b611135565b3480156106b057600080fd5b506102926106bf366004611cc1565b611159565b6102926106d2366004611e01565b6111d9565b603d81815481106106e457fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b3330146107645760405162461bcd60e51b815260040161075b906122b7565b60405180910390fd5b603555565b61077433838361136b565b5050565b60415481565b603e6020526000908152604090205481565b60335481565b60006107a0611071565b82111580156107af5750600082115b6107cb5760405162461bcd60e51b815260040161075b906123ed565b6000603d83815481106107da57fe5b9060005260206000209060080201905080600201546107f761159c565b116108065760009150506108d4565b806003015461081361159c565b116108225760019150506108d4565b8060050154816004015411158061084457506035548160050154826004015401105b156108535760029150506108d4565b600681015460ff161561086a5760059150506108d4565b61088f60345461088960335484600301546115a290919063ffffffff16565b906115a2565b61089761159c565b106108a65760069150506108d4565b60335460038201546108b7916115a2565b6108bf61159c565b106108ce5760049150506108d4565b60039150505b919050565b603a5481565b6001600160a01b038381166000908152603c6020526040812054909116331461091a5760405162461bcd60e51b815260040161075b9061247d565b6109258484846115c7565b949350505050565b336000818152603c60205260409020546001600160a01b03908116919083161480159061096357506001600160a01b0382163014155b801561097757506001600160a01b03821615155b80156109955750806001600160a01b0316826001600160a01b031614155b6109b15760405162461bcd60e51b815260040161075b906122ee565b6001600160a01b038116156109f7576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000908152603f6020526040902054610a6761159c565b11610a845760405162461bcd60e51b815260040161075b9061221a565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054610ad2918390611915565b336000818152603b602052604090819020929092558154915163a9059cbb60e01b81526001600160a01b039092169163a9059cbb91610b15918590600401611ed0565b602060405180830381600087803b158015610b2f57600080fd5b505af1158015610b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b679190611de5565b610b835760405162461bcd60e51b815260040161075b90612251565b50565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610bcc5760405162461bcd60e51b815260040161075b906122b7565b6033548110610bed5760405162461bcd60e51b815260040161075b906121d6565b603a55565b333014610c115760405162461bcd60e51b815260040161075b906122b7565b603755565b336000908152603c60205260409020546001600160a01b031680610c4c5760405162461bcd60e51b815260040161075b90612433565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b333014610cbc5760405162461bcd60e51b815260040161075b906122b7565b603455565b603b6020526000908152604090205481565b604155565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b610b833382611941565b604080546001600160a01b0319166001600160a01b0392909216919091179055565b60005b8351811015610dc257336001600160a01b0316603c6000868481518110610d5757fe5b6020908102919091018101516001600160a01b03908116835290820192909252604001600020541614610d9c5760405162461bcd60e51b815260040161075b9061247d565b610dba848281518110610dab57fe5b6020026020010151848461136b565b600101610d34565b50336000908152603b602052604090205415610de357610de333838361136b565b505050565b333014610e075760405162461bcd60e51b815260040161075b906122b7565b603955565b600054610100900460ff1680610e255750610e25611a26565b80610e33575060005460ff16155b610e4f5760405162461bcd60e51b815260040161075b9061239f565b600054610100900460ff16158015610e7a576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff19909416939093171691909117905561103a611a2c565b8015610774576000805461ff00191690555050565b60395481565b60375481565b60006110683384846115c7565b90505b92915050565b603d546000190190565b611083611af2565b603d838154811061109057fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b33301461110c5760405162461bcd60e51b815260040161075b906122b7565b603355565b3330146111305760405162461bcd60e51b815260040161075b906122b7565b603855565b3330146111545760405162461bcd60e51b815260040161075b906122b7565b603655565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf9061119590899030908a908a908a908a908a90600401611f53565b600060405180830381600087803b1580156111af57600080fd5b505af11580156111c3573d6000803e3d6000fd5b505050506111d18686611941565b505050505050565b60046111e482610796565b60068111156111ef57fe5b1461120c5760405162461bcd60e51b815260040161075b90612035565b6000603d828154811061121b57fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b031661125681611a6d565b6112725760405162461bcd60e51b815260040161075b90611ff2565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b038516916112b691611ea0565b600060405180830381855af49150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b50915091508161133957805115611321578060405162461bcd60e51b815260040161075b9190611fdf565b60405162461bcd60e51b815260040161075b906124b4565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b600161137683610796565b600681111561138157fe5b1461139e5760405162461bcd60e51b815260040161075b906120fb565b6000603d83815481106113ad57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b90945291909420549294501015908061140c5760405162461bcd60e51b815260040161075b90612325565b825460ff161561145b578254610100900460ff1615611442576001830154600485015461143891611a73565b600485015561145b565b6001830154600585015461145591611a73565b60058501555b841561147a57600484015461147090826115a2565b600485015561148f565b600584015461148990826115a2565b60058501555b6006840154610100900460ff161580156114bf57506039546114bd6114b261159c565b600387015490611a73565b105b156115035760058401546004850154111582151581146115015760068501805461ff001916610100179055603a5460038601546114fb916115a2565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a54600387015461154e938b93611549939192610889928391906115a2565b611ab5565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b58460405161158b9190612510565b60405180910390a450505050505050565b60415490565b6000828201838110156110685760405162461bcd60e51b815260040161075b9061219f565b6001600160a01b0383166000908152603b60205260408120546036548110156116025760405162461bcd60e51b815260040161075b90612142565b61160b84611a6d565b6116275760405162461bcd60e51b815260040161075b9061235c565b6001600160a01b0385166000908152603e6020526040902054801561169957600061165182610796565b9050600181600681111561166157fe5b1415801561167b5750600081600681111561167857fe5b14155b6116975760405162461bcd60e51b815260040161075b90612080565b505b60006116a960375461088961159c565b905060006116c2603854836115a290919063ffffffff16565b90506116cc611b12565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff1990931692909217949094161790559061187e611071565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a549293506118c0928d92611549929091610889919082908a906115a2565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516119009493929190611f94565b60405180910390a39998505050505050505050565b600081848411156119395760405162461bcd60e51b815260040161075b9190611fdf565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd9061197590859030908690600401611ee9565b602060405180830381600087803b15801561198f57600080fd5b505af11580156119a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c79190611de5565b6119e35760405162461bcd60e51b815260040161075b90612280565b6001600160a01b0382166000908152603b6020526040902054611a0690826115a2565b6001600160a01b039092166000908152603b602052604090209190915550565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b3b151590565b600061106883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611915565b6001600160a01b0382166000908152603f6020526040902054811115610774576001600160a01b03919091166000908152603f6020526040902055565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b038116811461106b57600080fd5b803561106b81612585565b600082601f830112611b9f578081fd5b813567ffffffffffffffff811115611bb5578182fd5b611bc8601f8201601f1916602001612519565b9150808252836020828501011115611bdf57600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611c09578081fd5b6110688383611b6d565b600080600060608486031215611c27578182fd5b8335611c3281612570565b92506020840135611c4281612570565b9150604084013567ffffffffffffffff811115611c5d578182fd5b611c6986828701611b8f565b9150509250925092565b60008060408385031215611c85578182fd5b8235611c9081612570565b9150602083013567ffffffffffffffff811115611cab578182fd5b611cb785828601611b8f565b9150509250929050565b60008060008060008060c08789031215611cd9578182fd5b611ce38888611b6d565b95506020870135945060408701359350606087013560ff81168114611d06578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215611d34578283fd5b833567ffffffffffffffff80821115611d4b578485fd5b818601915086601f830112611d5e578485fd5b813581811115611d6c578586fd5b60209150818102611d7e838201612519565b8281528381019085850183870186018c1015611d9857898afd5b8996505b84871015611dc257611dae8c82611b6d565b835260019690960195918501918501611d9c565b5097505050508501359250611ddc90508560408601611b84565b90509250925092565b600060208284031215611df6578081fd5b815161106881612585565b600060208284031215611e12578081fd5b5035919050565b60008060408385031215611e2b578182fd5b82359150611e3c8460208501611b6d565b90509250929050565b60008060408385031215611e57578182fd5b823591506020830135611e6981612585565b809150509250929050565b60008151808452611e8c816020860160208601612540565b601f01601f19169290920160200192915050565b60008251611eb2818460208701612540565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152611fc16080830184611e74565b9695505050505050565b6020810160078310611fd957fe5b91905290565b6000602082526110686020830184611e74565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b6020808252601590820152741513d4938e881d1c985b9cd9995c8819985a5b1959605a1b604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561253857600080fd5b604052919050565b60005b8381101561255b578181015183820152602001612543565b8381111561256a576000848401525b50505050565b6001600160a01b0381168114610b8357600080fd5b8015158114610b8357600080fdfea264697066735822122079a24ea0dc3d5ef34041a37a137cef69305763e031faa841e2db8f078345f2af64736f6c634300060c0033";class ki extends Ka{constructor(...e){e.length>1?super(...e):super(Ri,Oi,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ri)}static connect(e,t){return new $a(e,Ri,t)}}ki.bytecode=Oi,ki.abi=Ri;const Pi=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"output",type:"address"}],name:"Debug",type:"event"},{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"}],Ai="0x608060405234801561001057600080fd5b506103d5806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063373058b814610030575b600080fd5b61003861003a565b005b6000604051610048906100fa565b604051809103906000f080158015610064573d6000803e3d6000fd5b509050806001600160a01b0316638129fc1c6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156100a257600080fd5b505af11580156100b6573d6000803e3d6000fd5b5050604080516001600160a01b038516815290517f330da4cde831ccab151372275307c2f0cce2bcce846635cd66e6908f10d203639350908190036020019150a150565b610298806101088339019056fe608060405234801561001057600080fd5b50610278806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80631f1bd692146100465780633fa4f245146100c35780638129fc1c146100dd575b600080fd5b61004e6100e7565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100cb610174565b60408051918252519081900360200190f35b6100e561017a565b005b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561016c5780601f106101415761010080835404028352916020019161016c565b820191906000526020600020905b81548152906001019060200180831161014f57829003601f168201915b505050505081565b60005481565b600160008190556040805180820190915260058082526464756d6d7960d81b60209092019182526101ac9291906101af565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101f057805160ff191683800117855561021d565b8280016001018555821561021d579182015b8281111561021d578251825591602001919060010190610202565b5061022992915061022d565b5090565b5b80821115610229576000815560010161022e56fea26469706673582212204b4d54284aeff9c7c570415da4a9efb9bf7115fe94a322210f9981c1c7ae107a64736f6c634300060c0033a26469706673582212205967b156db23a5fd2372953049f5c366f68a9f95cfa116f9fbd6d0c8e7bdaa6364736f6c634300060c0033";class Ci extends Ka{constructor(...e){e.length>1?super(...e):super(Pi,Ai,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Pi)}static connect(e,t){return new $a(e,Pi,t)}}Ci.bytecode=Ai,Ci.abi=Pi;var Ni=Object.freeze({__proto__:null,MockGovernance__factory:ki,Proposal__factory:Ci,dummySol:pi,proposalStateChangeGovernanceSol:Ti,proposalUpgradeSol:Ei});const Di=[{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"}],Si="0x608060405234801561001057600080fd5b50610563806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063a6c2660311610097578063d6159fe511610066578063d6159fe5146101e2578063e4917d9f146101ea578063ea0217cf14610207578063ece40cc11461022457610100565b8063a6c26603146101ad578063b1610d7e146101b5578063c0c0e820146101bd578063ce25d71c146101da57610100565b80636a661755116100d35780636a6617551461014e5780636dc2dc6c1461015657806370b0f660146101735780639a9e3b6e1461019057610100565b806302ec8f9e1461010557806337f135d714610124578063587a6ecb1461013e578063671dd27514610146575b600080fd5b6101226004803603602081101561011b57600080fd5b5035610241565b005b61012c610288565b60408051918252519081900360200190f35b61012c61028e565b61012c610294565b61012c61029a565b6101226004803603602081101561016c57600080fd5b50356102a0565b6101226004803603602081101561018957600080fd5b5035610327565b610122600480360360208110156101a657600080fd5b503561036e565b61012c6103b5565b61012c6103bb565b610122600480360360208110156101d357600080fd5b50356103c1565b61012c610408565b61012c61040e565b6101226004803603602081101561020057600080fd5b5035610414565b6101226004803603602081101561021d57600080fd5b503561045b565b6101226004803603602081101561023a57600080fd5b50356104a2565b333014610283576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600255565b60005481565b60075481565b60025481565b60015481565b3330146102e2576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b60005481106103225760405162461bcd60e51b81526004018080602001828103825260248152602001806104ea6024913960400191505060405180910390fd5b600755565b333014610369576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600455565b3330146103b0576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600155565b60035481565b60055481565b333014610403576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600655565b60065481565b60045481565b333014610456576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600055565b33301461049d576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600555565b3330146104e4576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b60035556fe476f7665726e616e63653a20696e636f727265637420766f7465457874656e6454696d65476f7665726e616e63653a20756e617574686f72697a65640000000000000000a26469706673582212208fff4d62d622acc801ece8b6a7cc281f67f5959bf09e0ca68afde2a0ab0bc83164736f6c634300060c0033";class Ui extends Ka{constructor(...e){e.length>1?super(...e):super(Di,Si,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Di)}static connect(e,t){return new $a(e,Di,t)}}Ui.bytecode=Si,Ui.abi=Di;const Vi=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}];class Li{static createInterface(){return new ba(Vi)}static connect(e,t){return new $a(e,Vi,t)}}Li.abi=Vi;const Fi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"}];class Gi{static createInterface(){return new ba(Fi)}static connect(e,t){return new $a(e,Fi,t)}}Gi.abi=Fi;const Bi=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],ji="0x60806040523480156200001157600080fd5b50600054610100900460ff16806200002e57506200002e620000c9565b806200003d575060005460ff16155b620000655760405162461bcd60e51b81526004016200005c9062000110565b60405180910390fd5b600054610100900460ff1615801562000091576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000af620000cf565b8015620000c2576000805461ff00191690555b506200015e565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b612524806200016e6000396000f3fe60806040526004361061020f5760003560e01c8063a6c2660311610118578063d6159fe5116100a0578063e4917d9f1161006f578063e4917d9f146105ce578063ea0217cf146105ee578063ece40cc11461060e578063f0b768921461062e578063fe0d94c11461064e5761020f565b8063d6159fe514610557578063d6f0948c1461056c578063da35c6641461058c578063e23a9a52146105a15761020f565b8063b54426c8116100e7578063b54426c8146104c2578063b859f11b146104e2578063c0c0e82014610502578063c4d66de814610522578063ce25d71c146105425761020f565b8063a6c2660314610463578063a72edda314610478578063adf898a414610498578063b1610d7e146104ad5761020f565b80636198e3391161019b5780636dc2dc6c1161016a5780636dc2dc6c146103ce57806370b0f660146103ee57806392ab89bb1461040e5780639a9e3b6e146104235780639ae697bf146104435761020f565b80636198e3391461035757806365da126414610377578063671dd275146103a45780636a661755146103b95761020f565b806337f135d7116101e257806337f135d7146102c05780633e4f49e6146102d5578063587a6ecb1461030257806358e9fff0146103175780635c19a95c146103375761020f565b8063013cf08b1461021457806302ec8f9e1461025157806315373e3d1461027357806317977c6114610293575b600080fd5b34801561022057600080fd5b5061023461022f366004611d5c565b610661565b604051610248989796959493929190611e68565b60405180910390f35b34801561025d57600080fd5b5061027161026c366004611d5c565b6106c6565b005b34801561027f57600080fd5b5061027161028e366004611da0565b6106f3565b34801561029f57600080fd5b506102b36102ae366004611b53565b610702565b604051610248919061246b565b3480156102cc57600080fd5b506102b3610714565b3480156102e157600080fd5b506102f56102f0366004611d5c565b61071a565b6040516102489190611f26565b34801561030e57600080fd5b506102b361085d565b34801561032357600080fd5b506102b3610332366004611b6e565b610863565b34801561034357600080fd5b50610271610352366004611b53565b6108b1565b34801561036357600080fd5b50610271610372366004611d5c565b6109d3565b34801561038357600080fd5b50610397610392366004611b53565b610b0a565b6040516102489190611e17565b3480156103b057600080fd5b506102b3610b25565b3480156103c557600080fd5b506102b3610b2b565b3480156103da57600080fd5b506102716103e9366004611d5c565b610b31565b3480156103fa57600080fd5b50610271610409366004611d5c565b610b76565b34801561041a57600080fd5b50610271610b9a565b34801561042f57600080fd5b5061027161043e366004611d5c565b610c21565b34801561044f57600080fd5b506102b361045e366004611b53565b610c45565b34801561046f57600080fd5b506102b3610c57565b34801561048457600080fd5b506102b3610493366004611b53565b610c5d565b3480156104a457600080fd5b50610397610c6f565b3480156104b957600080fd5b506102b3610c7e565b3480156104ce57600080fd5b506102716104dd366004611d5c565b610c84565b3480156104ee57600080fd5b506102716104fd366004611c7b565b610c8e565b34801561050e57600080fd5b5061027161051d366004611d5c565b610d45565b34801561052e57600080fd5b5061027161053d366004611b53565b610d69565b34801561054e57600080fd5b506102b3610fac565b34801561056357600080fd5b506102b3610fb2565b34801561057857600080fd5b506102b3610587366004611bce565b610fb8565b34801561059857600080fd5b506102b3610fce565b3480156105ad57600080fd5b506105c16105bc366004611d74565b610fd8565b6040516102489190612446565b3480156105da57600080fd5b506102716105e9366004611d5c565b61104a565b3480156105fa57600080fd5b50610271610609366004611d5c565b61106e565b34801561061a57600080fd5b50610271610629366004611d5c565b611092565b34801561063a57600080fd5b50610271610649366004611c1c565b6110b6565b61027161065c366004611d5c565b611136565b603d818154811061066e57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b3330146106ee5760405162461bcd60e51b81526004016106e590612212565b60405180910390fd5b603555565b6106fe3383836112c8565b5050565b603e6020526000908152604090205481565b60335481565b6000610724610fce565b82111580156107335750600082115b61074f5760405162461bcd60e51b81526004016106e590612348565b6000603d838154811061075e57fe5b90600052602060002090600802019050806002015461077b6114f9565b1161078a576000915050610858565b80600301546107976114f9565b116107a6576001915050610858565b806005015481600401541115806107c857506035548160050154826004015401105b156107d7576002915050610858565b600681015460ff16156107ee576005915050610858565b61081360345461080d60335484600301546114fd90919063ffffffff16565b906114fd565b61081b6114f9565b1061082a576006915050610858565b603354600382015461083b916114fd565b6108436114f9565b10610852576004915050610858565b60039150505b919050565b603a5481565b6001600160a01b038381166000908152603c6020526040812054909116331461089e5760405162461bcd60e51b81526004016106e5906123d8565b6108a9848484611522565b949350505050565b336000818152603c60205260409020546001600160a01b0390811691908316148015906108e757506001600160a01b0382163014155b80156108fb57506001600160a01b03821615155b80156109195750806001600160a01b0316826001600160a01b031614155b6109355760405162461bcd60e51b81526004016106e590612249565b6001600160a01b0381161561097b576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000908152603f60205260409020546109eb6114f9565b11610a085760405162461bcd60e51b81526004016106e590612175565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054610a56918390611870565b336000818152603b602052604090819020929092558154915163a9059cbb60e01b81526001600160a01b039092169163a9059cbb91610a99918590600401611e2b565b602060405180830381600087803b158015610ab357600080fd5b505af1158015610ac7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aeb9190611d40565b610b075760405162461bcd60e51b81526004016106e5906121ac565b50565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610b505760405162461bcd60e51b81526004016106e590612212565b6033548110610b715760405162461bcd60e51b81526004016106e590612131565b603a55565b333014610b955760405162461bcd60e51b81526004016106e590612212565b603755565b336000908152603c60205260409020546001600160a01b031680610bd05760405162461bcd60e51b81526004016106e59061238e565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b333014610c405760405162461bcd60e51b81526004016106e590612212565b603455565b603b6020526000908152604090205481565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b610b07338261189c565b60005b8351811015610d1f57336001600160a01b0316603c6000868481518110610cb457fe5b6020908102919091018101516001600160a01b03908116835290820192909252604001600020541614610cf95760405162461bcd60e51b81526004016106e5906123d8565b610d17848281518110610d0857fe5b602002602001015184846112c8565b600101610c91565b50336000908152603b602052604090205415610d4057610d403383836112c8565b505050565b333014610d645760405162461bcd60e51b81526004016106e590612212565b603955565b600054610100900460ff1680610d825750610d82611981565b80610d90575060005460ff16155b610dac5760405162461bcd60e51b81526004016106e5906122fa565b600054610100900460ff16158015610dd7576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff199094169390931716919091179055610f97611987565b80156106fe576000805461ff00191690555050565b60395481565b60375481565b6000610fc5338484611522565b90505b92915050565b603d546000190190565b610fe0611a4d565b603d8381548110610fed57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146110695760405162461bcd60e51b81526004016106e590612212565b603355565b33301461108d5760405162461bcd60e51b81526004016106e590612212565b603855565b3330146110b15760405162461bcd60e51b81526004016106e590612212565b603655565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf906110f290899030908a908a908a908a908a90600401611eae565b600060405180830381600087803b15801561110c57600080fd5b505af1158015611120573d6000803e3d6000fd5b5050505061112e868661189c565b505050505050565b60046111418261071a565b600681111561114c57fe5b146111695760405162461bcd60e51b81526004016106e590611f90565b6000603d828154811061117857fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b03166111b3816119c8565b6111cf5760405162461bcd60e51b81526004016106e590611f4d565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161121391611dfb565b600060405180830381855af49150503d806000811461124e576040519150601f19603f3d011682016040523d82523d6000602084013e611253565b606091505b5091509150816112965780511561127e578060405162461bcd60e51b81526004016106e59190611f3a565b60405162461bcd60e51b81526004016106e59061240f565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b60016112d38361071a565b60068111156112de57fe5b146112fb5760405162461bcd60e51b81526004016106e590612056565b6000603d838154811061130a57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b9094529190942054929450101590806113695760405162461bcd60e51b81526004016106e590612280565b825460ff16156113b8578254610100900460ff161561139f5760018301546004850154611395916119ce565b60048501556113b8565b600183015460058501546113b2916119ce565b60058501555b84156113d75760048401546113cd90826114fd565b60048501556113ec565b60058401546113e690826114fd565b60058501555b6006840154610100900460ff1615801561141c575060395461141a61140f6114f9565b6003870154906119ce565b105b1561146057600584015460048501541115821515811461145e5760068501805461ff001916610100179055603a546003860154611458916114fd565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a5460038701546114ab938b936114a693919261080d928391906114fd565b611a10565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b5846040516114e8919061246b565b60405180910390a450505050505050565b4290565b600082820183811015610fc55760405162461bcd60e51b81526004016106e5906120fa565b6001600160a01b0383166000908152603b602052604081205460365481101561155d5760405162461bcd60e51b81526004016106e59061209d565b611566846119c8565b6115825760405162461bcd60e51b81526004016106e5906122b7565b6001600160a01b0385166000908152603e602052604090205480156115f45760006115ac8261071a565b905060018160068111156115bc57fe5b141580156115d6575060008160068111156115d357fe5b14155b6115f25760405162461bcd60e51b81526004016106e590611fdb565b505b600061160460375461080d6114f9565b9050600061161d603854836114fd90919063ffffffff16565b9050611627611a6d565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff199093169290921794909416179055906117d9610fce565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a5492935061181b928d926114a692909161080d919082908a906114fd565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d60405161185b9493929190611eef565b60405180910390a39998505050505050505050565b600081848411156118945760405162461bcd60e51b81526004016106e59190611f3a565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd906118d090859030908690600401611e44565b602060405180830381600087803b1580156118ea57600080fd5b505af11580156118fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119229190611d40565b61193e5760405162461bcd60e51b81526004016106e5906121db565b6001600160a01b0382166000908152603b602052604090205461196190826114fd565b6001600160a01b039092166000908152603b602052604090209190915550565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b3b151590565b6000610fc583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611870565b6001600160a01b0382166000908152603f60205260409020548111156106fe576001600160a01b03919091166000908152603f6020526040902055565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b0381168114610fc857600080fd5b8035610fc8816124e0565b600082601f830112611afa578081fd5b813567ffffffffffffffff811115611b10578182fd5b611b23601f8201601f1916602001612474565b9150808252836020828501011115611b3a57600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611b64578081fd5b610fc58383611ac8565b600080600060608486031215611b82578182fd5b8335611b8d816124cb565b92506020840135611b9d816124cb565b9150604084013567ffffffffffffffff811115611bb8578182fd5b611bc486828701611aea565b9150509250925092565b60008060408385031215611be0578182fd5b8235611beb816124cb565b9150602083013567ffffffffffffffff811115611c06578182fd5b611c1285828601611aea565b9150509250929050565b60008060008060008060c08789031215611c34578182fd5b611c3e8888611ac8565b95506020870135945060408701359350606087013560ff81168114611c61578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215611c8f578283fd5b833567ffffffffffffffff80821115611ca6578485fd5b818601915086601f830112611cb9578485fd5b813581811115611cc7578586fd5b60209150818102611cd9838201612474565b8281528381019085850183870186018c1015611cf357898afd5b8996505b84871015611d1d57611d098c82611ac8565b835260019690960195918501918501611cf7565b5097505050508501359250611d3790508560408601611adf565b90509250925092565b600060208284031215611d51578081fd5b8151610fc5816124e0565b600060208284031215611d6d578081fd5b5035919050565b60008060408385031215611d86578182fd5b82359150611d978460208501611ac8565b90509250929050565b60008060408385031215611db2578182fd5b823591506020830135611dc4816124e0565b809150509250929050565b60008151808452611de781602086016020860161249b565b601f01601f19169290920160200192915050565b60008251611e0d81846020870161249b565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152611f1c6080830184611dcf565b9695505050505050565b6020810160078310611f3457fe5b91905290565b600060208252610fc56020830184611dcf565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b6020808252601590820152741513d4938e881d1c985b9cd9995c8819985a5b1959605a1b604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561249357600080fd5b604052919050565b60005b838110156124b657818101518382015260200161249e565b838111156124c5576000848401525b50505050565b6001600160a01b0381168114610b0757600080fd5b8015158114610b0757600080fdfea26469706673582212208c8a57d0dd9da76417112ba79eab1d38dbdf5e0a8bc014651f10bebe82ce8f9b64736f6c634300060c0033";class Hi extends Ka{constructor(...e){e.length>1?super(...e):super(Bi,ji,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Bi)}static connect(e,t){return new $a(e,Bi,t)}}Hi.bytecode=ji,Hi.abi=Bi;var zi=Object.freeze({__proto__:null,Configuration__factory:Ui,Core__factory:Li,Delegation__factory:Gi,Governance__factory:Hi,mocks:Ni});const $i=[{inputs:[{internalType:"address",name:"_gasCompensationVault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"gasCompensationVault",outputs:[{internalType:"contract IGasCompensationVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_gasCompensationsLimit",type:"uint256"}],name:"setGasCompensations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawFromHelper",outputs:[],stateMutability:"nonpayable",type:"function"}];class Xi{static createInterface(){return new ba($i)}static connect(e,t){return new $a(e,$i,t)}}Xi.abi=$i;const Wi=[{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"gasAmount",type:"uint256"}],name:"compensateGas",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawToGovernance",outputs:[],stateMutability:"nonpayable",type:"function"}];class qi{static createInterface(){return new ba(Wi)}static connect(e,t){return new $a(e,Wi,t)}}qi.abi=Wi;var Ji=Object.freeze({__proto__:null,GasCompensator__factory:Xi,IGasCompensationVault__factory:qi});const Ki=[{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawTorn",outputs:[],stateMutability:"nonpayable",type:"function"}];class Yi{static createInterface(){return new ba(Ki)}static connect(e,t){return new $a(e,Ki,t)}}Yi.abi=Ki;var Zi=Object.freeze({__proto__:null,ITornadoVault__factory:Yi});const Qi=[{inputs:[{internalType:"address",name:"_gasCompLogic",type:"address"},{internalType:"address",name:"_userVault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"checkIfQuorumReached",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"gasCompensationVault",outputs:[{internalType:"contract IGasCompensationVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"account",type:"address"}],name:"hasAccountVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"returnMultisigAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"gasCompensationsLimit",type:"uint256"}],name:"setGasCompensations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawFromHelper",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],es="0x60c06040523480156200001157600080fd5b5060405162002e3138038062002e31833981016040819052620000349162000153565b60005482908290610100900460ff1680620000545750620000546200010c565b8062000063575060005460ff16155b6200008b5760405162461bcd60e51b8152600401620000829062000191565b60405180910390fd5b600054610100900460ff16158015620000b7576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000d562000112565b8015620000e8576000805461ff00191690555b506001600160601b0319606091821b811660805291901b1660a05250620001f89050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6000806040838503121562000166578182fd5b82516200017381620001df565b60208401519092506200018681620001df565b809150509250929050565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6001600160a01b0381168114620001f557600080fd5b50565b60805160601c60a05160601c612bf162000240600039806108c55280610e525280610f4a52806114505280611ee1525080610d545280610fb75280611cf75250612bf16000f3fe60806040526004361061026b5760003560e01c80639ae697bf11610144578063d6159fe5116100b6578063e525aa081161007a578063e525aa08146106ff578063ea0217cf1461071f578063ece40cc11461073f578063ef3f8bb11461075f578063f0b768921461077f578063fe0d94c11461079f57610272565b8063d6159fe514610668578063d6f0948c1461067d578063da35c6641461069d578063e23a9a52146106b2578063e4917d9f146106df57610272565b8063b1610d7e11610108578063b1610d7e146105be578063b54426c8146105d3578063b859f11b146105f3578063c0c0e82014610613578063c4d66de814610633578063ce25d71c1461065357610272565b80639ae697bf1461053f5780639daafec71461055f578063a6c2660314610574578063a72edda314610589578063adf898a4146105a957610272565b80635c19a95c116101dd5780636dc2dc6c116101a15780636dc2dc6c1461049557806370b0f660146104b55780638b34a960146104d557806392ab89bb146104ea578063932d5157146104ff5780639a9e3b6e1461051f57610272565b80635c19a95c1461040b5780636198e3391461042b57806365da12641461044b578063671dd2751461046b5780636a6617551461048057610272565b806332687ec11161022f57806332687ec11461034557806337f135d7146103725780633e4f49e61461038757806354fd4d50146103b4578063587a6ecb146103d657806358e9fff0146103eb57610272565b8063013cf08b1461027757806302ec8f9e146102b457806315373e3d146102d657806317977c61146102f657806324b0435f1461032357610272565b3661027257005b600080fd5b34801561028357600080fd5b506102976102923660046123c5565b6107b2565b6040516102ab9897969594939291906124d1565b60405180910390f35b3480156102c057600080fd5b506102d46102cf3660046123c5565b610817565b005b3480156102e257600080fd5b506102d46102f1366004612409565b610844565b34801561030257600080fd5b506103166103113660046121bc565b610947565b6040516102ab9190612b38565b34801561032f57600080fd5b50610338610959565b6040516102ab9190612480565b34801561035157600080fd5b506103656103603660046123c5565b610971565b6040516102ab919061258f565b34801561037e57600080fd5b506103166109bf565b34801561039357600080fd5b506103a76103a23660046123c5565b6109c5565b6040516102ab919061259a565b3480156103c057600080fd5b506103c9610b01565b6040516102ab91906125ae565b3480156103e257600080fd5b50610316610b38565b3480156103f757600080fd5b506103166104063660046121d7565b610b3e565b34801561041757600080fd5b506102d46104263660046121bc565b610b8c565b34801561043757600080fd5b506102d46104463660046123c5565b610cae565b34801561045757600080fd5b506103386104663660046121bc565b610dc0565b34801561047757600080fd5b50610316610ddb565b34801561048c57600080fd5b50610316610de1565b3480156104a157600080fd5b506102d46104b03660046123c5565b610de7565b3480156104c157600080fd5b506102d46104d03660046123c5565b610e2c565b3480156104e157600080fd5b50610338610e50565b3480156104f657600080fd5b506102d4610e74565b34801561050b57600080fd5b506102d461051a3660046123c5565b610efb565b34801561052b57600080fd5b506102d461053a3660046123c5565b610f7f565b34801561054b57600080fd5b5061031661055a3660046121bc565b610fa3565b34801561056b57600080fd5b50610338610fb5565b34801561058057600080fd5b50610316610fd9565b34801561059557600080fd5b506103166105a43660046121bc565b610fdf565b3480156105b557600080fd5b50610338610ff1565b3480156105ca57600080fd5b50610316611000565b3480156105df57600080fd5b506102d46105ee3660046123c5565b611006565b3480156105ff57600080fd5b506102d461060e3660046122e4565b611013565b34801561061f57600080fd5b506102d461062e3660046123c5565b611061565b34801561063f57600080fd5b506102d461064e3660046121bc565b611085565b34801561065f57600080fd5b506103166112c9565b34801561067457600080fd5b506103166112cf565b34801561068957600080fd5b50610316610698366004612237565b6112d5565b3480156106a957600080fd5b506103166112eb565b3480156106be57600080fd5b506106d26106cd3660046123dd565b6112f5565b6040516102ab9190612b13565b3480156106eb57600080fd5b506102d46106fa3660046123c5565b611367565b34801561070b57600080fd5b5061036561071a3660046123dd565b61138b565b34801561072b57600080fd5b506102d461073a3660046123c5565b6113ce565b34801561074b57600080fd5b506102d461075a3660046123c5565b6113f2565b34801561076b57600080fd5b506102d461077a3660046123c5565b611416565b34801561078b57600080fd5b506102d461079a366004612285565b6114a5565b6102d46107ad3660046123c5565b611525565b603d81815481106107bf57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461083f5760405162461bcd60e51b815260040161083690612881565b60405180910390fd5b603555565b3361084f833361138b565b158015610862575061086083610971565b155b333214610870576000610874565b6152085b61ffff1681156109355760005a905061088e3387876116b7565b60006108ab6127106108a5856108a55a87906118e8565b9061192a565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce807906108fc9088908590600401612494565b600060405180830381600087803b15801561091657600080fd5b505af115801561092a573d6000803e3d6000fd5b505050505050610940565b6109403386866116b7565b5050505050565b603e6020526000908152604090205481565b73b04e030140b30c27bcdfaafffa98c57d80eda7b490565b6000603554603d838154811061098357fe5b906000526020600020906008020160050154603d84815481106109a257fe5b90600052602060002090600802016004015401101590505b919050565b60335481565b60006109cf6112eb565b82111580156109de5750600082115b6109fa5760405162461bcd60e51b8152600401610836906129de565b6000603d8381548110610a0957fe5b906000526020600020906008020190508060020154610a2661194f565b11610a355760009150506109ba565b8060030154610a4261194f565b11610a515760019150506109ba565b80600501548160040154111580610a7357506035548160050154826004015401105b15610a825760029150506109ba565b600681015460ff1615610a995760059150506109ba565b610ab86034546108a5603354846003015461192a90919063ffffffff16565b610ac061194f565b10610acf5760069150506109ba565b6033546003820154610ae09161192a565b610ae861194f565b10610af75760049150506109ba565b60039150506109ba565b60408051808201909152601981527f322e6c6f74746572792d616e642d6761732d7570677261646500000000000000602082015290565b603a5481565b6001600160a01b038381166000908152603c60205260408120549091163314610b795760405162461bcd60e51b815260040161083690612a6e565b610b84848484611953565b949350505050565b336000818152603c60205260409020546001600160a01b039081169190831614801590610bc257506001600160a01b0382163014155b8015610bd657506001600160a01b03821615155b8015610bf45750806001600160a01b0316826001600160a01b031614155b610c105760405162461bcd60e51b8152600401610836906128b8565b6001600160a01b03811615610c56576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000908152603f6020526040902054610cc661194f565b11610ce35760405162461bcd60e51b8152600401610836906127e9565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054610d31918390611ca1565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610d9291908590600401612494565b600060405180830381600087803b158015610dac57600080fd5b505af1158015610940573d6000803e3d6000fd5b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610e065760405162461bcd60e51b815260040161083690612881565b6033548110610e275760405162461bcd60e51b8152600401610836906127a5565b603a55565b333014610e4b5760405162461bcd60e51b815260040161083690612881565b603755565b7f000000000000000000000000000000000000000000000000000000000000000081565b336000908152603c60205260409020546001600160a01b031680610eaa5760405162461bcd60e51b815260040161083690612a24565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b610f03610959565b6001600160a01b0316336001600160a01b031614610f335760405162461bcd60e51b8152600401610836906129b7565b604051633a08bde160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e822f78490610d92908490600401612b38565b333014610f9e5760405162461bcd60e51b815260040161083690612881565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b6110103382611ccd565b50565b60008351116110345760405162461bcd60e51b815260040161083690612857565b61105c838383611044863361138b565b158015611057575061105586610971565b155b611dd2565b505050565b3330146110805760405162461bcd60e51b815260040161083690612881565b603955565b600054610100900460ff168061109e575061109e612016565b806110ac575060005460ff16155b6110c85760405162461bcd60e51b815260040161083690612969565b600054610100900460ff161580156110f3576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff1990941693909317169190911790556112b361201c565b80156112c5576000805461ff00191690555b5050565b60395481565b60375481565b60006112e2338484611953565b90505b92915050565b603d546000190190565b6112fd6120b6565b603d838154811061130a57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146113865760405162461bcd60e51b815260040161083690612881565b603355565b6000603d838154811061139a57fe5b600091825260208083206001600160a01b03861684526007600890930201919091019052604090205460ff16905092915050565b3330146113ed5760405162461bcd60e51b815260040161083690612881565b603855565b3330146114115760405162461bcd60e51b815260040161083690612881565b603655565b61141e610959565b6001600160a01b0316336001600160a01b03161461144e5760405162461bcd60e51b8152600401610836906129b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fc611485834761205d565b6040518115909202916000818181858888f1935050505061101057600080fd5b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf906114e190899030908a908a908a908a908a90600401612517565b600060405180830381600087803b1580156114fb57600080fd5b505af115801561150f573d6000803e3d6000fd5b5050505061151d8686611ccd565b505050505050565b6004611530826109c5565b600681111561153b57fe5b146115585760405162461bcd60e51b815260040161083690612604565b6000603d828154811061156757fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b03166115a281612073565b6115be5760405162461bcd60e51b8152600401610836906125c1565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161160291612464565b600060405180830381855af49150503d806000811461163d576040519150601f19603f3d011682016040523d82523d6000602084013e611642565b606091505b5091509150816116855780511561166d578060405162461bcd60e51b815260040161083691906125ae565b60405162461bcd60e51b815260040161083690612aa5565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b60016116c2836109c5565b60068111156116cd57fe5b146116ea5760405162461bcd60e51b8152600401610836906126ca565b6000603d83815481106116f957fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b9094529190942054929450101590806117585760405162461bcd60e51b8152600401610836906128ef565b825460ff16156117a7578254610100900460ff161561178e5760018301546004850154611784916118e8565b60048501556117a7565b600183015460058501546117a1916118e8565b60058501555b84156117c65760048401546117bc908261192a565b60048501556117db565b60058401546117d5908261192a565b60058501555b6006840154610100900460ff1615801561180b57506039546118096117fe61194f565b6003870154906118e8565b105b1561184f57600584015460048501541115821515811461184d5760068501805461ff001916610100179055603a5460038601546118479161192a565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a54600387015461189a938b936118959391926108a59283919061192a565b612079565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b5846040516118d79190612b38565b60405180910390a450505050505050565b60006112e283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ca1565b6000828201838110156112e25760405162461bcd60e51b81526004016108369061276e565b4290565b6001600160a01b0383166000908152603b602052604081205460365481101561198e5760405162461bcd60e51b815260040161083690612711565b61199784612073565b6119b35760405162461bcd60e51b815260040161083690612926565b6001600160a01b0385166000908152603e60205260409020548015611a255760006119dd826109c5565b905060018160068111156119ed57fe5b14158015611a0757506000816006811115611a0457fe5b14155b611a235760405162461bcd60e51b81526004016108369061264f565b505b6000611a356037546108a561194f565b90506000611a4e6038548361192a90919063ffffffff16565b9050611a586120d6565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff19909316929092179490941617905590611c0a6112eb565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350611c4c928d926118959290916108a5919082908a9061192a565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d604051611c8c9493929190612558565b60405180910390a39998505050505050505050565b60008184841115611cc55760405162461bcd60e51b815260040161083691906125ae565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd90611d219085907f00000000000000000000000000000000000000000000000000000000000000009086906004016124ad565b602060405180830381600087803b158015611d3b57600080fd5b505af1158015611d4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7391906123a9565b611d8f5760405162461bcd60e51b815260040161083690612820565b6001600160a01b0382166000908152603b6020526040902054611db2908261192a565b6001600160a01b039092166000908152603b602052604090209190915550565b3381328214611de2576000611de6565b6152085b61ffff168115611f515760005a905060005b8851811015611eaf576000898281518110611e0f57fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611e4f57506001600160a01b03811633145b611e6b5760405162461bcd60e51b815260040161083690612a6e565b861580611e7f5750611e7d898261138b565b155b611e9b5760405162461bcd60e51b815260040161083690612adc565b611ea6818a8a6116b7565b50600101611df8565b506000611ec76127106108a5856108a55a87906118e8565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce80790611f189088908590600401612494565b600060405180830381600087803b158015611f3257600080fd5b505af1158015611f46573d6000803e3d6000fd5b50505050505061200d565b60005b875181101561200b576000888281518110611f6b57fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611fab57506001600160a01b03811633145b611fc75760405162461bcd60e51b815260040161083690612a6e565b851580611fdb5750611fd9888261138b565b155b611ff75760405162461bcd60e51b815260040161083690612adc565b6120028189896116b7565b50600101611f54565b505b50505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b600081831061206c57816112e2565b5090919050565b3b151590565b6001600160a01b0382166000908152603f60205260409020548111156112c5576001600160a01b03919091166000908152603f6020526040902055565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b03811681146112e557600080fd5b80356112e581612bad565b600082601f830112612163578081fd5b813567ffffffffffffffff811115612179578182fd5b61218c601f8201601f1916602001612b41565b91508082528360208285010111156121a357600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156121cd578081fd5b6112e28383612131565b6000806000606084860312156121eb578182fd5b83356121f681612b98565b9250602084013561220681612b98565b9150604084013567ffffffffffffffff811115612221578182fd5b61222d86828701612153565b9150509250925092565b60008060408385031215612249578182fd5b823561225481612b98565b9150602083013567ffffffffffffffff81111561226f578182fd5b61227b85828601612153565b9150509250929050565b60008060008060008060c0878903121561229d578182fd5b6122a78888612131565b95506020870135945060408701359350606087013560ff811681146122ca578283fd5b9598949750929560808101359460a0909101359350915050565b6000806000606084860312156122f8578283fd5b833567ffffffffffffffff8082111561230f578485fd5b818601915086601f830112612322578485fd5b813581811115612330578586fd5b60209150818102612342838201612b41565b8281528381019085850183870186018c101561235c57898afd5b8996505b84871015612386576123728c82612131565b835260019690960195918501918501612360565b50975050505085013592506123a090508560408601612148565b90509250925092565b6000602082840312156123ba578081fd5b81516112e281612bad565b6000602082840312156123d6578081fd5b5035919050565b600080604083850312156123ef578182fd5b823591506124008460208501612131565b90509250929050565b6000806040838503121561241b578182fd5b82359150602083013561242d81612bad565b809150509250929050565b60008151808452612450816020860160208601612b68565b601f01601f19169290920160200192915050565b60008251612476818460208701612b68565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b0386168252846020830152836040830152608060608301526125856080830184612438565b9695505050505050565b901515815260200190565b60208101600783106125a857fe5b91905290565b6000602082526112e26020830184612438565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526010908201526f43616e206e6f7420626520656d70747960801b604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600d908201526c6f6e6c79206d756c746973696760981b604082015260600190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b60208082526019908201527f476f7665726e616e63653a20766f74656420616c726561647900000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715612b6057600080fd5b604052919050565b60005b83811015612b83578181015183820152602001612b6b565b83811115612b92576000848401525b50505050565b6001600160a01b038116811461101057600080fd5b801515811461101057600080fdfea2646970667358221220a9ae24380315e86f1632949f167f44c17322fe48a1385357edbfdf8bc543469764736f6c634300060c0033";class ts extends Ka{constructor(...e){e.length>1?super(...e):super(Qi,es,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Qi)}static connect(e,t){return new $a(e,Qi,t)}}ts.bytecode=es,ts.abi=Qi;const as=[{inputs:[{internalType:"address",name:"_userVault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"}],ns="0x60a06040523480156200001157600080fd5b506040516200277e3803806200277e833981016040819052620000349162000142565b600054610100900460ff168062000050575062000050620000fb565b806200005f575060005460ff16155b620000875760405162461bcd60e51b81526004016200007e9062000172565b60405180910390fd5b600054610100900460ff16158015620000b3576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000d162000101565b8015620000e4576000805461ff00191690555b5060601b6001600160601b031916608052620001c0565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b60006020828403121562000154578081fd5b81516001600160a01b03811681146200016b578182fd5b9392505050565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60805160601c612596620001e860003980610af15280610cb3528061194752506125966000f3fe6080604052600436106102255760003560e01c80639daafec711610123578063ce25d71c116100ab578063e4917d9f1161006f578063e4917d9f1461061b578063ea0217cf1461063b578063ece40cc11461065b578063f0b768921461067b578063fe0d94c11461069b57610225565b8063ce25d71c1461058f578063d6159fe5146105a4578063d6f0948c146105b9578063da35c664146105d9578063e23a9a52146105ee57610225565b8063b1610d7e116100f2578063b1610d7e146104fa578063b54426c81461050f578063b859f11b1461052f578063c0c0e8201461054f578063c4d66de81461056f57610225565b80639daafec71461049b578063a6c26603146104b0578063a72edda3146104c5578063adf898a4146104e557610225565b80635c19a95c116101b15780636dc2dc6c116101755780636dc2dc6c1461040657806370b0f6601461042657806392ab89bb146104465780639a9e3b6e1461045b5780639ae697bf1461047b57610225565b80635c19a95c1461036f5780636198e3391461038f57806365da1264146103af578063671dd275146103dc5780636a661755146103f157610225565b806337f135d7116101f857806337f135d7146102d65780633e4f49e6146102eb57806354fd4d5014610318578063587a6ecb1461033a57806358e9fff01461034f57610225565b8063013cf08b1461022a57806302ec8f9e1461026757806315373e3d1461028957806317977c61146102a9575b600080fd5b34801561023657600080fd5b5061024a610245366004611dfd565b6106ae565b60405161025e989796959493929190611f09565b60405180910390f35b34801561027357600080fd5b50610287610282366004611dfd565b610713565b005b34801561029557600080fd5b506102876102a4366004611e41565b610740565b3480156102b557600080fd5b506102c96102c4366004611bf4565b61074f565b60405161025e91906124dd565b3480156102e257600080fd5b506102c9610761565b3480156102f757600080fd5b5061030b610306366004611dfd565b610767565b60405161025e9190611fc7565b34801561032457600080fd5b5061032d6108aa565b60405161025e9190611fdb565b34801561034657600080fd5b506102c96108d5565b34801561035b57600080fd5b506102c961036a366004611c0f565b6108db565b34801561037b57600080fd5b5061028761038a366004611bf4565b610929565b34801561039b57600080fd5b506102876103aa366004611dfd565b610a4b565b3480156103bb57600080fd5b506103cf6103ca366004611bf4565b610b64565b60405161025e9190611eb8565b3480156103e857600080fd5b506102c9610b7f565b3480156103fd57600080fd5b506102c9610b85565b34801561041257600080fd5b50610287610421366004611dfd565b610b8b565b34801561043257600080fd5b50610287610441366004611dfd565b610bd0565b34801561045257600080fd5b50610287610bf4565b34801561046757600080fd5b50610287610476366004611dfd565b610c7b565b34801561048757600080fd5b506102c9610496366004611bf4565b610c9f565b3480156104a757600080fd5b506103cf610cb1565b3480156104bc57600080fd5b506102c9610cd5565b3480156104d157600080fd5b506102c96104e0366004611bf4565b610cdb565b3480156104f157600080fd5b506103cf610ced565b34801561050657600080fd5b506102c9610cfc565b34801561051b57600080fd5b5061028761052a366004611dfd565b610d02565b34801561053b57600080fd5b5061028761054a366004611d1c565b610d0f565b34801561055b57600080fd5b5061028761056a366004611dfd565b610dc6565b34801561057b57600080fd5b5061028761058a366004611bf4565b610dea565b34801561059b57600080fd5b506102c961102d565b3480156105b057600080fd5b506102c9611033565b3480156105c557600080fd5b506102c96105d4366004611c6f565b611039565b3480156105e557600080fd5b506102c961104f565b3480156105fa57600080fd5b5061060e610609366004611e15565b611059565b60405161025e91906124b8565b34801561062757600080fd5b50610287610636366004611dfd565b6110cb565b34801561064757600080fd5b50610287610656366004611dfd565b6110ef565b34801561066757600080fd5b50610287610676366004611dfd565b611113565b34801561068757600080fd5b50610287610696366004611cbd565b611137565b6102876106a9366004611dfd565b6111b7565b603d81815481106106bb57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461073b5760405162461bcd60e51b815260040161073290612284565b60405180910390fd5b603555565b61074b338383611349565b5050565b603e6020526000908152604090205481565b60335481565b600061077161104f565b82111580156107805750600082115b61079c5760405162461bcd60e51b8152600401610732906123ba565b6000603d83815481106107ab57fe5b9060005260206000209060080201905080600201546107c861157a565b116107d75760009150506108a5565b80600301546107e461157a565b116107f35760019150506108a5565b8060050154816004015411158061081557506035548160050154826004015401105b156108245760029150506108a5565b600681015460ff161561083b5760059150506108a5565b61086060345461085a603354846003015461157e90919063ffffffff16565b9061157e565b61086861157a565b106108775760069150506108a5565b60335460038201546108889161157e565b61089061157a565b1061089f5760049150506108a5565b60039150505b919050565b60408051808201909152601181527019173b30bab63a16b6b4b3b930ba34b7b760791b602082015290565b603a5481565b6001600160a01b038381166000908152603c602052604081205490911633146109165760405162461bcd60e51b81526004016107329061244a565b6109218484846115a3565b949350505050565b336000818152603c60205260409020546001600160a01b03908116919083161480159061095f57506001600160a01b0382163014155b801561097357506001600160a01b03821615155b80156109915750806001600160a01b0316826001600160a01b031614155b6109ad5760405162461bcd60e51b8152600401610732906122bb565b6001600160a01b038116156109f3576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000908152603f6020526040902054610a6361157a565b11610a805760405162461bcd60e51b815260040161073290612216565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054610ace9183906118f1565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610b2f91908590600401611ecc565b600060405180830381600087803b158015610b4957600080fd5b505af1158015610b5d573d6000803e3d6000fd5b5050505050565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610baa5760405162461bcd60e51b815260040161073290612284565b6033548110610bcb5760405162461bcd60e51b8152600401610732906121d2565b603a55565b333014610bef5760405162461bcd60e51b815260040161073290612284565b603755565b336000908152603c60205260409020546001600160a01b031680610c2a5760405162461bcd60e51b815260040161073290612400565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b333014610c9a5760405162461bcd60e51b815260040161073290612284565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b610d0c338261191d565b50565b60005b8351811015610da057336001600160a01b0316603c6000868481518110610d3557fe5b6020908102919091018101516001600160a01b03908116835290820192909252604001600020541614610d7a5760405162461bcd60e51b81526004016107329061244a565b610d98848281518110610d8957fe5b60200260200101518484611349565b600101610d12565b50336000908152603b602052604090205415610dc157610dc1338383611349565b505050565b333014610de55760405162461bcd60e51b815260040161073290612284565b603955565b600054610100900460ff1680610e035750610e03611a22565b80610e11575060005460ff16155b610e2d5760405162461bcd60e51b81526004016107329061236c565b600054610100900460ff16158015610e58576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff199094169390931716919091179055611018611a28565b801561074b576000805461ff00191690555050565b60395481565b60375481565b60006110463384846115a3565b90505b92915050565b603d546000190190565b611061611aee565b603d838154811061106e57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146110ea5760405162461bcd60e51b815260040161073290612284565b603355565b33301461110e5760405162461bcd60e51b815260040161073290612284565b603855565b3330146111325760405162461bcd60e51b815260040161073290612284565b603655565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf9061117390899030908a908a908a908a908a90600401611f4f565b600060405180830381600087803b15801561118d57600080fd5b505af11580156111a1573d6000803e3d6000fd5b505050506111af868661191d565b505050505050565b60046111c282610767565b60068111156111cd57fe5b146111ea5760405162461bcd60e51b815260040161073290612031565b6000603d82815481106111f957fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b031661123481611a69565b6112505760405162461bcd60e51b815260040161073290611fee565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161129491611e9c565b600060405180830381855af49150503d80600081146112cf576040519150601f19603f3d011682016040523d82523d6000602084013e6112d4565b606091505b509150915081611317578051156112ff578060405162461bcd60e51b81526004016107329190611fdb565b60405162461bcd60e51b815260040161073290612481565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b600161135483610767565b600681111561135f57fe5b1461137c5760405162461bcd60e51b8152600401610732906120f7565b6000603d838154811061138b57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b9094529190942054929450101590806113ea5760405162461bcd60e51b8152600401610732906122f2565b825460ff1615611439578254610100900460ff1615611420576001830154600485015461141691611a6f565b6004850155611439565b6001830154600585015461143391611a6f565b60058501555b841561145857600484015461144e908261157e565b600485015561146d565b6005840154611467908261157e565b60058501555b6006840154610100900460ff1615801561149d575060395461149b61149061157a565b600387015490611a6f565b105b156114e15760058401546004850154111582151581146114df5760068501805461ff001916610100179055603a5460038601546114d99161157e565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a54600387015461152c938b9361152793919261085a9283919061157e565b611ab1565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b58460405161156991906124dd565b60405180910390a450505050505050565b4290565b6000828201838110156110465760405162461bcd60e51b81526004016107329061219b565b6001600160a01b0383166000908152603b60205260408120546036548110156115de5760405162461bcd60e51b81526004016107329061213e565b6115e784611a69565b6116035760405162461bcd60e51b815260040161073290612329565b6001600160a01b0385166000908152603e6020526040902054801561167557600061162d82610767565b9050600181600681111561163d57fe5b141580156116575750600081600681111561165457fe5b14155b6116735760405162461bcd60e51b81526004016107329061207c565b505b600061168560375461085a61157a565b9050600061169e6038548361157e90919063ffffffff16565b90506116a8611b0e565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff1990931692909217949094161790559061185a61104f565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a5492935061189c928d9261152792909161085a919082908a9061157e565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516118dc9493929190611f90565b60405180910390a39998505050505050505050565b600081848411156119155760405162461bcd60e51b81526004016107329190611fdb565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd906119719085907f0000000000000000000000000000000000000000000000000000000000000000908690600401611ee5565b602060405180830381600087803b15801561198b57600080fd5b505af115801561199f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c39190611de1565b6119df5760405162461bcd60e51b81526004016107329061224d565b6001600160a01b0382166000908152603b6020526040902054611a02908261157e565b6001600160a01b039092166000908152603b602052604090209190915550565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b3b151590565b600061104683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506118f1565b6001600160a01b0382166000908152603f602052604090205481111561074b576001600160a01b03919091166000908152603f6020526040902055565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b038116811461104957600080fd5b803561104981612552565b600082601f830112611b9b578081fd5b813567ffffffffffffffff811115611bb1578182fd5b611bc4601f8201601f19166020016124e6565b9150808252836020828501011115611bdb57600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611c05578081fd5b6110468383611b69565b600080600060608486031215611c23578182fd5b8335611c2e8161253d565b92506020840135611c3e8161253d565b9150604084013567ffffffffffffffff811115611c59578182fd5b611c6586828701611b8b565b9150509250925092565b60008060408385031215611c81578182fd5b8235611c8c8161253d565b9150602083013567ffffffffffffffff811115611ca7578182fd5b611cb385828601611b8b565b9150509250929050565b60008060008060008060c08789031215611cd5578182fd5b611cdf8888611b69565b95506020870135945060408701359350606087013560ff81168114611d02578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215611d30578283fd5b833567ffffffffffffffff80821115611d47578485fd5b818601915086601f830112611d5a578485fd5b813581811115611d68578586fd5b60209150818102611d7a8382016124e6565b8281528381019085850183870186018c1015611d9457898afd5b8996505b84871015611dbe57611daa8c82611b69565b835260019690960195918501918501611d98565b5097505050508501359250611dd890508560408601611b80565b90509250925092565b600060208284031215611df2578081fd5b815161104681612552565b600060208284031215611e0e578081fd5b5035919050565b60008060408385031215611e27578182fd5b82359150611e388460208501611b69565b90509250929050565b60008060408385031215611e53578182fd5b823591506020830135611e6581612552565b809150509250929050565b60008151808452611e8881602086016020860161250d565b601f01601f19169290920160200192915050565b60008251611eae81846020870161250d565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152611fbd6080830184611e70565b9695505050505050565b6020810160078310611fd557fe5b91905290565b6000602082526110466020830184611e70565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561250557600080fd5b604052919050565b60005b83811015612528578181015183820152602001612510565b83811115612537576000848401525b50505050565b6001600160a01b0381168114610d0c57600080fd5b8015158114610d0c57600080fdfea26469706673582212204b0042571b6576e17c0708c8f251958898bb0e0a9f340387b1eed439d732af7264736f6c634300060c0033";class bs extends Ka{constructor(...e){e.length>1?super(...e):super(as,ns,e[0])}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}deploy(e,t){return super.deploy(e,t||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(as)}static connect(e,t){return new $a(e,as,t)}}bs.bytecode=ns,bs.abi=as;var fs=Object.freeze({__proto__:null,GovernanceGasUpgrade__factory:ts,GovernanceVaultUpgrade__factory:bs,gasCompensatorSol:Ji,interfaces:Zi});const ds=[{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amountLockedBeforehand",type:"uint256"}],name:"updateRewardsOnLockedBalanceChange",outputs:[],stateMutability:"nonpayable",type:"function"}];class is{static createInterface(){return new ba(ds)}static connect(e,t){return new $a(e,ds,t)}}is.abi=ds;var ss=Object.freeze({__proto__:null,ITornadoStakingRewards__factory:is});const cs=[{inputs:[{internalType:"address",name:"stakingRewardsAddress",type:"address"},{internalType:"address",name:"gasCompLogic",type:"address"},{internalType:"address",name:"userVaultAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"bytes",name:"errorData",type:"bytes"}],name:"RewardUpdateFailed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"RewardUpdateSuccessful",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"Staking",outputs:[{internalType:"contract ITornadoStakingRewards",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"checkIfQuorumReached",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"gasCompensationVault",outputs:[{internalType:"contract IGasCompensationVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"account",type:"address"}],name:"hasAccountVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"returnMultisigAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"gasCompensationsLimit",type:"uint256"}],name:"setGasCompensations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawFromHelper",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],rs="0x60e06040523480156200001157600080fd5b50604051620032a6380380620032a6833981016040819052620000349162000165565b81818181600060019054906101000a900460ff1680620000595750620000596200011e565b8062000068575060005460ff16155b620000905760405162461bcd60e51b81526004016200008790620001b8565b60405180910390fd5b600054610100900460ff16158015620000bc576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000da62000124565b8015620000ed576000805461ff00191690555b506001600160601b0319606091821b811660805291811b821660a0529590951b90941660c052506200021f92505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6000806000606084860312156200017a578283fd5b8351620001878162000206565b60208501519093506200019a8162000206565b6040850151909250620001ad8162000206565b809150509250925092565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6001600160a01b03811681146200021c57600080fd5b50565b60805160601c60a05160601c60c05160601c6130246200028260003980610cf652806110b7528061169852806117c95250806108e55280610ead5280610fa552806116145280612164525080611040528061200d528061240e52506130246000f3fe6080604052600436106102765760003560e01c80639ae697bf1161014f578063d6159fe5116100c1578063ea0217cf1161007a578063ea0217cf1461072a578063ece40cc11461074a578063ef3f8bb11461076a578063f0b768921461078a578063f57df22e146107aa578063fe0d94c1146107bf5761027d565b8063d6159fe514610673578063d6f0948c14610688578063da35c664146106a8578063e23a9a52146106bd578063e4917d9f146106ea578063e525aa081461070a5761027d565b8063b1610d7e11610113578063b1610d7e146105c9578063b54426c8146105de578063b859f11b146105fe578063c0c0e8201461061e578063c4d66de81461063e578063ce25d71c1461065e5761027d565b80639ae697bf1461054a5780639daafec71461056a578063a6c266031461057f578063a72edda314610594578063adf898a4146105b45761027d565b80635c19a95c116101e85780636dc2dc6c116101ac5780636dc2dc6c146104a057806370b0f660146104c05780638b34a960146104e057806392ab89bb146104f5578063932d51571461050a5780639a9e3b6e1461052a5761027d565b80635c19a95c146104165780636198e3391461043657806365da126414610456578063671dd275146104765780636a6617551461048b5761027d565b806332687ec11161023a57806332687ec11461035057806337f135d71461037d5780633e4f49e61461039257806354fd4d50146103bf578063587a6ecb146103e157806358e9fff0146103f65761027d565b8063013cf08b1461028257806302ec8f9e146102bf57806315373e3d146102e157806317977c611461030157806324b0435f1461032e5761027d565b3661027d57005b600080fd5b34801561028e57600080fd5b506102a261029d3660046127f8565b6107d2565b6040516102b6989796959493929190612904565b60405180910390f35b3480156102cb57600080fd5b506102df6102da3660046127f8565b610837565b005b3480156102ed57600080fd5b506102df6102fc36600461283c565b610864565b34801561030d57600080fd5b5061032161031c3660046125ef565b610967565b6040516102b69190612f6b565b34801561033a57600080fd5b50610343610979565b6040516102b691906128b3565b34801561035c57600080fd5b5061037061036b3660046127f8565b610991565b6040516102b691906129c2565b34801561038957600080fd5b506103216109df565b34801561039e57600080fd5b506103b26103ad3660046127f8565b6109e5565b6040516102b691906129cd565b3480156103cb57600080fd5b506103d4610b21565b6040516102b691906129e1565b3480156103ed57600080fd5b50610321610b58565b34801561040257600080fd5b5061032161041136600461260a565b610b5e565b34801561042257600080fd5b506102df6104313660046125ef565b610bac565b34801561044257600080fd5b506102df6104513660046127f8565b610cce565b34801561046257600080fd5b506103436104713660046125ef565b610e1b565b34801561048257600080fd5b50610321610e36565b34801561049757600080fd5b50610321610e3c565b3480156104ac57600080fd5b506102df6104bb3660046127f8565b610e42565b3480156104cc57600080fd5b506102df6104db3660046127f8565b610e87565b3480156104ec57600080fd5b50610343610eab565b34801561050157600080fd5b506102df610ecf565b34801561051657600080fd5b506102df6105253660046127f8565b610f56565b34801561053657600080fd5b506102df6105453660046127f8565b611008565b34801561055657600080fd5b506103216105653660046125ef565b61102c565b34801561057657600080fd5b5061034361103e565b34801561058b57600080fd5b50610321611062565b3480156105a057600080fd5b506103216105af3660046125ef565b611068565b3480156105c057600080fd5b5061034361107a565b3480156105d557600080fd5b50610321611089565b3480156105ea57600080fd5b506102df6105f93660046127f8565b61108f565b34801561060a57600080fd5b506102df610619366004612717565b6111d8565b34801561062a57600080fd5b506102df6106393660046127f8565b611226565b34801561064a57600080fd5b506102df6106593660046125ef565b61124a565b34801561066a57600080fd5b5061032161148d565b34801561067f57600080fd5b50610321611493565b34801561069457600080fd5b506103216106a336600461266a565b611499565b3480156106b457600080fd5b506103216114af565b3480156106c957600080fd5b506106dd6106d8366004612810565b6114b9565b6040516102b69190612f46565b3480156106f657600080fd5b506102df6107053660046127f8565b61152b565b34801561071657600080fd5b50610370610725366004612810565b61154f565b34801561073657600080fd5b506102df6107453660046127f8565b611592565b34801561075657600080fd5b506102df6107653660046127f8565b6115b6565b34801561077657600080fd5b506102df6107853660046127f8565b6115da565b34801561079657600080fd5b506102df6107a53660046126b8565b61166c565b3480156107b657600080fd5b506103436117c7565b6102df6107cd3660046127f8565b6117eb565b603d81815481106107df57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461085f5760405162461bcd60e51b815260040161085690612cb4565b60405180910390fd5b603555565b3361086f833361154f565b158015610882575061088083610991565b155b333214610890576000610894565b6152085b61ffff1681156109555760005a90506108ae33878761197d565b60006108cb6127106108c5856108c55a8790611bae565b90611bf0565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce8079061091c90889085906004016128c7565b600060405180830381600087803b15801561093657600080fd5b505af115801561094a573d6000803e3d6000fd5b505050505050610960565b61096033868661197d565b5050505050565b603e6020526000908152604090205481565b73b04e030140b30c27bcdfaafffa98c57d80eda7b490565b6000603554603d83815481106109a357fe5b906000526020600020906008020160050154603d84815481106109c257fe5b90600052602060002090600802016004015401101590505b919050565b60335481565b60006109ef6114af565b82111580156109fe5750600082115b610a1a5760405162461bcd60e51b815260040161085690612e11565b6000603d8381548110610a2957fe5b906000526020600020906008020190508060020154610a46611c15565b11610a555760009150506109da565b8060030154610a62611c15565b11610a715760019150506109da565b80600501548160040154111580610a9357506035548160050154826004015401105b15610aa25760029150506109da565b600681015460ff1615610ab95760059150506109da565b610ad86034546108c56033548460030154611bf090919063ffffffff16565b610ae0611c15565b10610aef5760069150506109da565b6033546003820154610b0091611bf0565b610b08611c15565b10610b175760049150506109da565b60039150506109da565b60408051808201909152601981527f322e6c6f74746572792d616e642d6761732d7570677261646500000000000000602082015290565b603a5481565b6001600160a01b038381166000908152603c60205260408120549091163314610b995760405162461bcd60e51b815260040161085690612ea1565b610ba4848484611c19565b949350505050565b336000818152603c60205260409020546001600160a01b039081169190831614801590610be257506001600160a01b0382163014155b8015610bf657506001600160a01b03821615155b8015610c145750806001600160a01b0316826001600160a01b031614155b610c305760405162461bcd60e51b815260040161085690612ceb565b6001600160a01b03811615610c76576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f91610d2b9185916004016128c7565b600060405180830381600087803b158015610d4557600080fd5b505af1925050508015610d56575060015b610dd9573d808015610d84576040519150601f19603f3d011682016040523d82523d6000602084013e610d89565b606091505b5080604051610d989190612897565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a350610e0e565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e1782611f67565b5050565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610e615760405162461bcd60e51b815260040161085690612cb4565b6033548110610e825760405162461bcd60e51b815260040161085690612bd8565b603a55565b333014610ea65760405162461bcd60e51b815260040161085690612cb4565b603755565b7f000000000000000000000000000000000000000000000000000000000000000081565b336000908152603c60205260409020546001600160a01b031680610f055760405162461bcd60e51b815260040161085690612e57565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b610f5e610979565b6001600160a01b0316336001600160a01b031614610f8e5760405162461bcd60e51b815260040161085690612dea565b604051633a08bde160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e822f78490610fda908490600401612f6b565b600060405180830381600087803b158015610ff457600080fd5b505af1158015610960573d6000803e3d6000fd5b3330146110275760405162461bcd60e51b815260040161085690612cb4565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916110ec9185916004016128c7565b600060405180830381600087803b15801561110657600080fd5b505af1925050508015611117575060015b61119a573d808015611145576040519150601f19603f3d011682016040523d82523d6000602084013e61114a565b606091505b50806040516111599190612897565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506111cf565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e178261204b565b60008351116111f95760405162461bcd60e51b815260040161085690612c8a565b611221838383611209863361154f565b15801561121c575061121a86610991565b155b612055565b505050565b3330146112455760405162461bcd60e51b815260040161085690612cb4565b603955565b600054610100900460ff16806112635750611263612298565b80611271575060005460ff16155b61128d5760405162461bcd60e51b815260040161085690612d9c565b600054610100900460ff161580156112b8576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff19909416939093171691909117905561147861229e565b8015610e17576000805461ff00191690555050565b60395481565b60375481565b60006114a6338484611c19565b90505b92915050565b603d546000190190565b6114c16124e9565b603d83815481106114ce57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b33301461154a5760405162461bcd60e51b815260040161085690612cb4565b603355565b6000603d838154811061155e57fe5b600091825260208083206001600160a01b03861684526007600890930201919091019052604090205460ff16905092915050565b3330146115b15760405162461bcd60e51b815260040161085690612cb4565b603855565b3330146115d55760405162461bcd60e51b815260040161085690612cb4565b603655565b6115e2610979565b6001600160a01b0316336001600160a01b0316146116125760405162461bcd60e51b815260040161085690612dea565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fc61164983476122df565b6040518115909202916000818181858888f1935050505061166957600080fd5b50565b6001600160a01b038087166000908152603b60205260409081902054905163e113335f60e01b815288927f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916116cd9185916004016128c7565b600060405180830381600087803b1580156116e757600080fd5b505af19250505080156116f8575060015b61177b573d808015611726576040519150601f19603f3d011682016040523d82523d6000602084013e61172b565b606091505b508060405161173a9190612897565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506117b0565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b6117be8787878787876122f5565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60046117f6826109e5565b600681111561180157fe5b1461181e5760405162461bcd60e51b815260040161085690612a37565b6000603d828154811061182d57fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b031661186881612375565b6118845760405162461bcd60e51b8152600401610856906129f4565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b038516916118c891612897565b600060405180830381855af49150503d8060008114611903576040519150601f19603f3d011682016040523d82523d6000602084013e611908565b606091505b50915091508161194b57805115611933578060405162461bcd60e51b815260040161085691906129e1565b60405162461bcd60e51b815260040161085690612ed8565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b6001611988836109e5565b600681111561199357fe5b146119b05760405162461bcd60e51b815260040161085690612afd565b6000603d83815481106119bf57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b909452919094205492945010159080611a1e5760405162461bcd60e51b815260040161085690612d22565b825460ff1615611a6d578254610100900460ff1615611a545760018301546004850154611a4a91611bae565b6004850155611a6d565b60018301546005850154611a6791611bae565b60058501555b8415611a8c576004840154611a829082611bf0565b6004850155611aa1565b6005840154611a9b9082611bf0565b60058501555b6006840154610100900460ff16158015611ad15750603954611acf611ac4611c15565b600387015490611bae565b105b15611b15576005840154600485015411158215158114611b135760068501805461ff001916610100179055603a546003860154611b0d91611bf0565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a546003870154611b60938b93611b5b9391926108c592839190611bf0565b61237b565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b584604051611b9d9190612f6b565b60405180910390a450505050505050565b60006114a683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506123b8565b6000828201838110156114a65760405162461bcd60e51b815260040161085690612ba1565b4290565b6001600160a01b0383166000908152603b6020526040812054603654811015611c545760405162461bcd60e51b815260040161085690612b44565b611c5d84612375565b611c795760405162461bcd60e51b815260040161085690612d59565b6001600160a01b0385166000908152603e60205260409020548015611ceb576000611ca3826109e5565b90506001816006811115611cb357fe5b14158015611ccd57506000816006811115611cca57fe5b14155b611ce95760405162461bcd60e51b815260040161085690612a82565b505b6000611cfb6037546108c5611c15565b90506000611d1460385483611bf090919063ffffffff16565b9050611d1e612509565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff19909316929092179490941617905590611ed06114af565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350611f12928d92611b5b9290916108c5919082908a90611bf0565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d604051611f52949392919061298b565b60405180910390a39998505050505050505050565b336000908152603f6020526040902054611f7f611c15565b11611f9c5760405162461bcd60e51b815260040161085690612c1c565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054611fea9183906123b8565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610fda919085906004016128c7565b61166933826123e4565b3381328214612065576000612069565b6152085b61ffff1681156121d45760005a905060005b885181101561213257600089828151811061209257fe5b6020908102919091018101516001600160a01b038082166000908152603c909352604090922054909250163314806120d257506001600160a01b03811633145b6120ee5760405162461bcd60e51b815260040161085690612ea1565b8615806121025750612100898261154f565b155b61211e5760405162461bcd60e51b815260040161085690612f0f565b612129818a8a61197d565b5060010161207b565b50600061214a6127106108c5856108c55a8790611bae565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce8079061219b90889085906004016128c7565b600060405180830381600087803b1580156121b557600080fd5b505af11580156121c9573d6000803e3d6000fd5b5050505050506117be565b60005b875181101561228e5760008882815181106121ee57fe5b6020908102919091018101516001600160a01b038082166000908152603c9093526040909220549092501633148061222e57506001600160a01b03811633145b61224a5760405162461bcd60e51b815260040161085690612ea1565b85158061225e575061225c888261154f565b155b61227a5760405162461bcd60e51b815260040161085690612f0f565b61228581898961197d565b506001016121d7565b5050505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b60008183106122ee57816114a6565b5090919050565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf9061233190899030908a908a908a908a908a9060040161294a565b600060405180830381600087803b15801561234b57600080fd5b505af115801561235f573d6000803e3d6000fd5b5050505061236d86866123e4565b505050505050565b3b151590565b6001600160a01b0382166000908152603f6020526040902054811115610e17576001600160a01b03919091166000908152603f6020526040902055565b600081848411156123dc5760405162461bcd60e51b815260040161085691906129e1565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd906124389085907f00000000000000000000000000000000000000000000000000000000000000009086906004016128e0565b602060405180830381600087803b15801561245257600080fd5b505af1158015612466573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061248a91906127dc565b6124a65760405162461bcd60e51b815260040161085690612c53565b6001600160a01b0382166000908152603b60205260409020546124c99082611bf0565b6001600160a01b039092166000908152603b602052604090209190915550565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b03811681146114a957600080fd5b80356114a981612fe0565b600082601f830112612596578081fd5b813567ffffffffffffffff8111156125ac578182fd5b6125bf601f8201601f1916602001612f74565b91508082528360208285010111156125d657600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215612600578081fd5b6114a68383612564565b60008060006060848603121561261e578182fd5b833561262981612fcb565b9250602084013561263981612fcb565b9150604084013567ffffffffffffffff811115612654578182fd5b61266086828701612586565b9150509250925092565b6000806040838503121561267c578182fd5b823561268781612fcb565b9150602083013567ffffffffffffffff8111156126a2578182fd5b6126ae85828601612586565b9150509250929050565b60008060008060008060c087890312156126d0578182fd5b6126da8888612564565b95506020870135945060408701359350606087013560ff811681146126fd578283fd5b9598949750929560808101359460a0909101359350915050565b60008060006060848603121561272b578283fd5b833567ffffffffffffffff80821115612742578485fd5b818601915086601f830112612755578485fd5b813581811115612763578586fd5b60209150818102612775838201612f74565b8281528381019085850183870186018c101561278f57898afd5b8996505b848710156127b9576127a58c82612564565b835260019690960195918501918501612793565b50975050505085013592506127d39050856040860161257b565b90509250925092565b6000602082840312156127ed578081fd5b81516114a681612fe0565b600060208284031215612809578081fd5b5035919050565b60008060408385031215612822578182fd5b823591506128338460208501612564565b90509250929050565b6000806040838503121561284e578182fd5b82359150602083013561286081612fe0565b809150509250929050565b60008151808452612883816020860160208601612f9b565b601f01601f19169290920160200192915050565b600082516128a9818460208701612f9b565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b0386168252846020830152836040830152608060608301526129b8608083018461286b565b9695505050505050565b901515815260200190565b60208101600783106129db57fe5b91905290565b6000602082526114a6602083018461286b565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526010908201526f43616e206e6f7420626520656d70747960801b604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600d908201526c6f6e6c79206d756c746973696760981b604082015260600190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b60208082526019908201527f476f7665726e616e63653a20766f74656420616c726561647900000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715612f9357600080fd5b604052919050565b60005b83811015612fb6578181015183820152602001612f9e565b83811115612fc5576000848401525b50505050565b6001600160a01b038116811461166957600080fd5b801515811461166957600080fdfea2646970667358221220e1f35bea256ff1c0e43f98312094903f31941303df43a2edbe8b9bd0fa323c8864736f6c634300060c0033";class ps extends Ka{constructor(...e){e.length>1?super(...e):super(cs,rs,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(cs)}static connect(e,t){return new $a(e,cs,t)}}ps.bytecode=rs,ps.abi=cs;var us=Object.freeze({__proto__:null,GovernanceStakingUpgrade__factory:ps,interfaces:ss});const os=[{inputs:[{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"address",name:"implementationContract",type:"address"},{internalType:"bytes",name:"metamorphicContractInitializationCalldata",type:"bytes"}],name:"deployMetamorphicContractFromExistingImplementation",outputs:[{internalType:"address",name:"metamorphicContractAddress",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"findMetamorphicContractAddress",outputs:[{internalType:"address",name:"metamorphicContractAddress",type:"address"}],stateMutability:"view",type:"function"}];class ys{static createInterface(){return new ba(os)}static connect(e,t){return new $a(e,os,t)}}ys.abi=os;var ls=Object.freeze({__proto__:null,IMetamorphicContractFactory__factory:ys});const ms=[{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"num",type:"uint256"}],name:"MockExecuted",type:"event"},{inputs:[],name:"emergencyStop",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"}],Ts="0x608060405234801561001057600080fd5b5060c08061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c8063373058b814603757806363a599a414603f575b600080fd5b603d6045565b005b603d607d565b7f2ff532ec74fd1130db9b7b6800e0992b2363095b00331a891a27edfab97c45406001604051607391906081565b60405180910390a1565b6000ff5b9081526020019056fea264697066735822122018779fa63005d6573862657b4a5cd55f75b705b28a7ff69222461665b78f408a64736f6c634300060c0033";class hs extends Ka{constructor(...e){e.length>1?super(...e):super(ms,Ts,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(ms)}static connect(e,t){return new $a(e,ms,t)}}hs.bytecode=Ts,hs.abi=ms;const gs=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"num",type:"uint256"}],name:"MockExecuted",type:"event"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"emergencyStop",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"}],ws="0x60a060405234801561001057600080fd5b5033606081901b6080526102746100366000398061012952806101b052506102746000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063373058b81461004657806363a599a414610050578063d5f3948814610058575b600080fd5b61004e610076565b005b61004e6101aa565b6100606101ae565b60405161006d9190610211565b60405180910390f35b6040516370a0823160e01b81527377777feddddffc19ff86db637967013e6c6a116c9060009082906370a08231906100b2903090600401610211565b60206040518083038186803b1580156100ca57600080fd5b505afa1580156100de573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061010291906101f9565b60405163a9059cbb60e01b81529091506001600160a01b0383169063a9059cbb90610153907f0000000000000000000000000000000000000000000000000000000000000000908590600401610225565b602060405180830381600087803b15801561016d57600080fd5b505af1158015610181573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a591906101d2565b505050565b6000ff5b7f000000000000000000000000000000000000000000000000000000000000000081565b6000602082840312156101e3578081fd5b815180151581146101f2578182fd5b9392505050565b60006020828403121561020a578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b0392909216825260208201526040019056fea2646970667358221220c120adf2a3856eb39e4d2305abf19175fb5f11d87cd96e5c70ce2a9f702ba53664736f6c634300060c0033";class vs extends Ka{constructor(...e){e.length>1?super(...e):super(gs,ws,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(gs)}static connect(e,t){return new $a(e,gs,t)}}vs.bytecode=ws,vs.abi=gs;var Ms=Object.freeze({__proto__:null,InitialProposal__factory:hs,MaliciousProposal__factory:vs}),_s=Object.freeze({__proto__:null,mockProposalsSol:Ms});const xs=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"_admin",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],Is="0x60806040526040516108403803806108408339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b50604052508491508390508282816100f1826101c5565b8051156101a9576000826001600160a01b0316826040518082805190602001908083835b602083106101345780518252601f199092019160209182019101610115565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610194576040519150601f19603f3d011682016040523d82523d6000602084013e610199565b606091505b50509050806101a757600080fd5b505b506101b19050565b6101ba82610237565b505050505050610261565b6101d88161025b60201b6103b41760201c565b6102135760405162461bcd60e51b815260040180806020018281038252603681526020018061080a6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b3b151590565b61059a806102706000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996101a9565b6101a96101a46103ba565b6103df565b565b6101b3610403565b6001600160a01b0316336001600160a01b031614156101da576101d581610428565b6101e2565b6101e2610191565b50565b6101ed610403565b6001600160a01b0316336001600160a01b031614156102855761020f83610428565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd6103ba565b90506102cc565b6102cc610191565b90565b6102d7610403565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b815260040180806020018281038252603a8152602001806104f5603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610403565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d581610468565b6000610393610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd610403565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156103fe573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6104318161048c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b610495816103b4565b6104d05760405162461bcd60e51b815260040180806020018281038252603681526020018061052f6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a26469706673582212203c0c6456361fbff816ff53c5547d39ad0e807130f877d2661772f7bffc95b82764736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";let Es=class extends Ka{constructor(...e){e.length>1?super(...e):super(xs,Is,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(xs)}static connect(e,t){return new $a(e,xs,t)}};Es.bytecode=Is,Es.abi=xs;const Rs=[{inputs:[{internalType:"address",name:"stakingRewardsAddress",type:"address"},{internalType:"address",name:"gasCompLogic",type:"address"},{internalType:"address",name:"userVaultAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"bytes",name:"errorData",type:"bytes"}],name:"RewardUpdateFailed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"RewardUpdateSuccessful",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"Staking",outputs:[{internalType:"contract ITornadoStakingRewards",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"checkIfQuorumReached",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"gasCompensationVault",outputs:[{internalType:"contract IGasCompensationVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"account",type:"address"}],name:"hasAccountVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposalCodehashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"returnMultisigAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"gasCompensationsLimit",type:"uint256"}],name:"setGasCompensations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawFromHelper",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],Os="0x60e06040523480156200001157600080fd5b50604051620034343803806200343483398101604081905262000034916200016b565b82828281818181600060019054906101000a900460ff16806200005c57506200005c62000124565b806200006b575060005460ff16155b620000935760405162461bcd60e51b81526004016200008a90620001be565b60405180910390fd5b600054610100900460ff16158015620000bf576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000dd6200012a565b8015620000f0576000805461ff00191690555b506001600160601b0319606091821b811660805291811b821660a0529590951b90941660c052506200022595505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b60008060006060848603121562000180578283fd5b83516200018d816200020c565b6020850151909350620001a0816200020c565b6040850151909250620001b3816200020c565b809150509250925092565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6001600160a01b03811681146200022257600080fd5b50565b60805160601c60a05160601c60c05160601c6131ac6200028860003980610d1352806110d452806116c752806117f85250806109105280610eca5280610fc252806116435280611d6d52508061105d5280611c1652806124f152506131ac6000f3fe6080604052600436106102815760003560e01c80639daafec71161014f578063d6f0948c116100c1578063ea0217cf1161007a578063ea0217cf14610755578063ece40cc114610775578063ef3f8bb114610795578063f0b76892146107b5578063f57df22e146107d5578063fe0d94c1146107ea57610288565b8063d6f0948c14610693578063da35c664146106b3578063e01f5237146106c8578063e23a9a52146106e8578063e4917d9f14610715578063e525aa081461073557610288565b8063b54426c811610113578063b54426c8146105e9578063b859f11b14610609578063c0c0e82014610629578063c4d66de814610649578063ce25d71c14610669578063d6159fe51461067e57610288565b80639daafec714610575578063a6c266031461058a578063a72edda31461059f578063adf898a4146105bf578063b1610d7e146105d457610288565b80635c19a95c116101f357806370b0f660116101ac57806370b0f660146104cb5780638b34a960146104eb57806392ab89bb14610500578063932d5157146105155780639a9e3b6e146105355780639ae697bf1461055557610288565b80635c19a95c146104215780636198e3391461044157806365da126414610461578063671dd275146104815780636a661755146104965780636dc2dc6c146104ab57610288565b806332687ec11161024557806332687ec11461035b57806337f135d7146103885780633e4f49e61461039d57806354fd4d50146103ca578063587a6ecb146103ec57806358e9fff01461040157610288565b8063013cf08b1461028d57806302ec8f9e146102ca57806315373e3d146102ec57806317977c611461030c57806324b0435f1461033957610288565b3661028857005b600080fd5b34801561029957600080fd5b506102ad6102a83660046128e1565b6107fd565b6040516102c19897969594939291906129ed565b60405180910390f35b3480156102d657600080fd5b506102ea6102e53660046128e1565b610862565b005b3480156102f857600080fd5b506102ea610307366004612925565b61088f565b34801561031857600080fd5b5061032c6103273660046126d8565b610992565b6040516102c19190612ab6565b34801561034557600080fd5b5061034e6109a4565b6040516102c1919061299c565b34801561036757600080fd5b5061037b6103763660046128e1565b6109bc565b6040516102c19190612aab565b34801561039457600080fd5b5061032c610a0a565b3480156103a957600080fd5b506103bd6103b83660046128e1565b610a10565b6040516102c19190612abf565b3480156103d657600080fd5b506103df610b4c565b6040516102c19190612ad3565b3480156103f857600080fd5b5061032c610b75565b34801561040d57600080fd5b5061032c61041c3660046126f3565b610b7b565b34801561042d57600080fd5b506102ea61043c3660046126d8565b610bc9565b34801561044d57600080fd5b506102ea61045c3660046128e1565b610ceb565b34801561046d57600080fd5b5061034e61047c3660046126d8565b610e38565b34801561048d57600080fd5b5061032c610e53565b3480156104a257600080fd5b5061032c610e59565b3480156104b757600080fd5b506102ea6104c63660046128e1565b610e5f565b3480156104d757600080fd5b506102ea6104e63660046128e1565b610ea4565b3480156104f757600080fd5b5061034e610ec8565b34801561050c57600080fd5b506102ea610eec565b34801561052157600080fd5b506102ea6105303660046128e1565b610f73565b34801561054157600080fd5b506102ea6105503660046128e1565b611025565b34801561056157600080fd5b5061032c6105703660046126d8565b611049565b34801561058157600080fd5b5061034e61105b565b34801561059657600080fd5b5061032c61107f565b3480156105ab57600080fd5b5061032c6105ba3660046126d8565b611085565b3480156105cb57600080fd5b5061034e611097565b3480156105e057600080fd5b5061032c6110a6565b3480156105f557600080fd5b506102ea6106043660046128e1565b6110ac565b34801561061557600080fd5b506102ea610624366004612800565b6111f5565b34801561063557600080fd5b506102ea6106443660046128e1565b611243565b34801561065557600080fd5b506102ea6106643660046126d8565b611267565b34801561067557600080fd5b5061032c6114aa565b34801561068a57600080fd5b5061032c6114b0565b34801561069f57600080fd5b5061032c6106ae366004612753565b6114b6565b3480156106bf57600080fd5b5061032c6114cc565b3480156106d457600080fd5b5061032c6106e33660046128e1565b6114d6565b3480156106f457600080fd5b506107086107033660046128f9565b6114e8565b6040516102c191906130db565b34801561072157600080fd5b506102ea6107303660046128e1565b61155a565b34801561074157600080fd5b5061037b6107503660046128f9565b61157e565b34801561076157600080fd5b506102ea6107703660046128e1565b6115c1565b34801561078157600080fd5b506102ea6107903660046128e1565b6115e5565b3480156107a157600080fd5b506102ea6107b03660046128e1565b611609565b3480156107c157600080fd5b506102ea6107d03660046127a1565b61169b565b3480156107e157600080fd5b5061034e6117f6565b6102ea6107f83660046128e1565b61181a565b603d818154811061080a57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461088a5760405162461bcd60e51b815260040161088190612e49565b60405180910390fd5b603555565b3361089a833361157e565b1580156108ad57506108ab836109bc565b155b3332146108bb5760006108bf565b6152085b61ffff1681156109805760005a90506108d93387876118ac565b60006108f66127106108f0856108f05a8790611add565b90611b1f565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce8079061094790889085906004016129b0565b600060405180830381600087803b15801561096157600080fd5b505af1158015610975573d6000803e3d6000fd5b50505050505061098b565b61098b3386866118ac565b5050505050565b603e6020526000908152604090205481565b73b04e030140b30c27bcdfaafffa98c57d80eda7b490565b6000603554603d83815481106109ce57fe5b906000526020600020906008020160050154603d84815481106109ed57fe5b90600052602060002090600802016004015401101590505b919050565b60335481565b6000610a1a6114cc565b8211158015610a295750600082115b610a455760405162461bcd60e51b815260040161088190612fa6565b6000603d8381548110610a5457fe5b906000526020600020906008020190508060020154610a71611b44565b11610a80576000915050610a05565b8060030154610a8d611b44565b11610a9c576001915050610a05565b80600501548160040154111580610abe57506035548160050154826004015401105b15610acd576002915050610a05565b600681015460ff1615610ae4576005915050610a05565b610b036034546108f06033548460030154611b1f90919063ffffffff16565b610b0b611b44565b10610b1a576006915050610a05565b6033546003820154610b2b91611b1f565b610b33611b44565b10610b42576004915050610a05565b6003915050610a05565b60408051808201909152600f81526e0d0b9c185d18da0b595e1c1b1bda5d608a1b602082015290565b603a5481565b6001600160a01b038381166000908152603c60205260408120549091163314610bb65760405162461bcd60e51b815260040161088190613036565b610bc1848484611b48565b949350505050565b336000818152603c60205260409020546001600160a01b039081169190831614801590610bff57506001600160a01b0382163014155b8015610c1357506001600160a01b03821615155b8015610c315750806001600160a01b0316826001600160a01b031614155b610c4d5760405162461bcd60e51b815260040161088190612e80565b6001600160a01b03811615610c93576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f91610d489185916004016129b0565b600060405180830381600087803b158015610d6257600080fd5b505af1925050508015610d73575060015b610df6573d808015610da1576040519150601f19603f3d011682016040523d82523d6000602084013e610da6565b606091505b5080604051610db59190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a350610e2b565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3482611b70565b5050565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610e7e5760405162461bcd60e51b815260040161088190612e49565b6033548110610e9f5760405162461bcd60e51b815260040161088190612d6d565b603a55565b333014610ec35760405162461bcd60e51b815260040161088190612e49565b603755565b7f000000000000000000000000000000000000000000000000000000000000000081565b336000908152603c60205260409020546001600160a01b031680610f225760405162461bcd60e51b815260040161088190612fec565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b610f7b6109a4565b6001600160a01b0316336001600160a01b031614610fab5760405162461bcd60e51b815260040161088190612f7f565b604051633a08bde160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e822f78490610ff7908490600401612ab6565b600060405180830381600087803b15801561101157600080fd5b505af115801561098b573d6000803e3d6000fd5b3330146110445760405162461bcd60e51b815260040161088190612e49565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916111099185916004016129b0565b600060405180830381600087803b15801561112357600080fd5b505af1925050508015611134575060015b6111b7573d808015611162576040519150601f19603f3d011682016040523d82523d6000602084013e611167565b606091505b50806040516111769190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506111ec565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3482611c54565b60008351116112165760405162461bcd60e51b815260040161088190612e1f565b61123e838383611226863361157e565b1580156112395750611237866109bc565b155b611c5e565b505050565b3330146112625760405162461bcd60e51b815260040161088190612e49565b603955565b600054610100900460ff16806112805750611280611ea1565b8061128e575060005460ff16155b6112aa5760405162461bcd60e51b815260040161088190612f31565b600054610100900460ff161580156112d5576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff199094169390931716919091179055611495611ea7565b8015610e34576000805461ff00191690555050565b60395481565b60375481565b60006114c3338484611b48565b90505b92915050565b603d546000190190565b60416020526000908152604090205481565b6114f06125d2565b603d83815481106114fd57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146115795760405162461bcd60e51b815260040161088190612e49565b603355565b6000603d838154811061158d57fe5b600091825260208083206001600160a01b03861684526007600890930201919091019052604090205460ff16905092915050565b3330146115e05760405162461bcd60e51b815260040161088190612e49565b603855565b3330146116045760405162461bcd60e51b815260040161088190612e49565b603655565b6116116109a4565b6001600160a01b0316336001600160a01b0316146116415760405162461bcd60e51b815260040161088190612f7f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fc6116788347611ee8565b6040518115909202916000818181858888f1935050505061169857600080fd5b50565b6001600160a01b038087166000908152603b60205260409081902054905163e113335f60e01b815288927f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916116fc9185916004016129b0565b600060405180830381600087803b15801561171657600080fd5b505af1925050508015611727575060015b6117aa573d808015611755576040519150601f19603f3d011682016040523d82523d6000602084013e61175a565b606091505b50806040516117699190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506117df565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b6117ed878787878787611efe565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b3330141561183a5760405162461bcd60e51b815260040161088190612c36565b6000603d828154811061184957fe5b6000918252602080832060016008909302019182015485845260419091526040909220549092506001600160a01b0390911690813f90811461189d5760405162461bcd60e51b815260040161088190612d17565b6118a684611f7e565b50505050565b60016118b783610a10565b60068111156118c257fe5b146118df5760405162461bcd60e51b815260040161088190612bef565b6000603d83815481106118ee57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b90945291909420549294501015908061194d5760405162461bcd60e51b815260040161088190612eb7565b825460ff161561199c578254610100900460ff1615611983576001830154600485015461197991611add565b600485015561199c565b6001830154600585015461199691611add565b60058501555b84156119bb5760048401546119b19082611b1f565b60048501556119d0565b60058401546119ca9082611b1f565b60058501555b6006840154610100900460ff16158015611a0057506039546119fe6119f3611b44565b600387015490611add565b105b15611a44576005840154600485015411158215158114611a425760068501805461ff001916610100179055603a546003860154611a3c91611b1f565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a546003870154611a8f938b93611a8a9391926108f092839190611b1f565b612110565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b584604051611acc9190612ab6565b60405180910390a450505050505050565b60006114c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061214d565b6000828201838110156114c35760405162461bcd60e51b815260040161088190612ce0565b4290565b6000611b55848484612179565b6000818152604160205260409020933f909355509092915050565b336000908152603f6020526040902054611b88611b44565b11611ba55760405162461bcd60e51b815260040161088190612db1565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054611bf391839061214d565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610ff7919085906004016129b0565b61169833826124c7565b3381328214611c6e576000611c72565b6152085b61ffff168115611ddd5760005a905060005b8851811015611d3b576000898281518110611c9b57fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611cdb57506001600160a01b03811633145b611cf75760405162461bcd60e51b815260040161088190613036565b861580611d0b5750611d09898261157e565b155b611d275760405162461bcd60e51b8152600401610881906130a4565b611d32818a8a6118ac565b50600101611c84565b506000611d536127106108f0856108f05a8790611add565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce80790611da490889085906004016129b0565b600060405180830381600087803b158015611dbe57600080fd5b505af1158015611dd2573d6000803e3d6000fd5b5050505050506117ed565b60005b8751811015611e97576000888281518110611df757fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611e3757506001600160a01b03811633145b611e535760405162461bcd60e51b815260040161088190613036565b851580611e675750611e65888261157e565b155b611e835760405162461bcd60e51b8152600401610881906130a4565b611e8e8189896118ac565b50600101611de0565b5050505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6000818310611ef757816114c3565b5090919050565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf90611f3a90899030908a908a908a908a908a90600401612a33565b600060405180830381600087803b158015611f5457600080fd5b505af1158015611f68573d6000803e3d6000fd5b50505050611f7686866124c7565b505050505050565b6004611f8982610a10565b6006811115611f9457fe5b14611fb15760405162461bcd60e51b815260040161088190612b29565b6000603d8281548110611fc057fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b0316611ffb816125cc565b6120175760405162461bcd60e51b815260040161088190612ae6565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161205b91612980565b600060405180830381855af49150503d8060008114612096576040519150601f19603f3d011682016040523d82523d6000602084013e61209b565b606091505b5091509150816120de578051156120c6578060405162461bcd60e51b81526004016108819190612ad3565b60405162461bcd60e51b81526004016108819061306d565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b6001600160a01b0382166000908152603f6020526040902054811115610e34576001600160a01b03919091166000908152603f6020526040902055565b600081848411156121715760405162461bcd60e51b81526004016108819190612ad3565b505050900390565b6001600160a01b0383166000908152603b60205260408120546036548110156121b45760405162461bcd60e51b815260040161088190612c83565b6121bd846125cc565b6121d95760405162461bcd60e51b815260040161088190612eee565b6001600160a01b0385166000908152603e6020526040902054801561224b57600061220382610a10565b9050600181600681111561221357fe5b1415801561222d5750600081600681111561222a57fe5b14155b6122495760405162461bcd60e51b815260040161088190612b74565b505b600061225b6037546108f0611b44565b9050600061227460385483611b1f90919063ffffffff16565b905061227e6125f2565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff199093169290921794909416179055906124306114cc565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350612472928d92611a8a9290916108f0919082908a90611b1f565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516124b29493929190612a74565b60405180910390a39998505050505050505050565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd9061251b9085907f00000000000000000000000000000000000000000000000000000000000000009086906004016129c9565b602060405180830381600087803b15801561253557600080fd5b505af1158015612549573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256d91906128c5565b6125895760405162461bcd60e51b815260040161088190612de8565b6001600160a01b0382166000908152603b60205260409020546125ac9082611b1f565b6001600160a01b039092166000908152603b602052604090209190915550565b3b151590565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b03811681146114c657600080fd5b80356114c681613168565b600082601f83011261267f578081fd5b813567ffffffffffffffff811115612695578182fd5b6126a8601f8201601f1916602001613100565b91508082528360208285010111156126bf57600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156126e9578081fd5b6114c3838361264d565b600080600060608486031215612707578182fd5b833561271281613153565b9250602084013561272281613153565b9150604084013567ffffffffffffffff81111561273d578182fd5b6127498682870161266f565b9150509250925092565b60008060408385031215612765578182fd5b823561277081613153565b9150602083013567ffffffffffffffff81111561278b578182fd5b6127978582860161266f565b9150509250929050565b60008060008060008060c087890312156127b9578182fd5b6127c3888861264d565b95506020870135945060408701359350606087013560ff811681146127e6578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215612814578283fd5b833567ffffffffffffffff8082111561282b578485fd5b818601915086601f83011261283e578485fd5b81358181111561284c578586fd5b6020915081810261285e838201613100565b8281528381019085850183870186018c101561287857898afd5b8996505b848710156128a25761288e8c8261264d565b83526001969096019591850191850161287c565b50975050505085013592506128bc90508560408601612664565b90509250925092565b6000602082840312156128d6578081fd5b81516114c381613168565b6000602082840312156128f2578081fd5b5035919050565b6000806040838503121561290b578182fd5b8235915061291c846020850161264d565b90509250929050565b60008060408385031215612937578182fd5b82359150602083013561294981613168565b809150509250929050565b6000815180845261296c816020860160208601613127565b601f01601f19169290920160200192915050565b60008251612992818460208701613127565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152612aa16080830184612954565b9695505050505050565b901515815260200190565b90815260200190565b6020810160078310612acd57fe5b91905290565b6000602082526114c36020830184612954565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252602d908201527f476f7665726e616e63653a3a70726f706f73653a2070736575646f2d6578746560408201526c393730b610333ab731ba34b7b760991b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526036908201527f476f7665726e616e63653a3a70726f706f73653a206d6574616d6f72706869636040820152750818dbdb9d1c9858dd1cc81b9bdd08185b1b1bddd95960521b606082015260800190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526010908201526f43616e206e6f7420626520656d70747960801b604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600d908201526c6f6e6c79206d756c746973696760981b604082015260600190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b60208082526019908201527f476f7665726e616e63653a20766f74656420616c726561647900000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b60405181810167ffffffffffffffff8111828210171561311f57600080fd5b604052919050565b60005b8381101561314257818101518382015260200161312a565b838111156118a65750506000910152565b6001600160a01b038116811461169857600080fd5b801515811461169857600080fdfea2646970667358221220b75004153b6c8b4905c018daca78cb0fa6d3859298be55252bcf6ba75ea68d0e64736f6c634300060c0033";class ks extends Ka{constructor(...e){e.length>1?super(...e):super(Rs,Os,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Rs)}static connect(e,t){return new $a(e,Rs,t)}}ks.bytecode=Os,ks.abi=Rs;const Ps=[{inputs:[{internalType:"address",name:"_deployedStakingProxyContractAddress",type:"address"},{internalType:"address",name:"_deployedRelayerRegistryImplementationAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"TORN",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployedRelayerRegistryImplementationAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployedStakingProxyContractAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"gasCompensationVaultAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"governanceProxyAddress",outputs:[{internalType:"address payable",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"oldStakingProxyAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registryProxyAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"userVaultAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],As="0x60c060405234801561001057600080fd5b50604051613adb380380613adb83398101604081905261002f9161004d565b6001600160601b0319606092831b8116608052911b1660a05261009e565b6000806040838503121561005f578182fd5b825161006a81610086565b602084015190925061007b81610086565b809150509250929050565b6001600160a01b038116811461009b57600080fd5b50565b60805160601c60a05160601c613a056100d66000398061027a52806104985250806102f952806103f452806104bc5250613a056000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063373058b811610066578063373058b8146100ce5780634655478f146100d857806361697d64146100e05780636fc6091d146100e85780639b49989a146100f057610093565b80630cc784761461009857806313f32237146100b657806324044543146100be57806332bf1039146100c6575b600080fd5b6100a06100f8565b6040516100ad9190610542565b60405180910390f35b6100a0610110565b6100a0610128565b6100a0610140565b6100d6610158565b005b6100a061047e565b6100a0610496565b6100a06104ba565b6100a06104de565b7358e8dcc13be9780fc42e8723d8ead4cf46943df281565b732fc93484614a34f26f7970cbb94615ba109bb4bf81565b73fa4c1f3f7d5dd7c12a9adb82cd7dda542e3d59ef81565b7377777feddddffc19ff86db637967013e6c6a116c81565b6040516370a0823160e01b8152732fc93484614a34f26f7970cbb94615ba109bb4bf90819063f58073b1907377777feddddffc19ff86db637967013e6c6a116c906370a08231906101ad908590600401610542565b60206040518083038186803b1580156101c557600080fd5b505afa1580156101d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fd919061052a565b6040518263ffffffff1660e01b81526004016102199190610592565b600060405180830381600087803b15801561023357600080fd5b505af1158015610247573d6000803e3d6000fd5b5050604051631b2ce7f360e11b81527358e8dcc13be9780fc42e8723d8ead4cf46943df29250633659cfe691506102a2907f000000000000000000000000000000000000000000000000000000000000000090600401610542565b600060405180830381600087803b1580156102bc57600080fd5b505af11580156102d0573d6000803e3d6000fd5b50505050735efda50f22d34f262c29268506c5fa42cb56a1ce6001600160a01b0316633659cfe67f000000000000000000000000000000000000000000000000000000000000000073fa4c1f3f7d5dd7c12a9adb82cd7dda542e3d59ef732f50508a8a3d323b91336fa3ea6ae50e55f3218560405161034e906104f6565b61035a93929190610556565b604051809103906000f080158015610376573d6000803e3d6000fd5b506040518263ffffffff1660e01b81526004016103939190610542565b600060405180830381600087803b1580156103ad57600080fd5b505af11580156103c1573d6000803e3d6000fd5b505060405163a9059cbb60e01b81527377777feddddffc19ff86db637967013e6c6a116c925063a9059cbb9150610428907f0000000000000000000000000000000000000000000000000000000000000000906913ecbccf7737e6b0000090600401610579565b602060405180830381600087803b15801561044257600080fd5b505af1158015610456573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047a9190610503565b5050565b735efda50f22d34f262c29268506c5fa42cb56a1ce81565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b732f50508a8a3d323b91336fa3ea6ae50e55f3218581565b6134348061059c83390190565b600060208284031215610514578081fd5b81518015158114610523578182fd5b9392505050565b60006020828403121561053b578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b03929092168252602082015260400190565b9081526020019056fe60e06040523480156200001157600080fd5b50604051620034343803806200343483398101604081905262000034916200016b565b82828281818181600060019054906101000a900460ff16806200005c57506200005c62000124565b806200006b575060005460ff16155b620000935760405162461bcd60e51b81526004016200008a90620001be565b60405180910390fd5b600054610100900460ff16158015620000bf576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000dd6200012a565b8015620000f0576000805461ff00191690555b506001600160601b0319606091821b811660805291811b821660a0529590951b90941660c052506200022595505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b60008060006060848603121562000180578283fd5b83516200018d816200020c565b6020850151909350620001a0816200020c565b6040850151909250620001b3816200020c565b809150509250925092565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6001600160a01b03811681146200022257600080fd5b50565b60805160601c60a05160601c60c05160601c6131ac6200028860003980610d1352806110d452806116c752806117f85250806109105280610eca5280610fc252806116435280611d6d52508061105d5280611c1652806124f152506131ac6000f3fe6080604052600436106102815760003560e01c80639daafec71161014f578063d6f0948c116100c1578063ea0217cf1161007a578063ea0217cf14610755578063ece40cc114610775578063ef3f8bb114610795578063f0b76892146107b5578063f57df22e146107d5578063fe0d94c1146107ea57610288565b8063d6f0948c14610693578063da35c664146106b3578063e01f5237146106c8578063e23a9a52146106e8578063e4917d9f14610715578063e525aa081461073557610288565b8063b54426c811610113578063b54426c8146105e9578063b859f11b14610609578063c0c0e82014610629578063c4d66de814610649578063ce25d71c14610669578063d6159fe51461067e57610288565b80639daafec714610575578063a6c266031461058a578063a72edda31461059f578063adf898a4146105bf578063b1610d7e146105d457610288565b80635c19a95c116101f357806370b0f660116101ac57806370b0f660146104cb5780638b34a960146104eb57806392ab89bb14610500578063932d5157146105155780639a9e3b6e146105355780639ae697bf1461055557610288565b80635c19a95c146104215780636198e3391461044157806365da126414610461578063671dd275146104815780636a661755146104965780636dc2dc6c146104ab57610288565b806332687ec11161024557806332687ec11461035b57806337f135d7146103885780633e4f49e61461039d57806354fd4d50146103ca578063587a6ecb146103ec57806358e9fff01461040157610288565b8063013cf08b1461028d57806302ec8f9e146102ca57806315373e3d146102ec57806317977c611461030c57806324b0435f1461033957610288565b3661028857005b600080fd5b34801561029957600080fd5b506102ad6102a83660046128e1565b6107fd565b6040516102c19897969594939291906129ed565b60405180910390f35b3480156102d657600080fd5b506102ea6102e53660046128e1565b610862565b005b3480156102f857600080fd5b506102ea610307366004612925565b61088f565b34801561031857600080fd5b5061032c6103273660046126d8565b610992565b6040516102c19190612ab6565b34801561034557600080fd5b5061034e6109a4565b6040516102c1919061299c565b34801561036757600080fd5b5061037b6103763660046128e1565b6109bc565b6040516102c19190612aab565b34801561039457600080fd5b5061032c610a0a565b3480156103a957600080fd5b506103bd6103b83660046128e1565b610a10565b6040516102c19190612abf565b3480156103d657600080fd5b506103df610b4c565b6040516102c19190612ad3565b3480156103f857600080fd5b5061032c610b75565b34801561040d57600080fd5b5061032c61041c3660046126f3565b610b7b565b34801561042d57600080fd5b506102ea61043c3660046126d8565b610bc9565b34801561044d57600080fd5b506102ea61045c3660046128e1565b610ceb565b34801561046d57600080fd5b5061034e61047c3660046126d8565b610e38565b34801561048d57600080fd5b5061032c610e53565b3480156104a257600080fd5b5061032c610e59565b3480156104b757600080fd5b506102ea6104c63660046128e1565b610e5f565b3480156104d757600080fd5b506102ea6104e63660046128e1565b610ea4565b3480156104f757600080fd5b5061034e610ec8565b34801561050c57600080fd5b506102ea610eec565b34801561052157600080fd5b506102ea6105303660046128e1565b610f73565b34801561054157600080fd5b506102ea6105503660046128e1565b611025565b34801561056157600080fd5b5061032c6105703660046126d8565b611049565b34801561058157600080fd5b5061034e61105b565b34801561059657600080fd5b5061032c61107f565b3480156105ab57600080fd5b5061032c6105ba3660046126d8565b611085565b3480156105cb57600080fd5b5061034e611097565b3480156105e057600080fd5b5061032c6110a6565b3480156105f557600080fd5b506102ea6106043660046128e1565b6110ac565b34801561061557600080fd5b506102ea610624366004612800565b6111f5565b34801561063557600080fd5b506102ea6106443660046128e1565b611243565b34801561065557600080fd5b506102ea6106643660046126d8565b611267565b34801561067557600080fd5b5061032c6114aa565b34801561068a57600080fd5b5061032c6114b0565b34801561069f57600080fd5b5061032c6106ae366004612753565b6114b6565b3480156106bf57600080fd5b5061032c6114cc565b3480156106d457600080fd5b5061032c6106e33660046128e1565b6114d6565b3480156106f457600080fd5b506107086107033660046128f9565b6114e8565b6040516102c191906130db565b34801561072157600080fd5b506102ea6107303660046128e1565b61155a565b34801561074157600080fd5b5061037b6107503660046128f9565b61157e565b34801561076157600080fd5b506102ea6107703660046128e1565b6115c1565b34801561078157600080fd5b506102ea6107903660046128e1565b6115e5565b3480156107a157600080fd5b506102ea6107b03660046128e1565b611609565b3480156107c157600080fd5b506102ea6107d03660046127a1565b61169b565b3480156107e157600080fd5b5061034e6117f6565b6102ea6107f83660046128e1565b61181a565b603d818154811061080a57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461088a5760405162461bcd60e51b815260040161088190612e49565b60405180910390fd5b603555565b3361089a833361157e565b1580156108ad57506108ab836109bc565b155b3332146108bb5760006108bf565b6152085b61ffff1681156109805760005a90506108d93387876118ac565b60006108f66127106108f0856108f05a8790611add565b90611b1f565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce8079061094790889085906004016129b0565b600060405180830381600087803b15801561096157600080fd5b505af1158015610975573d6000803e3d6000fd5b50505050505061098b565b61098b3386866118ac565b5050505050565b603e6020526000908152604090205481565b73b04e030140b30c27bcdfaafffa98c57d80eda7b490565b6000603554603d83815481106109ce57fe5b906000526020600020906008020160050154603d84815481106109ed57fe5b90600052602060002090600802016004015401101590505b919050565b60335481565b6000610a1a6114cc565b8211158015610a295750600082115b610a455760405162461bcd60e51b815260040161088190612fa6565b6000603d8381548110610a5457fe5b906000526020600020906008020190508060020154610a71611b44565b11610a80576000915050610a05565b8060030154610a8d611b44565b11610a9c576001915050610a05565b80600501548160040154111580610abe57506035548160050154826004015401105b15610acd576002915050610a05565b600681015460ff1615610ae4576005915050610a05565b610b036034546108f06033548460030154611b1f90919063ffffffff16565b610b0b611b44565b10610b1a576006915050610a05565b6033546003820154610b2b91611b1f565b610b33611b44565b10610b42576004915050610a05565b6003915050610a05565b60408051808201909152600f81526e0d0b9c185d18da0b595e1c1b1bda5d608a1b602082015290565b603a5481565b6001600160a01b038381166000908152603c60205260408120549091163314610bb65760405162461bcd60e51b815260040161088190613036565b610bc1848484611b48565b949350505050565b336000818152603c60205260409020546001600160a01b039081169190831614801590610bff57506001600160a01b0382163014155b8015610c1357506001600160a01b03821615155b8015610c315750806001600160a01b0316826001600160a01b031614155b610c4d5760405162461bcd60e51b815260040161088190612e80565b6001600160a01b03811615610c93576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f91610d489185916004016129b0565b600060405180830381600087803b158015610d6257600080fd5b505af1925050508015610d73575060015b610df6573d808015610da1576040519150601f19603f3d011682016040523d82523d6000602084013e610da6565b606091505b5080604051610db59190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a350610e2b565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3482611b70565b5050565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610e7e5760405162461bcd60e51b815260040161088190612e49565b6033548110610e9f5760405162461bcd60e51b815260040161088190612d6d565b603a55565b333014610ec35760405162461bcd60e51b815260040161088190612e49565b603755565b7f000000000000000000000000000000000000000000000000000000000000000081565b336000908152603c60205260409020546001600160a01b031680610f225760405162461bcd60e51b815260040161088190612fec565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b610f7b6109a4565b6001600160a01b0316336001600160a01b031614610fab5760405162461bcd60e51b815260040161088190612f7f565b604051633a08bde160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e822f78490610ff7908490600401612ab6565b600060405180830381600087803b15801561101157600080fd5b505af115801561098b573d6000803e3d6000fd5b3330146110445760405162461bcd60e51b815260040161088190612e49565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916111099185916004016129b0565b600060405180830381600087803b15801561112357600080fd5b505af1925050508015611134575060015b6111b7573d808015611162576040519150601f19603f3d011682016040523d82523d6000602084013e611167565b606091505b50806040516111769190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506111ec565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3482611c54565b60008351116112165760405162461bcd60e51b815260040161088190612e1f565b61123e838383611226863361157e565b1580156112395750611237866109bc565b155b611c5e565b505050565b3330146112625760405162461bcd60e51b815260040161088190612e49565b603955565b600054610100900460ff16806112805750611280611ea1565b8061128e575060005460ff16155b6112aa5760405162461bcd60e51b815260040161088190612f31565b600054610100900460ff161580156112d5576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff199094169390931716919091179055611495611ea7565b8015610e34576000805461ff00191690555050565b60395481565b60375481565b60006114c3338484611b48565b90505b92915050565b603d546000190190565b60416020526000908152604090205481565b6114f06125d2565b603d83815481106114fd57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146115795760405162461bcd60e51b815260040161088190612e49565b603355565b6000603d838154811061158d57fe5b600091825260208083206001600160a01b03861684526007600890930201919091019052604090205460ff16905092915050565b3330146115e05760405162461bcd60e51b815260040161088190612e49565b603855565b3330146116045760405162461bcd60e51b815260040161088190612e49565b603655565b6116116109a4565b6001600160a01b0316336001600160a01b0316146116415760405162461bcd60e51b815260040161088190612f7f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fc6116788347611ee8565b6040518115909202916000818181858888f1935050505061169857600080fd5b50565b6001600160a01b038087166000908152603b60205260409081902054905163e113335f60e01b815288927f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916116fc9185916004016129b0565b600060405180830381600087803b15801561171657600080fd5b505af1925050508015611727575060015b6117aa573d808015611755576040519150601f19603f3d011682016040523d82523d6000602084013e61175a565b606091505b50806040516117699190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506117df565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b6117ed878787878787611efe565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b3330141561183a5760405162461bcd60e51b815260040161088190612c36565b6000603d828154811061184957fe5b6000918252602080832060016008909302019182015485845260419091526040909220549092506001600160a01b0390911690813f90811461189d5760405162461bcd60e51b815260040161088190612d17565b6118a684611f7e565b50505050565b60016118b783610a10565b60068111156118c257fe5b146118df5760405162461bcd60e51b815260040161088190612bef565b6000603d83815481106118ee57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b90945291909420549294501015908061194d5760405162461bcd60e51b815260040161088190612eb7565b825460ff161561199c578254610100900460ff1615611983576001830154600485015461197991611add565b600485015561199c565b6001830154600585015461199691611add565b60058501555b84156119bb5760048401546119b19082611b1f565b60048501556119d0565b60058401546119ca9082611b1f565b60058501555b6006840154610100900460ff16158015611a0057506039546119fe6119f3611b44565b600387015490611add565b105b15611a44576005840154600485015411158215158114611a425760068501805461ff001916610100179055603a546003860154611a3c91611b1f565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a546003870154611a8f938b93611a8a9391926108f092839190611b1f565b612110565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b584604051611acc9190612ab6565b60405180910390a450505050505050565b60006114c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061214d565b6000828201838110156114c35760405162461bcd60e51b815260040161088190612ce0565b4290565b6000611b55848484612179565b6000818152604160205260409020933f909355509092915050565b336000908152603f6020526040902054611b88611b44565b11611ba55760405162461bcd60e51b815260040161088190612db1565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054611bf391839061214d565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610ff7919085906004016129b0565b61169833826124c7565b3381328214611c6e576000611c72565b6152085b61ffff168115611ddd5760005a905060005b8851811015611d3b576000898281518110611c9b57fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611cdb57506001600160a01b03811633145b611cf75760405162461bcd60e51b815260040161088190613036565b861580611d0b5750611d09898261157e565b155b611d275760405162461bcd60e51b8152600401610881906130a4565b611d32818a8a6118ac565b50600101611c84565b506000611d536127106108f0856108f05a8790611add565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce80790611da490889085906004016129b0565b600060405180830381600087803b158015611dbe57600080fd5b505af1158015611dd2573d6000803e3d6000fd5b5050505050506117ed565b60005b8751811015611e97576000888281518110611df757fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611e3757506001600160a01b03811633145b611e535760405162461bcd60e51b815260040161088190613036565b851580611e675750611e65888261157e565b155b611e835760405162461bcd60e51b8152600401610881906130a4565b611e8e8189896118ac565b50600101611de0565b5050505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6000818310611ef757816114c3565b5090919050565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf90611f3a90899030908a908a908a908a908a90600401612a33565b600060405180830381600087803b158015611f5457600080fd5b505af1158015611f68573d6000803e3d6000fd5b50505050611f7686866124c7565b505050505050565b6004611f8982610a10565b6006811115611f9457fe5b14611fb15760405162461bcd60e51b815260040161088190612b29565b6000603d8281548110611fc057fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b0316611ffb816125cc565b6120175760405162461bcd60e51b815260040161088190612ae6565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161205b91612980565b600060405180830381855af49150503d8060008114612096576040519150601f19603f3d011682016040523d82523d6000602084013e61209b565b606091505b5091509150816120de578051156120c6578060405162461bcd60e51b81526004016108819190612ad3565b60405162461bcd60e51b81526004016108819061306d565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b6001600160a01b0382166000908152603f6020526040902054811115610e34576001600160a01b03919091166000908152603f6020526040902055565b600081848411156121715760405162461bcd60e51b81526004016108819190612ad3565b505050900390565b6001600160a01b0383166000908152603b60205260408120546036548110156121b45760405162461bcd60e51b815260040161088190612c83565b6121bd846125cc565b6121d95760405162461bcd60e51b815260040161088190612eee565b6001600160a01b0385166000908152603e6020526040902054801561224b57600061220382610a10565b9050600181600681111561221357fe5b1415801561222d5750600081600681111561222a57fe5b14155b6122495760405162461bcd60e51b815260040161088190612b74565b505b600061225b6037546108f0611b44565b9050600061227460385483611b1f90919063ffffffff16565b905061227e6125f2565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff199093169290921794909416179055906124306114cc565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350612472928d92611a8a9290916108f0919082908a90611b1f565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516124b29493929190612a74565b60405180910390a39998505050505050505050565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd9061251b9085907f00000000000000000000000000000000000000000000000000000000000000009086906004016129c9565b602060405180830381600087803b15801561253557600080fd5b505af1158015612549573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256d91906128c5565b6125895760405162461bcd60e51b815260040161088190612de8565b6001600160a01b0382166000908152603b60205260409020546125ac9082611b1f565b6001600160a01b039092166000908152603b602052604090209190915550565b3b151590565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b03811681146114c657600080fd5b80356114c681613168565b600082601f83011261267f578081fd5b813567ffffffffffffffff811115612695578182fd5b6126a8601f8201601f1916602001613100565b91508082528360208285010111156126bf57600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156126e9578081fd5b6114c3838361264d565b600080600060608486031215612707578182fd5b833561271281613153565b9250602084013561272281613153565b9150604084013567ffffffffffffffff81111561273d578182fd5b6127498682870161266f565b9150509250925092565b60008060408385031215612765578182fd5b823561277081613153565b9150602083013567ffffffffffffffff81111561278b578182fd5b6127978582860161266f565b9150509250929050565b60008060008060008060c087890312156127b9578182fd5b6127c3888861264d565b95506020870135945060408701359350606087013560ff811681146127e6578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215612814578283fd5b833567ffffffffffffffff8082111561282b578485fd5b818601915086601f83011261283e578485fd5b81358181111561284c578586fd5b6020915081810261285e838201613100565b8281528381019085850183870186018c101561287857898afd5b8996505b848710156128a25761288e8c8261264d565b83526001969096019591850191850161287c565b50975050505085013592506128bc90508560408601612664565b90509250925092565b6000602082840312156128d6578081fd5b81516114c381613168565b6000602082840312156128f2578081fd5b5035919050565b6000806040838503121561290b578182fd5b8235915061291c846020850161264d565b90509250929050565b60008060408385031215612937578182fd5b82359150602083013561294981613168565b809150509250929050565b6000815180845261296c816020860160208601613127565b601f01601f19169290920160200192915050565b60008251612992818460208701613127565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152612aa16080830184612954565b9695505050505050565b901515815260200190565b90815260200190565b6020810160078310612acd57fe5b91905290565b6000602082526114c36020830184612954565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252602d908201527f476f7665726e616e63653a3a70726f706f73653a2070736575646f2d6578746560408201526c393730b610333ab731ba34b7b760991b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526036908201527f476f7665726e616e63653a3a70726f706f73653a206d6574616d6f72706869636040820152750818dbdb9d1c9858dd1cc81b9bdd08185b1b1bddd95960521b606082015260800190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526010908201526f43616e206e6f7420626520656d70747960801b604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600d908201526c6f6e6c79206d756c746973696760981b604082015260600190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b60208082526019908201527f476f7665726e616e63653a20766f74656420616c726561647900000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b60405181810167ffffffffffffffff8111828210171561311f57600080fd5b604052919050565b60005b8381101561314257818101518382015260200161312a565b838111156118a65750506000910152565b6001600160a01b038116811461169857600080fd5b801515811461169857600080fdfea2646970667358221220b75004153b6c8b4905c018daca78cb0fa6d3859298be55252bcf6ba75ea68d0e64736f6c634300060c0033a26469706673582212205ce84e9446fce11b2c9c1572684a150170d4bffa09fb4c56f9926d2efe573f6b64736f6c634300060c0033";class Cs extends Ka{constructor(...e){e.length>1?super(...e):super(Ps,As,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ps)}static connect(e,t){return new $a(e,Ps,t)}}Cs.bytecode=As,Cs.abi=Ps;var Ns=Object.freeze({__proto__:null,AdminUpgradeableProxy__factory:Es,GovernanceExploitPatchUpgrade__factory:ks,PatchProposal__factory:Cs,metamorphic:ls,mock:_s});const Ds=[{inputs:[{internalType:"address",name:"stakingRewardsAddress",type:"address"},{internalType:"address",name:"gasCompLogic",type:"address"},{internalType:"address",name:"userVaultAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"bytes",name:"errorData",type:"bytes"}],name:"RewardUpdateFailed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"RewardUpdateSuccessful",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"Staking",outputs:[{internalType:"contract ITornadoStakingRewards",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"checkIfQuorumReached",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"gasCompensationVault",outputs:[{internalType:"contract IGasCompensationVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"account",type:"address"}],name:"hasAccountVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposalCodehashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"returnMultisigAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"gasCompensationsLimit",type:"uint256"}],name:"setGasCompensations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawFromHelper",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],Ss="0x60e06040523480156200001157600080fd5b506040516200344138038062003441833981016040819052620000349162000171565b82828282828281818181600060019054906101000a900460ff16806200005f57506200005f6200012a565b806200006e575060005460ff16155b620000965760405162461bcd60e51b81526004016200008d90620001c4565b60405180910390fd5b600054610100900460ff16158015620000c2576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000e062000130565b8015620000f3576000805461ff00191690555b506001600160601b0319606091821b811660805291811b821660a0529590951b90941660c052506200022b98505050505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b60008060006060848603121562000186578283fd5b8351620001938162000212565b6020850151909350620001a68162000212565b6040850151909250620001b98162000212565b809150509250925092565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6001600160a01b03811681146200022857600080fd5b50565b60805160601c60a05160601c60c05160601c6131b36200028e60003980610d1a52806110db52806116ce52806117ff5250806109105280610ed15280610fc9528061164a5280611d745250806110645280611c1d52806124f852506131b36000f3fe6080604052600436106102815760003560e01c80639daafec71161014f578063d6f0948c116100c1578063ea0217cf1161007a578063ea0217cf14610755578063ece40cc114610775578063ef3f8bb114610795578063f0b76892146107b5578063f57df22e146107d5578063fe0d94c1146107ea57610288565b8063d6f0948c14610693578063da35c664146106b3578063e01f5237146106c8578063e23a9a52146106e8578063e4917d9f14610715578063e525aa081461073557610288565b8063b54426c811610113578063b54426c8146105e9578063b859f11b14610609578063c0c0e82014610629578063c4d66de814610649578063ce25d71c14610669578063d6159fe51461067e57610288565b80639daafec714610575578063a6c266031461058a578063a72edda31461059f578063adf898a4146105bf578063b1610d7e146105d457610288565b80635c19a95c116101f357806370b0f660116101ac57806370b0f660146104cb5780638b34a960146104eb57806392ab89bb14610500578063932d5157146105155780639a9e3b6e146105355780639ae697bf1461055557610288565b80635c19a95c146104215780636198e3391461044157806365da126414610461578063671dd275146104815780636a661755146104965780636dc2dc6c146104ab57610288565b806332687ec11161024557806332687ec11461035b57806337f135d7146103885780633e4f49e61461039d57806354fd4d50146103ca578063587a6ecb146103ec57806358e9fff01461040157610288565b8063013cf08b1461028d57806302ec8f9e146102ca57806315373e3d146102ec57806317977c611461030c57806324b0435f1461033957610288565b3661028857005b600080fd5b34801561029957600080fd5b506102ad6102a83660046128e8565b6107fd565b6040516102c19897969594939291906129f4565b60405180910390f35b3480156102d657600080fd5b506102ea6102e53660046128e8565b610862565b005b3480156102f857600080fd5b506102ea61030736600461292c565b61088f565b34801561031857600080fd5b5061032c6103273660046126df565b610992565b6040516102c19190612abd565b34801561034557600080fd5b5061034e6109a4565b6040516102c191906129a3565b34801561036757600080fd5b5061037b6103763660046128e8565b6109bc565b6040516102c19190612ab2565b34801561039457600080fd5b5061032c610a0a565b3480156103a957600080fd5b506103bd6103b83660046128e8565b610a10565b6040516102c19190612ac6565b3480156103d657600080fd5b506103df610b4c565b6040516102c19190612ada565b3480156103f857600080fd5b5061032c610b7c565b34801561040d57600080fd5b5061032c61041c3660046126fa565b610b82565b34801561042d57600080fd5b506102ea61043c3660046126df565b610bd0565b34801561044d57600080fd5b506102ea61045c3660046128e8565b610cf2565b34801561046d57600080fd5b5061034e61047c3660046126df565b610e3f565b34801561048d57600080fd5b5061032c610e5a565b3480156104a257600080fd5b5061032c610e60565b3480156104b757600080fd5b506102ea6104c63660046128e8565b610e66565b3480156104d757600080fd5b506102ea6104e63660046128e8565b610eab565b3480156104f757600080fd5b5061034e610ecf565b34801561050c57600080fd5b506102ea610ef3565b34801561052157600080fd5b506102ea6105303660046128e8565b610f7a565b34801561054157600080fd5b506102ea6105503660046128e8565b61102c565b34801561056157600080fd5b5061032c6105703660046126df565b611050565b34801561058157600080fd5b5061034e611062565b34801561059657600080fd5b5061032c611086565b3480156105ab57600080fd5b5061032c6105ba3660046126df565b61108c565b3480156105cb57600080fd5b5061034e61109e565b3480156105e057600080fd5b5061032c6110ad565b3480156105f557600080fd5b506102ea6106043660046128e8565b6110b3565b34801561061557600080fd5b506102ea610624366004612807565b6111fc565b34801561063557600080fd5b506102ea6106443660046128e8565b61124a565b34801561065557600080fd5b506102ea6106643660046126df565b61126e565b34801561067557600080fd5b5061032c6114b1565b34801561068a57600080fd5b5061032c6114b7565b34801561069f57600080fd5b5061032c6106ae36600461275a565b6114bd565b3480156106bf57600080fd5b5061032c6114d3565b3480156106d457600080fd5b5061032c6106e33660046128e8565b6114dd565b3480156106f457600080fd5b50610708610703366004612900565b6114ef565b6040516102c191906130e2565b34801561072157600080fd5b506102ea6107303660046128e8565b611561565b34801561074157600080fd5b5061037b610750366004612900565b611585565b34801561076157600080fd5b506102ea6107703660046128e8565b6115c8565b34801561078157600080fd5b506102ea6107903660046128e8565b6115ec565b3480156107a157600080fd5b506102ea6107b03660046128e8565b611610565b3480156107c157600080fd5b506102ea6107d03660046127a8565b6116a2565b3480156107e157600080fd5b5061034e6117fd565b6102ea6107f83660046128e8565b611821565b603d818154811061080a57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461088a5760405162461bcd60e51b815260040161088190612e50565b60405180910390fd5b603555565b3361089a8333611585565b1580156108ad57506108ab836109bc565b155b3332146108bb5760006108bf565b6152085b61ffff1681156109805760005a90506108d93387876118b3565b60006108f66127106108f0856108f05a8790611ae4565b90611b26565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce8079061094790889085906004016129b7565b600060405180830381600087803b15801561096157600080fd5b505af1158015610975573d6000803e3d6000fd5b50505050505061098b565b61098b3386866118b3565b5050505050565b603e6020526000908152604090205481565b73b04e030140b30c27bcdfaafffa98c57d80eda7b490565b6000603554603d83815481106109ce57fe5b906000526020600020906008020160050154603d84815481106109ed57fe5b90600052602060002090600802016004015401101590505b919050565b60335481565b6000610a1a6114d3565b8211158015610a295750600082115b610a455760405162461bcd60e51b815260040161088190612fad565b6000603d8381548110610a5457fe5b906000526020600020906008020190508060020154610a71611b4b565b11610a80576000915050610a05565b8060030154610a8d611b4b565b11610a9c576001915050610a05565b600681015460ff1615610ab3576005915050610a05565b80600501548160040154111580610ad557506035548160050154826004015401105b15610ae4576002915050610a05565b610b036034546108f06033548460030154611b2690919063ffffffff16565b610b0b611b4b565b10610b1a576006915050610a05565b6033546003820154610b2b91611b26565b610b33611b4b565b10610b42576004915050610a05565b6003915050610a05565b60408051808201909152601681527506a5ce0e4dee0dee6c2d85ae6e8c2e8ca5ae0c2e8c6d60531b602082015290565b603a5481565b6001600160a01b038381166000908152603c60205260408120549091163314610bbd5760405162461bcd60e51b81526004016108819061303d565b610bc8848484611b4f565b949350505050565b336000818152603c60205260409020546001600160a01b039081169190831614801590610c0657506001600160a01b0382163014155b8015610c1a57506001600160a01b03821615155b8015610c385750806001600160a01b0316826001600160a01b031614155b610c545760405162461bcd60e51b815260040161088190612e87565b6001600160a01b03811615610c9a576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f91610d4f9185916004016129b7565b600060405180830381600087803b158015610d6957600080fd5b505af1925050508015610d7a575060015b610dfd573d808015610da8576040519150601f19603f3d011682016040523d82523d6000602084013e610dad565b606091505b5080604051610dbc9190612987565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a350610e32565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3b82611b77565b5050565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610e855760405162461bcd60e51b815260040161088190612e50565b6033548110610ea65760405162461bcd60e51b815260040161088190612d74565b603a55565b333014610eca5760405162461bcd60e51b815260040161088190612e50565b603755565b7f000000000000000000000000000000000000000000000000000000000000000081565b336000908152603c60205260409020546001600160a01b031680610f295760405162461bcd60e51b815260040161088190612ff3565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b610f826109a4565b6001600160a01b0316336001600160a01b031614610fb25760405162461bcd60e51b815260040161088190612f86565b604051633a08bde160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e822f78490610ffe908490600401612abd565b600060405180830381600087803b15801561101857600080fd5b505af115801561098b573d6000803e3d6000fd5b33301461104b5760405162461bcd60e51b815260040161088190612e50565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916111109185916004016129b7565b600060405180830381600087803b15801561112a57600080fd5b505af192505050801561113b575060015b6111be573d808015611169576040519150601f19603f3d011682016040523d82523d6000602084013e61116e565b606091505b508060405161117d9190612987565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506111f3565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3b82611c5b565b600083511161121d5760405162461bcd60e51b815260040161088190612e26565b61124583838361122d8633611585565b158015611240575061123e866109bc565b155b611c65565b505050565b3330146112695760405162461bcd60e51b815260040161088190612e50565b603955565b600054610100900460ff16806112875750611287611ea8565b80611295575060005460ff16155b6112b15760405162461bcd60e51b815260040161088190612f38565b600054610100900460ff161580156112dc576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff19909416939093171691909117905561149c611eae565b8015610e3b576000805461ff00191690555050565b60395481565b60375481565b60006114ca338484611b4f565b90505b92915050565b603d546000190190565b60416020526000908152604090205481565b6114f76125d9565b603d838154811061150457fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146115805760405162461bcd60e51b815260040161088190612e50565b603355565b6000603d838154811061159457fe5b600091825260208083206001600160a01b03861684526007600890930201919091019052604090205460ff16905092915050565b3330146115e75760405162461bcd60e51b815260040161088190612e50565b603855565b33301461160b5760405162461bcd60e51b815260040161088190612e50565b603655565b6116186109a4565b6001600160a01b0316336001600160a01b0316146116485760405162461bcd60e51b815260040161088190612f86565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fc61167f8347611eef565b6040518115909202916000818181858888f1935050505061169f57600080fd5b50565b6001600160a01b038087166000908152603b60205260409081902054905163e113335f60e01b815288927f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916117039185916004016129b7565b600060405180830381600087803b15801561171d57600080fd5b505af192505050801561172e575060015b6117b1573d80801561175c576040519150601f19603f3d011682016040523d82523d6000602084013e611761565b606091505b50806040516117709190612987565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506117e6565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b6117f4878787878787611f05565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b333014156118415760405162461bcd60e51b815260040161088190612c3d565b6000603d828154811061185057fe5b6000918252602080832060016008909302019182015485845260419091526040909220549092506001600160a01b0390911690813f9081146118a45760405162461bcd60e51b815260040161088190612d1e565b6118ad84611f85565b50505050565b60016118be83610a10565b60068111156118c957fe5b146118e65760405162461bcd60e51b815260040161088190612bf6565b6000603d83815481106118f557fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b9094529190942054929450101590806119545760405162461bcd60e51b815260040161088190612ebe565b825460ff16156119a3578254610100900460ff161561198a576001830154600485015461198091611ae4565b60048501556119a3565b6001830154600585015461199d91611ae4565b60058501555b84156119c25760048401546119b89082611b26565b60048501556119d7565b60058401546119d19082611b26565b60058501555b6006840154610100900460ff16158015611a075750603954611a056119fa611b4b565b600387015490611ae4565b105b15611a4b576005840154600485015411158215158114611a495760068501805461ff001916610100179055603a546003860154611a4391611b26565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a546003870154611a96938b93611a919391926108f092839190611b26565b612117565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b584604051611ad39190612abd565b60405180910390a450505050505050565b60006114ca83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612154565b6000828201838110156114ca5760405162461bcd60e51b815260040161088190612ce7565b4290565b6000611b5c848484612180565b6000818152604160205260409020933f909355509092915050565b336000908152603f6020526040902054611b8f611b4b565b11611bac5760405162461bcd60e51b815260040161088190612db8565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054611bfa918390612154565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610ffe919085906004016129b7565b61169f33826124ce565b3381328214611c75576000611c79565b6152085b61ffff168115611de45760005a905060005b8851811015611d42576000898281518110611ca257fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611ce257506001600160a01b03811633145b611cfe5760405162461bcd60e51b81526004016108819061303d565b861580611d125750611d108982611585565b155b611d2e5760405162461bcd60e51b8152600401610881906130ab565b611d39818a8a6118b3565b50600101611c8b565b506000611d5a6127106108f0856108f05a8790611ae4565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce80790611dab90889085906004016129b7565b600060405180830381600087803b158015611dc557600080fd5b505af1158015611dd9573d6000803e3d6000fd5b5050505050506117f4565b60005b8751811015611e9e576000888281518110611dfe57fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611e3e57506001600160a01b03811633145b611e5a5760405162461bcd60e51b81526004016108819061303d565b851580611e6e5750611e6c8882611585565b155b611e8a5760405162461bcd60e51b8152600401610881906130ab565b611e958189896118b3565b50600101611de7565b5050505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6000818310611efe57816114ca565b5090919050565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf90611f4190899030908a908a908a908a908a90600401612a3a565b600060405180830381600087803b158015611f5b57600080fd5b505af1158015611f6f573d6000803e3d6000fd5b50505050611f7d86866124ce565b505050505050565b6004611f9082610a10565b6006811115611f9b57fe5b14611fb85760405162461bcd60e51b815260040161088190612b30565b6000603d8281548110611fc757fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b0316612002816125d3565b61201e5760405162461bcd60e51b815260040161088190612aed565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161206291612987565b600060405180830381855af49150503d806000811461209d576040519150601f19603f3d011682016040523d82523d6000602084013e6120a2565b606091505b5091509150816120e5578051156120cd578060405162461bcd60e51b81526004016108819190612ada565b60405162461bcd60e51b815260040161088190613074565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b6001600160a01b0382166000908152603f6020526040902054811115610e3b576001600160a01b03919091166000908152603f6020526040902055565b600081848411156121785760405162461bcd60e51b81526004016108819190612ada565b505050900390565b6001600160a01b0383166000908152603b60205260408120546036548110156121bb5760405162461bcd60e51b815260040161088190612c8a565b6121c4846125d3565b6121e05760405162461bcd60e51b815260040161088190612ef5565b6001600160a01b0385166000908152603e6020526040902054801561225257600061220a82610a10565b9050600181600681111561221a57fe5b141580156122345750600081600681111561223157fe5b14155b6122505760405162461bcd60e51b815260040161088190612b7b565b505b60006122626037546108f0611b4b565b9050600061227b60385483611b2690919063ffffffff16565b90506122856125f9565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff199093169290921794909416179055906124376114d3565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350612479928d92611a919290916108f0919082908a90611b26565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516124b99493929190612a7b565b60405180910390a39998505050505050505050565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd906125229085907f00000000000000000000000000000000000000000000000000000000000000009086906004016129d0565b602060405180830381600087803b15801561253c57600080fd5b505af1158015612550573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257491906128cc565b6125905760405162461bcd60e51b815260040161088190612def565b6001600160a01b0382166000908152603b60205260409020546125b39082611b26565b6001600160a01b039092166000908152603b602052604090209190915550565b3b151590565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b03811681146114cd57600080fd5b80356114cd8161316f565b600082601f830112612686578081fd5b813567ffffffffffffffff81111561269c578182fd5b6126af601f8201601f1916602001613107565b91508082528360208285010111156126c657600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156126f0578081fd5b6114ca8383612654565b60008060006060848603121561270e578182fd5b83356127198161315a565b925060208401356127298161315a565b9150604084013567ffffffffffffffff811115612744578182fd5b61275086828701612676565b9150509250925092565b6000806040838503121561276c578182fd5b82356127778161315a565b9150602083013567ffffffffffffffff811115612792578182fd5b61279e85828601612676565b9150509250929050565b60008060008060008060c087890312156127c0578182fd5b6127ca8888612654565b95506020870135945060408701359350606087013560ff811681146127ed578283fd5b9598949750929560808101359460a0909101359350915050565b60008060006060848603121561281b578283fd5b833567ffffffffffffffff80821115612832578485fd5b818601915086601f830112612845578485fd5b813581811115612853578586fd5b60209150818102612865838201613107565b8281528381019085850183870186018c101561287f57898afd5b8996505b848710156128a9576128958c82612654565b835260019690960195918501918501612883565b50975050505085013592506128c39050856040860161266b565b90509250925092565b6000602082840312156128dd578081fd5b81516114ca8161316f565b6000602082840312156128f9578081fd5b5035919050565b60008060408385031215612912578182fd5b823591506129238460208501612654565b90509250929050565b6000806040838503121561293e578182fd5b8235915060208301356129508161316f565b809150509250929050565b6000815180845261297381602086016020860161312e565b601f01601f19169290920160200192915050565b6000825161299981846020870161312e565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152612aa8608083018461295b565b9695505050505050565b901515815260200190565b90815260200190565b6020810160078310612ad457fe5b91905290565b6000602082526114ca602083018461295b565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252602d908201527f476f7665726e616e63653a3a70726f706f73653a2070736575646f2d6578746560408201526c393730b610333ab731ba34b7b760991b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526036908201527f476f7665726e616e63653a3a70726f706f73653a206d6574616d6f72706869636040820152750818dbdb9d1c9858dd1cc81b9bdd08185b1b1bddd95960521b606082015260800190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526010908201526f43616e206e6f7420626520656d70747960801b604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600d908201526c6f6e6c79206d756c746973696760981b604082015260600190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b60208082526019908201527f476f7665726e616e63653a20766f74656420616c726561647900000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b60405181810167ffffffffffffffff8111828210171561312657600080fd5b604052919050565b60005b83811015613149578181015183820152602001613131565b838111156118ad5750506000910152565b6001600160a01b038116811461169f57600080fd5b801515811461169f57600080fdfea26469706673582212209ae80078297b488112cf4c0eaef3af85f34156332aa7d60065ce1ebb90ab93c264736f6c634300060c0033";class Us extends Ka{constructor(...e){e.length>1?super(...e):super(Ds,Ss,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ds)}static connect(e,t){return new $a(e,Ds,t)}}Us.bytecode=Ss,Us.abi=Ds;var Vs=Object.freeze({__proto__:null,GovernanceProposalStateUpgrade__factory:Us});const Ls=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"_admin",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],Fs="0x60806040526040516108403803806108408339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b50604052508491508390508282816100f1826101c5565b8051156101a9576000826001600160a01b0316826040518082805190602001908083835b602083106101345780518252601f199092019160209182019101610115565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610194576040519150601f19603f3d011682016040523d82523d6000602084013e610199565b606091505b50509050806101a757600080fd5b505b506101b19050565b6101ba82610237565b505050505050610261565b6101d88161025b60201b6103b41760201c565b6102135760405162461bcd60e51b815260040180806020018281038252603681526020018061080a6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b3b151590565b61059a806102706000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996101a9565b6101a96101a46103ba565b6103df565b565b6101b3610403565b6001600160a01b0316336001600160a01b031614156101da576101d581610428565b6101e2565b6101e2610191565b50565b6101ed610403565b6001600160a01b0316336001600160a01b031614156102855761020f83610428565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd6103ba565b90506102cc565b6102cc610191565b90565b6102d7610403565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b815260040180806020018281038252603a8152602001806104f5603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610403565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d581610468565b6000610393610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd610403565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156103fe573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6104318161048c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b610495816103b4565b6104d05760405162461bcd60e51b815260040180806020018281038252603681526020018061052f6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a2646970667358221220f9da162f8a2d779a4f5f08577ac886bc4694791f749bd6ecc5d270427405583364736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class Gs extends Ka{constructor(...e){e.length>1?super(...e):super(Ls,Fs,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ls)}static connect(e,t){return new $a(e,Ls,t)}}Gs.bytecode=Fs,Gs.abi=Ls;const Bs=[{inputs:[{internalType:"address",name:"_torn",type:"address"},{internalType:"address",name:"_governance",type:"address"},{internalType:"address",name:"_registry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"instance",type:"address"},{indexed:!1,internalType:"uint256",name:"newFee",type:"uint256"}],name:"FeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint24",name:"newFee",type:"uint24"}],name:"UniswapTornPoolSwappingFeeChanged",type:"event"},{inputs:[],name:"PROTOCOL_FEE_DIVIDER",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"calculatePoolFee",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeDeviations",outputs:[{components:[{internalType:"address",name:"instance",type:"address"},{internalType:"int256",name:"deviation",type:"int256"}],internalType:"struct FeeManager.Deviation[]",name:"results",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],name:"instanceFee",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],name:"instanceFeeUpdated",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"instanceFeeWithUpdate",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"registry",outputs:[{internalType:"contract InstanceRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"newPeriod",type:"uint32"}],name:"setPeriodForTWAPOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"_uniswapTornPoolSwappingFee",type:"uint24"}],name:"setUniswapTornPoolSwappingFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"newLimit",type:"uint24"}],name:"setUpdateFeeTimeLimit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"uniswapTimePeriod",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"uniswapTornPoolSwappingFee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"updateAllFees",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"updateFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateFeeTimeLimit",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance[]",name:"_instances",type:"address[]"}],name:"updateFees",outputs:[],stateMutability:"nonpayable",type:"function"}],js="0x60e06040523480156200001157600080fd5b5060405162001a8938038062001a8983398101604081905262000034916200005c565b6001600160601b0319606093841b811660805291831b821660a05290911b1660c052620000c8565b60008060006060848603121562000071578283fd5b83516200007e81620000af565b60208501519093506200009181620000af565b6040850151909250620000a481620000af565b809150509250925092565b6001600160a01b0381168114620000c557600080fd5b50565b60805160601c60a05160601c60c05160601c61196862000121600039806102ce52806104f6528061077752806109945250806104b7528061052e528061060f528061070852508061068f528061087e52506119686000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063a0287520116100a2578063bcc5ee6411610071578063bcc5ee641461020f578063c51c229714610217578063d8718fb11461022a578063e1f121561461023f578063f522d6d61461025257610116565b8063a0287520146101d9578063adf898a4146101ec578063aeb3077a146101f4578063b19a2972146101fc57610116565b8063603a54fe116100e9578063603a54fe146101815780637b103999146101945780637ccd2f481461019c57806380679eb3146101b157806380eb7bf0146101c657610116565b806305e343641461011b5780632efbf384146101445780634bf0a542146101645780635aa6e67514610179575b600080fd5b61012e610129366004611650565b61025a565b60405161013b9190611896565b60405180910390f35b610157610152366004611650565b61026c565b60405161013b91906116dd565b61016c6102c9565b60405161013b9190611719565b6101576104b5565b61015761018f366004611650565b6104d9565b6101576104f4565b6101a4610518565b60405161013b9190611886565b6101c46101bf3660046116a0565b610523565b005b6101c46101d4366004611650565b61057e565b6101c46101e736600461166c565b610604565b61015761068d565b61012e6106b1565b6101c461020a3660046113ef565b6106b7565b6101a46106eb565b6101c461022536600461166c565b6106fd565b61023261075a565b60405161013b919061189f565b61015761024d366004611650565b61076d565b6101c461098f565b60026020526000908152604090205481565b600080546001600160a01b038316825260026020526040822054600160381b90910462ffffff16429190910311156102a7576102a78261057e565b506001600160a01b03808216600090815260016020526040902054165b919050565b6060807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166310c13ac36040518163ffffffff1660e01b815260040160006040518083038186803b15801561032557600080fd5b505afa158015610339573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103619190810190611487565b9050805167ffffffffffffffff8111801561037b57600080fd5b506040519080825280602002602001820160405280156103b557816020015b6103a261131d565b81526020019060019003908161039a5790505b50915060005b81518110156104b05760006103e28383815181106103d557fe5b602002602001015161076d565b6001600160a01b031690506000811561045e576103e8826001600087878151811061040957fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b03166103e8026001600160a01b03168161045957fe5b040390505b604051806040016040528085858151811061047557fe5b60200260200101516001600160a01b031681526020018281525085848151811061049b57fe5b602090810291909101015250506001016103bb565b505090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001602052600090815260409020546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005462ffffff1681565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461055857600080fd5b6000805463ffffffff90921663010000000266ffffffff00000019909216919091179055565b60006105898261076d565b6001600160a01b03838116600081815260016020908152604080832080546001600160a01b03191695871695909517909455600290528290204290559051919250907f6f0eaf2c2f89fb4cfe96a1dee5e764d60b52c7f48aaa590f0850e308aa1b953a906105f89084906116dd565b60405180910390a25050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461063957600080fd5b6000805462ffffff191662ffffff83811691909117918290556040517fbfe65cfc2359076c4468c9b895156c309c78f94fb09f6d2fc0463c4ca9a71ac292610682921690611886565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b61271081565b60005b81518110156106e7576106df8282815181106106d257fe5b602002602001015161057e565b6001016106ba565b5050565b600054600160381b900462ffffff1681565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461073257600080fd5b6000805462ffffff909216600160381b0269ffffff0000000000000019909216919091179055565b6000546301000000900463ffffffff1681565b60008060008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663032bb443876040518263ffffffff1660e01b81526004016107c191906116dd565b60a06040518083038186803b1580156107d957600080fd5b505afa1580156107ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081191906115d5565b9450945050935093508063ffffffff16600014156108365760009450505050506102c4565b6001600160a01b03831615801561084b575083155b610855578261086b565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b6040805180820182526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081168252831660208083019190915282518084019093526000805462ffffff80821686528816928501929092529396506108e5929063ffffffff630100000090910416610a29565b905061098461271061097e8463ffffffff166109788561097e670de0b6b3a76400008e6001600160a01b0316638bca6d166040518163ffffffff1660e01b815260040160206040518083038186803b15801561094057600080fd5b505afa158015610954573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109789190611688565b90610a75565b90610ac1565b979650505050505050565b610a277f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166310c13ac36040518163ffffffff1660e01b815260040160006040518083038186803b1580156109eb57600080fd5b505afa1580156109ff573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261020a9190810190611487565b565b60208084015190830151600091610a409184610b03565b84518451610a6391670de0b6b3a764000091610a5d919087610b03565b90610b2d565b81610a6a57fe5b0490505b9392505050565b600082610a8457506000610abb565b82820282848281610a9157fe5b0414610ab85760405162461bcd60e51b8152600401610aaf90611845565b60405180910390fd5b90505b92915050565b6000610ab883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610b51565b6000610b258473c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28585610b88565b949350505050565b6000821580610b4857505081810281838281610b4557fe5b04145b610abb57600080fd5b60008183610b725760405162461bcd60e51b8152600401610aaf91906117bb565b506000838581610b7e57fe5b0495945050505050565b600080846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610bc457600080fd5b505afa158015610bd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfc91906116bc565b60ff16600a0a90506001600160a01b038681169086161415610c28576001600160801b03169050610b25565b604051630b4c774160e11b8152610cc990610cc190731f98431c8ad98523631ae4a59f267346ea31f98490631698ee8290610c6b908b908b908b906004016116f1565b60206040518083038186803b158015610c8357600080fd5b505afa158015610c97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbb91906113d3565b85610cda565b828888610e6f565b915050610b25565b50949350505050565b600063ffffffff8216610cff5760405162461bcd60e51b8152600401610aaf9061180e565b60408051600280825260608083018452926020830190803683370190505090508281600081518110610d2d57fe5b602002602001019063ffffffff16908163ffffffff1681525050600081600181518110610d5657fe5b63ffffffff9092166020928302919091019091015260405163883bdbfd60e01b81526060906001600160a01b0386169063883bdbfd90610d9a908590600401611771565b60006040518083038186803b158015610db257600080fd5b505afa158015610dc6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610dee9190810190611513565b509050600081600081518110610e0057fe5b602002602001015182600181518110610e1557fe5b60200260200101510390508463ffffffff168160060b81610e3257fe5b05935060008160060b128015610e5957508463ffffffff168160060b81610e5557fe5b0715155b15610e6657600019909301925b50505092915050565b600080610e7b86610f59565b90506001600160801b036001600160a01b03821611610eea576001600160a01b0380821680029084811690861610610eca57610ec5600160c01b876001600160801b031683611272565b610ee2565b610ee281876001600160801b0316600160c01b611272565b925050610cd1565b6000610f096001600160a01b0383168068010000000000000000611272565b9050836001600160a01b0316856001600160a01b031610610f4157610f3c600160801b876001600160801b031683611272565b610984565b61098481876001600160801b0316600160801b611272565b60008060008360020b12610f70578260020b610f78565b8260020b6000035b9050620d89e8811115610f9d5760405162461bcd60e51b8152600401610aaf9061182a565b600060018216610fb157600160801b610fc3565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff1690506002821615610ff7576ffff97272373d413259a46990580e213a0260801c5b6004821615611016576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615611035576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615611054576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615611073576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615611092576fff2ea16466c96a3843ec78b326b528610260801c5b60808216156110b1576ffe5dee046a99a2a811c461f1969c30530260801c5b6101008216156110d1576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b6102008216156110f1576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615611111576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615611131576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615611151576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615611171576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615611191576f70d869a156d2a1b890bb3df62baf32f70260801c5b6180008216156111b1576f31be135f97d08fd981231505542fcfa60260801c5b620100008216156111d2576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b620200008216156111f2576e5d6af8dedb81196699c329225ee6040260801c5b62040000821615611211576d2216e584f5fa1ea926041bedfe980260801c5b6208000082161561122e576b048a170391f7dc42444e8fa20260801c5b60008460020b131561124957806000198161124557fe5b0490505b64010000000081061561125d576001611260565b60005b60ff16602082901c0192505050919050565b60008080600019858709868602925082811090839003039050806112a8576000841161129d57600080fd5b508290049050610a6e565b8084116112b457600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b604080518082019091526000808252602082015290565b600082601f830112611344578081fd5b8151611357611352826118d7565b6118b0565b81815291506020808301908481018184028601820187101561137857600080fd5b60005b848110156113a057815161138e816118f7565b8452928201929082019060010161137b565b505050505092915050565b8035610abb816118f7565b8051610abb816118f7565b8051600681900b8114610abb57600080fd5b6000602082840312156113e4578081fd5b8151610ab8816118f7565b60006020808385031215611401578182fd5b823567ffffffffffffffff811115611417578283fd5b8301601f81018513611427578283fd5b8035611435611352826118d7565b8181528381019083850185840285018601891015611451578687fd5b8694505b8385101561147b5761146789826113ab565b835260019490940193918501918501611455565b50979650505050505050565b60006020808385031215611499578182fd5b825167ffffffffffffffff8111156114af578283fd5b8301601f810185136114bf578283fd5b80516114cd611352826118d7565b81815283810190838501858402850186018910156114e9578687fd5b8694505b8385101561147b576114ff89826113b6565b8352600194909401939185019185016114ed565b60008060408385031215611525578081fd5b825167ffffffffffffffff8082111561153c578283fd5b818501915085601f83011261154f578283fd5b815161155d611352826118d7565b80828252602080830192508086018a82838702890101111561157d578788fd5b8796505b848710156115a7576115938b826113c1565b845260019690960195928101928101611581565b5088015190965093505050808211156115be578283fd5b506115cb85828601611334565b9150509250929050565b600080600080600060a086880312156115ec578081fd5b855180151581146115fb578182fd5b602087015190955061160c816118f7565b604087015190945060028110611620578182fd5b60608701519093506116318161190f565b608087015190925061164281611920565b809150509295509295909350565b600060208284031215611661578081fd5b8135610ab8816118f7565b60006020828403121561167d578081fd5b8135610ab88161190f565b600060208284031215611699578081fd5b5051919050565b6000602082840312156116b1578081fd5b8135610ab881611920565b6000602082840312156116cd578081fd5b815160ff81168114610ab8578182fd5b6001600160a01b0391909116815260200190565b6001600160a01b03938416815291909216602082015262ffffff909116604082015260600190565b602080825282518282018190526000919060409081850190868401855b8281101561176457815180516001600160a01b03168552860151868501529284019290850190600101611736565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156117af57835163ffffffff168352928401929184019160010161178d565b50909695505050505050565b6000602080835283518082850152825b818110156117e7578581018301518582016040015282016117cb565b818111156117f85783604083870101525b50601f01601f1916929092016040019392505050565b602080825260029082015261042560f41b604082015260600190565b6020808252600190820152601560fa1b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b62ffffff91909116815260200190565b90815260200190565b63ffffffff91909116815260200190565b60405181810167ffffffffffffffff811182821017156118cf57600080fd5b604052919050565b600067ffffffffffffffff8211156118ed578081fd5b5060209081020190565b6001600160a01b038116811461190c57600080fd5b50565b62ffffff8116811461190c57600080fd5b63ffffffff8116811461190c57600080fdfea26469706673582212205690be246e00d9bf30da35441a160026439ececfa962348f01e498d25f89f5d164736f6c634300060c0033";class Hs extends Ka{constructor(...e){e.length>1?super(...e):super(Bs,js,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Bs)}static connect(e,t){return new $a(e,Bs,t)}}Hs.bytecode=js,Hs.abi=Bs;const zs=[{inputs:[{internalType:"address",name:"_governance",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"GovernanceAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"gasAmount",type:"uint256"}],name:"compensateGas",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawToGovernance",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],$s="0x60a0604052348015600f57600080fd5b50604051610472380380610472833981016040819052602c91603c565b6001600160a01b0316608052606a565b600060208284031215604d57600080fd5b81516001600160a01b0381168114606357600080fd5b9392505050565b6080516103da6100986000396000818160560152818160e101528181610212015261027701526103da6000f3fe6080604052600436106100385760003560e01c8063a3221c2e14610044578063a99ce80714610094578063e822f784146100b657600080fd5b3661003f57005b600080fd5b34801561005057600080fd5b506100787f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156100a057600080fd5b506100b46100af366004610328565b6100d6565b005b3480156100c257600080fd5b506100b46100d1366004610360565b610207565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461013e5760405162461bcd60e51b815260206004820152600860248201526737b7363c9033b7bb60c11b60448201526064015b60405180910390fd5b47600061014b4884610379565b90508160000361015b5750505050565b6000846001600160a01b03168383116101745782610176565b835b604051600081818185875af1925050503d80600081146101b2576040519150601f19603f3d011682016040523d82523d6000602084013e6101b7565b606091505b50509050806102005760405162461bcd60e51b815260206004820152601560248201527418dbdb5c195b9cd85d194819d85cc819985a5b1959605a1b6044820152606401610135565b5050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461026a5760405162461bcd60e51b815260206004820152600860248201526737b7363c9033b7bb60c11b6044820152606401610135565b4760006001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284116102a457836102a6565b825b604051600081818185875af1925050503d80600081146102e2576040519150601f19603f3d011682016040523d82523d6000602084013e6102e7565b606091505b50509050806103235760405162461bcd60e51b81526020600482015260086024820152671c185e4819985a5b60c21b6044820152606401610135565b505050565b6000806040838503121561033b57600080fd5b82356001600160a01b038116811461035257600080fd5b946020939093013593505050565b60006020828403121561037257600080fd5b5035919050565b808202811582820484141761039e57634e487b7160e01b600052601160045260246000fd5b9291505056fea264697066735822122073841dd5b5d8687d927814633a2fcb7944a306bb89a9b65a0aab4cc361c8312264736f6c63430008190033";class Xs extends Ka{constructor(...e){e.length>1?super(...e):super(zs,$s,e[0])}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}deploy(e,t){return super.deploy(e,t||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(zs)}static connect(e,t){return new $a(e,zs,t)}}Xs.bytecode=$s,Xs.abi=zs;const Ws=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],qs="0x608060405260405161083b38038061083b8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052508391503090508282816100ed826101c0565b8051156101a5576000826001600160a01b0316826040518082805190602001908083835b602083106101305780518252601f199092019160209182019101610111565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610190576040519150601f19603f3d011682016040523d82523d6000602084013e610195565b606091505b50509050806101a357600080fd5b505b506101ad9050565b6101b682610232565b505050505061025c565b6101d38161025660201b6103b41760201c565b61020e5760405162461bcd60e51b81526004018080602001828103825260368152602001806108056036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b3b151590565b61059a8061026b6000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996101a9565b6101a96101a46103ba565b6103df565b565b6101b3610403565b6001600160a01b0316336001600160a01b031614156101da576101d581610428565b6101e2565b6101e2610191565b50565b6101ed610403565b6001600160a01b0316336001600160a01b031614156102855761020f83610428565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd6103ba565b90506102cc565b6102cc610191565b90565b6102d7610403565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b815260040180806020018281038252603a8152602001806104f5603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610403565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d581610468565b6000610393610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd610403565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156103fe573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6104318161048c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b610495816103b4565b6104d05760405162461bcd60e51b815260040180806020018281038252603681526020018061052f6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a264697066735822122014d721b179bdff3154685a6f1f0fecdd0d99b7cfc61b3f1a2f7a95c6f6d2c2ae64736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class Js extends Ka{constructor(...e){e.length>1?super(...e):super(Ws,qs,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ws)}static connect(e,t){return new $a(e,Ws,t)}}Js.bytecode=qs,Js.abi=Ws;const Ks=[{inputs:[{internalType:"address",name:"_governance",type:"address"},{internalType:"address",name:"_instanceRegistry",type:"address"},{internalType:"address",name:"_relayerRegistry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bytes",name:"encryptedNote",type:"bytes"}],name:"EncryptedNote",type:"event"},{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address",name:"_spender",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveExactToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"_encryptedNotes",type:"bytes[]"}],name:"backupNotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_tornado",type:"address"},{internalType:"bytes32",name:"_commitment",type:"bytes32"},{internalType:"bytes",name:"_encryptedNote",type:"bytes"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"instanceRegistry",outputs:[{internalType:"contract InstanceRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"relayerRegistry",outputs:[{internalType:"contract RelayerRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address payable",name:"_to",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"rescueTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_tornado",type:"address"},{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"}],Ys="0x60e060405234801561001057600080fd5b5060405161128438038061128483398101604081905261002f91610056565b6001600160601b0319606093841b811660805291831b821660a05290911b1660c0526100ba565b60008060006060848603121561006a578283fd5b8351610075816100a2565b6020850151909350610086816100a2565b6040850151909250610097816100a2565b809150509250925092565b6001600160a01b03811681146100b757600080fd5b50565b60805160601c60a05160601c60c05160601c61117c610108600039806103ff528061059e525080610164528061037a52806103a752806104c8525080610423528061068e525061117c6000f3fe60806040526004361061007b5760003560e01c80635aa6e6751161004e5780635aa6e675146100f55780636485ba2a1461010a578063b438689f1461012a578063cea9d26f1461013d5761007b565b806313d98d131461008057806336a3874b146100955780633ef10783146100c057806347ff589d146100e0575b600080fd5b61009361008e366004610c77565b61015d565b005b3480156100a157600080fd5b506100aa610378565b6040516100b79190610dd0565b60405180910390f35b3480156100cc57600080fd5b506100936100db366004610c37565b61039c565b3480156100ec57600080fd5b506100aa6103fd565b34801561010157600080fd5b506100aa610421565b34801561011657600080fd5b50610093610125366004610b26565b610445565b610093610138366004610cd1565b6104ae565b34801561014957600080fd5b50610093610158366004610c37565b610683565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663032bb443886040518263ffffffff1660e01b81526004016101ae9190610dd0565b60a06040518083038186803b1580156101c657600080fd5b505afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe9190610bb1565b5092955090935091506000905081600181111561021757fe5b141561023e5760405162461bcd60e51b815260040161023590610f00565b60405180910390fd5b82156102cc576102cc3330896001600160a01b0316638bca6d166040518163ffffffff1660e01b815260040160206040518083038186803b15801561028257600080fd5b505afa158015610296573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ba9190610d72565b6001600160a01b038616929190610817565b60405163b214faa560e01b81526001600160a01b0388169063b214faa59034906102fa908a90600401610e5e565b6000604051808303818588803b15801561031357600080fd5b505af1158015610327573d6000803e3d6000fd5b5050505050336001600160a01b03167ffa28df43db3553771f7209dcef046f3bdfea15870ab625dcda30ac58b82b40088686604051610367929190610e67565b60405180910390a250505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103e45760405162461bcd60e51b815260040161023590611087565b6103f86001600160a01b0384168383610875565b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005b818110156103f857337ffa28df43db3553771f7209dcef046f3bdfea15870ab625dcda30ac58b82b400884848481811061047e57fe5b905060200281019061049091906110af565b60405161049e929190610e67565b60405180910390a2600101610448565b60405163032bb44360e01b81526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063032bb443906104fd908d90600401610dd0565b60a06040518083038186803b15801561051557600080fd5b505afa158015610529573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054d9190610bb1565b509093506000925061055d915050565b81600181111561056957fe5b14156105875760405162461bcd60e51b815260040161023590610f00565b604051631168473b60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906345a11cec906105d790339088908f90600401610de4565b600060405180830381600087803b1580156105f157600080fd5b505af1158015610605573d6000803e3d6000fd5b50506040516310d056db60e11b81526001600160a01b038d1692506321a0adb691503490610645908d908d908d908d908d908d908d908d90600401610e7b565b6000604051808303818588803b15801561065e57600080fd5b505af1158015610672573d6000803e3d6000fd5b505050505050505050505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106cb5760405162461bcd60e51b815260040161023590611087565b6001600160a01b0382166106f15760405162461bcd60e51b815260040161023590610f6e565b6001600160a01b03831661074d5747600061070c8284610938565b6040519091506001600160a01b0385169082156108fc029083906000818181858888f19350505050158015610745573d6000803e3d6000fd5b5050506103f8565b6040516370a0823160e01b81526000906001600160a01b038516906370a082319061077c903090600401610dd0565b60206040518083038186803b15801561079457600080fd5b505afa1580156107a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cc9190610d72565b905060006107da8284610938565b9050600081116107fc5760405162461bcd60e51b815260040161023590610ffa565b6108106001600160a01b0386168583610950565b5050505050565b61086f846323b872dd60e01b85858560405160240161083893929190610e21565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261096f565b50505050565b8015806108fd5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906108ab9030908690600401610e07565b60206040518083038186803b1580156108c357600080fd5b505afa1580156108d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fb9190610d72565b155b6109195760405162461bcd60e51b815260040161023590611031565b6103f88363095ea7b360e01b8484604051602401610838929190610e45565b60008183106109475781610949565b825b9392505050565b6103f88363a9059cbb60e01b8484604051602401610838929190610e45565b60606109c4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166109fe9092919063ffffffff16565b8051909150156103f857808060200190518101906109e29190610b95565b6103f85760405162461bcd60e51b815260040161023590610fb0565b6060610a0d8484600085610a15565b949350505050565b6060610a2085610ad9565b610a3c5760405162461bcd60e51b815260040161023590610f37565b60006060866001600160a01b03168587604051610a599190610db4565b60006040518083038185875af1925050503d8060008114610a96576040519150601f19603f3d011682016040523d82523d6000602084013e610a9b565b606091505b50915091508115610aaf579150610a0d9050565b805115610abf5780518082602001fd5b8360405162461bcd60e51b81526004016102359190610ecd565b3b151590565b60008083601f840112610af0578182fd5b50813567ffffffffffffffff811115610b07578182fd5b602083019150836020828501011115610b1f57600080fd5b9250929050565b60008060208385031215610b38578182fd5b823567ffffffffffffffff80821115610b4f578384fd5b818501915085601f830112610b62578384fd5b813581811115610b70578485fd5b8660208083028501011115610b83578485fd5b60209290920196919550909350505050565b600060208284031215610ba6578081fd5b815161094981611138565b600080600080600060a08688031215610bc8578081fd5b8551610bd381611138565b6020870151909550610be481611120565b604087015190945060028110610bf8578182fd5b606087015190935062ffffff81168114610c10578182fd5b608087015190925063ffffffff81168114610c29578182fd5b809150509295509295909350565b600080600060608486031215610c4b578283fd5b8335610c5681611120565b92506020840135610c6681611120565b929592945050506040919091013590565b60008060008060608587031215610c8c578384fd5b8435610c9781611120565b935060208501359250604085013567ffffffffffffffff811115610cb9578283fd5b610cc587828801610adf565b95989497509550505050565b60008060008060008060008060006101008a8c031215610cef578384fd5b8935610cfa81611120565b985060208a013567ffffffffffffffff811115610d15578485fd5b610d218c828d01610adf565b90995097505060408a0135955060608a0135945060808a0135610d4381611120565b935060a08a0135610d5381611120565b8093505060c08a0135915060e08a013590509295985092959850929598565b600060208284031215610d83578081fd5b5051919050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008251610dc68184602087016110f4565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b90815260200190565b600060208252610a0d602083018486610d8a565b600060e08252610e8f60e083018a8c610d8a565b60208301989098525060408101959095526001600160a01b03938416606086015291909216608084015260a083019190915260c09091015292915050565b6000602082528251806020840152610eec8160408501602087016110f4565b601f01601f19169190910160400192915050565b6020808252601d908201527f54686520696e7374616e6365206973206e6f7420737570706f72746564000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526022908201527f544f524e3a2063616e206e6f742073656e6420746f207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601e908201527f544f524e3a20747279696e6720746f2073656e6420302062616c616e63650000604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b6000808335601e198436030181126110c5578283fd5b83018035915067ffffffffffffffff8211156110df578283fd5b602001915036819003821315610b1f57600080fd5b60005b8381101561110f5781810151838201526020016110f7565b8381111561086f5750506000910152565b6001600160a01b038116811461113557600080fd5b50565b801515811461113557600080fdfea264697066735822122004c0e245ab0b87d2916977a9650f299de2e526143487c917a63e4b88e54387e364736f6c634300060c0033";class Zs extends Ka{constructor(...e){e.length>1?super(...e):super(Ks,Ys,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ks)}static connect(e,t){return new $a(e,Ks,t)}}Zs.bytecode=Ys,Zs.abi=Ks;const Qs=[{inputs:[{internalType:"address",name:"_torn",type:"address"},{internalType:"address",name:"_governance",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawTorn",outputs:[],stateMutability:"nonpayable",type:"function"}],ec="0x60c060405234801561001057600080fd5b506040516104aa3803806104aa8339818101604052604081101561003357600080fd5b5080516020909101516001600160601b0319606092831b8116608052911b1660a05260805160601c60a05160601c61042e61007c60003980606952508060d3525061042e6000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806391fe357314610030575b600080fd5b61005c6004803603604081101561004657600080fd5b506001600160a01b03813516906020013561005e565b005b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100c6576040805162461bcd60e51b815260206004820152600860248201526737b7363c9033b7bb60c11b604482015290519081900360640190fd5b6100fa6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683836100fe565b5050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610150908490610155565b505050565b60606101aa826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166102069092919063ffffffff16565b805190915015610150578080602001905160208110156101c957600080fd5b50516101505760405162461bcd60e51b815260040180806020018281038252602a8152602001806103cf602a913960400191505060405180910390fd5b6060610215848460008561021d565b949350505050565b6060610228856103c8565b610279576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106102b85780518252601f199092019160209182019101610299565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461031a576040519150601f19603f3d011682016040523d82523d6000602084013e61031f565b606091505b509150915081156103335791506102159050565b8051156103435780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3b15159056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208fc65ae8299d617f6cff836a2822363849c7fb35b0b27a6f0aebfa62084005c764736f6c634300060c0033";class tc extends Ka{constructor(...e){e.length>1?super(...e):super(Qs,ec,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Qs)}static connect(e,t){return new $a(e,Qs,t)}}tc.bytecode=ec,tc.abi=Qs;var ac=Object.freeze({__proto__:null,AdminUpgradeableProxy__factory:Gs,FeeManager__factory:Hs,GasCompensationVault__factory:Xs,LoopbackProxy__factory:Js,TornadoRouter__factory:Zs,TornadoVault__factory:tc,aggregator:nf,deployerSol:rf,instanceRegistrySol:mf,interfaces:ei,libraries:bi,relayerRegistrySol:xf,testnet:Md,torn:ud,tornadoStakingRewardsSol:Pd,uniswap:Yd,v1:zi,v2VaultAndGas:fs,v3RelayerRegistry:us,v4ExploitPatch:Ns,v5ProposalStatePatch:Vs}),nc=Object.freeze({__proto__:null,classic:Gb,governance:ac}),bc=Object.freeze({__proto__:null,contracts:nc,openzeppelin:Bn});const fc=[{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes[]",name:"returnData",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3[]",name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3Value[]",name:"calls",type:"tuple[]"}],name:"aggregate3Value",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"blockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getBasefee",outputs:[{internalType:"uint256",name:"basefee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBlockNumber",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"chainid",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockCoinbase",outputs:[{internalType:"address",name:"coinbase",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockDifficulty",outputs:[{internalType:"uint256",name:"difficulty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockGasLimit",outputs:[{internalType:"uint256",name:"gaslimit",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"}],name:"getEthBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryAggregate",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryBlockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"}];class dc{static createInterface(){return new ba(fc)}static connect(e,t){return new $a(e,fc,t)}}dc.abi=fc;const ic=[{inputs:[{internalType:"contract MultiWrapper",name:"_multiWrapper",type:"address"},{internalType:"contract IOracle[]",name:"existingOracles",type:"address[]"},{internalType:"enum OffchainOracle.OracleType[]",name:"oracleTypes",type:"uint8[]"},{internalType:"contract IERC20[]",name:"existingConnectors",type:"address[]"},{internalType:"contract IERC20",name:"wBase",type:"address"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ArraysLengthMismatch",type:"error"},{inputs:[],name:"ConnectorAlreadyAdded",type:"error"},{inputs:[],name:"InvalidOracleTokenKind",type:"error"},{inputs:[],name:"OracleAlreadyAdded",type:"error"},{inputs:[],name:"SameTokens",type:"error"},{inputs:[],name:"TooBigThreshold",type:"error"},{inputs:[],name:"UnknownConnector",type:"error"},{inputs:[],name:"UnknownOracle",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IERC20",name:"connector",type:"address"}],name:"ConnectorAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IERC20",name:"connector",type:"address"}],name:"ConnectorRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract MultiWrapper",name:"multiWrapper",type:"address"}],name:"MultiWrapperUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IOracle",name:"oracle",type:"address"},{indexed:!1,internalType:"enum OffchainOracle.OracleType",name:"oracleType",type:"uint8"}],name:"OracleAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IOracle",name:"oracle",type:"address"},{indexed:!1,internalType:"enum OffchainOracle.OracleType",name:"oracleType",type:"uint8"}],name:"OracleRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[{internalType:"contract IERC20",name:"connector",type:"address"}],name:"addConnector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IOracle",name:"oracle",type:"address"},{internalType:"enum OffchainOracle.OracleType",name:"oracleKind",type:"uint8"}],name:"addOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"connectors",outputs:[{internalType:"contract IERC20[]",name:"allConnectors",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"}],name:"getRate",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"}],name:"getRateToEth",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"},{internalType:"contract IERC20[]",name:"customConnectors",type:"address[]"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateToEthWithCustomConnectors",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateToEthWithThreshold",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"},{internalType:"contract IERC20[]",name:"customConnectors",type:"address[]"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateWithCustomConnectors",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateWithThreshold",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"multiWrapper",outputs:[{internalType:"contract MultiWrapper",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"oracles",outputs:[{internalType:"contract IOracle[]",name:"allOracles",type:"address[]"},{internalType:"enum OffchainOracle.OracleType[]",name:"oracleTypes",type:"uint8[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"connector",type:"address"}],name:"removeConnector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IOracle",name:"oracle",type:"address"},{internalType:"enum OffchainOracle.OracleType",name:"oracleKind",type:"uint8"}],name:"removeOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract MultiWrapper",name:"_multiWrapper",type:"address"}],name:"setMultiWrapper",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class sc{static createInterface(){return new ba(ic)}static connect(e,t){return new $a(e,ic,t)}}sc.abi=ic;const cc=[{inputs:[{internalType:"address",name:"_owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"DecimalsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"GasPriceUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"L1BaseFeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"OverheadUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"ScalarUpdated",type:"event"},{inputs:[],name:"decimals",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"gasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_data",type:"bytes"}],name:"getL1Fee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_data",type:"bytes"}],name:"getL1GasUsed",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"l1BaseFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"overhead",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"scalar",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_decimals",type:"uint256"}],name:"setDecimals",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_gasPrice",type:"uint256"}],name:"setGasPrice",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_baseFee",type:"uint256"}],name:"setL1BaseFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_overhead",type:"uint256"}],name:"setOverhead",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_scalar",type:"uint256"}],name:"setScalar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class rc{static createInterface(){return new ba(cc)}static connect(e,t){return new $a(e,cc,t)}}rc.abi=cc;const pc=[{inputs:[{internalType:"contract ENS",name:"_ens",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address[]",name:"addresses",type:"address[]"}],name:"getNames",outputs:[{internalType:"string[]",name:"r",type:"string[]"}],stateMutability:"view",type:"function"}];class uc{static createInterface(){return new ba(pc)}static connect(e,t){return new $a(e,pc,t)}}return uc.abi=pc,t})())); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.TornadoContracts=t():e.TornadoContracts=t()}(self,(()=>(()=>{"use strict";var e={d:(t,a)=>{for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{AdminUpgradeableProxy__factory:()=>Gs,Aggregator__factory:()=>Qb,AirdropMock__factory:()=>Sf,Airdrop__factory:()=>ed,BadRecipient__factory:()=>tb,CTornado__factory:()=>Fb,Configuration__factory:()=>Ui,Core__factory:()=>Li,Delegation__factory:()=>Gi,Deployer__factory:()=>df,DummySecond__factory:()=>ri,Dummy__factory:()=>ii,ENSMock__factory:()=>Lf,ENS__factory:()=>Ef,ERC20Basic__factory:()=>Jn,ERC20Burnable__factory:()=>Cn,ERC20Mock__factory:()=>bb,ERC20Permit__factory:()=>ad,ERC20Tornado__factory:()=>Rb,ERC20__factory:()=>Pn,ETHTornado__factory:()=>Pb,Echoer__factory:()=>Nb,EnsResolve__factory:()=>kf,FeeManager__factory:()=>Hs,GasCompensationVault__factory:()=>Xs,GasCompensator__factory:()=>Xi,GovernanceAggregator__factory:()=>af,GovernanceExploitPatchUpgrade__factory:()=>ks,GovernanceGasUpgrade__factory:()=>ts,GovernanceProposalStateUpgrade__factory:()=>Us,GovernanceStakingUpgrade__factory:()=>ps,GovernanceVaultUpgrade__factory:()=>bs,Governance__factory:()=>Hi,IDeployer__factory:()=>db,IENSRegistry__factory:()=>jb,IENSResolver__factory:()=>zb,IENS__factory:()=>hf,IERC1155Errors__factory:()=>Za,IERC20Decimals__factory:()=>ai,IERC20Errors__factory:()=>en,IERC20Metadata__factory:()=>dn,IERC20__factory:()=>Dn,IERC721Errors__factory:()=>an,IFeeManager__factory:()=>wf,IGasCompensationVault__factory:()=>qi,IGovernance__factory:()=>oi,IHasher__factory:()=>Hn,IMetamorphicContractFactory__factory:()=>ys,IProxy__factory:()=>gi,IRelayerRegistry__factory:()=>Xb,ITornadoGovernance__factory:()=>xd,ITornadoInstance__factory:()=>Tb,ITornadoRouter__factory:()=>uf,ITornadoStakingRewards__factory:()=>is,ITornadoVault__factory:()=>Ed,IUSDT__factory:()=>Yn,IUniswapV3Factory__factory:()=>$d,IUniswapV3PoolActions__factory:()=>Cd,IUniswapV3PoolDerivedState__factory:()=>Dd,IUniswapV3PoolEvents__factory:()=>Ud,IUniswapV3PoolImmutables__factory:()=>Ld,IUniswapV3PoolOwnerActions__factory:()=>Gd,IUniswapV3PoolState__factory:()=>jd,IUniswapV3Pool__factory:()=>Wd,IVerifier__factory:()=>ub,InitialProposal__factory:()=>hs,InstanceRegistry__factory:()=>lf,LoopbackProxy__factory:()=>Js,MaliciousProposal__factory:()=>vs,MerkleTreeWithHistoryMock__factory:()=>cb,MerkleTreeWithHistory__factory:()=>Xn,MockGovernance__factory:()=>ki,Multicall:()=>a.Multicall,Multicall__factory:()=>dc,NewImplementation__factory:()=>Mi,OffchainOracle:()=>a.OffchainOracle,OffchainOracle__factory:()=>sc,OvmGasPriceOracle:()=>a.OvmGasPriceOracle,OvmGasPriceOracle__factory:()=>rc,Ownable__factory:()=>Tn,PatchProposal__factory:()=>Cs,Pausable__factory:()=>Ln,ProposalStateChangeGovernance__factory:()=>mi,ProposalUpgrade__factory:()=>Ii,Proposal__factory:()=>Ci,Proxy__factory:()=>wn,RelayerAggregator__factory:()=>Jb,RelayerRegistry__factory:()=>_f,Resolver__factory:()=>Af,ReverseRecords:()=>a.ReverseRecords,ReverseRecords__factory:()=>uc,TORNMock__factory:()=>Bf,TORN__factory:()=>fd,TestnetAdminProxy__factory:()=>ld,TestnetFeeManager__factory:()=>hd,TestnetGovernanceProxy__factory:()=>vd,Timestamp__factory:()=>zf,TornadoProxyLight__factory:()=>wb,TornadoRouter__factory:()=>Zs,TornadoStakingRewards__factory:()=>kd,TornadoVault__factory:()=>tc,Tornado__factory:()=>yb,TransparentUpgradeableProxy__factory:()=>_n,UpgradeableProxy__factory:()=>En,Verifier__factory:()=>Ub,VestingMock__factory:()=>Wf,Vesting__factory:()=>sd,VoucherMock__factory:()=>Kf,Voucher__factory:()=>pd,factories:()=>bc});var a={};function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function b(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function f(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}e.r(a),e.d(a,{Q2:()=>dc,Hk:()=>sc,Ld:()=>rc,Rp:()=>uc});const d=BigInt(2**32-1),i=BigInt(32);function s(e,t=!1){return t?{h:Number(e&d),l:Number(e>>i&d)}:{h:0|Number(e>>i&d),l:0|Number(e&d)}}function c(e,t=!1){let a=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let b=0;b>h)*w)%g,t&T&&(b^=m<<(m<a>32?((e,t,a)=>t<>>64-a)(e,t,a):((e,t,a)=>e<>>32-a)(e,t,a),x=(e,t,a)=>a>32?((e,t,a)=>e<>>64-a)(e,t,a):((e,t,a)=>t<>>32-a)(e,t,a);class I extends p{constructor(e,t,a,b=!1,f=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=a,this.enableXOF=b,this.rounds=f,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,n(a),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var d;this.state=new Uint8Array(200),this.state32=(d=this.state,new Uint32Array(d.buffer,d.byteOffset,Math.floor(d.byteLength/4)))}keccak(){!function(e,t=24){const a=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)a[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,b=(t+2)%10,f=a[b],d=a[b+1],i=_(f,d,1)^a[n],s=x(f,d,1)^a[n+1];for(let a=0;a<50;a+=10)e[t+a]^=i,e[t+a+1]^=s}let t=e[2],b=e[3];for(let a=0;a<24;a++){const n=o[a],f=_(t,b,n),d=x(t,b,n),i=u[a];t=e[i],b=e[i+1],e[i]=f,e[i+1]=d}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)a[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~a[(n+2)%10]&a[(n+4)%10]}e[0]^=v[n],e[1]^=M[n]}a.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){f(this);const{blockLen:t,state:a}=this,n=(e=r(e)).length;for(let b=0;b=a&&this.keccak();const f=Math.min(a-this.posOut,b-n);e.set(t.subarray(this.posOut,this.posOut+f),n),this.posOut+=f,n+=f}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return n(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(function(e,t){b(e);const a=t.outputLen;if(e.lengthfunction(e){const t=t=>e().update(r(t)).digest(),a=e();return t.outputLen=a.outputLen,t.blockLen=a.blockLen,t.create=()=>e(),t}((()=>new I(t,e,a))))(1,136,32);function R(e,t,a){const n=t.split("|").map((e=>e.trim()));for(let a=0;aPromise.resolve(e[t]))))).reduce(((e,a,n)=>(e[t[n]]=a,e)),{})}function k(e,t,a){for(let n in t){let b=t[n];const f=a?a[n]:null;f&&R(b,f,n),Object.defineProperty(e,n,{enumerable:!0,value:b,writable:!1})}}function P(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(P).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let a="0x";for(let n=0;n>4],a+=t[15&e[n]];return a}if("object"==typeof e&&"function"==typeof e.toJSON)return P(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{ "+t.map((t=>`${P(t)}: ${P(e[t])}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function A(e,t){return e&&e.code===t}function C(e){return A(e,"CALL_EXCEPTION")}function N(e,t,a){let n,b=e;{const n=[];if(a){if("message"in a||"code"in a||"name"in a)throw new Error(`value will overwrite populated values: ${P(a)}`);for(const e in a){if("shortMessage"===e)continue;const t=a[e];n.push(e+"="+P(t))}}n.push(`code=${t}`),n.push("version=6.13.3"),n.length&&(e+=" ("+n.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":n=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":n=new RangeError(e);break;default:n=new Error(e)}return k(n,{code:t}),a&&Object.assign(n,a),null==n.shortMessage&&k(n,{shortMessage:b}),n}function D(e,t,a,n){if(!e)throw N(t,a,n)}function S(e,t,a,n){D(e,t,"INVALID_ARGUMENT",{argument:a,value:n})}function U(e,t,a){null==a&&(a=""),a&&(a=": "+a),D(e>=t,"missing arguemnt"+a,"MISSING_ARGUMENT",{count:e,expectedCount:t}),D(e<=t,"too many arguments"+a,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})}const V=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(e){}return e}),[]);function L(e,t,a){if(null==a&&(a=""),e!==t){let e=a,t="new";a&&(e+=".",t+=" "+a),D(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}function F(e,t,a){if(e instanceof Uint8Array)return a?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let a=2;for(let n=0;n>4]+H[15&n]}return a}function $(e){return"0x"+e.map((e=>z(e).substring(2))).join("")}function X(e,t,a){const n=G(e);return null!=a&&a>n.length&&D(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:a}),z(n.slice(null==t?0:t,null==a?n.length:a))}function W(e,t,a){const n=G(e);D(t>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:t,offset:t+1});const b=new Uint8Array(t);return b.fill(0),a?b.set(n,t-n.length):b.set(n,0),z(b)}let q=!1;const J=function(e){return E(e)};let K=J;function Y(e){const t=G(e,"data");return z(K(t))}function Z(e,t,a,n,b){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return"OVERRUN"===e?a.length-t-1:0}Y._=J,Y.lock=function(){q=!0},Y.register=function(e){if(q)throw new TypeError("keccak256 is locked");K=e},Object.freeze(Y);const Q=Object.freeze({error:function(e,t,a,n,b){S(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",a)},ignore:Z,replace:function(e,t,a,n,b){return"OVERLONG"===e?(S("number"==typeof b,"invalid bad code point for replacement","badCodepoint",b),n.push(b),0):(n.push(65533),Z(e,t,a))}});function ee(e,t){S("string"==typeof e,"invalid string value","str",e),null!=t&&(function(e){D(V.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}(t),e=e.normalize(t));let a=[];for(let t=0;t>6|192),a.push(63&n|128);else if(55296==(64512&n)){t++;const b=e.charCodeAt(t);S(t>18|240),a.push(f>>12&63|128),a.push(f>>6&63|128),a.push(63&f|128)}else a.push(n>>12|224),a.push(n>>6&63|128),a.push(63&n|128)}return new Uint8Array(a)}function te(e,t){return function(e,t){null==t&&(t=Q.error);const a=G(e,"bytes"),n=[];let b=0;for(;b>7)){n.push(e);continue}let f=null,d=null;if(192==(224&e))f=1,d=127;else if(224==(240&e))f=2,d=2047;else{if(240!=(248&e)){b+=t(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",b-1,a,n);continue}f=3,d=65535}if(b-1+f>=a.length){b+=t("OVERRUN",b-1,a,n);continue}let i=e&(1<<8-f-1)-1;for(let e=0;e1114111?b+=t("OUT_OF_RANGE",b-1-f,a,n,i):i>=55296&&i<=57343?b+=t("UTF16_SURROGATE",b-1-f,a,n,i):i<=d?b+=t("OVERLONG",b-1-f,a,n,i):n.push(i))}return n}(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function ae(e){return Y(ee(e))}const ne=BigInt(0),be=BigInt(1),fe=9007199254740991;function de(e,t){const a=se(e,"value"),n=BigInt(pe(t,"bits"));return a&(be<=-fe&&e<=fe,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(a){S(!1,`invalid BigNumberish string: ${a.message}`,t||"value",e)}}S(!1,"invalid BigNumberish value",t||"value",e)}function se(e,t){const a=ie(e,t);return D(a>=ne,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),a}const ce="0123456789abcdef";function re(e){if(e instanceof Uint8Array){let t="0x0";for(const a of e)t+=ce[a>>4],t+=ce[15&a];return BigInt(t)}return ie(e)}function pe(e,t){switch(typeof e){case"bigint":return S(e>=-fe&&e<=fe,"overflow",t||"value",e),Number(e);case"number":return S(Number.isInteger(e),"underflow",t||"value",e),S(e>=-fe&&e<=fe,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return pe(BigInt(e),t)}catch(a){S(!1,`invalid numeric string: ${a.message}`,t||"value",e)}}S(!1,"invalid numeric value",t||"value",e)}function ue(e,t){let a=se(e,"value").toString(16);if(null==t)a.length%2&&(a="0"+a);else{const n=pe(t,"width");for(D(2*n>=a.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});a.length<2*n;)a="0"+a}return"0x"+a}const oe=32,ye=new Uint8Array(oe),le=["then"],me={},Te=new WeakMap;function he(e){return Te.get(e)}function ge(e,t){Te.set(e,t)}function we(e,t){const a=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw a.error=t,a}function ve(e,t,a){return e.indexOf(null)>=0?t.map(((e,t)=>e instanceof Me?ve(he(e),e,a):e)):e.reduce(((e,n,b)=>{let f=t.getValue(n);return n in e||(a&&f instanceof Me&&(f=ve(he(f),f,a)),e[n]=f),e}),{})}class Me extends Array{#e;constructor(...e){const t=e[0];let a=e[1],n=(e[2]||[]).slice(),b=!0;t!==me&&(a=e,n=[],b=!1),super(a.length),a.forEach(((e,t)=>{this[t]=e}));const f=n.reduce(((e,t)=>("string"==typeof t&&e.set(t,(e.get(t)||0)+1),e)),new Map);if(ge(this,Object.freeze(a.map(((e,t)=>{const a=n[t];return null!=a&&1===f.get(a)?a:null})))),this.#e=[],null==this.#e&&this.#e,!b)return;Object.freeze(this);const d=new Proxy(this,{get:(e,t,a)=>{if("string"==typeof t){if(t.match(/^[0-9]+$/)){const a=pe(t,"%index");if(a<0||a>=this.length)throw new RangeError("out of result range");const n=e[a];return n instanceof Error&&we(`index ${a}`,n),n}if(le.indexOf(t)>=0)return Reflect.get(e,t,a);const n=e[t];if(n instanceof Function)return function(...t){return n.apply(this===a?e:this,t)};if(!(t in e))return e.getValue.apply(this===a?e:this,[t])}return Reflect.get(e,t,a)}});return ge(d,he(this)),d}toArray(e){const t=[];return this.forEach(((a,n)=>{a instanceof Error&&we(`index ${n}`,a),e&&a instanceof Me&&(a=a.toArray(e)),t.push(a)})),t}toObject(e){const t=he(this);return t.reduce(((a,n,b)=>(D(null!=n,`value at index ${b} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),ve(t,this,e))),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const a=he(this),n=[],b=[];for(let f=e;f{this.#t[e]=_e(t)}}}class Ee{allowLoose;#t;#b;#f;#d;#i;constructor(e,t,a){k(this,{allowLoose:!!t}),this.#t=B(e),this.#f=0,this.#d=null,this.#i=null!=a?a:1024,this.#b=0}get data(){return z(this.#t)}get dataLength(){return this.#t.length}get consumed(){return this.#b}get bytes(){return new Uint8Array(this.#t)}#s(e){if(this.#d)return this.#d.#s(e);this.#f+=e,D(this.#i<1||this.#f<=this.#i*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#i} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:B(this.#t),offset:this.#b,length:e,info:{bytesRead:this.#f,dataLength:this.dataLength}})}#c(e,t,a){let n=Math.ceil(t/oe)*oe;return this.#b+n>this.#t.length&&(this.allowLoose&&a&&this.#b+t<=this.#t.length?n=t:D(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:B(this.#t),length:this.#t.length,offset:this.#b+n})),this.#t.slice(this.#b,this.#b+n)}subReader(e){const t=new Ee(this.#t.slice(this.#b+e),this.allowLoose,this.#i);return t.#d=this,t}readBytes(e,t){let a=this.#c(0,e,!!t);return this.#s(e),this.#b+=a.length,a.slice(0,e)}readValue(){return re(this.readBytes(oe))}readIndex(){return pe(re(this.readBytes(oe)))}}const Re=BigInt(0),Oe=BigInt(36);function ke(e){const t=(e=e.toLowerCase()).substring(2).split(""),a=new Uint8Array(40);for(let e=0;e<40;e++)a[e]=t[e].charCodeAt(0);const n=G(Y(a));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const Pe={};for(let e=0;e<10;e++)Pe[String(e)]=String(e);for(let e=0;e<26;e++)Pe[String.fromCharCode(65+e)]=String(10+e);const Ae=function(){const e={};for(let t=0;t<36;t++)e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t);return e}();function Ce(e){if(S("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=ke(e);return S(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){S(e.substring(2,4)===function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>Pe[e])).join("");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let a=String(98-parseInt(t,10)%97);for(;a.length<2;)a="0"+a;return a}(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=Re;for(let a=0;ae.format())).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#r}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#r?-1:!1===this.#r?this.value.length:null}static from(e,t){return new Ve(Ne,e,t)}static uint8(e){return De(e,8)}static uint16(e){return De(e,16)}static uint24(e){return De(e,24)}static uint32(e){return De(e,32)}static uint40(e){return De(e,40)}static uint48(e){return De(e,48)}static uint56(e){return De(e,56)}static uint64(e){return De(e,64)}static uint72(e){return De(e,72)}static uint80(e){return De(e,80)}static uint88(e){return De(e,88)}static uint96(e){return De(e,96)}static uint104(e){return De(e,104)}static uint112(e){return De(e,112)}static uint120(e){return De(e,120)}static uint128(e){return De(e,128)}static uint136(e){return De(e,136)}static uint144(e){return De(e,144)}static uint152(e){return De(e,152)}static uint160(e){return De(e,160)}static uint168(e){return De(e,168)}static uint176(e){return De(e,176)}static uint184(e){return De(e,184)}static uint192(e){return De(e,192)}static uint200(e){return De(e,200)}static uint208(e){return De(e,208)}static uint216(e){return De(e,216)}static uint224(e){return De(e,224)}static uint232(e){return De(e,232)}static uint240(e){return De(e,240)}static uint248(e){return De(e,248)}static uint256(e){return De(e,256)}static uint(e){return De(e,256)}static int8(e){return De(e,-8)}static int16(e){return De(e,-16)}static int24(e){return De(e,-24)}static int32(e){return De(e,-32)}static int40(e){return De(e,-40)}static int48(e){return De(e,-48)}static int56(e){return De(e,-56)}static int64(e){return De(e,-64)}static int72(e){return De(e,-72)}static int80(e){return De(e,-80)}static int88(e){return De(e,-88)}static int96(e){return De(e,-96)}static int104(e){return De(e,-104)}static int112(e){return De(e,-112)}static int120(e){return De(e,-120)}static int128(e){return De(e,-128)}static int136(e){return De(e,-136)}static int144(e){return De(e,-144)}static int152(e){return De(e,-152)}static int160(e){return De(e,-160)}static int168(e){return De(e,-168)}static int176(e){return De(e,-176)}static int184(e){return De(e,-184)}static int192(e){return De(e,-192)}static int200(e){return De(e,-200)}static int208(e){return De(e,-208)}static int216(e){return De(e,-216)}static int224(e){return De(e,-224)}static int232(e){return De(e,-232)}static int240(e){return De(e,-240)}static int248(e){return De(e,-248)}static int256(e){return De(e,-256)}static int(e){return De(e,-256)}static bytes1(e){return Se(e,1)}static bytes2(e){return Se(e,2)}static bytes3(e){return Se(e,3)}static bytes4(e){return Se(e,4)}static bytes5(e){return Se(e,5)}static bytes6(e){return Se(e,6)}static bytes7(e){return Se(e,7)}static bytes8(e){return Se(e,8)}static bytes9(e){return Se(e,9)}static bytes10(e){return Se(e,10)}static bytes11(e){return Se(e,11)}static bytes12(e){return Se(e,12)}static bytes13(e){return Se(e,13)}static bytes14(e){return Se(e,14)}static bytes15(e){return Se(e,15)}static bytes16(e){return Se(e,16)}static bytes17(e){return Se(e,17)}static bytes18(e){return Se(e,18)}static bytes19(e){return Se(e,19)}static bytes20(e){return Se(e,20)}static bytes21(e){return Se(e,21)}static bytes22(e){return Se(e,22)}static bytes23(e){return Se(e,23)}static bytes24(e){return Se(e,24)}static bytes25(e){return Se(e,25)}static bytes26(e){return Se(e,26)}static bytes27(e){return Se(e,27)}static bytes28(e){return Se(e,28)}static bytes29(e){return Se(e,29)}static bytes30(e){return Se(e,30)}static bytes31(e){return Se(e,31)}static bytes32(e){return Se(e,32)}static address(e){return new Ve(Ne,"address",e)}static bool(e){return new Ve(Ne,"bool",!!e)}static bytes(e){return new Ve(Ne,"bytes",e)}static string(e){return new Ve(Ne,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new Ve(Ne,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===Ue}static dereference(e,t){if(Ve.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}class Le extends xe{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let a=Ve.dereference(t,"string");try{a=Ce(a)}catch(e){return this._throwError(e.message,t)}return e.writeValue(a)}decode(e){return Ce(ue(e.readValue(),20))}}class Fe extends xe{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}function Ge(e,t,a){let n=[];if(Array.isArray(a))n=a;else if(a&&"object"==typeof a){let e={};n=t.map((t=>{const n=t.localName;return D(n,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:a}),D(!e[n],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:a}),e[n]=!0,a[n]}))}else S(!1,"invalid tuple value","tuple",a);S(t.length===n.length,"types/value length mismatch","tuple",a);let b=new Ie,f=new Ie,d=[];t.forEach(((e,t)=>{let a=n[t];if(e.dynamic){let t=f.length;e.encode(f,a);let n=b.writeUpdatableValue();d.push((e=>{n(e+t)}))}else e.encode(b,a)})),d.forEach((e=>{e(b.length)}));let i=e.appendWriter(b);return i+=e.appendWriter(f),i}function Be(e,t){let a=[],n=[],b=e.subReader(0);return t.forEach((t=>{let f=null;if(t.dynamic){let a=e.readIndex(),n=b.subReader(a);try{f=t.decode(n)}catch(e){if(A(e,"BUFFER_OVERRUN"))throw e;f=e,f.baseType=t.name,f.name=t.localName,f.type=t.type}}else try{f=t.decode(e)}catch(e){if(A(e,"BUFFER_OVERRUN"))throw e;f=e,f.baseType=t.name,f.name=t.localName,f.type=t.type}if(null==f)throw new Error("investigate");a.push(f),n.push(t.localName||null)})),Me.fromItems(a,n)}class je extends xe{coder;length;constructor(e,t,a){super("array",e.type+"["+(t>=0?t:"")+"]",a,-1===t||e.dynamic),k(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let a=0;ae||a<-(e+Ke))&&this._throwError("value out-of-bounds",t),a=function(e){let t=ie(e,"value");const a=BigInt(pe(256,"width")),n=be<de(n,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(a)}decode(e){let t=de(e.readValue(),8*this.size);return this.signed&&(t=function(e,t){const a=se(e,"value"),n=BigInt(pe(t,"width"));return D(a>>n===ne,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),a>>n-be?-((~a&(be<{e.dynamic&&(a=!0),n.push(e.type)})),super("tuple","tuple("+n.join(",")+")",t,a),k(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const a=t.localName;return a&&(e[a]||(e[a]=0),e[a]++),e}),{});return this.coders.forEach(((a,n)=>{let b=a.localName;b&&1===t[b]&&("length"===b&&(b="_length"),null==e[b]&&(e[b]=e[n]))})),Object.freeze(e)}encode(e,t){const a=Ve.dereference(t,"tuple");return Ge(e,this.coders,a)}decode(e){return Be(e,this.coders)}}function tt(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}const at=tt("external public payable override".split(" ")),nt="constant external internal payable private public pure view override",bt=tt(nt.split(" ")),ft="constructor error event fallback function receive struct",dt=tt(ft.split(" ")),it="calldata memory storage payable indexed",st=tt(it.split(" ")),ct=tt([ft,it,"tuple returns",nt].join(" ").split(" ")),rt={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},pt=new RegExp("^(\\s*)"),ut=new RegExp("^([0-9]+)"),ot=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),yt=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),lt=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class mt{#b;#p;get offset(){return this.#b}get length(){return this.#p.length-this.#b}constructor(e){this.#b=0,this.#p=e.slice()}clone(){return new mt(this.#p)}reset(){this.#b=0}#u(e=0,t=0){return new mt(this.#p.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#u(this.#b+1,e.match+1);return this.#b=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#b=this.#p.length)throw new Error("out-of-bounds");return this.#p[this.#b]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#b++,e}toString(){const e=[];for(let t=this.#b;t`}}function Tt(e){const t=[],a=t=>{const a=f0&&"NUMBER"===t[t.length-1].type){const a=t.pop().text;e=a+e,t[t.length-1].value=pe(a)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(i=d.match(ot),i){if(s.text=i[1],f+=s.text.length,ct.has(s.text)){s.type="KEYWORD";continue}if(s.text.match(lt)){s.type="TYPE";continue}s.type="ID"}else{if(i=d.match(ut),!i)throw new Error(`unexpected token ${JSON.stringify(d[0])} at position ${f}`);s.text=i[1],s.type="NUMBER",f+=s.text.length}}return new mt(t.map((e=>Object.freeze(e))))}function ht(e,t){let a=[];for(const n in t.keys())e.has(n)&&a.push(n);if(a.length>1)throw new Error(`conflicting types: ${a.join(", ")}`)}function gt(e,t){if(t.peekKeyword(dt)){const a=t.pop().text;if(a!==e)throw new Error(`expected ${e}, got ${a}`)}return t.popType("ID")}function wt(e,t){const a=new Set;for(;;){const n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),a.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);a.add(n)}return Object.freeze(a)}function vt(e){let t=wt(e,bt);return ht(t,tt("constant payable nonpayable".split(" "))),ht(t,tt("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function Mt(e,t){return e.popParams().map((e=>Ut.from(e,t)))}function _t(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return ie(e.pop().text);throw new Error("invalid gas")}return null}function xt(e){if(e.length)throw new Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}const It=new RegExp(/^(.*)\[([0-9]*)\]$/);function Et(e){const t=e.match(lt);if(S(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const a=parseInt(t[2]);S(0!==a&&a<=32,"invalid bytes length","type",e)}else if(t[3]){const a=parseInt(t[3]);S(0!==a&&a<=256&&a%8==0,"invalid numeric width","type",e)}return e}const Rt={},Ot=Symbol.for("_ethers_internal"),kt="_ParamTypeInternal",Pt="_ErrorInternal",At="_EventInternal",Ct="_ConstructorInternal",Nt="_FallbackInternal",Dt="_FunctionInternal",St="_StructInternal";class Ut{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,a,n,b,f,d,i){if(L(e,Rt,"ParamType"),Object.defineProperty(this,Ot,{value:kt}),f&&(f=Object.freeze(f.slice())),"array"===n){if(null==d||null==i)throw new Error("")}else if(null!=d||null!=i)throw new Error("");if("tuple"===n){if(null==f)throw new Error("")}else if(null!=f)throw new Error("");k(this,{name:t,type:a,baseType:n,indexed:b,components:f,arrayLength:d,arrayChildren:i})}format(e){if(null==e&&(e="sighash"),"json"===e){const t=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const a={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"==typeof this.indexed&&(a.indexed=this.indexed),this.isTuple()&&(a.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(a)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const a=this;return e.map((e=>a.arrayChildren.walk(e,t)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const a=this;return e.map(((e,n)=>a.components[n].walk(e,t)))}return t(this.type,e)}#o(e,t,a,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const b=this.arrayChildren,f=t.slice();return f.forEach(((t,n)=>{b.#o(e,t,a,(e=>{f[n]=e}))})),void n(f)}if(this.isTuple()){const b=this.components;let f;if(Array.isArray(t))f=t.slice();else{if(null==t||"object"!=typeof t)throw new Error("invalid tuple value");f=b.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(f.length!==this.components.length)throw new Error("array is wrong length");return f.forEach(((t,n)=>{b[n].#o(e,t,a,(e=>{f[n]=e}))})),void n(f)}const b=a(this.type,t);b.then?e.push(async function(){n(await b)}()):n(b)}async walkAsync(e,t){const a=[],n=[e];return this.#o(a,e,t,(e=>{n[0]=e})),a.length&&await Promise.all(a),n[0]}static from(e,t){if(Ut.isParamType(e))return e;if("string"==typeof e)try{return Ut.from(Tt(e),t)}catch(t){S(!1,"invalid param type","obj",e)}else if(e instanceof mt){let a="",n="",b=null;wt(e,tt(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",b=e.popParams().map((e=>Ut.from(e))),a=`tuple(${b.map((e=>e.format())).join(",")})`):(a=Et(e.popType("TYPE")),n=a);let f=null,d=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();f=new Ut(Rt,"",a,n,null,b,d,f),d=t.value,a+=t.text,n="array",b=null}let i=null;if(wt(e,st).has("indexed")){if(!t)throw new Error("");i=!0}const s=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Ut(Rt,s,a,n,i,b,d,f)}const a=e.name;S(!a||"string"==typeof a&&a.match(yt),"invalid name","obj.name",a);let n=e.indexed;null!=n&&(S(t,"parameter cannot be indexed","obj.indexed",e.indexed),n=!!n);let b=e.type,f=b.match(It);if(f){const t=parseInt(f[2]||"-1"),d=Ut.from({type:f[1],components:e.components});return new Ut(Rt,a||"",b,"array",n,null,t,d)}if("tuple"===b||b.startsWith("tuple(")||b.startsWith("(")){const t=null!=e.components?e.components.map((e=>Ut.from(e))):null;return new Ut(Rt,a||"",b,"tuple",n,t,null,null)}return b=Et(e.type),new Ut(Rt,a||"",b,b,n,null,null,null)}static isParamType(e){return e&&e[Ot]===kt}}class Vt{type;inputs;constructor(e,t,a){L(e,Rt,"Fragment"),k(this,{type:t,inputs:a=Object.freeze(a.slice())})}static from(e){if("string"==typeof e){try{Vt.from(JSON.parse(e))}catch(e){}return Vt.from(Tt(e))}if(e instanceof mt)switch(e.peekKeyword(dt)){case"constructor":return jt.from(e);case"error":return Gt.from(e);case"event":return Bt.from(e);case"fallback":case"receive":return Ht.from(e);case"function":return zt.from(e);case"struct":return $t.from(e)}else if("object"==typeof e){switch(e.type){case"constructor":return jt.from(e);case"error":return Gt.from(e);case"event":return Bt.from(e);case"fallback":case"receive":return Ht.from(e);case"function":return zt.from(e);case"struct":return $t.from(e)}D(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}S(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return jt.isFragment(e)}static isError(e){return Gt.isFragment(e)}static isEvent(e){return Bt.isFragment(e)}static isFunction(e){return zt.isFragment(e)}static isStruct(e){return $t.isFragment(e)}}class Lt extends Vt{name;constructor(e,t,a,n){super(e,t,n),S("string"==typeof a&&a.match(yt),"invalid identifier","name",a),n=Object.freeze(n.slice()),k(this,{name:a})}}function Ft(e,t){return"("+t.map((t=>t.format(e))).join("full"===e?", ":",")+")"}class Gt extends Lt{constructor(e,t,a){super(e,"error",t,a),Object.defineProperty(this,Ot,{value:Pt})}get selector(){return ae(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+Ft(e,this.inputs)),t.join(" ")}static from(e){if(Gt.isFragment(e))return e;if("string"==typeof e)return Gt.from(Tt(e));if(e instanceof mt){const t=gt("error",e),a=Mt(e);return xt(e),new Gt(Rt,t,a)}return new Gt(Rt,e.name,e.inputs?e.inputs.map(Ut.from):[])}static isFragment(e){return e&&e[Ot]===Pt}}class Bt extends Lt{anonymous;constructor(e,t,a,n){super(e,"event",t,a),Object.defineProperty(this,Ot,{value:At}),k(this,{anonymous:n})}get topicHash(){return ae(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+Ft(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){return t=(t||[]).map((e=>Ut.from(e))),new Bt(Rt,e,t,!1).topicHash}static from(e){if(Bt.isFragment(e))return e;if("string"==typeof e)try{return Bt.from(Tt(e))}catch(t){S(!1,"invalid event fragment","obj",e)}else if(e instanceof mt){const t=gt("event",e),a=Mt(e,!0),n=!!wt(e,tt(["anonymous"])).has("anonymous");return xt(e),new Bt(Rt,t,a,n)}return new Bt(Rt,e.name,e.inputs?e.inputs.map((e=>Ut.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[Ot]===At}}class jt extends Vt{payable;gas;constructor(e,t,a,n,b){super(e,t,a),Object.defineProperty(this,Ot,{value:Ct}),k(this,{payable:n,gas:b})}format(e){if(D(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[`constructor${Ft(e,this.inputs)}`];return this.payable&&t.push("payable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(jt.isFragment(e))return e;if("string"==typeof e)try{return jt.from(Tt(e))}catch(t){S(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof mt){wt(e,tt(["constructor"]));const t=Mt(e),a=!!wt(e,at).has("payable"),n=_t(e);return xt(e),new jt(Rt,"constructor",t,a,n)}return new jt(Rt,"constructor",e.inputs?e.inputs.map(Ut.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[Ot]===Ct}}class Ht extends Vt{payable;constructor(e,t,a){super(e,"fallback",t),Object.defineProperty(this,Ot,{value:Nt}),k(this,{payable:a})}format(e){const t=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?" payable":""}`}static from(e){if(Ht.isFragment(e))return e;if("string"==typeof e)try{return Ht.from(Tt(e))}catch(t){S(!1,"invalid fallback fragment","obj",e)}else if(e instanceof mt){const t=e.toString();if(S(e.peekKeyword(tt(["fallback","receive"])),"type must be fallback or receive","obj",t),"receive"===e.popKeyword(tt(["fallback","receive"]))){const t=Mt(e);return S(0===t.length,"receive cannot have arguments","obj.inputs",t),wt(e,tt(["payable"])),xt(e),new Ht(Rt,[],!0)}let a=Mt(e);a.length?S(1===a.length&&"bytes"===a[0].type,"invalid fallback inputs","obj.inputs",a.map((e=>e.format("minimal"))).join(", ")):a=[Ut.from("bytes")];const n=vt(e);if(S("nonpayable"===n||"payable"===n,"fallback cannot be constants","obj.stateMutability",n),wt(e,tt(["returns"])).has("returns")){const t=Mt(e);S(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map((e=>e.format("minimal"))).join(", "))}return xt(e),new Ht(Rt,a,"payable"===n)}if("receive"===e.type)return new Ht(Rt,[],!0);if("fallback"===e.type){const t=[Ut.from("bytes")],a="payable"===e.stateMutability;return new Ht(Rt,t,a)}S(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[Ot]===Nt}}class zt extends Lt{constant;outputs;stateMutability;payable;gas;constructor(e,t,a,n,b,f){super(e,"function",t,n),Object.defineProperty(this,Ot,{value:Dt}),k(this,{constant:"view"===a||"pure"===a,gas:f,outputs:b=Object.freeze(b.slice()),payable:"payable"===a,stateMutability:a})}get selector(){return ae(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+Ft(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(Ft(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){return t=(t||[]).map((e=>Ut.from(e))),new zt(Rt,e,"view",t,[],null).selector}static from(e){if(zt.isFragment(e))return e;if("string"==typeof e)try{return zt.from(Tt(e))}catch(t){S(!1,"invalid function fragment","obj",e)}else if(e instanceof mt){const t=gt("function",e),a=Mt(e),n=vt(e);let b=[];wt(e,tt(["returns"])).has("returns")&&(b=Mt(e));const f=_t(e);return xt(e),new zt(Rt,t,n,a,b,f)}let t=e.stateMutability;return null==t&&(t="payable","boolean"==typeof e.constant?(t="view",e.constant||(t="payable","boolean"!=typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(t="nonpayable")),new zt(Rt,e.name,t,e.inputs?e.inputs.map(Ut.from):[],e.outputs?e.outputs.map(Ut.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[Ot]===Dt}}class $t extends Lt{constructor(e,t,a){super(e,"struct",t,a),Object.defineProperty(this,Ot,{value:St})}format(){throw new Error("@TODO")}static from(e){if("string"==typeof e)try{return $t.from(Tt(e))}catch(t){S(!1,"invalid struct fragment","obj",e)}else if(e instanceof mt){const t=gt("struct",e),a=Mt(e);return xt(e),new $t(Rt,t,a)}return new $t(Rt,e.name,e.inputs?e.inputs.map(Ut.from):[])}static isFragment(e){return e&&e[Ot]===St}}const Xt=new Map;Xt.set(0,"GENERIC_PANIC"),Xt.set(1,"ASSERT_FALSE"),Xt.set(17,"OVERFLOW"),Xt.set(18,"DIVIDE_BY_ZERO"),Xt.set(33,"ENUM_RANGE_ERROR"),Xt.set(34,"BAD_STORAGE_DATA"),Xt.set(49,"STACK_UNDERFLOW"),Xt.set(50,"ARRAY_RANGE_ERROR"),Xt.set(65,"OUT_OF_MEMORY"),Xt.set(81,"UNINITIALIZED_FUNCTION_CALL");const Wt=new RegExp(/^bytes([0-9]*)$/),qt=new RegExp(/^(u?int)([0-9]*)$/);let Jt=null,Kt=1024;class Yt{#y(e){if(e.isArray())return new je(this.#y(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new et(e.components.map((e=>this.#y(e))),e.name);switch(e.baseType){case"address":return new Le(e.name);case"bool":return new He(e.name);case"string":return new Qe(e.name);case"bytes":return new $e(e.name);case"":return new qe(e.name)}let t=e.type.match(qt);if(t){let a=parseInt(t[2]||"256");return S(0!==a&&a<=256&&a%8==0,"invalid "+t[1]+" bit length","param",e),new Ze(a/8,"int"===t[1],e.name)}if(t=e.type.match(Wt),t){let a=parseInt(t[1]);return S(0!==a&&a<=32,"invalid bytes length","param",e),new Xe(a,e.name)}S(!1,"invalid type","type",e.type)}getDefaultValue(e){const t=e.map((e=>this.#y(Ut.from(e))));return new et(t,"_").defaultValue()}encode(e,t){U(t.length,e.length,"types/values length mismatch");const a=e.map((e=>this.#y(Ut.from(e)))),n=new et(a,"_"),b=new Ie;return n.encode(b,t),b.data}decode(e,t,a){const n=e.map((e=>this.#y(Ut.from(e))));return new et(n,"_").decode(new Ee(t,a,Kt))}static _setDefaultMaxInflation(e){S("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),Kt=e}static defaultAbiCoder(){return null==Jt&&(Jt=new Yt),Jt}static getBuiltinCallException(e,t,a){return function(e,t,a,n){let b="missing revert data",f=null,d=null;if(a){b="execution reverted";const e=G(a);if(a=z(a),0===e.length)b+=" (no data present; likely require(false) occurred",f="require(false)";else if(e.length%32!=4)b+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===z(e.slice(0,4)))try{f=n.decode(["string"],e.slice(4))[0],d={signature:"Error(string)",name:"Error",args:[f]},b+=`: ${JSON.stringify(f)}`}catch(e){b+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===z(e.slice(0,4)))try{const t=Number(n.decode(["uint256"],e.slice(4))[0]);d={signature:"Panic(uint256)",name:"Panic",args:[t]},f=`Panic due to ${Xt.get(t)||"UNKNOWN"}(${t})`,b+=`: ${f}`}catch(e){b+=" (could not decode panic code)"}else b+=" (unknown custom error)"}const i={to:t.to?Ce(t.to):null,data:t.data||"0x"};return t.from&&(i.from=Ce(t.from)),N(b,"CALL_EXCEPTION",{action:e,data:a,reason:f,transaction:i,invocation:null,revert:d})}(e,t,a,Yt.defaultAbiCoder())}}class Zt{fragment;name;signature;topic;args;constructor(e,t,a){const n=e.name,b=e.format();k(this,{fragment:e,name:n,signature:b,topic:t,args:a})}}class Qt{fragment;name;args;signature;selector;value;constructor(e,t,a,n){const b=e.name,f=e.format();k(this,{fragment:e,name:b,args:a,signature:f,selector:t,value:n})}}class ea{fragment;name;args;signature;selector;constructor(e,t,a){const n=e.name,b=e.format();k(this,{fragment:e,name:n,args:a,signature:b,selector:t})}}class ta{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){k(this,{hash:e,_isIndexed:!0})}}const aa={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},na={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&aa[e.toString()]&&(t=aa[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class ba{fragments;deploy;fallback;receive;#l;#m;#T;#h;constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,this.#T=new Map,this.#l=new Map,this.#m=new Map;const a=[];for(const e of t)try{a.push(Vt.from(e))}catch(t){console.log(`[Warning] Invalid Fragment ${JSON.stringify(e)}:`,t.message)}k(this,{fragments:Object.freeze(a)});let n=null,b=!1;this.#h=this.getAbiCoder(),this.fragments.forEach(((e,t)=>{let a;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void k(this,{deploy:e});case"fallback":return void(0===e.inputs.length?b=!0:(S(!n||e.payable!==n.payable,"conflicting fallback fragments",`fragments[${t}]`,e),n=e,b=n.payable));case"function":a=this.#T;break;case"event":a=this.#m;break;case"error":a=this.#l;break;default:return}const f=e.format();a.has(f)||a.set(f,e)})),this.deploy||k(this,{deploy:jt.from("constructor()")}),k(this,{fallback:n,receive:b})}format(e){const t=e?"minimal":"full";return this.fragments.map((e=>e.format(t)))}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return Yt.defaultAbiCoder()}#g(e,t,a){if(j(e)){const t=e.toLowerCase();for(const e of this.#T.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,a]of this.#T)t.split("(")[0]===e&&n.push(a);if(t){const e=t.length>0?t[t.length-1]:null;let a=t.length,b=!0;Ve.isTyped(e)&&"overrides"===e.type&&(b=!1,a--);for(let e=n.length-1;e>=0;e--){const t=n[e].inputs.length;t===a||b&&t===a-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){const a=n[e].inputs;for(let b=0;b=a.length){if("overrides"===t[b].type)continue;n.splice(e,1);break}if(t[b].type!==a[b].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&n.splice(0,1)}return 0===n.length?null:(n.length>1&&a&&S(!1,`ambiguous function description (i.e. matches ${n.map((e=>JSON.stringify(e.format()))).join(", ")})`,"key",e),n[0])}return this.#T.get(zt.from(e).format())||null}getFunctionName(e){const t=this.#g(e,null,!1);return S(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#g(e,null,!1)}getFunction(e,t){return this.#g(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#T.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let a=0;a=0;e--)n[e].inputs.length=0;e--){const a=n[e].inputs;for(let b=0;b1&&a&&S(!1,`ambiguous event description (i.e. matches ${n.map((e=>JSON.stringify(e.format()))).join(", ")})`,"key",e),n[0])}return this.#m.get(Bt.from(e).format())||null}getEventName(e){const t=this.#w(e,null,!1);return S(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#w(e,null,!1)}getEvent(e,t){return this.#w(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#m.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let a=0;a1&&S(!1,`ambiguous error description (i.e. ${t.map((e=>JSON.stringify(e.format()))).join(", ")})`,"name",e),t[0])}if("Error(string)"===(e=Gt.from(e).format()))return Gt.from("error Error(string)");if("Panic(uint256)"===e)return Gt.from("error Panic(uint256)");return this.#l.get(e)||null}forEachError(e){const t=Array.from(this.#l.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let a=0;a"string"===e.type?ae(t):"bytes"===e.type?Y(z(t)):("bool"===e.type&&"boolean"==typeof t?t=t?"0x01":"0x00":e.type.match(/^u?int/)?t=ue(t):e.type.match(/^bytes/)?t=W(t,32,!1):"address"===e.type&&this.#h.encode(["address"],[t]),W(z(t),32,!0));for(t.forEach(((t,b)=>{const f=e.inputs[b];f.indexed?null==t?a.push(null):"array"===f.baseType||"tuple"===f.baseType?S(!1,"filtering with tuples or arrays not supported","contract."+f.name,t):Array.isArray(t)?a.push(t.map((e=>n(f,e)))):a.push(n(f,t)):S(null==t,"cannot filter non-indexed parameters; must be null","contract."+f.name,t)}));a.length&&null===a[a.length-1];)a.pop();return a}encodeEventLog(e,t){if("string"==typeof e){const t=this.getEvent(e);S(t,"unknown event","eventFragment",e),e=t}const a=[],n=[],b=[];return e.anonymous||a.push(e.topicHash),S(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach(((e,f)=>{const d=t[f];if(e.indexed)if("string"===e.type)a.push(ae(d));else if("bytes"===e.type)a.push(Y(d));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");a.push(this.#h.encode([e.type],[d]))}else n.push(e),b.push(d)})),{data:this.#h.encode(n,b),topics:a}}decodeEventLog(e,t,a){if("string"==typeof e){const t=this.getEvent(e);S(t,"unknown event","eventFragment",e),e=t}if(null!=a&&!e.anonymous){const t=e.topicHash;S(j(a[0],32)&&a[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",a[0]),a=a.slice(1)}const n=[],b=[],f=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(Ut.from({type:"bytes32",name:e.name})),f.push(!0)):(n.push(e),f.push(!1)):(b.push(e),f.push(!1))}));const d=null!=a?this.#h.decode(n,$(a)):null,i=this.#h.decode(b,t,!0),s=[],c=[];let r=0,p=0;return e.inputs.forEach(((e,t)=>{let a=null;if(e.indexed)if(null==d)a=new ta(null);else if(f[t])a=new ta(d[p++]);else try{a=d[p++]}catch(e){a=e}else try{a=i[r++]}catch(e){a=e}s.push(a),c.push(e.name||null)})),Me.fromItems(s,c)}parseTransaction(e){const t=G(e.data,"tx.data"),a=ie(null!=e.value?e.value:0,"tx.value"),n=this.getFunction(z(t.slice(0,4)));if(!n)return null;const b=this.#h.decode(n.inputs,t.slice(4));return new Qt(n,n.selector,b,a)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Zt(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=z(e),a=this.getError(X(t,0,4));if(!a)return null;const n=this.#h.decode(a.inputs,X(t,4));return new ea(a,a.selector,n)}static from(e){return e instanceof ba?e:"string"==typeof e?new ba(JSON.parse(e)):"function"==typeof e.formatJson?new ba(e.formatJson()):"function"==typeof e.format?new ba(e.format("json")):new ba(e)}}function fa(e){return e&&"function"==typeof e.getAddress}async function da(e,t){const a=await t;return null!=a&&"0x0000000000000000000000000000000000000000"!==a||(D("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),S(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),Ce(a)}function ia(e,t){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?Ce(e):(D(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),da(e,t.resolveName(e))):fa(e)?da(e,e.getAddress()):e&&"function"==typeof e.then?da(e,e):void S(!1,"unsupported addressable value","target",e)}function sa(e,t){return{address:Ce(e),storageKeys:t.map(((e,t)=>(S(j(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase())))}}const ca=BigInt(0);function ra(e){return null==e?null:e.toString()}Symbol.iterator;class pa{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(e,t){this.provider=t;const a=Object.freeze(e.topics.slice());k(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:a,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:t,blockNumber:a,data:n,index:b,removed:f,topics:d,transactionHash:i,transactionIndex:s}=this;return{_type:"log",address:e,blockHash:t,blockNumber:a,data:n,index:b,removed:f,topics:d,transactionHash:i,transactionIndex:s}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return D(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return D(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return D(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return{orphan:"drop-log",log:{transactionHash:(e=this).transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,address:e.address,data:e.data,topics:Object.freeze(e.topics.slice()),index:e.index}};var e}}class ua{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#v;constructor(e,t){this.#v=Object.freeze(e.logs.map((e=>new pa(e,t))));let a=ca;null!=e.effectiveGasPrice?a=e.effectiveGasPrice:null!=e.gasPrice&&(a=e.gasPrice),k(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:a,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#v}toJSON(){const{to:e,from:t,contractAddress:a,hash:n,index:b,blockHash:f,blockNumber:d,logsBloom:i,logs:s,status:c,root:r}=this;return{_type:"TransactionReceipt",blockHash:f,blockNumber:d,contractAddress:a,cumulativeGasUsed:ra(this.cumulativeGasUsed),from:t,gasPrice:ra(this.gasPrice),blobGasUsed:ra(this.blobGasUsed),blobGasPrice:ra(this.blobGasPrice),gasUsed:ra(this.gasUsed),hash:n,index:b,logs:s,logsBloom:i,root:r,status:c,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(d)return null;const{blockNumber:e,nonce:t}=await O({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(t{if(null==e||0!==e.status)return e;D(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},c=await this.provider.getTransactionReceipt(this.hash);if(0===a)return s(c);if(c){if(await c.confirmations()>=a)return s(c)}else if(await i(),0===a)return null;const r=new Promise(((e,t)=>{const f=[],c=()=>{f.forEach((e=>e()))};if(f.push((()=>{d=!0})),n>0){const e=setTimeout((()=>{c(),t(N("wait for transaction timeout","TIMEOUT"))}),n);f.push((()=>{clearTimeout(e)}))}const r=async n=>{if(await n.confirmations()>=a){c();try{e(s(n))}catch(e){t(e)}}};if(f.push((()=>{this.provider.off(this.hash,r)})),this.provider.on(this.hash,r),b>=0){const e=async()=>{try{await i()}catch(e){if(A(e,"TRANSACTION_REPLACED"))return c(),void t(e)}d||this.provider.once("block",e)};f.push((()=>{this.provider.off("block",e)})),this.provider.once("block",e)}}));return await r}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return D(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),la(this)}reorderedEvent(e){return D(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),D(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ya(this,e)}replaceableTransaction(e){S(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new oa(this,this.provider);return t.#M=e,t}}function ya(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function la(e){return{orphan:"drop-transaction",tx:e}}class ma{filter;emitter;#_;constructor(e,t,a){this.#_=t,k(this,{emitter:e,filter:a})}async removeListener(){null!=this.#_&&await this.emitter.off(this.filter,this.#_)}}class Ta extends pa{interface;fragment;args;constructor(e,t,a){super(e,e.provider),k(this,{args:t.decodeEventLog(a,e.data,e.topics),fragment:a,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class ha extends pa{error;constructor(e,t){super(e,e.provider),k(this,{error:t})}}class ga extends ua{#x;constructor(e,t,a){super(a,t),this.#x=e}get logs(){return super.logs.map((e=>{const t=e.topics.length?this.#x.getEvent(e.topics[0]):null;if(t)try{return new Ta(e,this.#x,t)}catch(t){return new ha(e,t)}return e}))}}class wa extends oa{#x;constructor(e,t,a){super(a,t),this.#x=e}async wait(e,t){const a=await super.wait(e,t);return null==a?null:new ga(this.#x,this.provider,a)}}class va extends ma{log;constructor(e,t,a,n){super(e,t,a),k(this,{log:n})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class Ma extends va{constructor(e,t,a,n,b){super(e,t,a,new Ta(b,e.interface,n)),k(this,{args:e.interface.decodeEventLog(n,this.log.data,this.log.topics),fragment:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const _a=BigInt(0);function xa(e){return e&&"function"==typeof e.call}function Ia(e){return e&&"function"==typeof e.estimateGas}function Ea(e){return e&&"function"==typeof e.resolveName}function Ra(e){return e&&"function"==typeof e.sendTransaction}function Oa(e){if(null!=e){if(Ea(e))return e;if(e.provider)return e.provider}}class ka{#I;fragment;constructor(e,t,a){if(k(this,{fragment:t}),t.inputs.lengthnull==a[t]?null:e.walkAsync(a[t],((e,t)=>"address"===e?Array.isArray(t)?Promise.all(t.map((e=>ia(e,b)))):ia(t,b):t)))));return e.interface.encodeFilterTopics(t,n)}()}getTopicFilter(){return this.#I}}function Pa(e,t){return null==e?null:"function"==typeof e[t]?e:e.provider&&"function"==typeof e.provider[t]?e.provider:null}function Aa(e){return null==e?null:e.provider||null}async function Ca(e,t){const a=Ve.dereference(e,"overrides");S("object"==typeof a,"invalid overrides parameter","overrides",e);const n=function(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=z(e.data));const a="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const n of a)n in e&&null!=e[n]&&(t[n]=ie(e[n],`request.${n}`));const n="type,nonce".split(/,/);for(const a of n)a in e&&null!=e[a]&&(t[a]=pe(e[a],`request.${a}`));return e.accessList&&(t.accessList=function(e){if(Array.isArray(e))return e.map(((t,a)=>Array.isArray(t)?(S(2===t.length,"invalid slot set",`value[${a}]`,t),sa(t[0],t[1])):(S(null!=t&&"object"==typeof t,"invalid address-slot set","value",e),sa(t.address,t.storageKeys))));S(null!=e&&"object"==typeof e,"invalid access list","value",e);const t=Object.keys(e).map((t=>{const a=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return sa(t,Object.keys(a).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}(e.accessList)),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map((e=>{return j(t=e,!0)||t instanceof Uint8Array?z(e):Object.assign({},e);var t}))),t}(a);return S(null==n.to||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),S(null==n.data||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function Na(e,t,a){const n=Pa(e,"resolveName"),b=Ea(n)?n:null;return await Promise.all(t.map(((e,t)=>e.walkAsync(a[t],((e,t)=>(t=Ve.dereference(t,e),"address"===e?ia(t,b):t))))))}function Da(e){const t=async function(t){const a=await Ca(t,["data"]);a.to=await e.getAddress(),a.from&&(a.from=await ia(a.from,Oa(e.runner)));const n=e.interface,b=ie(a.value||_a,"overrides.value")===_a,f="0x"===(a.data||"0x");return!n.fallback||n.fallback.payable||!n.receive||f||b||S(!1,"cannot send data to receive or send value to non-payable fallback","overrides",t),S(n.fallback||f,"cannot send data to receive-only contract","overrides.data",a.data),S(n.receive||n.fallback&&n.fallback.payable||b,"cannot send value to non-payable fallback","overrides.value",a.value),S(n.fallback||f,"cannot send data to receive-only contract","overrides.data",a.data),a},a=async function(a){const n=e.runner;D(Ra(n),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const b=await n.sendTransaction(await t(a)),f=Aa(e.runner);return new wa(e.interface,f,b)},n=async e=>await a(e);return k(n,{_contract:e,estimateGas:async function(a){const n=Pa(e.runner,"estimateGas");return D(Ia(n),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await n.estimateGas(await t(a))},populateTransaction:t,send:a,staticCall:async function(a){const n=Pa(e.runner,"call");D(xa(n),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const b=await t(a);try{return await n.call(b)}catch(t){if(C(t)&&t.data)throw e.interface.makeError(t.data,b);throw t}}}),n}const Sa=Symbol.for("_ethersInternal_contract"),Ua=new WeakMap;function Va(e){return Ua.get(e[Sa])}async function La(e,t){let a,n=null;if(Array.isArray(t)){const n=function(t){if(j(t,32))return t;const a=e.interface.getEvent(t);return S(a,"unknown fragment","name",t),a.topicHash};a=t.map((e=>null==e?null:Array.isArray(e)?e.map(n):n(e)))}else"*"===t?a=[null]:"string"==typeof t?j(t,32)?a=[t]:(n=e.interface.getEvent(t),S(n,"unknown fragment","event",t),a=[n.topicHash]):(b=t)&&"object"==typeof b&&"getTopicFilter"in b&&"function"==typeof b.getTopicFilter&&b.fragment?a=await t.getTopicFilter():"fragment"in t?(n=t.fragment,a=[n.topicHash]):S(!1,"unknown event name","event",t);var b;return a=a.map((e=>{if(null==e)return null;if(Array.isArray(e)){const t=Array.from(new Set(e.map((e=>e.toLowerCase()))).values());return 1===t.length?t[0]:(t.sort(),t)}return e.toLowerCase()})),{fragment:n,tag:a.map((e=>null==e?"null":Array.isArray(e)?e.join("|"):e)).join("&"),topics:a}}async function Fa(e,t){const{subs:a}=Va(e);return a.get((await La(e,t)).tag)||null}async function Ga(e,t,a){const n=Aa(e.runner);D(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:b,tag:f,topics:d}=await La(e,a),{addr:i,subs:s}=Va(e);let c=s.get(f);if(!c){const t={address:i||e,topics:d},r=t=>{let n=b;if(null==n)try{n=e.interface.getEvent(t.topics[0])}catch(e){}if(n){const f=n,d=b?e.interface.decodeEventLog(b,t.data,t.topics):[];ja(e,a,d,(n=>new Ma(e,n,a,f,t)))}else ja(e,a,[],(n=>new va(e,n,a,t)))};let p=[];c={tag:f,listeners:[],start:()=>{p.length||p.push(n.on(t,r))},stop:async()=>{if(0==p.length)return;let e=p;p=[],await Promise.all(e),n.off(t,r)}},s.set(f,c)}return c}let Ba=Promise.resolve();async function ja(e,t,a,n){try{await Ba}catch(e){}const b=async function(e,t,a,n){await Ba;const b=await Fa(e,t);if(!b)return!1;const f=b.listeners.length;return b.listeners=b.listeners.filter((({listener:t,once:b})=>{const f=Array.from(a);n&&f.push(n(b?null:t));try{t.call(e,...f)}catch(e){}return!b})),0===b.listeners.length&&(b.stop(),Va(e).subs.delete(b.tag)),f>0}(e,t,a,n);return Ba=b,await b}const Ha=["then"];class za{target;interface;runner;filters;[Sa];fallback;constructor(e,t,a,n){S("string"==typeof e||fa(e),"invalid value for Contract target","target",e),null==a&&(a=null);const b=ba.from(t);let f;k(this,{target:e,runner:a,interface:b}),Object.defineProperty(this,Sa,{value:{}});let d=null,i=null;if(n){const e=Aa(a);i=new wa(this.interface,e,n)}let s=new Map;if("string"==typeof e)if(j(e))d=e,f=Promise.resolve(e);else{const t=Pa(a,"resolveName");if(!Ea(t))throw N("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});f=t.resolveName(e).then((t=>{if(null==t)throw N("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Va(this).addr=t,t}))}else f=e.getAddress().then((e=>{if(null==e)throw new Error("TODO");return Va(this).addr=e,e}));var c;c={addrPromise:f,addr:d,deployTx:i,subs:s},Ua.set(this[Sa],c);const r=new Proxy({},{get:(e,t,a)=>{if("symbol"==typeof t||Ha.indexOf(t)>=0)return Reflect.get(e,t,a);try{return this.getEvent(t)}catch(e){if(!A(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>Ha.indexOf(t)>=0?Reflect.has(e,t):Reflect.has(e,t)||this.interface.hasEvent(String(t))});return k(this,{filters:r}),k(this,{fallback:b.receive||b.fallback?Da(this):null}),new Proxy(this,{get:(e,t,a)=>{if("symbol"==typeof t||t in e||Ha.indexOf(t)>=0)return Reflect.get(e,t,a);try{return e.getFunction(t)}catch(e){if(!A(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>"symbol"==typeof t||t in e||Ha.indexOf(t)>=0?Reflect.has(e,t):e.interface.hasFunction(t)})}connect(e){return new za(this.target,this.interface,e)}attach(e){return new za(e,this.interface,this.runner)}async getAddress(){return await Va(this).addrPromise}async getDeployedCode(){const e=Aa(this.runner);D(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return"0x"===t?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;const t=Aa(this.runner);return D(null!=t,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise(((e,a)=>{const n=async()=>{try{if(null!=await this.getDeployedCode())return e(this);t.once("block",n)}catch(e){a(e)}};n()}))}deploymentTransaction(){return Va(this).deployTx}getFunction(e){"string"!=typeof e&&(e=e.format());const t=function(e,t){const a=function(...a){const n=e.interface.getFunction(t,a);return D(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:a}}),n},n=async function(...t){const n=a(...t);let b={};if(n.inputs.length+1===t.length&&(b=await Ca(t.pop()),b.from&&(b.from=await ia(b.from,Oa(e.runner)))),n.inputs.length!==t.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const f=await Na(e.runner,n.inputs,t);return Object.assign({},b,await O({to:e.getAddress(),data:e.interface.encodeFunctionData(n,f)}))},b=async function(...e){const t=await d(...e);return 1===t.length?t[0]:t},f=async function(...t){const a=e.runner;D(Ra(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const b=await a.sendTransaction(await n(...t)),f=Aa(e.runner);return new wa(e.interface,f,b)},d=async function(...t){const b=Pa(e.runner,"call");D(xa(b),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await n(...t);let d="0x";try{d=await b.call(f)}catch(t){if(C(t)&&t.data)throw e.interface.makeError(t.data,f);throw t}const i=a(...t);return e.interface.decodeFunctionResult(i,d)},i=async(...e)=>a(...e).constant?await b(...e):await f(...e);return k(i,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:a,estimateGas:async function(...t){const a=Pa(e.runner,"estimateGas");return D(Ia(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await n(...t))},populateTransaction:n,send:f,staticCall:b,staticCallResult:d}),Object.defineProperty(i,"fragment",{configurable:!1,enumerable:!0,get:()=>{const a=e.interface.getFunction(t);return D(a,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),a}}),i}(this,e);return t}getEvent(e){return"string"!=typeof e&&(e=e.format()),function(e,t){const a=function(...a){const n=e.interface.getEvent(t,a);return D(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:a}}),n},n=function(...t){return new ka(e,a(...t),t)};return k(n,{name:e.interface.getEventName(t),_contract:e,_key:t,getFragment:a}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const a=e.interface.getEvent(t);return D(a,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),a}}),n}(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,a){null==t&&(t=0),null==a&&(a="latest");const{addr:n,addrPromise:b}=Va(this),f=n||await b,{fragment:d,topics:i}=await La(this,e),s={address:f,topics:i,fromBlock:t,toBlock:a},c=Aa(this.runner);return D(c,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await c.getLogs(s)).map((e=>{let t=d;if(null==t)try{t=this.interface.getEvent(e.topics[0])}catch(e){}if(t)try{return new Ta(e,this.interface,t)}catch(t){return new ha(e,t)}return new pa(e,c)}))}async on(e,t){const a=await Ga(this,"on",e);return a.listeners.push({listener:t,once:!1}),a.start(),this}async once(e,t){const a=await Ga(this,"once",e);return a.listeners.push({listener:t,once:!0}),a.start(),this}async emit(e,...t){return await ja(this,e,t,null)}async listenerCount(e){if(e){const t=await Fa(this,e);return t?t.listeners.length:0}const{subs:t}=Va(this);let a=0;for(const{listeners:e}of t.values())a+=e.length;return a}async listeners(e){if(e){const t=await Fa(this,e);return t?t.listeners.map((({listener:e})=>e)):[]}const{subs:t}=Va(this);let a=[];for(const{listeners:e}of t.values())a=a.concat(e.map((({listener:e})=>e)));return a}async off(e,t){const a=await Fa(this,e);if(!a)return this;if(t){const e=a.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&a.listeners.splice(e,1)}return null!=t&&0!==a.listeners.length||(a.stop(),Va(this).subs.delete(a.tag)),this}async removeAllListeners(e){if(e){const t=await Fa(this,e);if(!t)return this;t.stop(),Va(this).subs.delete(t.tag)}else{const{subs:e}=Va(this);for(const{tag:t,stop:a}of e.values())a(),e.delete(t)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){return class extends za{constructor(t,a=null){super(t,e,a)}}}static from(e,t,a){return null==a&&(a=null),new this(e,t,a)}}class $a extends(function(){return za}()){}function Xa(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function Wa(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(Wa(e))})),t.length<=55)return t.unshift(192+t.length),t;const a=Xa(t.length);return a.unshift(247+a.length),a.concat(t)}const t=Array.prototype.slice.call(G(e,"object"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const a=Xa(t.length);return a.unshift(183+a.length),a.concat(t)}const qa="0123456789abcdef";function Ja(e){let t="0x";for(const a of Wa(e))t+=qa[a>>4],t+=qa[15&a];return t}class Ka{interface;bytecode;runner;constructor(e,t,a){const n=ba.from(e);t instanceof Uint8Array||("object"==typeof t&&(t=t.object),t.startsWith("0x")||(t="0x"+t)),k(this,{bytecode:t=z(G(t)),interface:n,runner:a||null})}attach(e){return new za(e,this.interface,this.runner)}async getDeployTransaction(...e){let t={};const a=this.interface.deploy;if(a.inputs.length+1===e.length&&(t=await Ca(e.pop())),a.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const n=await Na(this.runner,a.inputs,e),b=$([this.bytecode,this.interface.encodeDeploy(n)]);return Object.assign({},t,{data:b})}async deploy(...e){const t=await this.getDeployTransaction(...e);D(this.runner&&"function"==typeof this.runner.sendTransaction,"factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const a=await this.runner.sendTransaction(t),n=function(e){const t=Ce(e.from);let a=ie(e.nonce,"tx.nonce").toString(16);return a="0"===a?"0x":a.length%2?"0x0"+a:"0x"+a,Ce(X(Y(Ja([t,a])),12))}(a);return new za(n,this.interface,this.runner,a)}connect(e){return new Ka(this.interface,this.bytecode,e)}static fromSolidity(e,t){S(null!=e,"bad compiler output","output",e),"string"==typeof e&&(e=JSON.parse(e));const a=e.abi;let n="";return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(a,n,t)}}const Ya=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"}];class Za{static createInterface(){return new ba(Ya)}static connect(e,t){return new $a(e,Ya,t)}}Za.abi=Ya;const Qa=[{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"allowance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientAllowance",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC20InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC20InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC20InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"spender",type:"address"}],name:"ERC20InvalidSpender",type:"error"}];class en{static createInterface(){return new ba(Qa)}static connect(e,t){return new $a(e,Qa,t)}}en.abi=Qa;const tn=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"}];class an{static createInterface(){return new ba(tn)}static connect(e,t){return new $a(e,tn,t)}}an.abi=tn;var nn=Object.freeze({__proto__:null,IERC1155Errors__factory:Za,IERC20Errors__factory:en,IERC721Errors__factory:an}),bn=Object.freeze({__proto__:null,draftIerc6093Sol:nn});const fn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class dn{static createInterface(){return new ba(fn)}static connect(e,t){return new $a(e,fn,t)}}dn.abi=fn;var sn=Object.freeze({__proto__:null,IERC20Metadata__factory:dn});const cn=[{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"allowance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientAllowance",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC20InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC20InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC20InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"spender",type:"address"}],name:"ERC20InvalidSpender",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];let rn=class{static createInterface(){return new ba(cn)}static connect(e,t){return new $a(e,cn,t)}};rn.abi=cn;const pn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];let un=class{static createInterface(){return new ba(pn)}static connect(e,t){return new $a(e,pn,t)}};un.abi=pn;var on=Object.freeze({__proto__:null,ERC20__factory:rn,IERC20__factory:un,extensions:sn}),yn=Object.freeze({__proto__:null,erc20:on}),ln=Object.freeze({__proto__:null,interfaces:bn,token:yn});const mn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class Tn{static createInterface(){return new ba(mn)}static connect(e,t){return new $a(e,mn,t)}}Tn.abi=mn;var hn=Object.freeze({__proto__:null,Ownable__factory:Tn});const gn=[{stateMutability:"payable",type:"fallback"},{stateMutability:"payable",type:"receive"}];class wn{static createInterface(){return new ba(gn)}static connect(e,t){return new $a(e,gn,t)}}wn.abi=gn;const vn=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"_admin",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],Mn="0x60806040526040516108dc3803806108dc8339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b50604052508491508290506100ee826101bf565b8051156101a6576000826001600160a01b0316826040518082805190602001908083835b602083106101315780518252601f199092019160209182019101610112565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610191576040519150601f19603f3d011682016040523d82523d6000602084013e610196565b606091505b50509050806101a457600080fd5b505b506101ae9050565b6101b782610231565b50505061025b565b6101d28161025560201b6103b41760201c565b61020d5760405162461bcd60e51b81526004018080602001828103825260368152602001806108a66036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b3b151590565b61063c8061026a6000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b815260040180806020018281038252603a815260200180610555603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260428152602001806105c56042913960600191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603681526020018061058f6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163745472616e73706172656e745570677261646561626c6550726f78793a2061646d696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172676574a26469706673582212200bf5c74f32000c92994fb0de053047d19f9c526eb1b1953df8bcb7d7e0df8d2864736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class _n extends Ka{constructor(...e){e.length>1?super(...e):super(vn,Mn,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(vn)}static connect(e,t){return new $a(e,vn,t)}}_n.bytecode=Mn,_n.abi=vn;const xn=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{stateMutability:"payable",type:"receive"}],In="0x60806040526040516103123803806103128339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052506100e3915050565b6100ec826101ab565b8051156101a4576000826001600160a01b0316826040518082805190602001908083835b6020831061012f5780518252601f199092019160209182019101610110565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461018f576040519150601f19603f3d011682016040523d82523d6000602084013e610194565b606091505b50509050806101a257600080fd5b505b5050610223565b6101be8161021d60201b6100271760201c565b6101f95760405162461bcd60e51b81526004018080602001828103825260368152602001806102dc6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b3b151590565b60ab806102316000396000f3fe608060405236601057600e6013565b005b600e5b60196025565b60256021602d565b6052565b565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156070573d6000f35b3d6000fdfea2646970667358221220621b7042bfb847b4073a3c58bdbea5295ce2e761b4e2307ca010caaac996d80c64736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class En extends Ka{constructor(...e){e.length>1?super(...e):super(xn,In,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(xn)}static connect(e,t){return new $a(e,xn,t)}}En.bytecode=In,En.abi=xn;var Rn=Object.freeze({__proto__:null,Proxy__factory:wn,TransparentUpgradeableProxy__factory:_n,UpgradeableProxy__factory:En});const On=[{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],kn="0x608060405234801561001057600080fd5b5060405162000c6238038062000c628339818101604052604081101561003557600080fd5b810190808051604051939291908464010000000082111561005557600080fd5b90830190602082018581111561006a57600080fd5b825164010000000081118282018810171561008457600080fd5b82525081516020918201929091019080838360005b838110156100b1578181015183820152602001610099565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b506040526020018051604051939291908464010000000082111561010157600080fd5b90830190602082018581111561011657600080fd5b825164010000000081118282018810171561013057600080fd5b82525081516020918201929091019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b50604052505082516101a4915060039060208501906101cd565b5080516101b89060049060208401906101cd565b50506005805460ff1916601217905550610260565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061020e57805160ff191683800117855561023b565b8280016001018555821561023b579182015b8281111561023b578251825591602001919060010190610220565b5061024792915061024b565b5090565b5b80821115610247576000815560010161024c565b6109f280620002706000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b61017361036c565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610372565b6101c36103f9565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b038135169060200135610402565b6101736004803603602081101561021b57600080fd5b50356001600160a01b0316610450565b6100b661046b565b6101576004803603604081101561024957600080fd5b506001600160a01b0381351690602001356104cc565b6101576004803603604081101561027557600080fd5b506001600160a01b038135169060200135610534565b610173600480360360408110156102a157600080fd5b506001600160a01b0381358116916020013516610548565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c610573565b8484610577565b50600192915050565b60025490565b600061037f848484610663565b6103ef8461038b610573565b6103ea85604051806060016040528060288152602001610927602891396001600160a01b038a166000908152600160205260408120906103c9610573565b6001600160a01b0316815260208101919091526040016000205491906107be565b610577565b5060019392505050565b60055460ff1690565b600061036361040f610573565b846103ea8560016000610420610573565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610855565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b60006103636104d9610573565b846103ea856040518060600160405280602581526020016109986025913960016000610503610573565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906107be565b6000610363610541610573565b8484610663565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166105bc5760405162461bcd60e51b81526004018080602001828103825260248152602001806109746024913960400191505060405180910390fd5b6001600160a01b0382166106015760405162461bcd60e51b81526004018080602001828103825260228152602001806108df6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106a85760405162461bcd60e51b815260040180806020018281038252602581526020018061094f6025913960400191505060405180910390fd5b6001600160a01b0382166106ed5760405162461bcd60e51b81526004018080602001828103825260238152602001806108bc6023913960400191505060405180910390fd5b6106f88383836108b6565b61073581604051806060016040528060268152602001610901602691396001600160a01b03861660009081526020819052604090205491906107be565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107649082610855565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561084d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108125781810151838201526020016107fa565b50505050905090810190601f16801561083f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156108af576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220347718b9db0288208ab5957df73278c6f781963df0e13918151971217fc2827964736f6c634300060c0033";class Pn extends Ka{constructor(...e){e.length>1?super(...e):super(On,kn,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(On)}static connect(e,t){return new $a(e,On,t)}}Pn.bytecode=kn,Pn.abi=On;const An=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class Cn{static createInterface(){return new ba(An)}static connect(e,t){return new $a(e,An,t)}}Cn.abi=An;const Nn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];let Dn=class{static createInterface(){return new ba(Nn)}static connect(e,t){return new $a(e,Nn,t)}};Dn.abi=Nn;var Sn=Object.freeze({__proto__:null,ERC20Burnable__factory:Cn,ERC20__factory:Pn,IERC20__factory:Dn}),Un=Object.freeze({__proto__:null,erc20:Sn});const Vn=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class Ln{static createInterface(){return new ba(Vn)}static connect(e,t){return new $a(e,Vn,t)}}Ln.abi=Vn;var Fn=Object.freeze({__proto__:null,Pausable__factory:Ln}),Gn=Object.freeze({__proto__:null,access:hn,proxy:Rn,token:Un,utils:Fn}),Bn=Object.freeze({__proto__:null,contracts:ln,contractsV3:Gn});const jn=[{inputs:[{internalType:"uint256",name:"in_xL",type:"uint256"},{internalType:"uint256",name:"in_xR",type:"uint256"}],name:"MiMCSponge",outputs:[{internalType:"uint256",name:"xL",type:"uint256"},{internalType:"uint256",name:"xR",type:"uint256"}],stateMutability:"pure",type:"function"}];class Hn{static createInterface(){return new ba(jn)}static connect(e,t){return new $a(e,jn,t)}}Hn.abi=jn;const zn=[{inputs:[{internalType:"uint32",name:"_levels",type:"uint32"},{internalType:"contract IHasher",name:"_hasher",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],$n="0x60c0604052600380546001600160401b031916905534801561002057600080fd5b50604051610a10380380610a1083398101604081905261003f91610385565b60008263ffffffff16116100a65760405162461bcd60e51b815260206004820152602360248201527f5f6c6576656c732073686f756c642062652067726561746572207468616e207a60448201526265726f60e81b60648201526084015b60405180910390fd5b60208263ffffffff16106100fc5760405162461bcd60e51b815260206004820152601e60248201527f5f6c6576656c732073686f756c64206265206c657373207468616e2033320000604482015260640161009d565b63ffffffff821660a0526001600160a01b0381166080527f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60005b8363ffffffff168163ffffffff1610156101845763ffffffff8116600090815260016020908152604080832085905590829052902082905561017a8383806101b8565b9150600101610137565b506000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b55506103f89050565b60006000805160206109f083398151915283106102175760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015260640161009d565b6000805160206109f0833981519152821061027e5760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b606482015260840161009d565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156102cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f191906103d4565b90925090506000805160206109f083398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037a91906103d4565b509695505050505050565b6000806040838503121561039857600080fd5b825163ffffffff811681146103ac57600080fd5b60208401519092506001600160a01b03811681146103c957600080fd5b809150509250929050565b600080604083850312156103e757600080fd5b505080516020909101519092909150565b60805160a0516105d361041d60003960006101010152600061020f01526105d36000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063c2b40ae41161008c578063ec73295911610066578063ec732959146101e3578063ed33639f1461020a578063f178e47c14610249578063fc7e9c6f1461026957600080fd5b8063c2b40ae41461019b578063cd87a3b4146101bb578063e8295588146101c357600080fd5b8063414a37ba146100d45780634ecf518b146100fc5780636d9833e3146101385780638ea3099e1461015b57806390eeb02b1461016e578063ba70f7571461017e575b600080fd5b6100e960008051602061057e83398151915281565b6040519081526020015b60405180910390f35b6101237f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016100f3565b61014b6101463660046104d1565b610281565b60405190151581526020016100f3565b6100e96101693660046104ea565b6102ff565b6003546101239063ffffffff1681565b60035463ffffffff166000908152600260205260409020546100e9565b6100e96101a93660046104d1565b60026020526000908152604090205481565b610123601e81565b6100e96101d13660046104d1565b60016020526000908152604090205481565b6100e97f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b6102317f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100f3565b6100e96102573660046104d1565b60006020819052908152604090205481565b60035461012390640100000000900463ffffffff1681565b600081810361029257506000919050565b60035463ffffffff16805b63ffffffff811660009081526002602052604090205484036102c3575060019392505050565b8063ffffffff166000036102d55750601e5b806102df8161052b565b9150508163ffffffff168163ffffffff160361029d575060009392505050565b600060008051602061057e83398151915283106103635760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c6460448201526064015b60405180910390fd5b60008051602061057e83398151915282106103ca5760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b606482015260840161035a565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610559565b909250905060008051602061057e83398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190610559565b509695505050505050565b6000602082840312156104e357600080fd5b5035919050565b6000806000606084860312156104ff57600080fd5b83356001600160a01b038116811461051657600080fd5b95602085013595506040909401359392505050565b600063ffffffff82168061054f57634e487b7160e01b600052601160045260246000fd5b6000190192915050565b6000806040838503121561056c57600080fd5b50508051602090910151909290915056fe30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001a26469706673582212208761f09aabb074ee2c2a755f38291cbc57ea6dac47bc37dfa948986c4481869c64736f6c6343000819003330644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001";class Xn extends Ka{constructor(...e){e.length>1?super(...e):super(zn,$n,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(zn)}static connect(e,t){return new $a(e,zn,t)}}Xn.bytecode=$n,Xn.abi=zn;var Wn=Object.freeze({__proto__:null,IHasher__factory:Hn,MerkleTreeWithHistory__factory:Xn});const qn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"_totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"who",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"}];class Jn{static createInterface(){return new ba(qn)}static connect(e,t){return new $a(e,qn,t)}}Jn.abi=qn;const Kn=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"_totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"who",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}];class Yn{static createInterface(){return new ba(Kn)}static connect(e,t){return new $a(e,Kn,t)}}Yn.abi=Kn;var Zn=Object.freeze({__proto__:null,ERC20Basic__factory:Jn,IUSDT__factory:Yn});const Qn=[{stateMutability:"nonpayable",type:"fallback"}],eb="0x6080604052348015600f57600080fd5b50609c80601d6000396000f3fe6080604052348015600f57600080fd5b5060405162461bcd60e51b815260206004820152602160248201527f7468697320636f6e747261637420646f6573206e6f74206163636570742045546044820152600960fb1b606482015260840160405180910390fdfea264697066735822122034c2432feedadd0f30a6f66555381c20922b6ab7c9b3ede4c27896b23e802a8264736f6c63430008190033";class tb extends Ka{constructor(...e){e.length>1?super(...e):super(Qn,eb,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Qn)}static connect(e,t){return new $a(e,Qn,t)}}tb.bytecode=eb,tb.abi=Qn;const ab=[{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"allowance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientAllowance",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC20InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC20InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC20InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"spender",type:"address"}],name:"ERC20InvalidSpender",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],nb="0x608060405234801561001057600080fd5b50604051806040016040528060078152602001664441494d6f636b60c81b815250604051806040016040528060048152602001634441494d60e01b815250816003908161005d9190610113565b50600461006a8282610113565b5050506101d2565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061009c57607f821691505b6020821081036100bc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561010e576000816000526020600020601f850160051c810160208610156100eb5750805b601f850160051c820191505b8181101561010a578281556001016100f7565b5050505b505050565b81516001600160401b0381111561012c5761012c610072565b6101408161013a8454610088565b846100c2565b602080601f831160018114610175576000841561015d5750858301515b600019600386901b1c1916600185901b17855561010a565b600085815260208120601f198616915b828110156101a457888601518255948401946001909101908401610185565b50858210156101c25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610785806101e16000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806340c10f191161006657806340c10f191461011857806370a082311461012d57806395d89b4114610156578063a9059cbb1461015e578063dd62ed3e1461017157600080fd5b806306fdde03146100a3578063095ea7b3146100c157806318160ddd146100e457806323b872dd146100f6578063313ce56714610109575b600080fd5b6100ab6101aa565b6040516100b891906105ce565b60405180910390f35b6100d46100cf366004610639565b61023c565b60405190151581526020016100b8565b6002545b6040519081526020016100b8565b6100d4610104366004610663565b610256565b604051601281526020016100b8565b61012b610126366004610639565b61027a565b005b6100e861013b36600461069f565b6001600160a01b031660009081526020819052604090205490565b6100ab610288565b6100d461016c366004610639565b610297565b6100e861017f3660046106c1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101b9906106f4565b80601f01602080910402602001604051908101604052809291908181526020018280546101e5906106f4565b80156102325780601f1061020757610100808354040283529160200191610232565b820191906000526020600020905b81548152906001019060200180831161021557829003601f168201915b5050505050905090565b60003361024a8185856102a5565b60019150505b92915050565b6000336102648582856102b7565b61026f85858561033a565b506001949350505050565b6102848282610399565b5050565b6060600480546101b9906106f4565b60003361024a81858561033a565b6102b283838360016103cf565b505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610334578181101561032557604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b610334848484840360006103cf565b50505050565b6001600160a01b03831661036457604051634b637e8f60e11b81526000600482015260240161031c565b6001600160a01b03821661038e5760405163ec442f0560e01b81526000600482015260240161031c565b6102b28383836104a4565b6001600160a01b0382166103c35760405163ec442f0560e01b81526000600482015260240161031c565b610284600083836104a4565b6001600160a01b0384166103f95760405163e602df0560e01b81526000600482015260240161031c565b6001600160a01b03831661042357604051634a1406b160e11b81526000600482015260240161031c565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561033457826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161049691815260200190565b60405180910390a350505050565b6001600160a01b0383166104cf5780600260008282546104c4919061072e565b909155506105419050565b6001600160a01b038316600090815260208190526040902054818110156105225760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640161031c565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661055d5760028054829003905561057c565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516105c191815260200190565b60405180910390a3505050565b60006020808352835180602085015260005b818110156105fc578581018301518582016040015282016105e0565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461063457600080fd5b919050565b6000806040838503121561064c57600080fd5b6106558361061d565b946020939093013593505050565b60008060006060848603121561067857600080fd5b6106818461061d565b925061068f6020850161061d565b9150604084013590509250925092565b6000602082840312156106b157600080fd5b6106ba8261061d565b9392505050565b600080604083850312156106d457600080fd5b6106dd8361061d565b91506106eb6020840161061d565b90509250929050565b600181811c9082168061070857607f821691505b60208210810361072857634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561025057634e487b7160e01b600052601160045260246000fdfea264697066735822122058942fcc650d3670455590fabbf6c5726b3ae7df7b57e75bc02cb2c66259d45b64736f6c63430008190033";class bb extends Ka{constructor(...e){e.length>1?super(...e):super(ab,nb,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(ab)}static connect(e,t){return new $a(e,ab,t)}}bb.bytecode=nb,bb.abi=ab;const fb=[{inputs:[{internalType:"bytes",name:"_initCode",type:"bytes"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"deploy",outputs:[{internalType:"address payable",name:"createdContract",type:"address"}],stateMutability:"nonpayable",type:"function"}];let db=class{static createInterface(){return new ba(fb)}static connect(e,t){return new $a(e,fb,t)}};db.abi=fb;const ib=[{inputs:[{internalType:"uint32",name:"_treeLevels",type:"uint32"},{internalType:"contract IHasher",name:"_hasher",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_leaf",type:"bytes32"}],name:"insert",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],sb="0x60c0604052600380546001600160401b031916905534801561002057600080fd5b50604051610e3c380380610e3c83398101604081905261003f91610389565b818160008263ffffffff16116100a85760405162461bcd60e51b815260206004820152602360248201527f5f6c6576656c732073686f756c642062652067726561746572207468616e207a60448201526265726f60e81b60648201526084015b60405180910390fd5b60208263ffffffff16106100fe5760405162461bcd60e51b815260206004820152601e60248201527f5f6c6576656c732073686f756c64206265206c657373207468616e2033320000604482015260640161009f565b63ffffffff821660a0526001600160a01b0381166080527f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60005b8363ffffffff168163ffffffff1610156101865763ffffffff8116600090815260016020908152604080832085905590829052902082905561017c8383806101bc565b9150600101610139565b506000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b55506103fc92505050565b6000600080516020610e1c833981519152831061021b5760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015260640161009f565b600080516020610e1c83398151915282106102825760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b606482015260840161009f565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156102d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f591906103d8565b9092509050600080516020610e1c83398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa15801561035a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037e91906103d8565b509695505050505050565b6000806040838503121561039c57600080fd5b825163ffffffff811681146103b057600080fd5b60208401519092506001600160a01b03811681146103cd57600080fd5b809150509250929050565b600080604083850312156103eb57600080fd5b505080516020909101519092909150565b60805160a0516109e6610436600039600081816101310152818161052701526105c901526000818161023f015261066101526109e66000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063c2b40ae41161008c578063ec73295911610066578063ec73295914610213578063ed33639f1461023a578063f178e47c14610279578063fc7e9c6f1461029957600080fd5b8063c2b40ae4146101cb578063cd87a3b4146101eb578063e8295588146101f357600080fd5b80636d9833e3116100c85780636d9833e3146101685780638ea3099e1461018b57806390eeb02b1461019e578063ba70f757146101ae57600080fd5b80632d287e43146100ef578063414a37ba146101045780634ecf518b1461012c575b600080fd5b6101026100fd36600461072c565b6102b1565b005b61011960008051602061099183398151915281565b6040519081526020015b60405180910390f35b6101537f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610123565b61017b61017636600461072c565b6102be565b6040519015158152602001610123565b610119610199366004610745565b61033c565b6003546101539063ffffffff1681565b60035463ffffffff16600090815260026020526040902054610119565b6101196101d936600461072c565b60026020526000908152604090205481565b610153601e81565b61011961020136600461072c565b60016020526000908152604090205481565b6101197f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b6102617f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610123565b61011961028736600461072c565b60006020819052908152604090205481565b60035461015390640100000000900463ffffffff1681565b6102ba8161050e565b5050565b60008181036102cf57506000919050565b60035463ffffffff16805b63ffffffff81166000908152600260205260409020548403610300575060019392505050565b8063ffffffff166000036103125750601e5b8061031c8161079c565b9150508163ffffffff168163ffffffff16036102da575060009392505050565b600060008051602061099183398151915283106103a05760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c6460448201526064015b60405180910390fd5b60008051602061099183398151915282106104075760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b6064820152608401610397565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610456573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047a91906107bc565b909250905060008051602061099183398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156104df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050391906107bc565b509695505050505050565b600354600090640100000000900463ffffffff1661054d7f00000000000000000000000000000000000000000000000000000000000000006002610909565b63ffffffff168163ffffffff16036105c05760405162461bcd60e51b815260206004820152603060248201527f4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656160448201526f1d995cc818d85b88189948185919195960821b6064820152608401610397565b8083600080805b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168163ffffffff16101561069e57610606600286610926565b63ffffffff166000036106405763ffffffff811660009081526001602090815260408083205491839052909120859055849350915061065c565b63ffffffff811660009081526020819052604090205492508391505b6106877f0000000000000000000000000000000000000000000000000000000000000000848461033c565b9350610694600286610949565b94506001016105c7565b50600354600090601e906106b99063ffffffff16600161096c565b6106c39190610926565b6003805463ffffffff191663ffffffff8316908117909155600090815260026020526040902085905590506106f986600161096c565b6003805463ffffffff929092166401000000000267ffffffff000000001990921691909117905550939695505050505050565b60006020828403121561073e57600080fd5b5035919050565b60008060006060848603121561075a57600080fd5b83356001600160a01b038116811461077157600080fd5b95602085013595506040909401359392505050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8216806107b2576107b2610786565b6000190192915050565b600080604083850312156107cf57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601260045260246000fd5b600181815b80851115610833578163ffffffff0482111561081957610819610786565b8085161561082657918102915b93841c93908002906107fb565b509250929050565b60008261084a57506001610903565b8161085757506000610903565b816001811461086d5760028114610877576108a8565b6001915050610903565b60ff84111561088857610888610786565b6001841b915063ffffffff8211156108a2576108a2610786565b50610903565b5060208310610133831016604e8410600b84101617156108df575081810a63ffffffff8111156108da576108da610786565b610903565b6108e983836107f6565b8063ffffffff048211156108ff576108ff610786565b0290505b92915050565b600063ffffffff61091e81851682851661083b565b949350505050565b600063ffffffff8084168061093d5761093d6107e0565b92169190910692915050565b600063ffffffff80841680610960576109606107e0565b92169190910492915050565b63ffffffff81811683821601908082111561098957610989610786565b509291505056fe30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001a2646970667358221220157f8209ab2f77037d0684fb5023c7036cedb727123539b4e3a1f03c335900f264736f6c6343000819003330644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001";class cb extends Ka{constructor(...e){e.length>1?super(...e):super(ib,sb,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(ib)}static connect(e,t){return new $a(e,ib,t)}}cb.bytecode=sb,cb.abi=ib;var rb=Object.freeze({__proto__:null,BadRecipient__factory:tb,ERC20Mock__factory:bb,IDeployer__factory:db,MerkleTreeWithHistoryMock__factory:cb,iusdtSol:Zn});const pb=[{inputs:[{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"uint256[6]",name:"_input",type:"uint256[6]"}],name:"verifyProof",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class ub{static createInterface(){return new ba(pb)}static connect(e,t){return new $a(e,pb,t)}}ub.abi=pb;const ob=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"commitment",type:"bytes32"},{indexed:!1,internalType:"uint32",name:"leafIndex",type:"uint32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"}],name:"Withdrawal",type:"event"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"commitments",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"}],name:"isSpent",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_nullifierHashes",type:"bytes32[]"}],name:"isSpentArray",outputs:[{internalType:"bool[]",name:"spent",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"nullifierHashes",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"verifier",outputs:[{internalType:"contract IVerifier",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}];class yb{static createInterface(){return new ba(ob)}static connect(e,t){return new $a(e,ob,t)}}yb.abi=ob;var lb=Object.freeze({__proto__:null,IVerifier__factory:ub,Tornado__factory:yb});const mb=[{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"proof",type:"bytes"},{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"address payable",name:"relayer",type:"address"},{internalType:"uint256",name:"fee",type:"uint256"},{internalType:"uint256",name:"refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"}];let Tb=class{static createInterface(){return new ba(mb)}static connect(e,t){return new $a(e,mb,t)}};Tb.abi=mb;const hb=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bytes",name:"encryptedNote",type:"bytes"}],name:"EncryptedNote",type:"event"},{inputs:[{internalType:"bytes[]",name:"_encryptedNotes",type:"bytes[]"}],name:"backupNotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_tornado",type:"address"},{internalType:"bytes32",name:"_commitment",type:"bytes32"},{internalType:"bytes",name:"_encryptedNote",type:"bytes"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_tornado",type:"address"},{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"}],gb="0x608060405234801561001057600080fd5b506104f6806100206000396000f3fe6080604052600436106100345760003560e01c806313d98d13146100395780636485ba2a1461004e578063b438689f1461006e575b600080fd5b61004c6100473660046102c7565b610081565b005b34801561005a57600080fd5b5061004c610069366004610258565b61012a565b61004c61007c366004610321565b610198565b60405163b214faa560e01b81526001600160a01b0385169063b214faa59034906100af9087906004016103ec565b6000604051808303818588803b1580156100c857600080fd5b505af11580156100dc573d6000803e3d6000fd5b5050505050336001600160a01b03167ffa28df43db3553771f7209dcef046f3bdfea15870ab625dcda30ac58b82b4008838360405161011c9291906103f5565b60405180910390a250505050565b60005b8181101561019357337ffa28df43db3553771f7209dcef046f3bdfea15870ab625dcda30ac58b82b400884848481811061016357fe5b90506020028101906101759190610463565b6040516101839291906103f5565b60405180910390a260010161012d565b505050565b6040516310d056db60e11b81526001600160a01b038a16906321a0adb69034906101d4908c908c908c908c908c908c908c908c90600401610411565b6000604051808303818588803b1580156101ed57600080fd5b505af1158015610201573d6000803e3d6000fd5b5050505050505050505050505050565b60008083601f840112610222578182fd5b50813567ffffffffffffffff811115610239578182fd5b60208301915083602082850101111561025157600080fd5b9250929050565b6000806020838503121561026a578182fd5b823567ffffffffffffffff80821115610281578384fd5b818501915085601f830112610294578384fd5b8135818111156102a2578485fd5b86602080830285010111156102b5578485fd5b60209290920196919550909350505050565b600080600080606085870312156102dc578182fd5b84356102e7816104a8565b935060208501359250604085013567ffffffffffffffff811115610309578283fd5b61031587828801610211565b95989497509550505050565b60008060008060008060008060006101008a8c03121561033f578485fd5b893561034a816104a8565b985060208a013567ffffffffffffffff811115610365578586fd5b6103718c828d01610211565b90995097505060408a0135955060608a0135945060808a0135610393816104a8565b935060a08a01356103a3816104a8565b8093505060c08a0135915060e08a013590509295985092959850929598565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b90815260200190565b6000602082526104096020830184866103c2565b949350505050565b600060e0825261042560e083018a8c6103c2565b60208301989098525060408101959095526001600160a01b03938416606086015291909216608084015260a083019190915260c09091015292915050565b6000808335601e19843603018112610479578283fd5b83018035915067ffffffffffffffff821115610493578283fd5b60200191503681900382131561025157600080fd5b6001600160a01b03811681146104bd57600080fd5b5056fea2646970667358221220a833625c5e7cc02dff95b380fd1e6d47b08cffea90c70cfe6739960deee47b8364736f6c634300060c0033";class wb extends Ka{constructor(...e){e.length>1?super(...e):super(hb,gb,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(hb)}static connect(e,t){return new $a(e,hb,t)}}wb.bytecode=gb,wb.abi=hb;var vb=Object.freeze({__proto__:null,ITornadoInstance__factory:Tb,TornadoProxyLight__factory:wb});const Mb=[{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class _b{static createInterface(){return new ba(Mb)}static connect(e,t){return new $a(e,Mb,t)}}_b.abi=Mb;var xb=Object.freeze({__proto__:null,IERC20__factory:_b});const Ib=[{inputs:[{internalType:"contract IVerifier",name:"_verifier",type:"address"},{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"uint256",name:"_denomination",type:"uint256"},{internalType:"uint32",name:"_merkleTreeHeight",type:"uint32"},{internalType:"contract IERC20",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"commitment",type:"bytes32"},{indexed:!1,internalType:"uint32",name:"leafIndex",type:"uint32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"}],name:"Withdrawal",type:"event"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"commitments",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"}],name:"isSpent",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_nullifierHashes",type:"bytes32[]"}],name:"isSpentArray",outputs:[{internalType:"bool[]",name:"spent",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"nullifierHashes",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"verifier",outputs:[{internalType:"contract IVerifier",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],Eb="0x610120604052600380546001600160401b031916905534801561002157600080fd5b50604051611db8380380611db883398101604081905261004091610420565b84848484808360008263ffffffff16116100ad5760405162461bcd60e51b815260206004820152602360248201527f5f6c6576656c732073686f756c642062652067726561746572207468616e207a60448201526265726f60e81b60648201526084015b60405180910390fd5b60208263ffffffff16106101035760405162461bcd60e51b815260206004820152601e60248201527f5f6c6576656c732073686f756c64206265206c657373207468616e203332000060448201526064016100a4565b63ffffffff821660a0526001600160a01b0381166080527f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60005b8363ffffffff168163ffffffff16101561018b5763ffffffff8116600090815260016020908152604080832085905590829052902082905561018183838061023b565b915060010161013e565b506000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b5550506001600455816102195760405162461bcd60e51b815260206004820152602560248201527f64656e6f6d696e6174696f6e2073686f756c6420626520677265617465722074604482015264068616e20360dc1b60648201526084016100a4565b506001600160a01b0392831660c05260e052501661010052506104b892505050565b6000600080516020611d98833981519152831061029a5760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c6460448201526064016100a4565b600080516020611d9883398151915282106103015760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b60648201526084016100a4565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610350573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103749190610494565b9092509050600080516020611d9883398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156103d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fd9190610494565b509695505050505050565b6001600160a01b038116811461041d57600080fd5b50565b600080600080600060a0868803121561043857600080fd5b855161044381610408565b602087015190955061045481610408565b60408701516060880151919550935063ffffffff8116811461047557600080fd5b608087015190925061048681610408565b809150509295509295909350565b600080604083850312156104a757600080fd5b505080516020909101519092909150565b60805160a05160c05160e05161010051611856610542600039600081816104ca01528181610cfa01528181610d34015261108e0152600081816102bb0152818161056f01528181610ccc01526110b20152600081816101a601526106d801526000818161022201528181610e150152610eb70152600081816104690152610f4f01526118566000f3fe6080604052600436106101355760003560e01c8063b214faa5116100ab578063e82955881161006f578063e8295588146103f6578063ec73295914610423578063ed33639f14610457578063f178e47c1461048b578063fc0c546a146104b8578063fc7e9c6f146104ec57600080fd5b8063b214faa514610347578063ba70f7571461035a578063c2b40ae414610384578063cd87a3b4146103b1578063e5285dcc146103c657600080fd5b80636d9833e3116100fd5780636d9833e314610259578063839df945146102795780638bca6d16146102a95780638ea3099e146102dd57806390eeb02b146102fd5780639fa12d0b1461031a57600080fd5b806317cc915c1461013a57806321a0adb61461017f5780632b7ac3f314610194578063414a37ba146101e05780634ecf518b14610210575b600080fd5b34801561014657600080fd5b5061016a61015536600461131d565b60056020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61019261018d36600461135e565b610511565b005b3480156101a057600080fd5b506101c87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610176565b3480156101ec57600080fd5b5061020260008051602061180183398151915281565b604051908152602001610176565b34801561021c57600080fd5b506102447f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610176565b34801561026557600080fd5b5061016a61027436600461131d565b61081c565b34801561028557600080fd5b5061016a61029436600461131d565b60066020526000908152604090205460ff1681565b3480156102b557600080fd5b506102027f000000000000000000000000000000000000000000000000000000000000000081565b3480156102e957600080fd5b506102026102f8366004611414565b61089a565b34801561030957600080fd5b506003546102449063ffffffff1681565b34801561032657600080fd5b5061033a610335366004611449565b610a67565b60405161017691906114be565b61019261035536600461131d565b610b23565b34801561036657600080fd5b5060035463ffffffff16600090815260026020526040902054610202565b34801561039057600080fd5b5061020261039f36600461131d565b60026020526000908152604090205481565b3480156103bd57600080fd5b50610244601e81565b3480156103d257600080fd5b5061016a6103e136600461131d565b60009081526005602052604090205460ff1690565b34801561040257600080fd5b5061020261041136600461131d565b60016020526000908152604090205481565b34801561042f57600080fd5b506102027f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b34801561046357600080fd5b506101c87f000000000000000000000000000000000000000000000000000000000000000081565b34801561049757600080fd5b506102026104a636600461131d565b60006020819052908152604090205481565b3480156104c457600080fd5b506101c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f857600080fd5b5060035461024490640100000000900463ffffffff1681565b6002600454036105685760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026004557f00000000000000000000000000000000000000000000000000000000000000008211156105dd5760405162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015260640161055f565b60008581526005602052604090205460ff161561063c5760405162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015260640161055f565b6106458661081c565b6106915760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015260640161055f565b6040805160c081018252878152602081018790526001600160a01b038681168284015285811660608301526080820185905260a08201849052915163695ef6f960e01b81527f00000000000000000000000000000000000000000000000000000000000000009092169163695ef6f991610711918c918c91600401611504565b6020604051808303816000875af1158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190611562565b6107995760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015260640161055f565b6000858152600560205260409020805460ff191660011790556107be84848484610c5a565b604080516001600160a01b03868116825260208201889052918101849052908416907fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319060600160405180910390a250506001600455505050505050565b600081810361082d57506000919050565b60035463ffffffff16805b63ffffffff8116600090815260026020526040902054840361085e575060019392505050565b8063ffffffff166000036108705750601e5b8061087a816115a1565b9150508163ffffffff168163ffffffff1603610838575060009392505050565b600060008051602061180183398151915283106108f95760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015260640161055f565b60008051602061180183398151915282106109605760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b606482015260840161055f565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156109af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d391906115c1565b909250905060008051602061180183398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610a38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5c91906115c1565b509695505050505050565b60608167ffffffffffffffff811115610a8257610a826115fb565b604051908082528060200260200182016040528015610aab578160200160208202803683370190505b50905060005b82811015610b1c57610aea848483818110610ace57610ace611611565b9050602002013560009081526005602052604090205460ff1690565b15610b14576001828281518110610b0357610b03611611565b911515602092830291909101909101525b600101610ab1565b5092915050565b600260045403610b755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161055f565b600260045560008181526006602052604090205460ff1615610be35760405162461bcd60e51b815260206004820152602160248201527f54686520636f6d6d69746d656e7420686173206265656e207375626d697474656044820152601960fa1b606482015260840161055f565b6000610bee82610dfc565b6000838152600660205260409020805460ff191660011790559050610c1161101a565b6040805163ffffffff8316815242602082015283917fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196910160405180910390a250506001600455565b803414610cc25760405162461bcd60e51b815260206004820152603060248201527f496e636f727265637420726566756e6420616d6f756e7420726563656976656460448201526f08189e481d1a194818dbdb9d1c9858dd60821b606482015260840161055f565b610d2184610cf0847f0000000000000000000000000000000000000000000000000000000000000000611627565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691906110d8565b8115610d5b57610d5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684846110d8565b8015610df6576000846001600160a01b03168260405160006040518083038185875af1925050503d8060008114610dae576040519150601f19603f3d011682016040523d82523d6000602084013e610db3565b606091505b5050905080610df4576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015610df2573d6000803e3d6000fd5b505b505b50505050565b600354600090640100000000900463ffffffff16610e3b7f00000000000000000000000000000000000000000000000000000000000000006002611751565b63ffffffff168163ffffffff1603610eae5760405162461bcd60e51b815260206004820152603060248201527f4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656160448201526f1d995cc818d85b88189948185919195960821b606482015260840161055f565b8083600080805b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168163ffffffff161015610f8c57610ef460028661176e565b63ffffffff16600003610f2e5763ffffffff8116600090815260016020908152604080832054918390529091208590558493509150610f4a565b63ffffffff811660009081526020819052604090205492508391505b610f757f0000000000000000000000000000000000000000000000000000000000000000848461089a565b9350610f82600286611791565b9450600101610eb5565b50600354600090601e90610fa79063ffffffff1660016117b4565b610fb1919061176e565b6003805463ffffffff191663ffffffff831690811790915560009081526002602052604090208590559050610fe78660016117b4565b6003805463ffffffff929092166401000000000267ffffffff000000001990921691909117905550939695505050505050565b34156110815760405162461bcd60e51b815260206004820152603060248201527f4554482076616c756520697320737570706f73656420746f206265203020666f60448201526f7220455243323020696e7374616e636560801b606482015260840161055f565b6110d66001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633307f00000000000000000000000000000000000000000000000000000000000000006111f1565b565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161113491906117d1565b6000604051808303816000865af19150503d8060008114611171576040519150601f19603f3d011682016040523d82523d6000602084013e611176565b606091505b50915091508161118857805181602001fd5b805115806111a55750808060200190518101906111a59190611562565b610df45760405162461bcd60e51b815260206004820152601e60248201527f5361666545524332303a20736166655472616e73666572206661696c65640000604482015260640161055f565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161125591906117d1565b6000604051808303816000865af19150503d8060008114611292576040519150601f19603f3d011682016040523d82523d6000602084013e611297565b606091505b5091509150816112a957805181602001fd5b805115806112c65750808060200190518101906112c69190611562565b610df25760405162461bcd60e51b815260206004820152602260248201527f5361666545524332303a20736166655472616e7366657246726f6d206661696c604482015261195960f21b606482015260840161055f565b60006020828403121561132f57600080fd5b5035919050565b6001600160a01b038116811461134b57600080fd5b50565b803561135981611336565b919050565b60008060008060008060008060e0898b03121561137a57600080fd5b883567ffffffffffffffff8082111561139257600080fd5b818b0191508b601f8301126113a657600080fd5b8135818111156113b557600080fd5b8c60208285010111156113c757600080fd5b60209283019a509850508901359550604089013594506113e960608a0161134e565b93506113f760808a0161134e565b925060a0890135915060c089013590509295985092959890939650565b60008060006060848603121561142957600080fd5b833561143481611336565b95602085013595506040909401359392505050565b6000806020838503121561145c57600080fd5b823567ffffffffffffffff8082111561147457600080fd5b818501915085601f83011261148857600080fd5b81358181111561149757600080fd5b8660208260051b85010111156114ac57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156114f85783511515835292840192918401916001016114da565b50909695505050505050565b60e081528260e08201526000610100848682850137600081868501015280601f19601f87011684010191505060208083018460005b600681101561155657815183529183019190830190600101611539565b50505050949350505050565b60006020828403121561157457600080fd5b8151801515811461158457600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8216806115b7576115b761158b565b6000190192915050565b600080604083850312156115d457600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8181038181111561163a5761163a61158b565b92915050565b600181815b8085111561167d578163ffffffff048211156116635761166361158b565b8085161561167057918102915b93841c9390800290611645565b509250929050565b6000826116945750600161163a565b816116a15750600061163a565b81600181146116b757600281146116c1576116f2565b600191505061163a565b60ff8411156116d2576116d261158b565b6001841b915063ffffffff8211156116ec576116ec61158b565b5061163a565b5060208310610133831016604e8410600b8410161715611729575081810a63ffffffff8111156117245761172461158b565b61163a565b6117338383611640565b8063ffffffff048211156117495761174961158b565b029392505050565b600063ffffffff611766818516828516611685565b949350505050565b600063ffffffff80841680611785576117856115e5565b92169190910692915050565b600063ffffffff808416806117a8576117a86115e5565b92169190910492915050565b63ffffffff818116838216019080821115610b1c57610b1c61158b565b6000825160005b818110156117f257602081860181015185830152016117d8565b50600092019182525091905056fe30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001a26469706673582212207a10ff661aea94ed5894f53cfa2fee06318fa49138057f7bd1b36d8fe228d9da64736f6c6343000819003330644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001";class Rb extends Ka{constructor(...e){e.length>1?super(...e):super(Ib,Eb,e[0])}getDeployTransaction(e,t,a,n,b,f){return super.getDeployTransaction(e,t,a,n,b,f||{})}deploy(e,t,a,n,b,f){return super.deploy(e,t,a,n,b,f||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ib)}static connect(e,t){return new $a(e,Ib,t)}}Rb.bytecode=Eb,Rb.abi=Ib;const Ob=[{inputs:[{internalType:"contract IVerifier",name:"_verifier",type:"address"},{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"uint256",name:"_denomination",type:"uint256"},{internalType:"uint32",name:"_merkleTreeHeight",type:"uint32"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"commitment",type:"bytes32"},{indexed:!1,internalType:"uint32",name:"leafIndex",type:"uint32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"}],name:"Withdrawal",type:"event"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"commitments",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"}],name:"isSpent",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_nullifierHashes",type:"bytes32[]"}],name:"isSpentArray",outputs:[{internalType:"bool[]",name:"spent",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"nullifierHashes",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"verifier",outputs:[{internalType:"contract IVerifier",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],kb="0x610100604052600380546001600160401b031916905534801561002157600080fd5b50604051611b68380380611b688339810160408190526100409161041b565b83838383808360008263ffffffff16116100ad5760405162461bcd60e51b815260206004820152602360248201527f5f6c6576656c732073686f756c642062652067726561746572207468616e207a60448201526265726f60e81b60648201526084015b60405180910390fd5b60208263ffffffff16106101035760405162461bcd60e51b815260206004820152601e60248201527f5f6c6576656c732073686f756c64206265206c657373207468616e203332000060448201526064016100a4565b63ffffffff821660a0526001600160a01b0381166080527f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60005b8363ffffffff168163ffffffff16101561018b5763ffffffff81166000908152600160209081526040808320859055908290529020829055610181838380610236565b915060010161013e565b506000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b5550506001600455816102195760405162461bcd60e51b815260206004820152602560248201527f64656e6f6d696e6174696f6e2073686f756c6420626520677265617465722074604482015264068616e20360dc1b60648201526084016100a4565b506001600160a01b0390921660c0525060e0525061049d92505050565b6000600080516020611b4883398151915283106102955760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c6460448201526064016100a4565b600080516020611b4883398151915282106102fc5760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b60648201526084016100a4565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa15801561034b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036f9190610479565b9092509050600080516020611b4883398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156103d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f89190610479565b509695505050505050565b6001600160a01b038116811461041857600080fd5b50565b6000806000806080858703121561043157600080fd5b845161043c81610403565b602086015190945061044d81610403565b60408601516060870151919450925063ffffffff8116811461046e57600080fd5b939692955090935050565b6000806040838503121561048c57600080fd5b505080516020909101519092909150565b60805160a05160c05160e051611641610507600039600081816102b00152818161053001528181610d0401526110a201526000818161019b015261069901526000818161021701528181610e9b0152610f3d01526000818161045e0152610fd501526116416000f3fe60806040526004361061012a5760003560e01c80639fa12d0b116100ab578063e5285dcc1161006f578063e5285dcc146103bb578063e8295588146103eb578063ec73295914610418578063ed33639f1461044c578063f178e47c14610480578063fc7e9c6f146104ad57600080fd5b80639fa12d0b1461030f578063b214faa51461033c578063ba70f7571461034f578063c2b40ae414610379578063cd87a3b4146103a657600080fd5b80636d9833e3116100f25780636d9833e31461024e578063839df9451461026e5780638bca6d161461029e5780638ea3099e146102d257806390eeb02b146102f257600080fd5b806317cc915c1461012f57806321a0adb6146101745780632b7ac3f314610189578063414a37ba146101d55780634ecf518b14610205575b600080fd5b34801561013b57600080fd5b5061015f61014a366004611137565b60056020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b610187610182366004611178565b6104d2565b005b34801561019557600080fd5b506101bd7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161016b565b3480156101e157600080fd5b506101f76000805160206115ec83398151915281565b60405190815260200161016b565b34801561021157600080fd5b506102397f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff909116815260200161016b565b34801561025a57600080fd5b5061015f610269366004611137565b6107dd565b34801561027a57600080fd5b5061015f610289366004611137565b60066020526000908152604090205460ff1681565b3480156102aa57600080fd5b506101f77f000000000000000000000000000000000000000000000000000000000000000081565b3480156102de57600080fd5b506101f76102ed36600461122e565b61085b565b3480156102fe57600080fd5b506003546102399063ffffffff1681565b34801561031b57600080fd5b5061032f61032a366004611263565b610a28565b60405161016b91906112d8565b61018761034a366004611137565b610ae4565b34801561035b57600080fd5b5060035463ffffffff166000908152600260205260409020546101f7565b34801561038557600080fd5b506101f7610394366004611137565b60026020526000908152604090205481565b3480156103b257600080fd5b50610239601e81565b3480156103c757600080fd5b5061015f6103d6366004611137565b60009081526005602052604090205460ff1690565b3480156103f757600080fd5b506101f7610406366004611137565b60016020526000908152604090205481565b34801561042457600080fd5b506101f77f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b34801561045857600080fd5b506101bd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561048c57600080fd5b506101f761049b366004611137565b60006020819052908152604090205481565b3480156104b957600080fd5b5060035461023990640100000000900463ffffffff1681565b6002600454036105295760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026004557f000000000000000000000000000000000000000000000000000000000000000082111561059e5760405162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c75650000000000006044820152606401610520565b60008581526005602052604090205460ff16156105fd5760405162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e74006044820152606401610520565b610606866107dd565b6106525760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f74000000006044820152606401610520565b6040805160c081018252878152602081018790526001600160a01b038681168284015285811660608301526080820185905260a08201849052915163695ef6f960e01b81527f00000000000000000000000000000000000000000000000000000000000000009092169163695ef6f9916106d2918c918c9160040161131e565b6020604051808303816000875af11580156106f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610715919061137c565b61075a5760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b6044820152606401610520565b6000858152600560205260409020805460ff1916600117905561077f84848484610c1b565b604080516001600160a01b03868116825260208201889052918101849052908416907fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319060600160405180910390a250506001600455505050505050565b60008181036107ee57506000919050565b60035463ffffffff16805b63ffffffff8116600090815260026020526040902054840361081f575060019392505050565b8063ffffffff166000036108315750601e5b8061083b816113bb565b9150508163ffffffff168163ffffffff16036107f9575060009392505050565b60006000805160206115ec83398151915283106108ba5760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c646044820152606401610520565b6000805160206115ec83398151915282106109215760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b6064820152608401610520565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610970573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099491906113db565b90925090506000805160206115ec83398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156109f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1d91906113db565b509695505050505050565b60608167ffffffffffffffff811115610a4357610a43611415565b604051908082528060200260200182016040528015610a6c578160200160208202803683370190505b50905060005b82811015610add57610aab848483818110610a8f57610a8f61142b565b9050602002013560009081526005602052604090205460ff1690565b15610ad5576001828281518110610ac457610ac461142b565b911515602092830291909101909101525b600101610a72565b5092915050565b600260045403610b365760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610520565b600260045560008181526006602052604090205460ff1615610ba45760405162461bcd60e51b815260206004820152602160248201527f54686520636f6d6d69746d656e7420686173206265656e207375626d697474656044820152601960fa1b6064820152608401610520565b6000610baf82610e82565b6000838152600660205260409020805460ff191660011790559050610bd26110a0565b6040805163ffffffff8316815242602082015283917fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196910160405180910390a250506001600455565b3415610c875760405162461bcd60e51b815260206004820152603560248201527f4d6573736167652076616c756520697320737570706f73656420746f206265206044820152747a65726f20666f722045544820696e7374616e636560581b6064820152608401610520565b8015610cf25760405162461bcd60e51b815260206004820152603460248201527f526566756e642076616c756520697320737570706f73656420746f206265207a60448201527365726f20666f722045544820696e7374616e636560601b6064820152608401610520565b60006001600160a01b038516610d28847f0000000000000000000000000000000000000000000000000000000000000000611441565b604051600081818185875af1925050503d8060008114610d64576040519150601f19603f3d011682016040523d82523d6000602084013e610d69565b606091505b5050905080610dc85760405162461bcd60e51b815260206004820152602560248201527f7061796d656e7420746f205f726563697069656e7420646964206e6f7420676f604482015264207468727560d81b6064820152608401610520565b8215610e7b576040516001600160a01b038516908490600081818185875af1925050503d8060008114610e17576040519150601f19603f3d011682016040523d82523d6000602084013e610e1c565b606091505b50508091505080610e7b5760405162461bcd60e51b815260206004820152602360248201527f7061796d656e7420746f205f72656c6179657220646964206e6f7420676f207460448201526268727560e81b6064820152608401610520565b5050505050565b600354600090640100000000900463ffffffff16610ec17f0000000000000000000000000000000000000000000000000000000000000000600261156b565b63ffffffff168163ffffffff1603610f345760405162461bcd60e51b815260206004820152603060248201527f4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656160448201526f1d995cc818d85b88189948185919195960821b6064820152608401610520565b8083600080805b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168163ffffffff16101561101257610f7a600286611588565b63ffffffff16600003610fb45763ffffffff8116600090815260016020908152604080832054918390529091208590558493509150610fd0565b63ffffffff811660009081526020819052604090205492508391505b610ffb7f0000000000000000000000000000000000000000000000000000000000000000848461085b565b93506110086002866115ab565b9450600101610f3b565b50600354600090601e9061102d9063ffffffff1660016115ce565b6110379190611588565b6003805463ffffffff191663ffffffff83169081179091556000908152600260205260409020859055905061106d8660016115ce565b6003805463ffffffff929092166401000000000267ffffffff000000001990921691909117905550939695505050505050565b7f000000000000000000000000000000000000000000000000000000000000000034146111355760405162461bcd60e51b815260206004820152603860248201527f506c656173652073656e6420606d697844656e6f6d696e6174696f6e6020455460448201527f4820616c6f6e672077697468207472616e73616374696f6e00000000000000006064820152608401610520565b565b60006020828403121561114957600080fd5b5035919050565b6001600160a01b038116811461116557600080fd5b50565b803561117381611150565b919050565b60008060008060008060008060e0898b03121561119457600080fd5b883567ffffffffffffffff808211156111ac57600080fd5b818b0191508b601f8301126111c057600080fd5b8135818111156111cf57600080fd5b8c60208285010111156111e157600080fd5b60209283019a5098505089013595506040890135945061120360608a01611168565b935061121160808a01611168565b925060a0890135915060c089013590509295985092959890939650565b60008060006060848603121561124357600080fd5b833561124e81611150565b95602085013595506040909401359392505050565b6000806020838503121561127657600080fd5b823567ffffffffffffffff8082111561128e57600080fd5b818501915085601f8301126112a257600080fd5b8135818111156112b157600080fd5b8660208260051b85010111156112c657600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156113125783511515835292840192918401916001016112f4565b50909695505050505050565b60e081528260e08201526000610100848682850137600081868501015280601f19601f87011684010191505060208083018460005b600681101561137057815183529183019190830190600101611353565b50505050949350505050565b60006020828403121561138e57600080fd5b8151801515811461139e57600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff8216806113d1576113d16113a5565b6000190192915050565b600080604083850312156113ee57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b81810381811115611454576114546113a5565b92915050565b600181815b80851115611497578163ffffffff0482111561147d5761147d6113a5565b8085161561148a57918102915b93841c939080029061145f565b509250929050565b6000826114ae57506001611454565b816114bb57506000611454565b81600181146114d157600281146114db5761150c565b6001915050611454565b60ff8411156114ec576114ec6113a5565b6001841b915063ffffffff821115611506576115066113a5565b50611454565b5060208310610133831016604e8410600b8410161715611543575081810a63ffffffff81111561153e5761153e6113a5565b611454565b61154d838361145a565b8063ffffffff04821115611563576115636113a5565b029392505050565b600063ffffffff61158081851682851661149f565b949350505050565b600063ffffffff8084168061159f5761159f6113ff565b92169190910692915050565b600063ffffffff808416806115c2576115c26113ff565b92169190910492915050565b63ffffffff818116838216019080821115610add57610add6113a556fe30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001a2646970667358221220b7ae6fa49d2dc33b05a35e194c48ba72870663895936d093d6708dda191f86f164736f6c6343000819003330644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001";class Pb extends Ka{constructor(...e){e.length>1?super(...e):super(Ob,kb,e[0])}getDeployTransaction(e,t,a,n,b){return super.getDeployTransaction(e,t,a,n,b||{})}deploy(e,t,a,n,b){return super.deploy(e,t,a,n,b||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ob)}static connect(e,t){return new $a(e,Ob,t)}}Pb.bytecode=kb,Pb.abi=Ob;const Ab=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"who",type:"address"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"}],name:"Echo",type:"event"},{inputs:[{internalType:"bytes",name:"_data",type:"bytes"}],name:"echo",outputs:[],stateMutability:"nonpayable",type:"function"}],Cb="0x6080604052348015600f57600080fd5b506101638061001f6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063624fbfdc14610030575b600080fd5b61004361003e36600461008c565b610045565b005b336001600160a01b03167f50d6f3fc915efd1695d8a4cb50da185984f50d256834b9cb308295eb3c872c9c83836040516100809291906100fe565b60405180910390a25050565b6000806020838503121561009f57600080fd5b823567ffffffffffffffff808211156100b757600080fd5b818501915085601f8301126100cb57600080fd5b8135818111156100da57600080fd5b8660208285010111156100ec57600080fd5b60209290920196919550909350505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fea2646970667358221220cadc2288aafcfeb373ae536503c025419ca51a0b1642ad003ff215a6bff8658464736f6c63430008190033";class Nb extends Ka{constructor(...e){e.length>1?super(...e):super(Ab,Cb,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ab)}static connect(e,t){return new $a(e,Ab,t)}}Nb.bytecode=Cb,Nb.abi=Ab;const Db=[{inputs:[{internalType:"bytes",name:"proof",type:"bytes"},{internalType:"uint256[6]",name:"input",type:"uint256[6]"}],name:"verifyProof",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],Sb="0x6080604052348015600f57600080fd5b506110d08061001f6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063695ef6f914610030575b600080fd5b61004361003e366004610eca565b610057565b604051901515815260200160405180910390f35b6000808380602001905181019061006e9190610f71565b905060005b60088160ff161015610129577f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47828260ff16600881106100b5576100b5610ff0565b6020020151106101175760405162461bcd60e51b815260206004820152602260248201527f76657269666965722d70726f6f662d656c656d656e742d6774652d7072696d656044820152612d7160f01b60648201526084015b60405180910390fd5b806101218161101c565b915050610073565b50610132610ca2565b6040805180820182528351815260208085015181830152908352815160808082018452858401518285019081526060808801519084015282528351808501855290860151815260a08601518184015281830152838201528151808301835260c0850151815260e0850151918101919091529082015260006101b1610321565b90506000604051806040016040528060008152602001600081525090506101f38183608001516000600781106101e9576101e9610ff0565b60200201516107ec565b905060005b60068110156102df577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000187826006811061023457610234610ff0565b6020020151106102865760405162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c6400604482015260640161010e565b6102d5826102d0856080015184600161029f919061103b565b600781106102af576102af610ff0565b60200201518a85600681106102c6576102c6610ff0565b602002015161088d565b6107ec565b91506001016101f8565b506103146102f0846000015161091b565b846020015184600001518560200151858760400151896040015189606001516109d5565b9450505050505b92915050565b610329610cf3565b6040805180820182527f2dbfc3ec62a3eee5a3b4b464bcf1f8527bbca12adea0f1f12033cd4f61b0e09181527f19e55bd0b72c126da18665039556776642ff82e2f347f24fcea2475f4db087df6020808301919091529083528151608080820184527f1ae724ab134e5a7c6bd8a116fa5505b259522c0f164a5e8126e3ec7d34465f6e8285019081527e9f1bcdc853f8e3531756bb625b0d1dc014f4ab57c3f79f4f4e2e7ef7e0ead6606080850191909152908352845180860186527f23a8ca5760457e726365b92fd0ceb486665797cd68c35dcffd8e4ae8066691e981527f13ec7182c9fd68331a10f8be0fe885d730de5c7f89aa7d0b7bafaa009bbc9e3e818601528385015285840192909252835180820185527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28186019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed828501528152845180860186527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b81527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa818601528185015285850152835180820185527f2f0c63d0c53b3dfbca27b6b43ae7fbf55a38d78a21470996485b03128accc2088186019081527e556502356e37ed150db2e36531b0f275fd6835c0fc1945922e270b48c48a86828501528152845180860186527f02644c27b5dbd793592a70b735e22c798a5e309fa17a992a7dc2a050e01b298f81527f194776b6a53439d7336f389d2a8f6651e40885f5ca2538b0dc9cb534fb23f7fa818601528185015282860152835180850185527f23df1bc9165e9c1c9b2bc036d8ebdd10e7aeae7e5e8019fde68aec7c818bb23e81527f0b6c92080d37c5fb2ddf30892a33665e5478432ef3f71ac8768ecbbe62c7789281850152818601805191909152845180860186527f1c7b2adf45e046caea000956b2ecb2d8617e710d2a7bb201a95ea276f92307b481527f2b15f07536f45948cf4abe6596637d902ffabb18c8c2f5c151544c294ce4a672818601528151850152845180860186527f1cecfe92882a8c835a47bf01bfa655cf628cbba7f81cf4042179fd13edcd6a3981527f0154bfbb2cb786ca247d4b69183d1751f267bbc7656be8d0f0e7a5a47e2c1101818601528151860152845180860186527f1584616a7423efcc72f69ea84fa0b2bc01433677297f4e8351bebfc15bcd0cda81527f0623755b1488526daa9fecf0e11b110dd6df12c461579d792e1db65af523c8be81860152815190930192909252835180850185527f12fbb5bfca9d61357ba2d641604cf4852e21ef54faa180fe539c18994dc1da5a81527f2f09dd9972a1af5f7bcfccf3d7ab600c9d898ea6d6933150ba0ae228ece17e5f81850152825190910152825180840184527f0adb513796fdf2103022c64151ce05f7c7a6d9200e8d819fa59e654fc4bfe83c81527f2d64f72ef4eddf9ca032058ed2bf691758387e913a77cf99d6a3cfb37c8ba7ee81840152815160a0015282518084019093527f21e7c9bffda74bfd2c4393b6803d775545de6fa89145f4a23476241d9881b66183527f0bbe41e52237ac13eb7b01f3cb999b7394d08734e71b1c3ada62713e17eb560c918301919091525160c0015290565b6040805180820190915260008082526020820152610808610d44565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa9050808061084257fe5b50806108855760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b604482015260640161010e565b505092915050565b60408051808201909152600080825260208201526108a9610d62565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa905080806108d857fe5b50806108855760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b604482015260640161010e565b6040805180820190915260008082526020820152815115801561094057506020820151155b1561095e575050604080518082019091526000808252602082015290565b6040518060400160405280836000015181526020017f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4784602001516109a3919061104e565b6109cd907f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47611070565b905292915050565b60408051608080820183528a825260208083018a90528284018890526060808401879052845192830185528b83528282018a9052828501889052820185905283516018808252610320820190955260009491859190839082016103008036833701905050905060005b6004811015610c1f576000610a54826006611083565b9050858260048110610a6857610a68610ff0565b60200201515183610a7a83600061103b565b81518110610a8a57610a8a610ff0565b602002602001018181525050858260048110610aa857610aa8610ff0565b60200201516020015183826001610abf919061103b565b81518110610acf57610acf610ff0565b602002602001018181525050848260048110610aed57610aed610ff0565b6020020151515183610b0083600261103b565b81518110610b1057610b10610ff0565b602002602001018181525050848260048110610b2e57610b2e610ff0565b6020020151516001602002015183610b4783600361103b565b81518110610b5757610b57610ff0565b602002602001018181525050848260048110610b7557610b75610ff0565b602002015160200151600060028110610b9057610b90610ff0565b602002015183610ba183600461103b565b81518110610bb157610bb1610ff0565b602002602001018181525050848260048110610bcf57610bcf610ff0565b602002015160200151600160028110610bea57610bea610ff0565b602002015183610bfb83600561103b565b81518110610c0b57610c0b610ff0565b602090810291909101015250600101610a3e565b50610c28610d80565b6000602082602086026020860160086107d05a03fa90508080610c4757fe5b5080610c8d5760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b604482015260640161010e565b505115159d9c50505050505050505050505050565b6040805160a081019091526000606082018181526080830191909152815260208101610ccc610d9e565b8152602001610cee604051806040016040528060008152602001600081525090565b905290565b6040805160e08101909152600060a0820181815260c0830191909152815260208101610d1d610d9e565b8152602001610d2a610d9e565b8152602001610d37610d9e565b8152602001610cee610dbe565b60405180608001604052806004906020820280368337509192915050565b60405180606001604052806003906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060400160405280610db1610df7565b8152602001610cee610df7565b6040518060e001604052806007905b6040805180820190915260008082526020820152815260200190600190039081610dcd5790505090565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610e5457610e54610e15565b604052919050565b600082601f830112610e6d57600080fd5b60405160c0810181811067ffffffffffffffff82111715610e9057610e90610e15565b6040528060c0840185811115610ea557600080fd5b845b81811015610ebf578035835260209283019201610ea7565b509195945050505050565b60008060e08385031215610edd57600080fd5b823567ffffffffffffffff80821115610ef557600080fd5b818501915085601f830112610f0957600080fd5b8135602082821115610f1d57610f1d610e15565b610f2f601f8301601f19168201610e2b565b92508183528781838601011115610f4557600080fd5b81818501828501376000818385010152829550610f6488828901610e5c565b9450505050509250929050565b6000610100808385031215610f8557600080fd5b83601f840112610f9457600080fd5b60405181810181811067ffffffffffffffff82111715610fb657610fb6610e15565b604052908301908085831115610fcb57600080fd5b845b83811015610fe5578051825260209182019101610fcd565b509095945050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff810361103257611032611006565b60010192915050565b8082018082111561031b5761031b611006565b60008261106b57634e487b7160e01b600052601260045260246000fd5b500690565b8181038181111561031b5761031b611006565b808202811582820484141761031b5761031b61100656fea2646970667358221220f45b9b217fe8de0faa784c9b47a788ed44f7beab2c4749dda027f1862d4a28df64736f6c63430008190033";class Ub extends Ka{constructor(...e){e.length>1?super(...e):super(Db,Sb,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Db)}static connect(e,t){return new $a(e,Db,t)}}Ub.bytecode=Sb,Ub.abi=Db;const Vb=[{inputs:[{internalType:"address",name:"_governance",type:"address"},{internalType:"contract IERC20",name:"_comp",type:"address"},{internalType:"contract IVerifier",name:"_verifier",type:"address"},{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"uint256",name:"_denomination",type:"uint256"},{internalType:"uint32",name:"_merkleTreeHeight",type:"uint32"},{internalType:"contract IERC20",name:"_token",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"commitment",type:"bytes32"},{indexed:!1,internalType:"uint32",name:"leafIndex",type:"uint32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"fee",type:"uint256"}],name:"Withdrawal",type:"event"},{inputs:[],name:"FIELD_SIZE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ROOT_HISTORY_SIZE",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ZERO_VALUE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"claimComp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"commitments",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"comp",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"currentRootIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"filledSubtrees",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastRoot",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IHasher",name:"_hasher",type:"address"},{internalType:"bytes32",name:"_left",type:"bytes32"},{internalType:"bytes32",name:"_right",type:"bytes32"}],name:"hashLeftRight",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"hasher",outputs:[{internalType:"contract IHasher",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"isKnownRoot",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"}],name:"isSpent",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_nullifierHashes",type:"bytes32[]"}],name:"isSpentArray",outputs:[{internalType:"bool[]",name:"spent",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"levels",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextIndex",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"nullifierHashes",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"roots",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"verifier",outputs:[{internalType:"contract IVerifier",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"zeros",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],Lb="0x610160604052600380546001600160401b031916905534801561002157600080fd5b5060405161205a38038061205a8339810160408190526100409161048f565b848484848484848484808360008263ffffffff16116100b25760405162461bcd60e51b815260206004820152602360248201527f5f6c6576656c732073686f756c642062652067726561746572207468616e207a60448201526265726f60e81b60648201526084015b60405180910390fd5b60208263ffffffff16106101085760405162461bcd60e51b815260206004820152601e60248201527f5f6c6576656c732073686f756c64206265206c657373207468616e203332000060448201526064016100a9565b63ffffffff821660a0526001600160a01b0381166080527f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60005b8363ffffffff168163ffffffff1610156101905763ffffffff811660009081526001602090815260408083208590559082905290208290556101868383806102aa565b9150600101610143565b506000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b55505060016004558161021e5760405162461bcd60e51b815260206004820152602560248201527f64656e6f6d696e6174696f6e2073686f756c6420626520677265617465722074604482015264068616e20360dc1b60648201526084016100a9565b506001600160a01b0392831660c05260e05250908116610100528a16935061028c925050505760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420434f4d5020746f6b656e206164647265737300000000000060448201526064016100a9565b5050506001600160a01b03938416610120525050166101405261054e565b600060008051602061203a83398151915283106103095760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c6460448201526064016100a9565b60008051602061203a83398151915282106103705760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b60648201526084016100a9565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa1580156103bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e3919061052a565b909250905060008051602061203a83398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610448573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046c919061052a565b509695505050505050565b6001600160a01b038116811461048c57600080fd5b50565b600080600080600080600060e0888a0312156104aa57600080fd5b87516104b581610477565b60208901519097506104c681610477565b60408901519096506104d781610477565b60608901519095506104e881610477565b608089015160a08a0151919550935063ffffffff8116811461050957600080fd5b60c089015190925061051a81610477565b8091505092959891949750929550565b6000806040838503121561053d57600080fd5b505080516020909101519092909150565b60805160a05160c05160e051610100516101205161014051611a3e6105fc6000396000818161017d01526105d40152600081816102e5015261060501526000818161057801528181610ecc01528181610f0601526112600152600081816103690152818161074101528181610e9e015261128401526000818161023801526108aa01526000818161029c01528181610fe7015261108901526000818161051701526111210152611a3e6000f3fe6080604052600436106101665760003560e01c806390eeb02b116100d1578063e5285dcc1161008a578063ed33639f11610064578063ed33639f14610505578063f178e47c14610539578063fc0c546a14610566578063fc7e9c6f1461059a57600080fd5b8063e5285dcc14610474578063e8295588146104a4578063ec732959146104d157600080fd5b806390eeb02b146103ab5780639fa12d0b146103c8578063b214faa5146103f5578063ba70f75714610408578063c2b40ae414610432578063cd87a3b41461045f57600080fd5b80634ecf518b116101235780634ecf518b1461028a5780635aa6e675146102d35780636d9833e314610307578063839df945146103275780638bca6d16146103575780638ea3099e1461038b57600080fd5b8063109d0af81461016b57806317cc915c146101bc5780631bd85bdb146101fc57806321a0adb6146102135780632b7ac3f314610226578063414a37ba1461025a575b600080fd5b34801561017757600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101c857600080fd5b506101ec6101d73660046114ef565b60056020526000908152604090205460ff1681565b60405190151581526020016101b3565b34801561020857600080fd5b506102116105bf565b005b61021161022136600461152d565b6106e3565b34801561023257600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561026657600080fd5b5061027c6000805160206119e983398151915281565b6040519081526020016101b3565b34801561029657600080fd5b506102be7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016101b3565b3480156102df57600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561031357600080fd5b506101ec6103223660046114ef565b6109ee565b34801561033357600080fd5b506101ec6103423660046114ef565b60066020526000908152604090205460ff1681565b34801561036357600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561039757600080fd5b5061027c6103a63660046115e3565b610a6c565b3480156103b757600080fd5b506003546102be9063ffffffff1681565b3480156103d457600080fd5b506103e86103e3366004611618565b610c39565b6040516101b3919061168d565b6102116104033660046114ef565b610cf5565b34801561041457600080fd5b5060035463ffffffff1660009081526002602052604090205461027c565b34801561043e57600080fd5b5061027c61044d3660046114ef565b60026020526000908152604090205481565b34801561046b57600080fd5b506102be601e81565b34801561048057600080fd5b506101ec61048f3660046114ef565b60009081526005602052604090205460ff1690565b3480156104b057600080fd5b5061027c6104bf3660046114ef565b60016020526000908152604090205481565b3480156104dd57600080fd5b5061027c7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b34801561051157600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054557600080fd5b5061027c6105543660046114ef565b60006020819052908152604090205481565b34801561057257600080fd5b5061019f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a657600080fd5b506003546102be90640100000000900463ffffffff1681565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb907f00000000000000000000000000000000000000000000000000000000000000009083906370a0823190602401602060405180830381865afa15801561064d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067191906116d3565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156106bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e091906116ec565b50565b60026004540361073a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026004557f00000000000000000000000000000000000000000000000000000000000000008211156107af5760405162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c75650000000000006044820152606401610731565b60008581526005602052604090205460ff161561080e5760405162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e74006044820152606401610731565b610817866109ee565b6108635760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f74000000006044820152606401610731565b6040805160c081018252878152602081018790526001600160a01b038681168284015285811660608301526080820185905260a08201849052915163695ef6f960e01b81527f00000000000000000000000000000000000000000000000000000000000000009092169163695ef6f9916108e3918c918c91600401611715565b6020604051808303816000875af1158015610902573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092691906116ec565b61096b5760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b6044820152606401610731565b6000858152600560205260409020805460ff1916600117905561099084848484610e2c565b604080516001600160a01b03868116825260208201889052918101849052908416907fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319060600160405180910390a250506001600455505050505050565b60008181036109ff57506000919050565b60035463ffffffff16805b63ffffffff81166000908152600260205260409020548403610a30575060019392505050565b8063ffffffff16600003610a425750601e5b80610a4c81611789565b9150508163ffffffff168163ffffffff1603610a0a575060009392505050565b60006000805160206119e98339815191528310610acb5760405162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c646044820152606401610731565b6000805160206119e98339815191528210610b325760405162461bcd60e51b815260206004820152602160248201527f5f72696768742073686f756c6420626520696e7369646520746865206669656c6044820152601960fa1b6064820152608401610731565b60405163f47d33b560e01b81526004810184905260006024820181905284916001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba591906117a9565b90925090506000805160206119e983398151915284830860405163f47d33b560e01b815260048101829052602481018390529092506001600160a01b0387169063f47d33b5906044016040805180830381865afa158015610c0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2e91906117a9565b509695505050505050565b60608167ffffffffffffffff811115610c5457610c546117e3565b604051908082528060200260200182016040528015610c7d578160200160208202803683370190505b50905060005b82811015610cee57610cbc848483818110610ca057610ca06117f9565b9050602002013560009081526005602052604090205460ff1690565b15610ce6576001828281518110610cd557610cd56117f9565b911515602092830291909101909101525b600101610c83565b5092915050565b600260045403610d475760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610731565b600260045560008181526006602052604090205460ff1615610db55760405162461bcd60e51b815260206004820152602160248201527f54686520636f6d6d69746d656e7420686173206265656e207375626d697474656044820152601960fa1b6064820152608401610731565b6000610dc082610fce565b6000838152600660205260409020805460ff191660011790559050610de36111ec565b6040805163ffffffff8316815242602082015283917fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196910160405180910390a250506001600455565b803414610e945760405162461bcd60e51b815260206004820152603060248201527f496e636f727265637420726566756e6420616d6f756e7420726563656976656460448201526f08189e481d1a194818dbdb9d1c9858dd60821b6064820152608401610731565b610ef384610ec2847f000000000000000000000000000000000000000000000000000000000000000061180f565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691906112aa565b8115610f2d57610f2d6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684846112aa565b8015610fc8576000846001600160a01b03168260405160006040518083038185875af1925050503d8060008114610f80576040519150601f19603f3d011682016040523d82523d6000602084013e610f85565b606091505b5050905080610fc6576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015610fc4573d6000803e3d6000fd5b505b505b50505050565b600354600090640100000000900463ffffffff1661100d7f00000000000000000000000000000000000000000000000000000000000000006002611939565b63ffffffff168163ffffffff16036110805760405162461bcd60e51b815260206004820152603060248201527f4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656160448201526f1d995cc818d85b88189948185919195960821b6064820152608401610731565b8083600080805b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168163ffffffff16101561115e576110c6600286611956565b63ffffffff166000036111005763ffffffff811660009081526001602090815260408083205491839052909120859055849350915061111c565b63ffffffff811660009081526020819052604090205492508391505b6111477f00000000000000000000000000000000000000000000000000000000000000008484610a6c565b9350611154600286611979565b9450600101611087565b50600354600090601e906111799063ffffffff16600161199c565b6111839190611956565b6003805463ffffffff191663ffffffff8316908117909155600090815260026020526040902085905590506111b986600161199c565b6003805463ffffffff929092166401000000000267ffffffff000000001990921691909117905550939695505050505050565b34156112535760405162461bcd60e51b815260206004820152603060248201527f4554482076616c756520697320737570706f73656420746f206265203020666f60448201526f7220455243323020696e7374616e636560801b6064820152608401610731565b6112a86001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633307f00000000000000000000000000000000000000000000000000000000000000006113c3565b565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161130691906119b9565b6000604051808303816000865af19150503d8060008114611343576040519150601f19603f3d011682016040523d82523d6000602084013e611348565b606091505b50915091508161135a57805181602001fd5b8051158061137757508080602001905181019061137791906116ec565b610fc65760405162461bcd60e51b815260206004820152601e60248201527f5361666545524332303a20736166655472616e73666572206661696c656400006044820152606401610731565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161142791906119b9565b6000604051808303816000865af19150503d8060008114611464576040519150601f19603f3d011682016040523d82523d6000602084013e611469565b606091505b50915091508161147b57805181602001fd5b8051158061149857508080602001905181019061149891906116ec565b610fc45760405162461bcd60e51b815260206004820152602260248201527f5361666545524332303a20736166655472616e7366657246726f6d206661696c604482015261195960f21b6064820152608401610731565b60006020828403121561150157600080fd5b5035919050565b6001600160a01b03811681146106e057600080fd5b803561152881611508565b919050565b60008060008060008060008060e0898b03121561154957600080fd5b883567ffffffffffffffff8082111561156157600080fd5b818b0191508b601f83011261157557600080fd5b81358181111561158457600080fd5b8c602082850101111561159657600080fd5b60209283019a509850508901359550604089013594506115b860608a0161151d565b93506115c660808a0161151d565b925060a0890135915060c089013590509295985092959890939650565b6000806000606084860312156115f857600080fd5b833561160381611508565b95602085013595506040909401359392505050565b6000806020838503121561162b57600080fd5b823567ffffffffffffffff8082111561164357600080fd5b818501915085601f83011261165757600080fd5b81358181111561166657600080fd5b8660208260051b850101111561167b57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156116c75783511515835292840192918401916001016116a9565b50909695505050505050565b6000602082840312156116e557600080fd5b5051919050565b6000602082840312156116fe57600080fd5b8151801515811461170e57600080fd5b9392505050565b60e081528260e08201526000610100848682850137600081868501015280601f19601f87011684010191505060208083018460005b60068110156117675781518352918301919083019060010161174a565b50505050949350505050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff82168061179f5761179f611773565b6000190192915050565b600080604083850312156117bc57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8181038181111561182257611822611773565b92915050565b600181815b80851115611865578163ffffffff0482111561184b5761184b611773565b8085161561185857918102915b93841c939080029061182d565b509250929050565b60008261187c57506001611822565b8161188957506000611822565b816001811461189f57600281146118a9576118da565b6001915050611822565b60ff8411156118ba576118ba611773565b6001841b915063ffffffff8211156118d4576118d4611773565b50611822565b5060208310610133831016604e8410600b8410161715611911575081810a63ffffffff81111561190c5761190c611773565b611822565b61191b8383611828565b8063ffffffff0482111561193157611931611773565b029392505050565b600063ffffffff61194e81851682851661186d565b949350505050565b600063ffffffff8084168061196d5761196d6117cd565b92169190910692915050565b600063ffffffff80841680611990576119906117cd565b92169190910492915050565b63ffffffff818116838216019080821115610cee57610cee611773565b6000825160005b818110156119da57602081860181015185830152016119c0565b50600092019182525091905056fe30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001a26469706673582212207136b381e40b7e1e84fceaba3022a28e73ab509289c831db484f05c7303d32a464736f6c6343000819003330644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001";class Fb extends Ka{constructor(...e){e.length>1?super(...e):super(Vb,Lb,e[0])}getDeployTransaction(e,t,a,n,b,f,d,i){return super.getDeployTransaction(e,t,a,n,b,f,d,i||{})}deploy(e,t,a,n,b,f,d,i){return super.deploy(e,t,a,n,b,f,d,i||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Vb)}static connect(e,t){return new $a(e,Vb,t)}}Fb.bytecode=Lb,Fb.abi=Vb;var Gb=Object.freeze({__proto__:null,CTornado__factory:Fb,ERC20Tornado__factory:Rb,ETHTornado__factory:Pb,Echoer__factory:Nb,Verifier__factory:Ub,interfaces:xb,merkleTreeWithHistorySol:Wn,mocks:rb,tornadoProxyLightSol:vb,tornadoSol:lb});const Bb=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"label",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint64",name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setRecord",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"resolver",type:"address"}],name:"setResolver",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setSubnodeRecord",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"ttl",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"}];class jb{static createInterface(){return new ba(Bb)}static connect(e,t){return new $a(e,Bb,t)}}jb.abi=Bb;const Hb=[{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"}],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class zb{static createInterface(){return new ba(Hb)}static connect(e,t){return new $a(e,Hb,t)}}zb.abi=Hb;const $b=[{inputs:[{internalType:"address",name:"relayer",type:"address"}],name:"getRelayerBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"address",name:"toResolve",type:"address"}],name:"isRelayerRegistered",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}];class Xb{static createInterface(){return new ba($b)}static connect(e,t){return new $a(e,$b,t)}}Xb.abi=$b;const Wb=[{inputs:[{internalType:"address",name:"_IENSRegistry",type:"address"},{internalType:"address",name:"_IRelayerRegistry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ENSRegistry",outputs:[{internalType:"contract IENSRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"RelayerRegistry",outputs:[{internalType:"contract IRelayerRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_relayers",type:"bytes32[]"},{internalType:"string[]",name:"_subdomains",type:"string[]"}],name:"relayersData",outputs:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bool",name:"isRegistered",type:"bool"},{internalType:"string[20]",name:"records",type:"string[20]"}],internalType:"struct Relayer[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"}],qb="0x60c060405234801561001057600080fd5b50604051610b74380380610b7483398101604081905261002f9161004d565b6001600160601b0319606092831b8116608052911b1660a05261009e565b6000806040838503121561005f578182fd5b825161006a81610086565b602084015190925061007b81610086565b809150509250929050565b6001600160a01b038116811461009b57600080fd5b50565b60805160601c60a05160601c610a9b6100d96000398060b2528061040352806104f1525080608e528061013a528061021b5250610a9b6000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80631cb120d61461004657806339c16356146100645780634d47d7751461006c575b600080fd5b61004e61008c565b60405161005b9190610891565b60405180910390f35b61004e6100b0565b61007f61007a366004610702565b6100d4565b60405161005b91906108bf565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b606080835167ffffffffffffffff811180156100ef57600080fd5b5060405190808252806020026020018201604052801561012957816020015b6101166105cd565b81526020019060019003908161010e5790505b50905060005b84518110156105c5577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166302571be386838151811061017357fe5b60200260200101516040518263ffffffff1660e01b8152600401610197919061099d565b60206040518083038186803b1580156101af57600080fd5b505afa1580156101c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e791906106d4565b8282815181106101f357fe5b6020026020010151600001906001600160a01b031690816001600160a01b03168152505060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630178b8bf87848151811061025457fe5b60200260200101516040518263ffffffff1660e01b8152600401610278919061099d565b60206040518083038186803b15801561029057600080fd5b505afa1580156102a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c891906106d4565b905060005b85518110156104005760008784815181106102e457fe5b60200260200101518783815181106102f857fe5b60200260200101516040516020016103109190610875565b60405160208183030381529060405280519060200120604051602001610337929190610867565b60408051601f19818403018152908290528051602090910120631674750f60e21b825291506001600160a01b038416906359d1d43c9061037b9084906004016109a6565b60006040518083038186803b15801561039357600080fd5b505afa1580156103a7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103cf91908101906107dc565b8585815181106103db57fe5b60200260200101516060015183601481106103f257fe5b6020020152506001016102cd565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b69fd4ab84848151811061043c57fe5b60200260200101516000015185858151811061045457fe5b6020026020010151600001516040518363ffffffff1660e01b815260040161047d9291906108a5565b60206040518083038186803b15801561049557600080fd5b505afa1580156104a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cd91906107bc565b8383815181106104d957fe5b602002602001015160400190151590811515815250507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b971a6bf84848151811061052a57fe5b6020026020010151600001516040518263ffffffff1660e01b81526004016105529190610891565b60206040518083038186803b15801561056a57600080fd5b505afa15801561057e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a2919061084f565b8383815181106105ae57fe5b60209081029190910181015101525060010161012f565b509392505050565b604051806080016040528060006001600160a01b0316815260200160008152602001600015158152602001610600610605565b905290565b6040518061028001604052806014905b60608152602001906001900390816106155790505090565b600082601f83011261063d578081fd5b813561065061064b826109f1565b6109ca565b818152915060208083019084810160005b848110156106c9578135870188603f82011261067c57600080fd5b8381013561068c61064b82610a11565b81815260408b818486010111156106a257600080fd5b82818501888401375060009181018601919091528552509282019290820190600101610661565b505050505092915050565b6000602082840312156106e5578081fd5b81516001600160a01b03811681146106fb578182fd5b9392505050565b60008060408385031215610714578081fd5b823567ffffffffffffffff8082111561072b578283fd5b818501915085601f83011261073e578283fd5b813561074c61064b826109f1565b80828252602080830192508086018a82838702890101111561076c578788fd5b8796505b8487101561078e578035845260019690960195928101928101610770565b5090965087013593505050808211156107a5578283fd5b506107b28582860161062d565b9150509250929050565b6000602082840312156107cd578081fd5b815180151581146106fb578182fd5b6000602082840312156107ed578081fd5b815167ffffffffffffffff811115610803578182fd5b8201601f81018413610813578182fd5b805161082161064b82610a11565b818152856020838501011115610835578384fd5b610846826020830160208601610a35565b95945050505050565b600060208284031215610860578081fd5b5051919050565b918252602082015260400190565b60008251610887818460208701610a35565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6000602080830181845280855180835260408601915060408482028701019250838701855b8281101561099057878503603f19018452815180516001600160a01b03168652868101518787015260408082015115159087015260609081015160809187018290529086016103008701895b601481101561097b57888203607f1901835283518051610950818561099d565b61095d82828f8601610a35565b958c0195948c0194601f91909101601f191601925050600101610930565b509650505092850192908501906001016108e4565b5092979650505050505050565b90815260200190565b908152604060208201819052600390820152621d5c9b60ea1b606082015260800190565b60405181810167ffffffffffffffff811182821017156109e957600080fd5b604052919050565b600067ffffffffffffffff821115610a07578081fd5b5060209081020190565b600067ffffffffffffffff821115610a27578081fd5b50601f01601f191660200190565b60005b83811015610a50578181015183820152602001610a38565b83811115610a5f576000848401525b5050505056fea2646970667358221220628a366714cdda82fe91d785ad928e44e4b9f7976ed987e5fef72d207582dbaf64736f6c634300060c0033";class Jb extends Ka{constructor(...e){e.length>1?super(...e):super(Wb,qb,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Wb)}static connect(e,t){return new $a(e,Wb,t)}}Jb.bytecode=qb,Jb.abi=Wb;var Kb=Object.freeze({__proto__:null,IENSRegistry__factory:jb,IENSResolver__factory:zb,IRelayerRegistry__factory:Xb,RelayerAggregator__factory:Jb});const Yb=[{inputs:[{internalType:"address",name:"_ensRegistry",type:"address"},{internalType:"address",name:"_relayerRegistry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ENSRegistry",outputs:[{internalType:"contract IENSRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"RelayerRegistry",outputs:[{internalType:"contract IRelayerRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract Governance",name:"governance",type:"address"}],name:"getAllProposals",outputs:[{components:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"},{internalType:"enum Governance.ProposalState",name:"state",type:"uint8"}],internalType:"struct GovernanceAggregator.Proposal[]",name:"proposals",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract Governance",name:"governance",type:"address"},{internalType:"address[]",name:"accs",type:"address[]"}],name:"getGovernanceBalances",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract Governance",name:"governance",type:"address"},{internalType:"address",name:"account",type:"address"}],name:"getUserData",outputs:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"latestProposalId",type:"uint256"},{internalType:"uint256",name:"latestProposalIdState",type:"uint256"},{internalType:"uint256",name:"timelock",type:"uint256"},{internalType:"address",name:"delegatee",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"_relayers",type:"bytes32[]"},{internalType:"string[]",name:"_subdomains",type:"string[]"}],name:"relayersData",outputs:[{components:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bool",name:"isRegistered",type:"bool"},{internalType:"string[20]",name:"records",type:"string[20]"}],internalType:"struct Relayer[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"}],Zb="0x60c060405234801561001057600080fd5b5060405161155d38038061155d83398101604081905261002f9161004d565b6001600160601b0319606092831b8116608052911b1660a05261009e565b6000806040838503121561005f578182fd5b825161006a81610086565b602084015190925061007b81610086565b809150509250929050565b6001600160a01b038116811461009b57600080fd5b50565b60805160601c60a05160601c6114826100db6000398061024b528061059c528061068a52508061022752806102d352806103b452506114826000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063029fcae7146100675780631cb120d61461009057806339c16356146100a55780634d47d775146100ad5780639853d922146100cd578063f4eeefe9146100ed575b600080fd5b61007a610075366004610fa1565b610111565b60405161008791906112ee565b60405180910390f35b610098610225565b6040516100879190611118565b610098610249565b6100c06100bb366004610e93565b61026d565b6040516100879190611210565b6100e06100db366004610dcc565b61075e565b6040516100879190611146565b6101006100fb366004610f69565b6109dd565b60405161008795949392919061135f565b60608167ffffffffffffffff8111801561012a57600080fd5b50604051908082528060200260200182016040528015610154578160200160208202803683370190505b50905060005b8281101561021d57846001600160a01b0316639ae697bf85858481811061017d57fe5b90506020020160208101906101929190610dcc565b6040518263ffffffff1660e01b81526004016101ae9190611118565b60206040518083038186803b1580156101c657600080fd5b505afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe91906110b5565b82828151811061020a57fe5b602090810291909101015260010161015a565b509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b606080835167ffffffffffffffff8111801561028857600080fd5b506040519080825280602002602001820160405280156102c257816020015b6102af610c79565b8152602001906001900390816102a75790505b50905060005b845181101561021d577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166302571be386838151811061030c57fe5b60200260200101516040518263ffffffff1660e01b81526004016103309190611332565b60206040518083038186803b15801561034857600080fd5b505afa15801561035c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103809190610def565b82828151811061038c57fe5b6020026020010151600001906001600160a01b031690816001600160a01b03168152505060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630178b8bf8784815181106103ed57fe5b60200260200101516040518263ffffffff1660e01b81526004016104119190611332565b60206040518083038186803b15801561042957600080fd5b505afa15801561043d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104619190610def565b905060005b855181101561059957600087848151811061047d57fe5b602002602001015187838151811061049157fe5b60200260200101516040516020016104a991906110fc565b604051602081830303815290604052805190602001206040516020016104d09291906110ee565b60408051601f19818403018152908290528051602090910120631674750f60e21b825291506001600160a01b038416906359d1d43c9061051490849060040161133b565b60006040518083038186803b15801561052c57600080fd5b505afa158015610540573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105689190810190611042565b85858151811061057457fe5b602002602001015160600151836014811061058b57fe5b602002015250600101610466565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b69fd4ab8484815181106105d557fe5b6020026020010151600001518585815181106105ed57fe5b6020026020010151600001516040518363ffffffff1660e01b815260040161061692919061112c565b60206040518083038186803b15801561062e57600080fd5b505afa158015610642573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106669190610f4d565b83838151811061067257fe5b602002602001015160400190151590811515815250507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b971a6bf8484815181106106c357fe5b6020026020010151600001516040518263ffffffff1660e01b81526004016106eb9190611118565b60206040518083038186803b15801561070357600080fd5b505afa158015610717573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073b91906110b5565b83838151811061074757fe5b6020908102919091018101510152506001016102c8565b6060816001600160a01b031663da35c6646040518163ffffffff1660e01b815260040160206040518083038186803b15801561079957600080fd5b505afa1580156107ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d191906110b5565b67ffffffffffffffff811180156107e757600080fd5b5060405190808252806020026020018201604052801561082157816020015b61080e610cb1565b8152602001906001900390816108065790505b50905060005b81518110156109d7576000806000806000806000808a6001600160a01b031663013cf08b8a6001016040518263ffffffff1660e01b815260040161086b9190611332565b6101006040518083038186803b15801561088457600080fd5b505afa158015610898573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bc9190610e0b565b97509750975097509750975097509750604051806101200160405280896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001831515815260200182151581526020018c6001600160a01b0316633e4f49e68c6001016040518263ffffffff1660e01b815260040161094d9190611332565b60206040518083038186803b15801561096557600080fd5b505afa158015610979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099d9190611023565b60068111156109a857fe5b8152508a8a815181106109b757fe5b602002602001018190525050505050505050508080600101915050610827565b50919050565b6000806000806000866001600160a01b0316639ae697bf876040518263ffffffff1660e01b8152600401610a119190611118565b60206040518083038186803b158015610a2957600080fd5b505afa158015610a3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6191906110b5565b6040516317977c6160e01b81529095506001600160a01b038816906317977c6190610a90908990600401611118565b60206040518083038186803b158015610aa857600080fd5b505afa158015610abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae091906110b5565b93508315610b7257604051631f27a4f360e11b81526001600160a01b03881690633e4f49e690610b14908790600401611332565b60206040518083038186803b158015610b2c57600080fd5b505afa158015610b40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b649190611023565b6006811115610b6f57fe5b92505b60405163a72edda360e01b81526001600160a01b0388169063a72edda390610b9e908990600401611118565b60206040518083038186803b158015610bb657600080fd5b505afa158015610bca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bee91906110b5565b604051631976849960e21b81529092506001600160a01b038816906365da126490610c1d908990600401611118565b60206040518083038186803b158015610c3557600080fd5b505afa158015610c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6d9190610def565b90509295509295909350565b604051806080016040528060006001600160a01b0316815260200160008152602001600015158152602001610cac610cfd565b905290565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905290610100820190610cac565b6040518061028001604052806014905b6060815260200190600190039081610d0d5790505090565b600082601f830112610d35578081fd5b8135610d48610d43826113b2565b61138b565b818152915060208083019084810160005b84811015610dc1578135870188603f820112610d7457600080fd5b83810135610d84610d43826113d2565b81815260408b81848601011115610d9a57600080fd5b82818501888401375060009181018601919091528552509282019290820190600101610d59565b505050505092915050565b600060208284031215610ddd578081fd5b8135610de881611426565b9392505050565b600060208284031215610e00578081fd5b8151610de881611426565b600080600080600080600080610100898b031215610e27578384fd5b8851610e3281611426565b60208a0151909850610e4381611426565b8097505060408901519550606089015194506080890151935060a0890151925060c0890151610e718161143e565b60e08a0151909250610e828161143e565b809150509295985092959890939650565b60008060408385031215610ea5578182fd5b823567ffffffffffffffff80821115610ebc578384fd5b818501915085601f830112610ecf578384fd5b8135610edd610d43826113b2565b80828252602080830192508086018a828387028901011115610efd578889fd5b8896505b84871015610f1f578035845260019690960195928101928101610f01565b509096508701359350505080821115610f36578283fd5b50610f4385828601610d25565b9150509250929050565b600060208284031215610f5e578081fd5b8151610de88161143e565b60008060408385031215610f7b578182fd5b8235610f8681611426565b91506020830135610f9681611426565b809150509250929050565b600080600060408486031215610fb5578283fd5b8335610fc081611426565b9250602084013567ffffffffffffffff80821115610fdc578384fd5b818601915086601f830112610fef578384fd5b813581811115610ffd578485fd5b8760208083028501011115611010578485fd5b6020830194508093505050509250925092565b600060208284031215611034578081fd5b815160078110610de8578182fd5b600060208284031215611053578081fd5b815167ffffffffffffffff811115611069578182fd5b8201601f81018413611079578182fd5b8051611087610d43826113d2565b81815285602083850101111561109b578384fd5b6110ac8260208301602086016113f6565b95945050505050565b6000602082840312156110c6578081fd5b5051919050565b6001600160a01b03169052565b15159052565b600781106110ea57fe5b9052565b918252602082015260400190565b6000825161110e8184602087016113f6565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b602080825282518282018190526000919060409081850190868401855b8281101561120357815180516001600160a01b031685528681015161118a888701826110cd565b508086015185870152606080820151908601526080808201519086015260a0808201519086015260c0808201516111c3828801826110da565b505060e0808201516111d7828801826110da565b505061010090810151906111ed868201836110e0565b5050610120939093019290850190600101611163565b5091979650505050505050565b6000602080830181845280855180835260408601915060408482028701019250838701855b828110156112e157878503603f19018452815180516001600160a01b03168652868101518787015260408082015115159087015260609081015160809187018290529086016103008701895b60148110156112cc57888203607f19018352835180516112a18185611332565b6112ae82828f86016113f6565b958c0195948c0194601f91909101601f191601925050600101611281565b50965050509285019290850190600101611235565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156113265783518352928401929184019160010161130a565b50909695505050505050565b90815260200190565b908152604060208201819052600390820152621d5c9b60ea1b606082015260800190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b60405181810167ffffffffffffffff811182821017156113aa57600080fd5b604052919050565b600067ffffffffffffffff8211156113c8578081fd5b5060209081020190565b600067ffffffffffffffff8211156113e8578081fd5b50601f01601f191660200190565b60005b838110156114115781810151838201526020016113f9565b83811115611420576000848401525b50505050565b6001600160a01b038116811461143b57600080fd5b50565b801515811461143b57600080fdfea26469706673582212209edead2cf5d16a9f09d7d75c5aa042cb00130c9febd0bf0e908fbf9c3f34f1a164736f6c634300060c0033";class Qb extends Ka{constructor(...e){e.length>1?super(...e):super(Yb,Zb,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Yb)}static connect(e,t){return new $a(e,Yb,t)}}Qb.bytecode=Zb,Qb.abi=Yb;const ef=[{inputs:[{internalType:"contract Governance",name:"governance",type:"address"}],name:"getAllProposals",outputs:[{components:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"},{internalType:"enum Governance.ProposalState",name:"state",type:"uint8"}],internalType:"struct GovernanceAggregator.Proposal[]",name:"proposals",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract Governance",name:"governance",type:"address"},{internalType:"address[]",name:"accs",type:"address[]"}],name:"getGovernanceBalances",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract Governance",name:"governance",type:"address"},{internalType:"address",name:"account",type:"address"}],name:"getUserData",outputs:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"latestProposalId",type:"uint256"},{internalType:"uint256",name:"latestProposalIdState",type:"uint256"},{internalType:"uint256",name:"timelock",type:"uint256"},{internalType:"address",name:"delegatee",type:"address"}],stateMutability:"view",type:"function"}],tf="0x608060405234801561001057600080fd5b50610ab8806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063029fcae7146100465780639853d9221461006f578063f4eeefe91461008f575b600080fd5b61005961005436600461082b565b6100b3565b60405161006691906109e3565b60405180910390f35b61008261007d36600461072c565b6101c7565b6040516100669190610919565b6100a261009d3660046107f3565b610446565b604051610066959493929190610a30565b60608167ffffffffffffffff811180156100cc57600080fd5b506040519080825280602002602001820160405280156100f6578160200160208202803683370190505b50905060005b828110156101bf57846001600160a01b0316639ae697bf85858481811061011f57fe5b9050602002016020810190610134919061072c565b6040518263ffffffff1660e01b81526004016101509190610905565b60206040518083038186803b15801561016857600080fd5b505afa15801561017c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a091906108cc565b8282815181106101ac57fe5b60209081029190910101526001016100fc565b509392505050565b6060816001600160a01b031663da35c6646040518163ffffffff1660e01b815260040160206040518083038186803b15801561020257600080fd5b505afa158015610216573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023a91906108cc565b67ffffffffffffffff8111801561025057600080fd5b5060405190808252806020026020018201604052801561028a57816020015b6102776106e2565b81526020019060019003908161026f5790505b50905060005b8151811015610440576000806000806000806000808a6001600160a01b031663013cf08b8a6001016040518263ffffffff1660e01b81526004016102d49190610a27565b6101006040518083038186803b1580156102ed57600080fd5b505afa158015610301573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610325919061076b565b97509750975097509750975097509750604051806101200160405280896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001831515815260200182151581526020018c6001600160a01b0316633e4f49e68c6001016040518263ffffffff1660e01b81526004016103b69190610a27565b60206040518083038186803b1580156103ce57600080fd5b505afa1580156103e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040691906108ad565b600681111561041157fe5b8152508a8a8151811061042057fe5b602002602001018190525050505050505050508080600101915050610290565b50919050565b6000806000806000866001600160a01b0316639ae697bf876040518263ffffffff1660e01b815260040161047a9190610905565b60206040518083038186803b15801561049257600080fd5b505afa1580156104a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ca91906108cc565b6040516317977c6160e01b81529095506001600160a01b038816906317977c61906104f9908990600401610905565b60206040518083038186803b15801561051157600080fd5b505afa158015610525573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054991906108cc565b935083156105db57604051631f27a4f360e11b81526001600160a01b03881690633e4f49e69061057d908790600401610a27565b60206040518083038186803b15801561059557600080fd5b505afa1580156105a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cd91906108ad565b60068111156105d857fe5b92505b60405163a72edda360e01b81526001600160a01b0388169063a72edda390610607908990600401610905565b60206040518083038186803b15801561061f57600080fd5b505afa158015610633573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065791906108cc565b604051631976849960e21b81529092506001600160a01b038816906365da126490610686908990600401610905565b60206040518083038186803b15801561069e57600080fd5b505afa1580156106b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d6919061074f565b90509295509295909350565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290529061010082015290565b60006020828403121561073d578081fd5b813561074881610a5c565b9392505050565b600060208284031215610760578081fd5b815161074881610a5c565b600080600080600080600080610100898b031215610787578384fd5b885161079281610a5c565b60208a01519098506107a381610a5c565b8097505060408901519550606089015194506080890151935060a0890151925060c08901516107d181610a74565b60e08a01519092506107e281610a74565b809150509295985092959890939650565b60008060408385031215610805578182fd5b823561081081610a5c565b9150602083013561082081610a5c565b809150509250929050565b60008060006040848603121561083f578283fd5b833561084a81610a5c565b9250602084013567ffffffffffffffff80821115610866578384fd5b818601915086601f830112610879578384fd5b813581811115610887578485fd5b876020808302850101111561089a578485fd5b6020830194508093505050509250925092565b6000602082840312156108be578081fd5b815160078110610748578182fd5b6000602082840312156108dd578081fd5b5051919050565b6001600160a01b03169052565b15159052565b6007811061090157fe5b9052565b6001600160a01b0391909116815260200190565b602080825282518282018190526000919060409081850190868401855b828110156109d657815180516001600160a01b031685528681015161095d888701826108e4565b508086015185870152606080820151908601526080808201519086015260a0808201519086015260c080820151610996828801826108f1565b505060e0808201516109aa828801826108f1565b505061010090810151906109c0868201836108f7565b5050610120939093019290850190600101610936565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610a1b578351835292840192918401916001016109ff565b50909695505050505050565b90815260200190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b6001600160a01b0381168114610a7157600080fd5b50565b8015158114610a7157600080fdfea2646970667358221220c68e065ff95a2c91c1e5904ff4ba8c709291d5227b10049b437e89d35c33af4d64736f6c634300060c0033";class af extends Ka{constructor(...e){e.length>1?super(...e):super(ef,tf,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(ef)}static connect(e,t){return new $a(e,ef,t)}}af.bytecode=tf,af.abi=ef;var nf=Object.freeze({__proto__:null,Aggregator__factory:Qb,GovernanceAggregator__factory:af,relayerAggregatorSol:Kb});const bf=[{inputs:[{internalType:"contract IDeployer",name:"_deployer",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"addr",type:"address"}],name:"Deployed",type:"event"},{inputs:[{internalType:"bytes",name:"_initCode",type:"bytes"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"deploy",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"contract IDeployer",name:"",type:"address"}],stateMutability:"view",type:"function"}],ff="0x60a060405234801561001057600080fd5b506040516103a93803806103a98339818101604052602081101561003357600080fd5b50516001600160a01b0381161561004a5780610060565b73ce0042b868300000d44a59004da54a005ffdcf9f5b60601b6001600160601b031916608052604051309032907f09e48df7857bd0c1e0d31bb8a85d42cf1874817895f171c917f6ee2cea73ec2090600090a35060805160601c6102e96100c06000398061010d528061029152506102e96000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634af63f021461003b578063d5f39488146100e5575b600080fd5b6100e36004803603604081101561005157600080fd5b81019060208101813564010000000081111561006c57600080fd5b82018360208201111561007e57600080fd5b803590602001918460018302840111640100000000831117156100a057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610109915050565b005b6100ed61028f565b604080516001600160a01b039092168252519081900360200190f35b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634af63f0284846040518363ffffffff1660e01b81526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561018e578181015183820152602001610176565b50505050905090810190601f1680156101bb5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156101db57600080fd5b505af11580156101ef573d6000803e3d6000fd5b505050506040513d602081101561020557600080fd5b505190506001600160a01b038116610254576040805162461bcd60e51b815260206004820152600d60248201526c11195c1b1bde4819985a5b1959609a1b604482015290519081900360640190fd5b6040516001600160a01b0382169033907f09e48df7857bd0c1e0d31bb8a85d42cf1874817895f171c917f6ee2cea73ec2090600090a3505050565b7f00000000000000000000000000000000000000000000000000000000000000008156fea26469706673582212209824ac82969e56106968b899123a2ecac48f942b4ed3dcae2ced58022879d32364736f6c634300060c0033";class df extends Ka{constructor(...e){e.length>1?super(...e):super(bf,ff,e[0])}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}deploy(e,t){return super.deploy(e,t||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(bf)}static connect(e,t){return new $a(e,bf,t)}}df.bytecode=ff,df.abi=bf;const sf=[{inputs:[{internalType:"bytes",name:"_initCode",type:"bytes"},{internalType:"bytes32",name:"_salt",type:"bytes32"}],name:"deploy",outputs:[{internalType:"address payable",name:"createdContract",type:"address"}],stateMutability:"nonpayable",type:"function"}];class cf{static createInterface(){return new ba(sf)}static connect(e,t){return new $a(e,sf,t)}}cf.abi=sf;var rf=Object.freeze({__proto__:null,Deployer__factory:df,IDeployer__factory:cf});const pf=[{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address",name:"_spender",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveExactToken",outputs:[],stateMutability:"nonpayable",type:"function"}];class uf{static createInterface(){return new ba(pf)}static connect(e,t){return new $a(e,pf,t)}}uf.abi=pf;const of=[{inputs:[{internalType:"address",name:"_governance",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract ITornadoInstance",name:"instance",type:"address"},{indexed:!1,internalType:"enum InstanceRegistry.InstanceState",name:"state",type:"uint8"}],name:"InstanceStateUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tornadoRouter",type:"address"}],name:"RouterRegistered",type:"event"},{inputs:[],name:"getAllInstanceAddresses",outputs:[{internalType:"contract ITornadoInstance[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAllInstances",outputs:[{components:[{internalType:"contract ITornadoInstance",name:"addr",type:"address"},{components:[{internalType:"bool",name:"isERC20",type:"bool"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"enum InstanceRegistry.InstanceState",name:"state",type:"uint8"},{internalType:"uint24",name:"uniswapPoolSwappingFee",type:"uint24"},{internalType:"uint32",name:"protocolFeePercentage",type:"uint32"}],internalType:"struct InstanceRegistry.Instance",name:"instance",type:"tuple"}],internalType:"struct InstanceRegistry.Tornado[]",name:"result",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"instance",type:"address"}],name:"getPoolToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"contract ITornadoInstance",name:"addr",type:"address"},{components:[{internalType:"bool",name:"isERC20",type:"bool"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"enum InstanceRegistry.InstanceState",name:"state",type:"uint8"},{internalType:"uint24",name:"uniswapPoolSwappingFee",type:"uint24"},{internalType:"uint32",name:"protocolFeePercentage",type:"uint32"}],internalType:"struct InstanceRegistry.Instance",name:"instance",type:"tuple"}],internalType:"struct InstanceRegistry.Tornado[]",name:"_instances",type:"tuple[]"},{internalType:"address",name:"_router",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"instanceIds",outputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],name:"instances",outputs:[{internalType:"bool",name:"isERC20",type:"bool"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"enum InstanceRegistry.InstanceState",name:"state",type:"uint8"},{internalType:"uint24",name:"uniswapPoolSwappingFee",type:"uint24"},{internalType:"uint32",name:"protocolFeePercentage",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_instanceId",type:"uint256"}],name:"removeInstance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"router",outputs:[{internalType:"contract ITornadoRouter",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"instance",type:"address"},{internalType:"uint32",name:"newFee",type:"uint32"}],name:"setProtocolFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"routerAddress",type:"address"}],name:"setTornadoRouter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract ITornadoInstance",name:"addr",type:"address"},{components:[{internalType:"bool",name:"isERC20",type:"bool"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"enum InstanceRegistry.InstanceState",name:"state",type:"uint8"},{internalType:"uint24",name:"uniswapPoolSwappingFee",type:"uint24"},{internalType:"uint32",name:"protocolFeePercentage",type:"uint32"}],internalType:"struct InstanceRegistry.Instance",name:"instance",type:"tuple"}],internalType:"struct InstanceRegistry.Tornado",name:"_tornado",type:"tuple"}],name:"updateInstance",outputs:[],stateMutability:"nonpayable",type:"function"}],yf="0x60a060405234801561001057600080fd5b5060405161146738038061146783398101604081905261002f91610044565b60601b6001600160601b031916608052610072565b600060208284031215610055578081fd5b81516001600160a01b038116811461006b578182fd5b9392505050565b60805160601c6113c46100a3600039806103e552806105c052806105ed528061073a52806107e652506113c46000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80636c9be937116100715780636c9be9371461014d578063908e3b371461016057806392b65a4114610173578063b5b899b714610186578063cf552c8914610199578063f887ea40146101ac576100b4565b8063032bb443146100b957806310c13ac3146100e65780631ad058a9146100fb5780634ba16d9d1461011057806352c228e3146101235780635aa6e67514610138575b600080fd5b6100cc6100c7366004610e89565b6101b4565b6040516100dd959493929190611194565b60405180910390f35b6100ee6101fe565b6040516100dd9190611097565b61010e610109366004610ec8565b6102af565b005b61010e61011e366004610e89565b6103da565b61012b61047f565b6040516100dd91906110e4565b6101406105be565b6040516100dd9190611069565b61010e61015b366004610fd3565b6105e2565b61014061016e366004610e89565b610709565b61010e610181366004610f80565b61072f565b610140610194366004611005565b6107b4565b61010e6101a7366004611005565b6107db565b610140610a77565b60016020526000908152604090205460ff8082169161010081046001600160a01b031691600160a81b82041690600160b01b810462ffffff1690600160c81b900463ffffffff1685565b60025460609067ffffffffffffffff8111801561021a57600080fd5b50604051908082528060200260200182016040528015610244578160200160208202803683370190505b50905060005b6002548110156102ab576002818154811061026157fe5b9060005260206000200160009054906101000a90046001600160a01b031682828151811061028b57fe5b6001600160a01b039092166020928302919091019091015260010161024a565b5090565b600054610100900460ff16806102c857506102c8610a8c565b806102d6575060005460ff16155b6102fb5760405162461bcd60e51b81526004016102f290611214565b60405180910390fd5b600054610100900460ff16158015610326576000805460ff1961ff0019909116610100171660011790555b6000805462010000600160b01b031916620100006001600160a01b038516021781555b83518110156103c25761036e84828151811061036157fe5b6020026020010151610a92565b600284828151811061037c57fe5b6020908102919091018101515182546001808201855560009485529290932090920180546001600160a01b0319166001600160a01b039093169290921790915501610349565b5080156103d5576000805461ff00191690555b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104225760405162461bcd60e51b81526004016102f2906112c2565b6000805462010000600160b01b031916620100006001600160a01b038416021790556040517f94df8c3a8087dce110e5fbc5acf380c83c94bbd31b2c8ed4c08e1396a696e1a890610474908390611069565b60405180910390a150565b60025460609067ffffffffffffffff8111801561049b57600080fd5b506040519080825280602002602001820160405280156104d557816020015b6104c2610d64565b8152602001906001900390816104ba5790505b50905060005b6002548110156102ab576000600282815481106104f457fe5b60009182526020808320909101546040805180820182526001600160a01b03928316808252808652600180865295839020835160a081018552815460ff8082161515835261010082049097168289015292985092969587019592949093850192600160a81b909204169081111561056757fe5b600181111561057257fe5b81529054600160b01b810462ffffff166020830152600160c81b900463ffffffff16604090910152905283518490849081106105aa57fe5b6020908102919091010152506001016104db565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461062a5760405162461bcd60e51b81526004016102f2906112c2565b600061063c6080830160608401610fb8565b600181111561064757fe5b14156106655760405162461bcd60e51b81526004016102f29061128b565b6000600160006106786020850185610e89565b6001600160a01b03168152602081019190915260400160002054600160a81b900460ff1660018111156106a757fe5b14156106ef5760026106bc6020830183610e89565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b039092169190911790555b61070661070136839003830183610fea565b610a92565b50565b6001600160a01b038082166000908152600160205260409020546101009004165b919050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107775760405162461bcd60e51b81526004016102f2906112c2565b6001600160a01b039091166000908152600160205260409020805463ffffffff909216600160c81b0263ffffffff60c81b19909216919091179055565b600281815481106107c157fe5b6000918252602090912001546001600160a01b0316905081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108235760405162461bcd60e51b81526004016102f2906112c2565b60006002828154811061083257fe5b60009182526020808320909101546001600160a01b03908116808452600190925260409092205490925060ff8116916101009091041681156109705760008054604051636eb1769f60e11b81526001600160a01b038085169263dd62ed3e926108aa926201000090920490911690889060040161107d565b60206040518083038186803b1580156108c257600080fd5b505afa1580156108d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fa919061101d565b9050801561096e5760008054604051633ef1078360e01b8152620100009091046001600160a01b031691633ef107839161093b9186918991906004016111db565b600060405180830381600087803b15801561095557600080fd5b505af1158015610969573d6000803e3d6000fd5b505050505b505b6001600160a01b038316600090815260016020526040902080546001600160e81b03191690556002805460001981019081106109a857fe5b600091825260209091200154600280546001600160a01b0390921691869081106109ce57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506002805480610a0757fe5b6001900381819060005260206000200160006101000a8154906001600160a01b0302191690559055826001600160a01b03167f02826f62d88a4d9f1978eb9c06f8663f642d032908e65a915d5898f3585421c06000604051610a6991906111ff565b60405180910390a250505050565b6000546201000090046001600160a01b031681565b303b1590565b60208181015182516001600160a01b0390811660009081526001808552604091829020845181549686015160ff1990971690151517610100600160a81b0319166101009690941695909502929092178085559083015192939291839160ff60a81b191690600160a81b908490811115610b0757fe5b02179055506060820151815460809093015163ffffffff16600160c81b0263ffffffff60c81b1962ffffff909216600160b01b0262ffffff60b01b19909416939093171691909117905560208101515115610d1457600081600001516001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b9b57600080fd5b505afa158015610baf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190610eac565b90508160200151602001516001600160a01b0316816001600160a01b031614610c0e5760405162461bcd60e51b81526004016102f290611262565b600080548351604051636eb1769f60e11b81526001600160a01b038086169363dd62ed3e93610c4b9362010000909204909216919060040161107d565b60206040518083038186803b158015610c6357600080fd5b505afa158015610c77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9b919061101d565b905080610d11576000548351604051633ef1078360e01b8152620100009092046001600160a01b031691633ef1078391610cde91869190600019906004016111db565b600060405180830381600087803b158015610cf857600080fd5b505af1158015610d0c573d6000803e3d6000fd5b505050505b50505b80600001516001600160a01b03167f02826f62d88a4d9f1978eb9c06f8663f642d032908e65a915d5898f3585421c0826020015160400151604051610d5991906111ff565b60405180910390a250565b604051806040016040528060006001600160a01b03168152602001610d87610d8c565b905290565b6040805160a0810182526000808252602082018190529091820190815260006020820181905260409091015290565b8035610dc681611348565b92915050565b803560028110610dc657600080fd5b600081830360c0811215610ded578182fd5b610df760406112ea565b91508235610e0481611348565b825260a0601f1982011215610e1857600080fd5b50610e2360a06112ea565b6020830135610e318161135d565b81526040830135610e4181611348565b6020820152610e538460608501610dcc565b60408201526080830135610e668161136b565b606082015260a0830135610e798161137c565b6080820152602082015292915050565b600060208284031215610e9a578081fd5b8135610ea581611348565b9392505050565b600060208284031215610ebd578081fd5b8151610ea581611348565b60008060408385031215610eda578081fd5b823567ffffffffffffffff811115610ef0578182fd5b8301601f81018513610f00578182fd5b8035610f13610f0e82611311565b6112ea565b808282526020808301925080850160c08a838288028901011115610f35578788fd5b8796505b85871015610f6157610f4b8b83610ddb565b8552600196909601959382019390810190610f39565b5050819650610f7289828a01610dbb565b955050505050509250929050565b60008060408385031215610f92578182fd5b8235610f9d81611348565b91506020830135610fad8161137c565b809150509250929050565b600060208284031215610fc9578081fd5b610ea58383610dcc565b600060c08284031215610fe4578081fd5b50919050565b600060c08284031215610ffb578081fd5b610ea58383610ddb565b600060208284031215611016578081fd5b5035919050565b60006020828403121561102e578081fd5b5051919050565b15159052565b6001600160a01b03169052565b6002811061105257fe5b9052565b62ffffff169052565b63ffffffff169052565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156110d85783516001600160a01b0316835292840192918401916001016110b3565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b828110156111875781516111158151611331565b855286015180516111299088870190611035565b868101516111398787018261103b565b5085810151606061114c81880183611048565b8201519050608061115f87820183611056565b9190910151905061117360a086018261105f565b5060c0939093019290850190600101611101565b5091979650505050505050565b85151581526001600160a01b038516602082015260a081016111b58561133d565b604083015262ffffff8416606083015263ffffffff831660808301529695505050505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020810161120c8361133d565b825292915050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600f908201526e24b731b7b93932b1ba103a37b5b2b760891b604082015260600190565b6020808252601f908201527f5573652072656d6f7665496e7374616e6365282920666f722072656d6f766500604082015260600190565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b60405181810167ffffffffffffffff8111828210171561130957600080fd5b604052919050565b600067ffffffffffffffff821115611327578081fd5b5060209081020190565b6001600160a01b031690565b806002811061072a57fe5b6001600160a01b038116811461070657600080fd5b801515811461070657600080fd5b62ffffff8116811461070657600080fd5b63ffffffff8116811461070657600080fdfea26469706673582212207c46c875176b62100d16a46c273e615cd9eb5336dbcd238b33b227f39ff9106564736f6c634300060c0033";class lf extends Ka{constructor(...e){e.length>1?super(...e):super(of,yf,e[0])}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}deploy(e,t){return super.deploy(e,t||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(of)}static connect(e,t){return new $a(e,of,t)}}lf.bytecode=yf,lf.abi=of;var mf=Object.freeze({__proto__:null,ITornadoRouter__factory:uf,InstanceRegistry__factory:lf});const Tf=[{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}];class hf{static createInterface(){return new ba(Tf)}static connect(e,t){return new $a(e,Tf,t)}}hf.abi=Tf;const gf=[{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"instanceFeeWithUpdate",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"nonpayable",type:"function"}];class wf{static createInterface(){return new ba(gf)}static connect(e,t){return new $a(e,gf,t)}}wf.abi=gf;const vf=[{inputs:[{internalType:"address",name:"_torn",type:"address"},{internalType:"address",name:"_governance",type:"address"},{internalType:"address",name:"_ens",type:"address"},{internalType:"address",name:"_staking",type:"address"},{internalType:"address",name:"_feeManager",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"minStakeAmount",type:"uint256"}],name:"MinimumStakeAmount",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"}],name:"RelayerBalanceNullified",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"relayer",type:"bytes32"},{indexed:!1,internalType:"string",name:"ensName",type:"string"},{indexed:!1,internalType:"address",name:"relayerAddress",type:"address"},{indexed:!1,internalType:"uint256",name:"stakedAmount",type:"uint256"}],name:"RelayerRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"}],name:"RelayerUnregistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"tornadoRouter",type:"address"}],name:"RouterRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"amountStakeAdded",type:"uint256"}],name:"StakeAddedToRelayer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"uint256",name:"amountBurned",type:"uint256"}],name:"StakeBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"address",name:"worker",type:"address"}],name:"WorkerRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"relayer",type:"address"},{indexed:!1,internalType:"address",name:"worker",type:"address"}],name:"WorkerUnregistered",type:"event"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"relayer",type:"address"},{internalType:"contract ITornadoInstance",name:"pool",type:"address"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ens",outputs:[{internalType:"contract IENS",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeManager",outputs:[{internalType:"contract IFeeManager",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"}],name:"getRelayerBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"}],name:"getRelayerEnsHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_tornadoRouter",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"toResolve",type:"address"}],name:"isRelayer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"address",name:"toResolve",type:"address"}],name:"isRelayerRegistered",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"minStakeAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"}],name:"nullifyBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"ensName",type:"string"},{internalType:"uint256",name:"stake",type:"uint256"},{internalType:"address[]",name:"workersToRegister",type:"address[]"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"ensName",type:"string"},{internalType:"uint256",name:"stake",type:"uint256"},{internalType:"address[]",name:"workersToRegister",type:"address[]"},{internalType:"address",name:"relayer",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"registerPermit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"address",name:"worker",type:"address"}],name:"registerWorker",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"relayers",outputs:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"bytes32",name:"ensHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"minAmount",type:"uint256"}],name:"setMinStakeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tornadoRouterAddress",type:"address"}],name:"setTornadoRouter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"uint256",name:"stake",type:"uint256"}],name:"stakeToRelayer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"uint256",name:"stake",type:"uint256"},{internalType:"address",name:"staker",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"stakeToRelayerPermit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"staking",outputs:[{internalType:"contract TornadoStakingRewards",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"tornadoRouter",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"}],name:"unregisterRelayer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"worker",type:"address"}],name:"unregisterWorker",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"workers",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Mf="0x6101206040523480156200001257600080fd5b5060405162001fab38038062001fab83398101604081905262000035916200006d565b6001600160601b0319606095861b811660805293851b841660a05291841b831660c052831b821660e05290911b166101005262000105565b600080600080600060a0868803121562000085578081fd5b85516200009281620000ec565b6020870151909550620000a581620000ec565b6040870151909450620000b881620000ec565b6060870151909350620000cb81620000ec565b6080870151909250620000de81620000ec565b809150509295509295909350565b6001600160a01b03811681146200010257600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c611e1662000195600039806106785280610bf352508061075452806108af5280610ea852806111685250806105625280610f99525080610351528061080952806108dc52806109e75280610ce4525080610a205280610aa95280610c375280610e8552806111455250611e166000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80635aa6e675116100de578063c4d66de811610097578063e37e8bcc11610071578063e37e8bcc14610305578063e43fdb3c14610318578063eb4af0451461032b578063f18876841461033e57610173565b8063c4d66de8146102d7578063d0fb0203146102ea578063d990231d146102f257610173565b80635aa6e6751461026e57806385a2968314610276578063adf898a414610289578063ae53941c14610291578063b69fd4ab146102b1578063b971a6bf146102c457610173565b80634ba16d9d116101305780634ba16d9d146101f75780634cb16c2e1461020a5780634cf088d9146102125780634d4efd041461021a5780635300f8411461022d578063541d55481461024e57610173565b806314d92307146101785780632e6506491461018d5780633523dc85146101a05780633f15457f146101b35780634048a257146101d157806345a11cec146101e4575b600080fd5b61018b610186366004611612565b610346565b005b61018b61019b36600461164a565b610414565b61018b6101ae366004611612565b610460565b6101bb610560565b6040516101c891906118f5565b60405180910390f35b6101bb6101df366004611612565b610584565b61018b6101f2366004611682565b61059f565b61018b610205366004611612565b6107fe565b6101bb610898565b6101bb6108ad565b61018b610228366004611612565b6108d1565b61024061023b366004611612565b6109ac565b6040516101c89291906118cb565b61026161025c366004611612565b6109c5565b6040516101c891906119a1565b6101bb6109e5565b61018b6102843660046116f7565b610a09565b6101bb610aa7565b6102a461029f366004611612565b610acb565b6040516101c891906119ac565b6102616102bf36600461164a565b610af9565b6102a46102d2366004611612565b610b20565b61018b6102e5366004611612565b610b4b565b6101bb610bf1565b61018b6103003660046116cc565b610c15565b61018b6103133660046117fc565b610c20565b61018b610326366004611785565b610cc4565b61018b6103393660046118b3565b610cd9565b6102a4610d56565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103975760405162461bcd60e51b815260040161038e90611ae4565b60405180910390fd5b6103a0816108d1565b6001600160a01b038116600090815260026020908152604080832083815560010183905560039091529081902080546001600160a01b0319169055517f490a66cc56c789979052c7052fc0c10a6c4627d8e6165caec80db97a4c383521906104099083906118f5565b60405180910390a150565b3360008181526003602052604090205483906001600160a01b038083169116146104505760405162461bcd60e51b815260040161038e90611c83565b61045a8484610d5c565b50505050565b6001600160a01b03811633146104a9576001600160a01b038181166000908152600360205260409020541633146104a95760405162461bcd60e51b815260040161038e90611cd8565b6001600160a01b0380821660008181526003602052604090205490911614156104e45760405162461bcd60e51b815260040161038e90611b8b565b6001600160a01b03808216600090815260036020526040908190205490517fb2a8e18b9e887f502d65c1683e60b723fa582a6903ea4e8eb23907a19c1ce8a0926105319216908490611909565b60405180910390a16001600160a01b0316600090815260036020526040902080546001600160a01b0319169055565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052600090815260409020546001600160a01b031681565b6000546201000090046001600160a01b031633146105cf5760405162461bcd60e51b815260040161038e90611a64565b6001600160a01b03808416600090815260036020526040902054168061062d576001600160a01b0383811660009081526003602052604090205416156106275760405162461bcd60e51b815260040161038e90611be8565b506107f9565b826001600160a01b0316816001600160a01b03161461065e5760405162461bcd60e51b815260040161038e90611c83565b604051630bbefce160e21b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632efbf384906106ad9086906004016118f5565b602060405180830381600087803b1580156106c757600080fd5b505af11580156106db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ff919061162e565b6001600160a01b03858116600090815260026020526040902054911691506107279082610df5565b6001600160a01b038086166000908152600260205260409081902092909255905163338610af60e01b81527f00000000000000000000000000000000000000000000000000000000000000009091169063338610af9061078b9084906004016119ac565b600060405180830381600087803b1580156107a557600080fd5b505af11580156107b9573d6000803e3d6000fd5b505050507f659f33fc6677bebf3a9bf3101092792e31f35766d0358e54577bdd91a655f6a084826040516107ee929190611988565b60405180910390a150505b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108465760405162461bcd60e51b815260040161038e90611ae4565b6000805462010000600160b01b031916620100006001600160a01b038416021790556040517f94df8c3a8087dce110e5fbc5acf380c83c94bbd31b2c8ed4c08e1396a696e1a8906104099083906118f5565b6000546201000090046001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109195760405162461bcd60e51b815260040161038e90611ae4565b6001600160a01b038082166000818152600360205260409020549091169081146109555760405162461bcd60e51b815260040161038e90611d74565b6001600160a01b03811660009081526002602052604080822091909155517fafa759fb3c68e89eaaba359f0930ab40c24875b73cc9e2f6a38b0180019eb8f3906109a09084906118f5565b60405180910390a15050565b6002602052600090815260409020805460019091015482565b6001600160a01b0390811660009081526003602052604090205416151590565b7f000000000000000000000000000000000000000000000000000000000000000081565b60405163d505accf60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d505accf90610a6190889030908b908a908a908a908a90600401611947565b600060405180830381600087803b158015610a7b57600080fd5b505af1158015610a8f573d6000803e3d6000fd5b50505050610a9e858888610e3e565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b03908116600090815260036020908152604080832054909316825260029052206001015490565b6001600160a01b038181166000908152600360205260409020548116908316145b92915050565b6001600160a01b03908116600090815260036020908152604080832054909316825260029052205490565b600054610100900460ff1680610b645750610b64610f4c565b80610b72575060005460ff16155b610b8e5760405162461bcd60e51b815260040161038e90611b3d565b600054610100900460ff16158015610bb9576000805460ff1961ff0019909116610100171660011790555b6000805462010000600160b01b031916620100006001600160a01b038516021790558015610bed576000805461ff00191690555b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b610bed338383610e3e565b60405163d505accf60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d505accf90610c7890889030908d908a908a908a908a90600401611947565b600060405180830381600087803b158015610c9257600080fd5b505af1158015610ca6573d6000803e3d6000fd5b50505050610cb8858b8b8b8b8b610f52565b50505050505050505050565b610cd2338686868686610f52565b5050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d215760405162461bcd60e51b815260040161038e90611ae4565b60018190556040517f404663163d528ec45288abc4389b81bd96fabf858ff57577ebd4ee7f15d7b0a6906104099083906119ac565b60015481565b6001600160a01b038181166000908152600360205260409020541615610d945760405162461bcd60e51b815260040161038e90611b0d565b6001600160a01b038181166000908152600360205260409081902080546001600160a01b03191692851692909217909155517fcde75bd02c5f739608c891bcd9aa6809e6c4a7035ac7b9f3fd5fea756db74724906109a09084908490611909565b6000610e3783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611287565b9392505050565b6001600160a01b0380831660008181526003602052604090205490911614610e785760405162461bcd60e51b815260040161038e90611abf565b610ecd6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016847f0000000000000000000000000000000000000000000000000000000000000000846112b3565b6001600160a01b038216600090815260026020526040902054610ef190829061130b565b6001600160a01b0383166000908152600260205260409081902091909155517f1275dbe2a271b2b822e60f1d44894fa5fb337e7e2dc6a200205b1a5b17c07d6490610f3f9084908490611988565b60405180910390a1505050565b303b1590565b6000610f9386868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061133092505050565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166302571be3836040518263ffffffff1660e01b8152600401610fe391906119ac565b60206040518083038186803b158015610ffb57600080fd5b505afa15801561100f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611033919061162e565b905073d4416b13d2b3a9abae7acd5d6c2bbdbe256864016001600160a01b0382168114156110735760405162461bcd60e51b815260040161038e90611c15565b816001600160a01b0316896001600160a01b0316146110a45760405162461bcd60e51b815260040161038e90611ca9565b6001600160a01b0389811660009081526003602052604090205416156110dc5760405162461bcd60e51b815260040161038e90611bbb565b6001600160a01b03891660009081526002602052604090206001810154156111165760405162461bcd60e51b815260040161038e90611a38565b6001548710156111385760405162461bcd60e51b815260040161038e90611d50565b61118d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168b7f00000000000000000000000000000000000000000000000000000000000000008a6112b3565b7f1275dbe2a271b2b822e60f1d44894fa5fb337e7e2dc6a200205b1a5b17c07d648a886040516111be929190611988565b60405180910390a1868155600181018490556001600160a01b038a16600081815260036020526040812080546001600160a01b0319169092179091555b8581101561123b57600087878381811061121157fe5b90506020020160208101906112269190611612565b90506112328c82610d5c565b506001016111fb565b507f9ca7c9c762eff27b021608f232b4c4b8f9b8bf9a3d322297e47cc4209a67d5e2848a8a8d8b6040516112739594939291906119b5565b60405180910390a150505050505050505050565b600081848411156112ab5760405162461bcd60e51b815260040161038e9190611a05565b505050900390565b61045a846323b872dd60e01b8585856040516024016112d493929190611923565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261133d565b600082820183811015610e375760405162461bcd60e51b815260040161038e90611a88565b6000610b1a8260006113cc565b6060611392826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114369092919063ffffffff16565b8051909150156107f957808060200190518101906113b09190611765565b6107f95760405162461bcd60e51b815260040161038e90611d06565b6000818351116113de57506000610b1a565b60006113ea848461144d565b90506113fb848285016001016113cc565b611406858584611492565b6040516020016114179291906118cb565b6040516020818303038152906040528051906020012091505092915050565b606061144584846000856114ae565b949350505050565b6000805b8351818401141580156114855750838184018151811061146d57fe5b6020910101516001600160f81b031916601760f91b14155b15610e3757600101611451565b6000835182840111156114a457600080fd5b5091016020012090565b60606114b985611572565b6114d55760405162461bcd60e51b815260040161038e90611c4c565b60006060866001600160a01b031685876040516114f291906118d9565b60006040518083038185875af1925050503d806000811461152f576040519150601f19603f3d011682016040523d82523d6000602084013e611534565b606091505b509150915081156115485791506114459050565b8051156115585780518082602001fd5b8360405162461bcd60e51b815260040161038e9190611a05565b3b151590565b60008083601f840112611589578182fd5b50813567ffffffffffffffff8111156115a0578182fd5b60208301915083602080830285010111156115ba57600080fd5b9250929050565b60008083601f8401126115d2578182fd5b50813567ffffffffffffffff8111156115e9578182fd5b6020830191508360208285010111156115ba57600080fd5b803560ff81168114610b1a57600080fd5b600060208284031215611623578081fd5b8135610e3781611dc8565b60006020828403121561163f578081fd5b8151610e3781611dc8565b6000806040838503121561165c578081fd5b823561166781611dc8565b9150602083013561167781611dc8565b809150509250929050565b600080600060608486031215611696578081fd5b83356116a181611dc8565b925060208401356116b181611dc8565b915060408401356116c181611dc8565b809150509250925092565b600080604083850312156116de578182fd5b82356116e981611dc8565b946020939093013593505050565b600080600080600080600060e0888a031215611711578283fd5b873561171c81611dc8565b965060208801359550604088013561173381611dc8565b9450606088013593506117498960808a01611601565b925060a0880135915060c0880135905092959891949750929550565b600060208284031215611776578081fd5b81518015158114610e37578182fd5b60008060008060006060868803121561179c578081fd5b853567ffffffffffffffff808211156117b3578283fd5b6117bf89838a016115c1565b90975095506020880135945060408801359150808211156117de578283fd5b506117eb88828901611578565b969995985093965092949392505050565b6000806000806000806000806000806101008b8d03121561181b578283fd5b8a3567ffffffffffffffff80821115611832578485fd5b61183e8e838f016115c1565b909c509a5060208d0135995060408d013591508082111561185d578485fd5b5061186a8d828e01611578565b90985096505060608b013561187e81611dc8565b945060808b013593506118948c60a08d01611601565b925060c08b0135915060e08b013590509295989b9194979a5092959850565b6000602082840312156118c4578081fd5b5035919050565b918252602082015260400190565b600082516118eb818460208701611d9c565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b600086825260806020830152846080830152848660a084013760a08583018101919091526001600160a01b039390931660408201526060810191909152601f909201601f19169091010192915050565b6000602082528251806020840152611a24816040850160208701611d9c565b601f01601f19169190910160400192915050565b6020808252601290820152717265676973746572656420616c726561647960701b604082015260600190565b6020808252600a90820152696f6e6c792070726f787960b01b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252600b908201526a085c9959da5cdd195c995960aa1b604082015260600190565b6020808252600f908201526e6f6e6c7920676f7665726e616e636560881b604082015260600190565b60208082526016908201527563616e277420737465616c20616e206164647265737360501b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526016908201527531b0b73a103ab73932b3b4b9ba32b91036b0b9ba32b960511b604082015260600190565b60208082526013908201527231b0b73a103932b3b4b9ba32b91030b3b0b4b760691b604082015260600190565b60208082526013908201527227b7363c9031bab9ba37b6903932b630bcb2b960691b604082015260600190565b6020808252601a908201527f6f6e6c7920756e7772617070656420656e7320646f6d61696e73000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252600c908201526b37b7363c903932b630bcb2b960a11b604082015260600190565b60208082526015908201527437b7363c9032b739903237b6b0b4b71037bbb732b960591b604082015260600190565b60208082526014908201527337b7363c9037bbb732b91037b3103bb7b935b2b960611b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252600a9082015269216d696e5f7374616b6560b01b604082015260600190565b6020808252600e908201526d36bab9ba1031329036b0b9ba32b960911b604082015260600190565b60005b83811015611db7578181015183820152602001611d9f565b8381111561045a5750506000910152565b6001600160a01b0381168114611ddd57600080fd5b5056fea26469706673582212206f4cc4f67dba9ba55aab193d3511cc31e3b32c37cef7bd7df74b3ebff2b3ca5b64736f6c634300060c0033";class _f extends Ka{constructor(...e){e.length>1?super(...e):super(vf,Mf,e[0])}getDeployTransaction(e,t,a,n,b,f){return super.getDeployTransaction(e,t,a,n,b,f||{})}deploy(e,t,a,n,b,f){return super.deploy(e,t,a,n,b,f||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(vf)}static connect(e,t){return new $a(e,vf,t)}}_f.bytecode=Mf,_f.abi=vf;var xf=Object.freeze({__proto__:null,IENS__factory:hf,IFeeManager__factory:wf,RelayerRegistry__factory:_f});const If=[{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolver",outputs:[{internalType:"contract Resolver",name:"",type:"address"}],stateMutability:"view",type:"function"}];class Ef{static createInterface(){return new ba(If)}static connect(e,t){return new $a(e,If,t)}}Ef.abi=If;const Rf=[{inputs:[{internalType:"bytes32[]",name:"domains",type:"bytes32[]"}],name:"bulkResolve",outputs:[{internalType:"address[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolve",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Of="0x608060405234801561001057600080fd5b5061036d806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635c23bdf51461003b578063f9e5423414610074575b600080fd5b6100586004803603602081101561005157600080fd5b5035610167565b604080516001600160a01b039092168252519081900360200190f35b6101176004803603602081101561008a57600080fd5b8101906020810181356401000000008111156100a557600080fd5b8201836020820111156100b757600080fd5b803590602001918460208302840111640100000000831117156100d957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610292945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561015357818101518382015260200161013b565b505050509050019250505060405180910390f35b600080610172610333565b60011461019357738595bfb0d940dfedc98943fa8a907091203f25ee6101a4565b6e0c2e074ec69a0dfb2997ba6c7d2e1e5b9050806001600160a01b0316630178b8bf846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156101ea57600080fd5b505afa1580156101fe573d6000803e3d6000fd5b505050506040513d602081101561021457600080fd5b505160408051631d9dabef60e11b81526004810186905290516001600160a01b0390921691633b3b57de91602480820192602092909190829003018186803b15801561025f57600080fd5b505afa158015610273573d6000803e3d6000fd5b505050506040513d602081101561028957600080fd5b50519392505050565b6060815167ffffffffffffffff811180156102ac57600080fd5b506040519080825280602002602001820160405280156102d6578160200160208202803683370190505b50905060005b825181101561032d576103018382815181106102f457fe5b6020026020010151610167565b82828151811061030d57fe5b6001600160a01b03909216602092830291909101909101526001016102dc565b50919050565b469056fea26469706673582212201849a5e31df8347ec61f3d54e8cef603101becea24443df7d4e43cc42ff12a7564736f6c634300060c0033";class kf extends Ka{constructor(...e){e.length>1?super(...e):super(Rf,Of,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Rf)}static connect(e,t){return new $a(e,Rf,t)}}kf.bytecode=Of,kf.abi=Rf;const Pf=[{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}];class Af{static createInterface(){return new ba(Pf)}static connect(e,t){return new $a(e,Pf,t)}}Af.abi=Pf;var Cf=Object.freeze({__proto__:null,ENS__factory:Ef,EnsResolve__factory:kf,Resolver__factory:Af});const Nf=[{inputs:[{internalType:"bytes32",name:"tokenAddress",type:"bytes32"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Airdrop.Recipient[]",name:"targets",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"bytes32[]",name:"domains",type:"bytes32[]"}],name:"bulkResolve",outputs:[{internalType:"address[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"addr",type:"bytes32"}],name:"resolve",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Df="0x608060405234801561001057600080fd5b5060405161039938038061039983398101604081905261002f91610220565b8181600061003c836101aa565b90506000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161006c91906102e4565b60206040518083038186803b15801561008457600080fd5b505afa158015610098573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100bc91906102cc565b116100e25760405162461bcd60e51b81526004016100d990610311565b60405180910390fd5b60005b82518110156101a557816001600160a01b031663a9059cbb84838151811061010957fe5b60200260200101516000015185848151811061012157fe5b6020026020010151602001516040518363ffffffff1660e01b815260040161014a9291906102f8565b602060405180830381600087803b15801561016457600080fd5b505af1158015610178573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019c91906101f9565b506001016100e5565b506000ff5b60601c90565b6000604082840312156101c1578081fd5b6101cb6040610353565b82519091506001600160a01b03811681146101e557600080fd5b808252506020820151602082015292915050565b60006020828403121561020a578081fd5b81518015158114610219578182fd5b9392505050565b6000806040808486031215610233578182fd5b8351602080860151919450906001600160401b03811115610252578384fd5b8501601f81018713610262578384fd5b805161027561027082610379565b610353565b81815283810190838501868402850186018b1015610291578788fd5b8794505b838510156102bb576102a78b826101b0565b835260019490940193918501918601610295565b508096505050505050509250929050565b6000602082840312156102dd578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526022908201527f42616c616e636520697320302c2061697264726f7020616c726561647920646f6040820152616e6560f01b606082015260800190565b6040518181016001600160401b038111828210171561037157600080fd5b604052919050565b60006001600160401b0382111561038e578081fd5b506020908102019056fe";class Sf extends Ka{constructor(...e){e.length>1?super(...e):super(Nf,Df,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Nf)}static connect(e,t){return new $a(e,Nf,t)}}Sf.bytecode=Df,Sf.abi=Nf;const Uf=[{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"registry",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"resolver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"address",name:"_addr",type:"address"}],name:"setAddr",outputs:[],stateMutability:"nonpayable",type:"function"}],Vf="0x608060405234801561001057600080fd5b5061044b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80630178b8bf1461005c5780633b3b57de146100855780637ef5029814610098578063ac9650d8146100ab578063d5fa2b00146100cb575b600080fd5b61006f61006a3660046102bc565b6100e0565b60405161007c919061031e565b60405180910390f35b61006f6100933660046102bc565b6100e5565b61006f6100a63660046102bc565b610100565b6100be6100b936600461024d565b61011b565b60405161007c9190610332565b6100de6100d93660046102d4565b61021f565b005b503090565b6000908152602081905260409020546001600160a01b031690565b6000602081905290815260409020546001600160a01b031681565b60608167ffffffffffffffff8111801561013457600080fd5b5060405190808252806020026020018201604052801561016857816020015b60608152602001906001900390816101535790505b50905060005b8281101561021857600060603086868581811061018757fe5b905060200281019061019991906103c9565b6040516101a792919061030e565b600060405180830381855af49150503d80600081146101e2576040519150601f19603f3d011682016040523d82523d6000602084013e6101e7565b606091505b5091509150816101f657600080fd5b8084848151811061020357fe5b6020908102919091010152505060010161016e565b5092915050565b60009182526020829052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b6000806020838503121561025f578182fd5b823567ffffffffffffffff80821115610276578384fd5b818501915085601f830112610289578384fd5b813581811115610297578485fd5b86602080830285010111156102aa578485fd5b60209290920196919550909350505050565b6000602082840312156102cd578081fd5b5035919050565b600080604083850312156102e6578182fd5b8235915060208301356001600160a01b0381168114610303578182fd5b809150509250929050565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b6000602080830181845280855180835260408601915060408482028701019250838701855b828110156103bc57878503603f1901845281518051808752885b8181101561038c578281018901518882018a01528801610371565b8181111561039c578989838a0101525b50601f01601f191695909501860194509285019290850190600101610357565b5092979650505050505050565b6000808335601e198436030181126103df578283fd5b83018035915067ffffffffffffffff8211156103f9578283fd5b60200191503681900382131561040e57600080fd5b925092905056fea26469706673582212202e44de42b72aec6265acc191876b290bc887c846ffca216ac5d28a16fd49092564736f6c634300060c0033";class Lf extends Ka{constructor(...e){e.length>1?super(...e):super(Uf,Vf,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Uf)}static connect(e,t){return new $a(e,Uf,t)}}Lf.bytecode=Vf,Lf.abi=Uf;const Ff=[{inputs:[{internalType:"address",name:"_governance",type:"address"},{internalType:"uint256",name:"_pausePeriod",type:"uint256"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct TORN.Recipient[]",name:"_vesting",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"}],name:"Allowed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"}],name:"Disallowed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[{internalType:"address[]",name:"target",type:"address[]"}],name:"addToAllowedList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"allowedTransferee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"canUnpauseAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"chainID",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"chainId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"decision",type:"bool"}],name:"changeTransferability",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"fakeTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"target",type:"address[]"}],name:"removeFromAllowedList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address payable",name:"_to",type:"address"},{internalType:"uint256",name:"_balance",type:"uint256"}],name:"rescueTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"setChainId",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_fakeTimestamp",type:"uint256"}],name:"setFakeTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Gf="0x60c06040523480156200001157600080fd5b506040516200298e3803806200298e8339810160408190526200003491620006d6565b604080518082018252600b81526a0a8dee4dcc2c8de86c2e6d60ab1b6020808301918252835180850190945260048452632a27a92760e11b90840152815186938693869390926200008891600391620005e4565b5080516200009e906004906020840190620005e4565b50506005805460ff1916601217905550620000b8620001f8565b506008805460ff199081169091556001600160601b0319606085901b1660a0526001600160a01b0384166000908152600960205260408120805490921660011790915583905b82518110156200017b5760008382815181106200011757fe5b60200260200101516000015190506200014f818584815181106200013757fe5b602002602001015160200151620002b460201b60201c565b6001600160a01b03166000908152600960205260409020805460ff1916600190811790915501620000fe565b506200019f836200018b62000397565b620003b360201b62000d721790919060201c565b608052620001ac620003e4565b620001b66200045b565b6a084595161401484a00000014620001eb5760405162461bcd60e51b8152600401620001e290620008a8565b60405180910390fd5b5050505050505062000946565b6000806200020562000461565b905060007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6200023462000467565b805160209182012060408051808201825260018152603160f81b90840152516200028693927fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6918791309101620007be565b60408051601f1981840301815291815281516020928301206000948552600790925290922082905550905090565b6001600160a01b038216620002dd5760405162461bcd60e51b8152600401620001e290620008df565b620002eb6000838362000501565b6200030781600254620003b360201b62000d721790919060201c565b6002556001600160a01b038216600090815260208181526040909120546200033a91839062000d72620003b3821b17901c565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906200038b90859062000916565b60405180910390a35050565b6000620003ae620005bc60201b62000d9e1760201c565b905090565b600082820183811015620003db5760405162461bcd60e51b8152600401620001e290620007ea565b90505b92915050565b60085460ff16156200040a5760405162461bcd60e51b8152600401620001e2906200087e565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25862000442620005d7565b604051620004519190620007aa565b60405180910390a1565b60025490565b600b5490565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015620004f75780601f10620004cb57610100808354040283529160200191620004f7565b820191906000526020600020905b815481529060010190602001808311620004d957829003601f168201915b5050505050905090565b62000519838383620005b760201b620007421760201c565b62000523620005db565b15806200054857506001600160a01b03831660009081526009602052604090205460ff165b806200056c57506001600160a01b03821660009081526009602052604090205460ff165b6200058b5760405162461bcd60e51b8152600401620001e29062000858565b6001600160a01b038216301415620005b75760405162461bcd60e51b8152600401620001e29062000821565b505050565b6000600a54600014620005d257600a54620003ae565b504290565b3390565b60085460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200062757805160ff191683800117855562000657565b8280016001018555821562000657579182015b82811115620006575782518255916020019190600101906200063a565b506200066592915062000669565b5090565b5b808211156200066557600081556001016200066a565b80516001600160a01b0381168114620003de57600080fd5b600060408284031215620006aa578081fd5b620006b660406200091f565b9050620006c4838362000680565b81526020820151602082015292915050565b600080600060608486031215620006eb578283fd5b620006f7858562000680565b9250602080850151925060408086015160018060401b03808211156200071b578485fd5b818801915088601f8301126200072f578485fd5b8151818111156200073e578586fd5b6200074d85868302016200091f565b8181528581019250838601858302850187018c10156200076b578788fd5b8794505b828510156200079957620007848c8262000698565b8452600194909401939286019285016200076f565b508096505050505050509250925092565b6001600160a01b0391909116815260200190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526017908201527f544f524e3a20696e76616c696420726563697069656e74000000000000000000604082015260600190565b6020808252600c908201526b1513d4938e881c185d5cd95960a21b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601c908201527f544f524e3a20696e636f727265637420646973747269627574696f6e00000000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b6040518181016001600160401b03811182821017156200093e57600080fd5b604052919050565b60805160a05160601c612008620009866000398061056f52806106975280610764528061081d5280610a215250806107bc5280610d2052506120086000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637ecebe0011610104578063adb61832116100a2578063d505accf11610071578063d505accf1461038d578063dc0f0d12146103a0578063dd62ed3e146103a8578063ef0e2ff4146103bb576101cf565b8063adb6183214610357578063adc879e91461035f578063c565882714610367578063cea9d26f1461037a576101cf565b806395d89b41116100de57806395d89b41146103215780639a8a059214610329578063a457c2d714610331578063a9059cbb14610344576101cf565b80637ecebe00146102e857806381893c7c146102fb578063885ad0cf1461030e576101cf565b80633c8d76d1116101715780635c975abb1161014b5780635c975abb146102a75780635d4545a0146102af57806370a08231146102c257806379cc6790146102d5576101cf565b80633c8d76d11461026a57806342966c681461027f5780635aa6e67514610292576101cf565b806318160ddd116101ad57806318160ddd1461022757806323b872dd1461022f578063313ce567146102425780633950935114610257576101cf565b806301ec0fab146101d457806306fdde03146101f2578063095ea7b314610207575b600080fd5b6101dc6103ce565b6040516101e99190611e68565b60405180910390f35b6101fa6103d4565b6040516101e99190611943565b61021a610215366004611708565b61046b565b6040516101e991906118ba565b6101dc610489565b61021a61023d366004611653565b61048f565b61024a610516565b6040516101e99190611e71565b61021a610265366004611708565b61051f565b61027d610278366004611733565b61056d565b005b61027d61028d36600461181c565b610681565b61029a610695565b6040516101e9919061188d565b61021a6106b9565b61021a6102bd3660046115ff565b6106c2565b6101dc6102d03660046115ff565b6106d7565b61027d6102e3366004611708565b6106f2565b6101dc6102f63660046115ff565b610747565b61027d6103093660046117d0565b610762565b61027d61031c366004611733565b61081b565b6101fa610922565b6101dc610983565b61021a61033f366004611708565b610989565b61021a610352366004611708565b6109f1565b6101dc610a05565b6101dc610a14565b61027d61037536600461181c565b610a1a565b61027d610388366004611808565b610a1f565b61027d61039b366004611693565b610bdd565b6101dc610d1e565b6101dc6103b636600461161b565b610d42565b61027d6103c936600461181c565b610d6d565b600a5481565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104605780601f1061043557610100808354040283529160200191610460565b820191906000526020600020905b81548152906001019060200180831161044357829003601f168201915b505050505090505b90565b600061047f610478610db7565b8484610dbb565b5060015b92915050565b60025490565b600061049c848484610e6f565b61050c846104a8610db7565b61050785604051806060016040528060288152602001611f62602891396001600160a01b038a166000908152600160205260408120906104e6610db7565b6001600160a01b031681526020810191909152604001600020549190610f84565b610dbb565b5060019392505050565b60055460ff1690565b600061047f61052c610db7565b84610507856001600061053d610db7565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610d72565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661059f610db7565b6001600160a01b0316146105ce5760405162461bcd60e51b81526004016105c590611de4565b60405180910390fd5b60005b815181101561067d576000600960008484815181106105ec57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f9ef90a89b00db1a1891a357dc96b2a273add9d883e378c350d22bad87a9d7d3082828151811061065857fe5b602002602001015160405161066d919061188d565b60405180910390a16001016105d1565b5050565b61069261068c610db7565b82610fb0565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60085460ff1690565b60096020526000908152604090205460ff1681565b6001600160a01b031660009081526020819052604090205490565b600061072482604051806060016040528060248152602001611f8a6024913961071d866103b6610db7565b9190610f84565b905061073883610732610db7565b83610dbb565b6107428383610fb0565b505050565b6001600160a01b031660009081526006602052604090205490565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610794610db7565b6001600160a01b0316146107ba5760405162461bcd60e51b81526004016105c590611de4565b7f00000000000000000000000000000000000000000000000000000000000000006107e3610a05565b116108005760405162461bcd60e51b81526004016105c590611bd9565b80156108135761080e611092565b610692565b6106926110fe565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661084d610db7565b6001600160a01b0316146108735760405162461bcd60e51b81526004016105c590611de4565b60005b815181101561067d5760016009600084848151811061089157fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f77a7dbc6ad97703ad411a8d5edfcd1df382fb34b076a90898b11884f7ebdcc058282815181106108fd57fe5b6020026020010151604051610912919061188d565b60405180910390a1600101610876565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104605780601f1061043557610100808354040283529160200191610460565b600b5481565b600061047f610996610db7565b8461050785604051806060016040528060258152602001611fae60259139600160006109c0610db7565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610f84565b600061047f6109fe610db7565b8484610e6f565b6000610a0f610d9e565b905090565b600b5490565b600a55565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610a51610db7565b6001600160a01b031614610a775760405162461bcd60e51b81526004016105c590611de4565b6001600160a01b038216610a9d5760405162461bcd60e51b81526004016105c590611d58565b6001600160a01b038316610b06574760008215610ac357610abe8284611157565b610ac5565b815b6040519091506001600160a01b0385169082156108fc029083906000818181858888f19350505050158015610afe573d6000803e3d6000fd5b505050610742565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190610b3590309060040161188d565b60206040518083038186803b158015610b4d57600080fd5b505afa158015610b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b859190611834565b905060008215610b9e57610b998284611157565b610ba0565b815b905060008111610bc25760405162461bcd60e51b81526004016105c590611e31565b610bd66001600160a01b038616858361116d565b5050505050565b83610be6610a05565b1115610c045760405162461bcd60e51b81526004016105c590611ace565b6001600160a01b0387166000908152600660209081526040808320549051610c57927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928c928c928c92918c91016118c5565b6040516020818303038152906040528051906020012090506000611901610c7c6111c3565b83604051602001610c8f93929190611868565b6040516020818303038152906040528051906020012090506000610cb582878787611202565b9050896001600160a01b0316816001600160a01b031614610ce85760405162461bcd60e51b81526004016105c590611c20565b6001600160a01b038a16600090815260066020526040902080546001019055610d128a8a8a610dbb565b50505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600b55565b600082820183811015610d975760405162461bcd60e51b81526004016105c590611a60565b9392505050565b6000600a54600014610db257600a54610a0f565b504290565b3390565b6001600160a01b038316610de15760405162461bcd60e51b81526004016105c590611cdd565b6001600160a01b038216610e075760405162461bcd60e51b81526004016105c590611a1e565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610e62908590611e68565b60405180910390a3505050565b6001600160a01b038316610e955760405162461bcd60e51b81526004016105c590611c98565b6001600160a01b038216610ebb5760405162461bcd60e51b81526004016105c5906119ad565b610ec68383836112fa565b610f0381604051806060016040528060268152602001611f3c602691396001600160a01b0386166000908152602081905260409020549190610f84565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610f329082610d72565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610e62908590611e68565b60008184841115610fa85760405162461bcd60e51b81526004016105c59190611943565b505050900390565b6001600160a01b038216610fd65760405162461bcd60e51b81526004016105c590611c57565b610fe2826000836112fa565b61101f81604051806060016040528060228152602001611f1a602291396001600160a01b0385166000908152602081905260409020549190610f84565b6001600160a01b0383166000908152602081905260409020556002546110459082611399565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611086908590611e68565b60405180910390a35050565b60085460ff166110b45760405162461bcd60e51b81526004016105c5906119f0565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6110e7610db7565b6040516110f4919061188d565b60405180910390a1565b60085460ff16156111215760405162461bcd60e51b81526004016105c590611b6d565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110e7610db7565b60008183106111665781610d97565b5090919050565b6107428363a9059cbb60e01b848460405160240161118c9291906118a1565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526113db565b600080600760006111d2610a14565b8152602081019190915260400160002054905080156111f2579050610468565b6111fa61146a565b915050610468565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156112445760405162461bcd60e51b81526004016105c590611b2b565b8360ff16601b148061125957508360ff16601c145b6112755760405162461bcd60e51b81526004016105c590611b97565b60006001868686866040516000815260200160405260405161129a9493929190611925565b6020604051602081039080840390855afa1580156112bc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166112ef5760405162461bcd60e51b81526004016105c590611976565b90505b949350505050565b611305838383610742565b61130d6106b9565b158061133157506001600160a01b03831660009081526009602052604090205460ff165b8061135457506001600160a01b03821660009081526009602052604090205460ff165b6113705760405162461bcd60e51b81526004016105c590611b05565b6001600160a01b0382163014156107425760405162461bcd60e51b81526004016105c590611a97565b6000610d9783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f84565b6060611430826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115209092919063ffffffff16565b805190915015610742578080602001905181019061144e91906117ec565b6107425760405162461bcd60e51b81526004016105c590611d9a565b600080611475610a14565b905060007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6114a26103d4565b805160209182012060408051808201825260018152603160f81b90840152516114f293927fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc69187913091016118f9565b60408051601f1981840301815291815281516020928301206000948552600790925290922082905550905090565b60606112f284846000856060611535856115ee565b6115515760405162461bcd60e51b81526004016105c590611d21565b60006060866001600160a01b0316858760405161156e919061184c565b60006040518083038185875af1925050503d80600081146115ab576040519150601f19603f3d011682016040523d82523d6000602084013e6115b0565b606091505b509150915081156115c45791506112f29050565b8051156115d45780518082602001fd5b8360405162461bcd60e51b81526004016105c59190611943565b3b151590565b803561048381611ef6565b600060208284031215611610578081fd5b8135610d9781611ef6565b6000806040838503121561162d578081fd5b823561163881611ef6565b9150602083013561164881611ef6565b809150509250929050565b600080600060608486031215611667578081fd5b833561167281611ef6565b9250602084013561168281611ef6565b929592945050506040919091013590565b600080600080600080600060e0888a0312156116ad578283fd5b87356116b881611ef6565b965060208801356116c881611ef6565b95506040880135945060608801359350608088013560ff811681146116eb578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561171a578182fd5b823561172581611ef6565b946020939093013593505050565b60006020808385031215611745578182fd5b823567ffffffffffffffff81111561175b578283fd5b8301601f8101851361176b578283fd5b803561177e61177982611ea6565b611e7f565b818152838101908385018584028501860189101561179a578687fd5b8694505b838510156117c4576117b089826115f4565b83526001949094019391850191850161179e565b50979650505050505050565b6000602082840312156117e1578081fd5b8135610d9781611f0b565b6000602082840312156117fd578081fd5b8151610d9781611f0b565b600080600060608486031215611667578283fd5b60006020828403121561182d578081fd5b5035919050565b600060208284031215611845578081fd5b5051919050565b6000825161185e818460208701611ec6565b9190910192915050565b60f09390931b6001600160f01b03191683526002830191909152602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082528251806020840152611962816040850160208701611ec6565b601f01601f19169190910160400192915050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526017908201527f544f524e3a20696e76616c696420726563697069656e74000000000000000000604082015260600190565b6020808252601d908201527f45524332305065726d69743a206578706972656420646561646c696e65000000604082015260600190565b6020808252600c908201526b1513d4938e881c185d5cd95960a21b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b60208082526027908201527f544f524e3a2063616e6e6f74206368616e6765207472616e736665726162696c6040820152661a5d1e481e595d60ca1b606082015260800190565b6020808252601e908201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526022908201527f544f524e3a2063616e206e6f742073656e6420746f207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252602d908201527f544f524e3a206f6e6c7920676f7665726e616e63652063616e20706572666f7260408201526c36903a3434b99030b1ba34b7b760991b606082015260800190565b6020808252601e908201527f544f524e3a20747279696e6720746f2073656e6420302062616c616e63650000604082015260600190565b90815260200190565b60ff91909116815260200190565b60405181810167ffffffffffffffff81118282101715611e9e57600080fd5b604052919050565b600067ffffffffffffffff821115611ebc578081fd5b5060209081020190565b60005b83811015611ee1578181015183820152602001611ec9565b83811115611ef0576000848401525b50505050565b6001600160a01b038116811461069257600080fd5b801515811461069257600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220c25cb2cef98080abbebec9b5719a4f46d638fbe559a3ab7a9de64272855c3c1064736f6c634300060c0033";class Bf extends Ka{constructor(...e){e.length>1?super(...e):super(Ff,Gf,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ff)}static connect(e,t){return new $a(e,Ff,t)}}Bf.bytecode=Gf,Bf.abi=Ff;const jf=[{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"fakeTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fakeTimestamp",type:"uint256"}],name:"setFakeTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"}],Hf="0x608060405234801561001057600080fd5b5060d28061001f6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c806301ec0fab146041578063adb61832146059578063c565882714605f575b600080fd5b6047607b565b60408051918252519081900360200190f35b60476081565b607960048036036020811015607357600080fd5b50356097565b005b60005481565b60008054156090576000546092565b425b905090565b60005556fea2646970667358221220b2410460a5b24aec9983bcf8349aa3b589a0dff9120af5b704feae536a65813064736f6c634300060c0033";class zf extends Ka{constructor(...e){e.length>1?super(...e):super(jf,Hf,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(jf)}static connect(e,t){return new $a(e,jf,t)}}zf.bytecode=Hf,zf.abi=jf;const $f=[{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_beneficiary",type:"address"},{internalType:"uint256",name:"_startTimestamp",type:"uint256"},{internalType:"uint256",name:"_cliffInMonths",type:"uint256"},{internalType:"uint256",name:"_durationInMonths",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Released",type:"event"},{inputs:[],name:"SECONDS_PER_MONTH",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"beneficiary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"cliffInMonths",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"durationInMonths",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"fakeTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"release",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"released",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fakeTimestamp",type:"uint256"}],name:"setFakeTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"vestedAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],Xf="0x61012060405234801561001157600080fd5b50604051610d2e380380610d2e833981810160405260a081101561003457600080fd5b5080516020820151604083015160608401516080909401519293919290919084848484846001600160a01b0384166100b3576040805162461bcd60e51b815260206004820152601b60248201527f42656e65666963696172792063616e6e6f7420626520656d7074790000000000604482015290519081900360640190fd5b80821115610108576040805162461bcd60e51b815260206004820152601e60248201527f436c6966662069732067726561746572207468616e206475726174696f6e0000604482015290519081900360640190fd5b6001600160601b0319606086811b821660a05285901b1660805261010081905260c082905282156101395782610141565b610141610154565b60e0525061018698505050505050505050565b600061016861016d60201b6105b81760201c565b905090565b600060015460001461018157600154610168565b504290565b60805160601c60a05160601c60c05160e05161010051610b366101f86000398061024452806103bc528061041e52508061019352806101cf52806105725250806102115280610534525080610289528061030952806104b5528061059652508061016d52806104d75250610b366000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063928d89ae11610071578063928d89ae146101195780639613252114610121578063adb6183214610129578063c565882714610131578063e6fd48bc1461014e578063fc0c546a14610156576100b4565b806301ec0fab146100b957806310786deb146100d357806338af3eed146100db57806344b1231f146100ff57806367097a4b1461010757806386d1a69f1461010f575b600080fd5b6100c161015e565b60408051918252519081900360200190f35b6100c1610164565b6100e361016b565b604080516001600160a01b039092168252519081900360200190f35b6100c161018f565b6100c161041c565b610117610440565b005b6100c1610532565b6100c1610556565b6100c161055c565b6101176004803603602081101561014757600080fd5b503561056b565b6100c1610570565b6100e3610594565b60015481565b62278d0081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000006101ba61055c565b10156101c857506000610419565b60006101fc7f00000000000000000000000000000000000000000000000000000000000000006101f661055c565b906105d1565b9050600061020d8262278d0061061c565b90507f000000000000000000000000000000000000000000000000000000000000000081101561024257600092505050610419565b7f0000000000000000000000000000000000000000000000000000000000000000811061030557604080516370a0823160e01b815230600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b1580156102cf57600080fd5b505afa1580156102e3573d6000803e3d6000fd5b505050506040513d60208110156102f957600080fd5b50519250610419915050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561037457600080fd5b505afa158015610388573d6000803e3d6000fd5b505050506040513d602081101561039e57600080fd5b505160008054919250906103b390839061065e565b905060006103eb7f00000000000000000000000000000000000000000000000000000000000000006103e584876106b8565b9061061c565b90506000610404600054836105d190919063ffffffff16565b90506104108482610711565b96505050505050505b90565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061044a61018f565b905060008111610498576040805162461bcd60e51b81526020600482015260146024820152734e6f20746f6b656e7320746f2072656c6561736560601b604482015290519081900360640190fd5b6000546104a5908261065e565b6000556104fc6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083610727565b6040805182815290517ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c5659181900360200190a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005481565b60006105666105b8565b905090565b600155565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006001546000146105cc57600154610566565b504290565b600061061383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061077e565b90505b92915050565b600061061383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610815565b600082820183811015610613576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826106c757506000610616565b828202828482816106d457fe5b04146106135760405162461bcd60e51b8152600401808060200182810382526021815260200180610ab66021913960400191505060405180910390fd5b60008183106107205781610613565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261077990849061087a565b505050565b6000818484111561080d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107d25781810151838201526020016107ba565b50505050905090810190601f1680156107ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836108645760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107d25781810151838201526020016107ba565b50600083858161087057fe5b0495945050505050565b60606108cf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661092b9092919063ffffffff16565b805190915015610779578080602001905160208110156108ee57600080fd5b50516107795760405162461bcd60e51b815260040180806020018281038252602a815260200180610ad7602a913960400191505060405180910390fd5b606061093a8484600085610942565b949350505050565b606061094d85610aaf565b61099e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106109dd5780518252601f1990920191602091820191016109be565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a3f576040519150601f19603f3d011682016040523d82523d6000602084013e610a44565b606091505b50915091508115610a5857915061093a9050565b805115610a685780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156107d25781810151838201526020016107ba565b3b15159056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220852e02606e74d747094138d7e10fc9f005278a953559d85ca961b67f95c9fa8f64736f6c634300060c0033";class Wf extends Ka{constructor(...e){e.length>1?super(...e):super($f,Xf,e[0])}getDeployTransaction(e,t,a,n,b,f){return super.getDeployTransaction(e,t,a,n,b,f||{})}deploy(e,t,a,n,b,f){return super.deploy(e,t,a,n,b,f||{})}connect(e){return super.connect(e)}static createInterface(){return new ba($f)}static connect(e,t){return new $a(e,$f,t)}}Wf.bytecode=Xf,Wf.abi=$f;const qf=[{inputs:[{internalType:"bytes32",name:"_torn",type:"bytes32"},{internalType:"bytes32",name:"_governance",type:"bytes32"},{internalType:"uint256",name:"_duration",type:"uint256"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Voucher.Recipient[]",name:"_airdrops",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"allowedTransferee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"domains",type:"bytes32[]"}],name:"bulkResolve",outputs:[{internalType:"address[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"expiresAt",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"fakeTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"redeem",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"rescueExpiredTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"addr",type:"bytes32"}],name:"resolve",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_fakeTimestamp",type:"uint256"}],name:"setFakeTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Jf="0x60e06040523480156200001157600080fd5b5060405162001b7838038062001b78833981016040819052620000349162000476565b8383838360405180606001604052806026815260200162001b5260269139604051806040016040528060058152602001643b2a27a92760d91b8152508160039080519060200190620000889291906200038d565b5080516200009e9060049060208401906200038d565b50506005805460ff1916601217905550620000b984620001b7565b60601b6001600160601b031916608052620000d483620001b7565b60601b6001600160601b03191660c0526200010782620000f3620001bd565b620001d960201b6200089d1790919060201c565b60a05260005b8151811015620001a857620001598282815181106200012857fe5b6020026020010151600001518383815181106200014157fe5b6020026020010151602001516200021160201b60201c565b6001600660008484815181106200016c57fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020805460ff19169115159190911790556001016200010d565b5050505050505050506200061d565b60601c90565b6000620001d4620002f460201b620008c91760201c565b905090565b6000828201838110156200020a5760405162461bcd60e51b8152600401620002019062000548565b60405180910390fd5b9392505050565b6001600160a01b0382166200023a5760405162461bcd60e51b81526004016200020190620005b6565b62000248600083836200030f565b6200026481600254620001d960201b6200089d1790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620002979183906200089d620001d9821b17901c565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90620002e8908590620005ed565b60405180910390a35050565b60006007546000146200030a57600754620001d4565b504290565b620003278383836200038860201b620008e21760201c565b6001600160a01b03821615806200034557506001600160a01b038316155b806200036957506001600160a01b03831660009081526006602052604090205460ff165b620003885760405162461bcd60e51b815260040162000201906200057f565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620003d057805160ff191683800117855562000400565b8280016001018555821562000400579182015b8281111562000400578251825591602001919060010190620003e3565b506200040e92915062000412565b5090565b5b808211156200040e576000815560010162000413565b6000604082840312156200043b578081fd5b620004476040620005f6565b82519091506001600160a01b03811681146200046257600080fd5b808252506020820151602082015292915050565b600080600080608085870312156200048c578384fd5b8451935060208086015193506040808701519350606087015160018060401b0380821115620004b9578485fd5b818901915089601f830112620004cd578485fd5b815181811115620004dc578586fd5b620004eb8586830201620005f6565b8181528581019250838601858302850187018d101562000509578788fd5b8794505b828510156200053757620005228d8262000429565b8452600194909401939286019285016200050d565b50989b979a50959850505050505050565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f45524332303a207472616e73666572206973206e6f7420616c6c6f7765640000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b6040518181016001600160401b03811182821017156200061557600080fd5b604052919050565b60805160601c60a05160c05160601c6114e46200066e6000398061046952806106de5250806104c352806105f752806106945250806105d3528061066852806106ff52806107a352506114e46000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80638622a689116100b8578063adf898a41161007c578063adf898a414610269578063be040fb014610271578063c39ef8551461027b578063c565882714610283578063dd62ed3e14610296578063f9e54234146102a957610142565b80638622a6891461022b57806395d89b4114610233578063a457c2d71461023b578063a9059cbb1461024e578063adb618321461026157610142565b8063313ce5671161010a578063313ce567146101b557806339509351146101ca5780635aa6e675146101dd5780635c23bdf5146101f25780635d4545a01461020557806370a082311461021857610142565b806301ec0fab1461014757806306fdde0314610165578063095ea7b31461017a57806318160ddd1461019a57806323b872dd146101a2575b600080fd5b61014f6102c9565b60405161015c9190611376565b60405180910390f35b61016d6102cf565b60405161015c9190611087565b61018d610188366004610ed7565b610365565b60405161015c919061107c565b61014f610383565b61018d6101b0366004610e97565b610389565b6101bd610410565b60405161015c919061137f565b61018d6101d8366004610ed7565b610419565b6101e5610467565b60405161015c9190611002565b6101e5610200366004610fb6565b61048b565b61018d610213366004610e48565b610491565b61014f610226366004610e48565b6104a6565b61014f6104c1565b61016d6104e5565b61018d610249366004610ed7565b610546565b61018d61025c366004610ed7565b6105ae565b61014f6105c2565b6101e56105d1565b6102796105f5565b005b610279610692565b610279610291366004610fb6565b6107cc565b61014f6102a4366004610e63565b6107d1565b6102bc6102b7366004610f01565b6107fc565b60405161015c919061102f565b60075481565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561035b5780601f106103305761010080835404028352916020019161035b565b820191906000526020600020905b81548152906001019060200180831161033e57829003601f168201915b5050505050905090565b60006103796103726108e7565b84846108eb565b5060015b92915050565b60025490565b600061039684848461099f565b610406846103a26108e7565b61040185604051806060016040528060288152602001611462602891396001600160a01b038a166000908152600160205260408120906103e06108e7565b6001600160a01b031681526020810191909152604001600020549190610ab4565b6108eb565b5060019392505050565b60055460ff1690565b60006103796104266108e7565b8461040185600160006104376108e7565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061089d565b7f000000000000000000000000000000000000000000000000000000000000000081565b60601c90565b60066020526000908152604090205460ff1681565b6001600160a01b031660009081526020819052604090205490565b7f000000000000000000000000000000000000000000000000000000000000000081565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561035b5780601f106103305761010080835404028352916020019161035b565b60006103796105536108e7565b846104018560405180606001604052806025815260200161148a602591396001600061057d6108e7565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610ab4565b60006103796105bb6108e7565b848461099f565b60006105cc6108c9565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000061061e6105c2565b106106445760405162461bcd60e51b815260040161063b90611176565b60405180910390fd5b600061064f336104a6565b905061065b3382610ae0565b61068f6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383610bc2565b50565b7f00000000000000000000000000000000000000000000000000000000000000006106bb6105c2565b10156106d95760405162461bcd60e51b815260040161063b906111ad565b6107ca7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016107499190611002565b60206040518083038186803b15801561076157600080fd5b505afa158015610775573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107999190610fce565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190610bc2565b565b600755565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060815167ffffffffffffffff8111801561081657600080fd5b50604051908082528060200260200182016040528015610840578160200160208202803683370190505b50905060005b82518110156108975761086b83828151811061085e57fe5b602002602001015161048b565b82828151811061087757fe5b6001600160a01b0390921660209283029190910190910152600101610846565b50919050565b6000828201838110156108c25760405162461bcd60e51b815260040161063b9061113f565b9392505050565b60006007546000146108dd576007546105cc565b504290565b505050565b3390565b6001600160a01b0383166109115760405162461bcd60e51b815260040161063b906112b1565b6001600160a01b0382166109375760405162461bcd60e51b815260040161063b906110fd565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610992908590611376565b60405180910390a3505050565b6001600160a01b0383166109c55760405162461bcd60e51b815260040161063b9061126c565b6001600160a01b0382166109eb5760405162461bcd60e51b815260040161063b906110ba565b6109f6838383610c18565b610a338160405180606001604052806026815260200161143c602691396001600160a01b0386166000908152602081905260409020549190610ab4565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610a62908261089d565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610992908590611376565b60008184841115610ad85760405162461bcd60e51b815260040161063b9190611087565b505050900390565b6001600160a01b038216610b065760405162461bcd60e51b815260040161063b9061122b565b610b1282600083610c18565b610b4f8160405180606001604052806022815260200161141a602291396001600160a01b0385166000908152602081905260409020549190610ab4565b6001600160a01b038316600090815260208190526040902055600254610b759082610c7f565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610bb6908590611376565b60405180910390a35050565b6108e28363a9059cbb60e01b8484604051602401610be1929190611016565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610cc1565b610c238383836108e2565b6001600160a01b0382161580610c4057506001600160a01b038316155b80610c6357506001600160a01b03831660009081526006602052604090205460ff165b6108e25760405162461bcd60e51b815260040161063b906111f4565b60006108c283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ab4565b6060610d16826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d509092919063ffffffff16565b8051909150156108e25780806020019051810190610d349190610f96565b6108e25760405162461bcd60e51b815260040161063b9061132c565b6060610d5f8484600085610d67565b949350505050565b6060610d7285610e2b565b610d8e5760405162461bcd60e51b815260040161063b906112f5565b60006060866001600160a01b03168587604051610dab9190610fe6565b60006040518083038185875af1925050503d8060008114610de8576040519150601f19603f3d011682016040523d82523d6000602084013e610ded565b606091505b50915091508115610e01579150610d5f9050565b805115610e115780518082602001fd5b8360405162461bcd60e51b815260040161063b9190611087565b3b151590565b80356001600160a01b038116811461037d57600080fd5b600060208284031215610e59578081fd5b6108c28383610e31565b60008060408385031215610e75578081fd5b610e7f8484610e31565b9150610e8e8460208501610e31565b90509250929050565b600080600060608486031215610eab578081fd5b8335610eb681611404565b92506020840135610ec681611404565b929592945050506040919091013590565b60008060408385031215610ee9578182fd5b610ef38484610e31565b946020939093013593505050565b60006020808385031215610f13578182fd5b823567ffffffffffffffff811115610f29578283fd5b8301601f81018513610f39578283fd5b8035610f4c610f47826113b4565b61138d565b8181528381019083850185840285018601891015610f68578687fd5b8694505b83851015610f8a578035835260019490940193918501918501610f6c565b50979650505050505050565b600060208284031215610fa7578081fd5b815180151581146108c2578182fd5b600060208284031215610fc7578081fd5b5035919050565b600060208284031215610fdf578081fd5b5051919050565b60008251610ff88184602087016113d4565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156110705783516001600160a01b03168352928401929184019160010161104b565b50909695505050505050565b901515815260200190565b60006020825282518060208401526110a68160408501602087016113d4565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601f908201527f41697264726f702072656465656d20706572696f642068617320656e64656400604082015260600190565b60208082526027908201527f41697264726f702072656465656d20706572696f6420686173206e6f7420656e604082015266191959081e595d60ca1b606082015260800190565b6020808252601e908201527f45524332303a207472616e73666572206973206e6f7420616c6c6f7765640000604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b90815260200190565b60ff91909116815260200190565b60405181810167ffffffffffffffff811182821017156113ac57600080fd5b604052919050565b600067ffffffffffffffff8211156113ca578081fd5b5060209081020190565b60005b838110156113ef5781810151838201526020016113d7565b838111156113fe576000848401525b50505050565b6001600160a01b038116811461068f57600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220794126baf4ea3c44b9afb84b4d8a20535aca899e75471e5d9bb4c8e671aabde664736f6c634300060c0033546f726e61646f4361736820766f756368657220666f72206561726c792061646f7074657273";class Kf extends Ka{constructor(...e){e.length>1?super(...e):super(qf,Jf,e[0])}getDeployTransaction(e,t,a,n,b){return super.getDeployTransaction(e,t,a,n,b||{})}deploy(e,t,a,n,b){return super.deploy(e,t,a,n,b||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(qf)}static connect(e,t){return new $a(e,qf,t)}}Kf.bytecode=Jf,Kf.abi=qf;var Yf=Object.freeze({__proto__:null,AirdropMock__factory:Sf,ENSMock__factory:Lf,TORNMock__factory:Bf,Timestamp__factory:zf,VestingMock__factory:Wf,VoucherMock__factory:Kf});const Zf=[{inputs:[{internalType:"bytes32",name:"tokenAddress",type:"bytes32"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Airdrop.Recipient[]",name:"targets",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"bytes32[]",name:"domains",type:"bytes32[]"}],name:"bulkResolve",outputs:[{internalType:"address[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolve",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],Qf="0x60806040523480156200001157600080fd5b506040516200054038038062000540833981016040819052620000349162000396565b60006200004183620001c2565b90506000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040162000073919062000467565b60206040518083038186803b1580156200008c57600080fd5b505afa158015620000a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000c791906200044e565b11620000f05760405162461bcd60e51b8152600401620000e7906200049d565b60405180910390fd5b60005b8251811015620001bd57816001600160a01b031663a9059cbb8483815181106200011957fe5b6020026020010151600001518584815181106200013257fe5b6020026020010151602001516040518363ffffffff1660e01b81526004016200015d9291906200047b565b602060405180830381600087803b1580156200017857600080fd5b505af11580156200018d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001b3919062000374565b50600101620000f3565b506000ff5b600080620001cf62000310565b600114620001f257738595bfb0d940dfedc98943fa8a907091203f25ee62000203565b6e0c2e074ec69a0dfb2997ba6c7d2e1e5b604051630178b8bf60e01b81529091506001600160a01b03821690630178b8bf906200023490869060040162000494565b60206040518083038186803b1580156200024d57600080fd5b505afa15801562000262573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000288919062000355565b6001600160a01b0316633b3b57de846040518263ffffffff1660e01b8152600401620002b5919062000494565b60206040518083038186803b158015620002ce57600080fd5b505afa158015620002e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000309919062000355565b9392505050565b4690565b60006040828403121562000326578081fd5b620003326040620004df565b90508151620003418162000526565b808252506020820151602082015292915050565b60006020828403121562000367578081fd5b8151620003098162000526565b60006020828403121562000386578081fd5b8151801515811462000309578182fd5b6000806040808486031215620003aa578182fd5b8351602080860151919450906001600160401b03811115620003ca578384fd5b8501601f81018713620003db578384fd5b8051620003f2620003ec8262000506565b620004df565b81815283810190838501868402850186018b10156200040f578788fd5b8794505b838510156200043d57620004288b8262000314565b83526001949094019391850191860162000413565b508096505050505050509250929050565b60006020828403121562000460578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b90815260200190565b60208082526022908201527f42616c616e636520697320302c2061697264726f7020616c726561647920646f6040820152616e6560f01b606082015260800190565b6040518181016001600160401b0381118282101715620004fe57600080fd5b604052919050565b60006001600160401b038211156200051c578081fd5b5060209081020190565b6001600160a01b03811681146200053c57600080fd5b5056fe";class ed extends Ka{constructor(...e){e.length>1?super(...e):super(Zf,Qf,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Zf)}static connect(e,t){return new $a(e,Zf,t)}}ed.bytecode=Qf,ed.abi=Zf;const td=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"chainID",outputs:[{internalType:"uint256",name:"_chainID",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class ad{static createInterface(){return new ba(td)}static connect(e,t){return new $a(e,td,t)}}ad.abi=td;const nd=[{inputs:[{internalType:"address",name:"_governance",type:"address"},{internalType:"uint256",name:"_pausePeriod",type:"uint256"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct TORN.Recipient[]",name:"_vestings",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"}],name:"Allowed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"target",type:"address"}],name:"Disallowed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[{internalType:"address[]",name:"target",type:"address[]"}],name:"addToAllowedList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"allowedTransferee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"canUnpauseAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"chainID",outputs:[{internalType:"uint256",name:"_chainID",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"decision",type:"bool"}],name:"changeTransferability",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"target",type:"address[]"}],name:"removeFromAllowedList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address payable",name:"_to",type:"address"},{internalType:"uint256",name:"_balance",type:"uint256"}],name:"rescueTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],bd="0x60c06040523480156200001157600080fd5b506040516200288338038062002883833981016040819052620000349162000699565b604080518082018252600b81526a0a8dee4dcc2c8de86c2e6d60ab1b6020808301918252835180850190945260048452632a27a92760e11b9084015281519192916200008391600391620005a7565b50805162000099906004906020840190620005a7565b50506005805460ff1916601217905550620000b3620001f0565b506008805460ff199081169091556001600160601b0319606085901b1660a0526001600160a01b0384166000908152600960205260408120805490921660011790915583905b8251811015620001765760008382815181106200011257fe5b60200260200101516000015190506200014a818584815181106200013257fe5b602002602001015160200151620002ac60201b60201c565b6001600160a01b03166000908152600960205260409020805460ff1916600190811790915501620000f9565b506200019a83620001866200038f565b6200039360201b62000cbd1790919060201c565b608052620001a7620003c4565b620001b16200043b565b6a084595161401484a00000014620001e65760405162461bcd60e51b8152600401620001dd906200086b565b60405180910390fd5b5050505062000909565b600080620001fd62000441565b905060007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6200022c62000445565b805160209182012060408051808201825260018152603160f81b90840152516200027e93927fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc691879130910162000781565b60408051601f1981840301815291815281516020928301206000948552600790925290922082905550905090565b6001600160a01b038216620002d55760405162461bcd60e51b8152600401620001dd90620008a2565b620002e360008383620004df565b620002ff816002546200039360201b62000cbd1790919060201c565b6002556001600160a01b038216600090815260208181526040909120546200033291839062000cbd62000393821b17901c565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9062000383908590620008d9565b60405180910390a35050565b4290565b600082820183811015620003bb5760405162461bcd60e51b8152600401620001dd90620007ad565b90505b92915050565b60085460ff1615620003ea5760405162461bcd60e51b8152600401620001dd9062000841565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620004226200059a565b6040516200043191906200076d565b60405180910390a1565b60025490565b4690565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015620004d55780601f10620004a957610100808354040283529160200191620004d5565b820191906000526020600020905b815481529060010190602001808311620004b757829003601f168201915b5050505050905090565b620004f78383836200059560201b620006aa1760201c565b620005016200059e565b15806200052657506001600160a01b03831660009081526009602052604090205460ff165b806200054a57506001600160a01b03821660009081526009602052604090205460ff165b620005695760405162461bcd60e51b8152600401620001dd906200081b565b6001600160a01b038216301415620005955760405162461bcd60e51b8152600401620001dd90620007e4565b505050565b3390565b60085460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620005ea57805160ff19168380011785556200061a565b828001600101855582156200061a579182015b828111156200061a578251825591602001919060010190620005fd565b50620006289291506200062c565b5090565b5b808211156200062857600081556001016200062d565b80516001600160a01b0381168114620003be57600080fd5b6000604082840312156200066d578081fd5b620006796040620008e2565b905062000687838362000643565b81526020820151602082015292915050565b600080600060608486031215620006ae578283fd5b620006ba858562000643565b9250602080850151925060408086015160018060401b0380821115620006de578485fd5b818801915088601f830112620006f2578485fd5b81518181111562000701578586fd5b620007108586830201620008e2565b8181528581019250838601858302850187018c10156200072e578788fd5b8794505b828510156200075c57620007478c826200065b565b84526001949094019392860192850162000732565b508096505050505050509250925092565b6001600160a01b0391909116815260200190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526017908201527f544f524e3a20696e76616c696420726563697069656e74000000000000000000604082015260600190565b6020808252600c908201526b1513d4938e881c185d5cd95960a21b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601c908201527f544f524e3a20696e636f727265637420646973747269627574696f6e00000000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b6040518181016001600160401b03811182821017156200090157600080fd5b604052919050565b60805160a05160601c611f3a62000949600039806104d752806105ff52806106cc528061078552806109715250806107245280610c705250611f3a6000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806379cc6790116100de578063a9059cbb11610097578063cea9d26f11610071578063cea9d26f146102fb578063d505accf1461030e578063dc0f0d1214610321578063dd62ed3e1461032957610173565b8063a9059cbb146102d8578063adb61832146102eb578063adc879e9146102f357610173565b806379cc6790146102715780637ecebe001461028457806381893c7c14610297578063885ad0cf146102aa57806395d89b41146102bd578063a457c2d7146102c557610173565b80633c8d76d1116101305780633c8d76d11461020657806342966c681461021b5780635aa6e6751461022e5780635c975abb146102435780635d4545a01461024b57806370a082311461025e57610173565b806306fdde0314610178578063095ea7b31461019657806318160ddd146101b657806323b872dd146101cb578063313ce567146101de57806339509351146101f3575b600080fd5b61018061033c565b60405161018d9190611875565b60405180910390f35b6101a96101a436600461163a565b6103d3565b60405161018d91906117ec565b6101be6103f1565b60405161018d9190611d9a565b6101a96101d9366004611585565b6103f7565b6101e661047e565b60405161018d9190611da3565b6101a961020136600461163a565b610487565b610219610214366004611665565b6104d5565b005b61021961022936600461174e565b6105e9565b6102366105fd565b60405161018d91906117bf565b6101a9610621565b6101a9610259366004611531565b61062a565b6101be61026c366004611531565b61063f565b61021961027f36600461163a565b61065a565b6101be610292366004611531565b6106af565b6102196102a5366004611702565b6106ca565b6102196102b8366004611665565b610783565b61018061088a565b6101a96102d336600461163a565b6108eb565b6101a96102e636600461163a565b610953565b6101be610967565b6101be61096b565b61021961030936600461173a565b61096f565b61021961031c3660046115c5565b610b2d565b6101be610c6e565b6101be61033736600461154d565b610c92565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c85780601f1061039d576101008083540402835291602001916103c8565b820191906000526020600020905b8154815290600101906020018083116103ab57829003601f168201915b505050505090505b90565b60006103e76103e0610ce9565b8484610ced565b5060015b92915050565b60025490565b6000610404848484610da1565b61047484610410610ce9565b61046f85604051806060016040528060288152602001611e94602891396001600160a01b038a1660009081526001602052604081209061044e610ce9565b6001600160a01b031681526020810191909152604001600020549190610eb6565b610ced565b5060019392505050565b60055460ff1690565b60006103e7610494610ce9565b8461046f85600160006104a5610ce9565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610cbd565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610507610ce9565b6001600160a01b0316146105365760405162461bcd60e51b815260040161052d90611d16565b60405180910390fd5b60005b81518110156105e55760006009600084848151811061055457fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f9ef90a89b00db1a1891a357dc96b2a273add9d883e378c350d22bad87a9d7d308282815181106105c057fe5b60200260200101516040516105d591906117bf565b60405180910390a1600101610539565b5050565b6105fa6105f4610ce9565b82610ee2565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60085460ff1690565b60096020526000908152604090205460ff1681565b6001600160a01b031660009081526020819052604090205490565b600061068c82604051806060016040528060248152602001611ebc6024913961068586610337610ce9565b9190610eb6565b90506106a08361069a610ce9565b83610ced565b6106aa8383610ee2565b505050565b6001600160a01b031660009081526006602052604090205490565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106fc610ce9565b6001600160a01b0316146107225760405162461bcd60e51b815260040161052d90611d16565b7f000000000000000000000000000000000000000000000000000000000000000061074b610967565b116107685760405162461bcd60e51b815260040161052d90611b0b565b801561077b57610776610fc4565b6105fa565b6105fa611030565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107b5610ce9565b6001600160a01b0316146107db5760405162461bcd60e51b815260040161052d90611d16565b60005b81518110156105e5576001600960008484815181106107f957fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f77a7dbc6ad97703ad411a8d5edfcd1df382fb34b076a90898b11884f7ebdcc0582828151811061086557fe5b602002602001015160405161087a91906117bf565b60405180910390a16001016107de565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c85780601f1061039d576101008083540402835291602001916103c8565b60006103e76108f8610ce9565b8461046f85604051806060016040528060258152602001611ee06025913960016000610922610ce9565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610eb6565b60006103e7610960610ce9565b8484610da1565b4290565b4690565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166109a1610ce9565b6001600160a01b0316146109c75760405162461bcd60e51b815260040161052d90611d16565b6001600160a01b0382166109ed5760405162461bcd60e51b815260040161052d90611c8a565b6001600160a01b038316610a56574760008215610a1357610a0e8284611089565b610a15565b815b6040519091506001600160a01b0385169082156108fc029083906000818181858888f19350505050158015610a4e573d6000803e3d6000fd5b5050506106aa565b6040516370a0823160e01b81526000906001600160a01b038516906370a0823190610a859030906004016117bf565b60206040518083038186803b158015610a9d57600080fd5b505afa158015610ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad59190611766565b905060008215610aee57610ae98284611089565b610af0565b815b905060008111610b125760405162461bcd60e51b815260040161052d90611d63565b610b266001600160a01b038616858361109f565b5050505050565b83610b36610967565b1115610b545760405162461bcd60e51b815260040161052d90611a00565b6001600160a01b0387166000908152600660209081526040808320549051610ba7927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928c928c928c92918c91016117f7565b6040516020818303038152906040528051906020012090506000611901610bcc6110f5565b83604051602001610bdf9392919061179a565b6040516020818303038152906040528051906020012090506000610c0582878787611134565b9050896001600160a01b0316816001600160a01b031614610c385760405162461bcd60e51b815260040161052d90611b52565b6001600160a01b038a16600090815260066020526040902080546001019055610c628a8a8a610ced565b50505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600082820183811015610ce25760405162461bcd60e51b815260040161052d90611992565b9392505050565b3390565b6001600160a01b038316610d135760405162461bcd60e51b815260040161052d90611c0f565b6001600160a01b038216610d395760405162461bcd60e51b815260040161052d90611950565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610d94908590611d9a565b60405180910390a3505050565b6001600160a01b038316610dc75760405162461bcd60e51b815260040161052d90611bca565b6001600160a01b038216610ded5760405162461bcd60e51b815260040161052d906118df565b610df883838361122c565b610e3581604051806060016040528060268152602001611e6e602691396001600160a01b0386166000908152602081905260409020549190610eb6565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610e649082610cbd565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610d94908590611d9a565b60008184841115610eda5760405162461bcd60e51b815260040161052d9190611875565b505050900390565b6001600160a01b038216610f085760405162461bcd60e51b815260040161052d90611b89565b610f148260008361122c565b610f5181604051806060016040528060228152602001611e4c602291396001600160a01b0385166000908152602081905260409020549190610eb6565b6001600160a01b038316600090815260208190526040902055600254610f7790826112cb565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610fb8908590611d9a565b60405180910390a35050565b60085460ff16610fe65760405162461bcd60e51b815260040161052d90611922565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611019610ce9565b60405161102691906117bf565b60405180910390a1565b60085460ff16156110535760405162461bcd60e51b815260040161052d90611a9f565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611019610ce9565b60008183106110985781610ce2565b5090919050565b6106aa8363a9059cbb60e01b84846040516024016110be9291906117d3565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261130d565b6000806007600061110461096b565b8152602081019190915260400160002054905080156111245790506103d0565b61112c61139c565b9150506103d0565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156111765760405162461bcd60e51b815260040161052d90611a5d565b8360ff16601b148061118b57508360ff16601c145b6111a75760405162461bcd60e51b815260040161052d90611ac9565b6000600186868686604051600081526020016040526040516111cc9493929190611857565b6020604051602081039080840390855afa1580156111ee573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166112215760405162461bcd60e51b815260040161052d906118a8565b90505b949350505050565b6112378383836106aa565b61123f610621565b158061126357506001600160a01b03831660009081526009602052604090205460ff165b8061128657506001600160a01b03821660009081526009602052604090205460ff165b6112a25760405162461bcd60e51b815260040161052d90611a37565b6001600160a01b0382163014156106aa5760405162461bcd60e51b815260040161052d906119c9565b6000610ce283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610eb6565b6060611362826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114529092919063ffffffff16565b8051909150156106aa5780806020019051810190611380919061171e565b6106aa5760405162461bcd60e51b815260040161052d90611ccc565b6000806113a761096b565b905060007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6113d461033c565b805160209182012060408051808201825260018152603160f81b908401525161142493927fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc691879130910161182b565b60408051601f1981840301815291815281516020928301206000948552600790925290922082905550905090565b60606112248484600085606061146785611520565b6114835760405162461bcd60e51b815260040161052d90611c53565b60006060866001600160a01b031685876040516114a0919061177e565b60006040518083038185875af1925050503d80600081146114dd576040519150601f19603f3d011682016040523d82523d6000602084013e6114e2565b606091505b509150915081156114f65791506112249050565b8051156115065780518082602001fd5b8360405162461bcd60e51b815260040161052d9190611875565b3b151590565b80356103eb81611e28565b600060208284031215611542578081fd5b8135610ce281611e28565b6000806040838503121561155f578081fd5b823561156a81611e28565b9150602083013561157a81611e28565b809150509250929050565b600080600060608486031215611599578081fd5b83356115a481611e28565b925060208401356115b481611e28565b929592945050506040919091013590565b600080600080600080600060e0888a0312156115df578283fd5b87356115ea81611e28565b965060208801356115fa81611e28565b95506040880135945060608801359350608088013560ff8116811461161d578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561164c578182fd5b823561165781611e28565b946020939093013593505050565b60006020808385031215611677578182fd5b823567ffffffffffffffff81111561168d578283fd5b8301601f8101851361169d578283fd5b80356116b06116ab82611dd8565b611db1565b81815283810190838501858402850186018910156116cc578687fd5b8694505b838510156116f6576116e28982611526565b8352600194909401939185019185016116d0565b50979650505050505050565b600060208284031215611713578081fd5b8135610ce281611e3d565b60006020828403121561172f578081fd5b8151610ce281611e3d565b600080600060608486031215611599578283fd5b60006020828403121561175f578081fd5b5035919050565b600060208284031215611777578081fd5b5051919050565b60008251611790818460208701611df8565b9190910192915050565b60f09390931b6001600160f01b03191683526002830191909152602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082528251806020840152611894816040850160208701611df8565b601f01601f19169190910160400192915050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526017908201527f544f524e3a20696e76616c696420726563697069656e74000000000000000000604082015260600190565b6020808252601d908201527f45524332305065726d69743a206578706972656420646561646c696e65000000604082015260600190565b6020808252600c908201526b1513d4938e881c185d5cd95960a21b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b60208082526027908201527f544f524e3a2063616e6e6f74206368616e6765207472616e736665726162696c6040820152661a5d1e481e595d60ca1b606082015260800190565b6020808252601e908201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526022908201527f544f524e3a2063616e206e6f742073656e6420746f207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252602d908201527f544f524e3a206f6e6c7920676f7665726e616e63652063616e20706572666f7260408201526c36903a3434b99030b1ba34b7b760991b606082015260800190565b6020808252601e908201527f544f524e3a20747279696e6720746f2073656e6420302062616c616e63650000604082015260600190565b90815260200190565b60ff91909116815260200190565b60405181810167ffffffffffffffff81118282101715611dd057600080fd5b604052919050565b600067ffffffffffffffff821115611dee578081fd5b5060209081020190565b60005b83811015611e13578181015183820152602001611dfb565b83811115611e22576000848401525b50505050565b6001600160a01b03811681146105fa57600080fd5b80151581146105fa57600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fd515804eca384cb14c99861e60dc5364ae65ba9ddfdfe00d195788ee631d01064736f6c634300060c0033";class fd extends Ka{constructor(...e){e.length>1?super(...e):super(nd,bd,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(nd)}static connect(e,t){return new $a(e,nd,t)}}fd.bytecode=bd,fd.abi=nd;const dd=[{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_beneficiary",type:"address"},{internalType:"uint256",name:"_startTimestamp",type:"uint256"},{internalType:"uint256",name:"_cliffInMonths",type:"uint256"},{internalType:"uint256",name:"_durationInMonths",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Released",type:"event"},{inputs:[],name:"SECONDS_PER_MONTH",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"beneficiary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"cliffInMonths",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"durationInMonths",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"release",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"released",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"startTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"vestedAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],id="0x61012060405234801561001157600080fd5b50604051610c8c380380610c8c833981810160405260a081101561003457600080fd5b508051602082015160408301516060840151608090940151929391929091906001600160a01b0384166100ae576040805162461bcd60e51b815260206004820152601b60248201527f42656e65666963696172792063616e6e6f7420626520656d7074790000000000604482015290519081900360640190fd5b80821115610103576040805162461bcd60e51b815260206004820152601e60248201527f436c6966662069732067726561746572207468616e206475726174696f6e0000604482015290519081900360640190fd5b6001600160601b0319606086811b821660a05285901b1660805261010081905260c08290528215610134578261013c565b61013c61014a565b60e0525061014e9350505050565b4290565b60805160601c60a05160601c60c05160e05161010051610acc6101c060003980610203528061037b52806103dd525080610152528061018e52806105215250806101d052806104f352508061024852806102c85280610474528061054552508061012c52806104965250610acc6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063928d89ae11610066578063928d89ae146100fb5780639613252114610103578063adb618321461010b578063e6fd48bc14610113578063fc0c546a1461011b5761009e565b806310786deb146100a357806338af3eed146100bd57806344b1231f146100e157806367097a4b146100e957806386d1a69f146100f1575b600080fd5b6100ab610123565b60408051918252519081900360200190f35b6100c561012a565b604080516001600160a01b039092168252519081900360200190f35b6100ab61014e565b6100ab6103db565b6100f96103ff565b005b6100ab6104f1565b6100ab610515565b6100ab61051b565b6100ab61051f565b6100c5610543565b62278d0081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000061017961051b565b1015610187575060006103d8565b60006101bb7f00000000000000000000000000000000000000000000000000000000000000006101b561051b565b90610567565b905060006101cc8262278d006105b2565b90507f0000000000000000000000000000000000000000000000000000000000000000811015610201576000925050506103d8565b7f000000000000000000000000000000000000000000000000000000000000000081106102c457604080516370a0823160e01b815230600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b15801561028e57600080fd5b505afa1580156102a2573d6000803e3d6000fd5b505050506040513d60208110156102b857600080fd5b505192506103d8915050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561033357600080fd5b505afa158015610347573d6000803e3d6000fd5b505050506040513d602081101561035d57600080fd5b505160008054919250906103729083906105f4565b905060006103aa7f00000000000000000000000000000000000000000000000000000000000000006103a4848761064e565b906105b2565b905060006103c36000548361056790919063ffffffff16565b90506103cf84826106a7565b96505050505050505b90565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061040961014e565b905060008111610457576040805162461bcd60e51b81526020600482015260146024820152734e6f20746f6b656e7320746f2072656c6561736560601b604482015290519081900360640190fd5b60005461046490826105f4565b6000556104bb6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836106bd565b6040805182815290517ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c5659181900360200190a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005481565b4290565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006105a983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610714565b90505b92915050565b60006105a983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506107ab565b6000828201838110156105a9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008261065d575060006105ac565b8282028284828161066a57fe5b04146105a95760405162461bcd60e51b8152600401808060200182810382526021815260200180610a4c6021913960400191505060405180910390fd5b60008183106106b657816105a9565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261070f908490610810565b505050565b600081848411156107a35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610768578181015183820152602001610750565b50505050905090810190601f1680156107955780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836107fa5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610768578181015183820152602001610750565b50600083858161080657fe5b0495945050505050565b6060610865826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108c19092919063ffffffff16565b80519091501561070f5780806020019051602081101561088457600080fd5b505161070f5760405162461bcd60e51b815260040180806020018281038252602a815260200180610a6d602a913960400191505060405180910390fd5b60606108d084846000856108d8565b949350505050565b60606108e385610a45565b610934576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106109735780518252601f199092019160209182019101610954565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146109d5576040519150601f19603f3d011682016040523d82523d6000602084013e6109da565b606091505b509150915081156109ee5791506108d09050565b8051156109fe5780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610768578181015183820152602001610750565b3b15159056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212203b3e8370e345374172efb9e3693b20807c318ecfcc569df94f28df8a94f2727a64736f6c634300060c0033";class sd extends Ka{constructor(...e){e.length>1?super(...e):super(dd,id,e[0])}getDeployTransaction(e,t,a,n,b,f){return super.getDeployTransaction(e,t,a,n,b,f||{})}deploy(e,t,a,n,b,f){return super.deploy(e,t,a,n,b,f||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(dd)}static connect(e,t){return new $a(e,dd,t)}}sd.bytecode=id,sd.abi=dd;const cd=[{inputs:[{internalType:"bytes32",name:"_torn",type:"bytes32"},{internalType:"bytes32",name:"_governance",type:"bytes32"},{internalType:"uint256",name:"_duration",type:"uint256"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Voucher.Recipient[]",name:"_airdrops",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"allowedTransferee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"blockTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"domains",type:"bytes32[]"}],name:"bulkResolve",outputs:[{internalType:"address[]",name:"result",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"expiresAt",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"redeem",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"rescueExpiredTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolve",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],rd="0x60e06040523480156200001157600080fd5b5060405162001d8d38038062001d8d833981016040819052620000349162000593565b60405180606001604052806026815260200162001d6760269139604051806040016040528060058152602001643b2a27a92760d91b81525081600390805190602001906200008492919062000497565b5080516200009a90600490602084019062000497565b50506005805460ff1916601217905550620000b584620001af565b60601b6001600160601b031916608052620000d083620001af565b60601b6001600160601b03191660c0526200010382620000ef620002fd565b6200030160201b6200098d1790919060201c565b60a05260005b8151811015620001a457620001558282815181106200012457fe5b6020026020010151600001518383815181106200013d57fe5b6020026020010151602001516200033260201b60201c565b6001600660008484815181106200016857fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020805460ff191691151591909117905560010162000109565b505050505062000753565b600080620001bc62000415565b600114620001df57738595bfb0d940dfedc98943fa8a907091203f25ee620001f0565b6e0c2e074ec69a0dfb2997ba6c7d2e1e5b604051630178b8bf60e01b81529091506001600160a01b03821690630178b8bf906200022190869060040162000665565b60206040518083038186803b1580156200023a57600080fd5b505afa1580156200024f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000275919062000574565b6001600160a01b0316633b3b57de846040518263ffffffff1660e01b8152600401620002a2919062000665565b60206040518083038186803b158015620002bb57600080fd5b505afa158015620002d0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002f6919062000574565b9392505050565b4290565b600082820183811015620002f65760405162461bcd60e51b815260040162000329906200066e565b60405180910390fd5b6001600160a01b0382166200035b5760405162461bcd60e51b81526004016200032990620006dc565b620003696000838362000419565b62000385816002546200030160201b6200098d1790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620003b89183906200098d62000301821b17901c565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906200040990859062000665565b60405180910390a35050565b4690565b620004318383836200049260201b620009b21760201c565b6001600160a01b03821615806200044f57506001600160a01b038316155b806200047357506001600160a01b03831660009081526006602052604090205460ff165b620004925760405162461bcd60e51b81526004016200032990620006a5565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004da57805160ff19168380011785556200050a565b828001600101855582156200050a579182015b828111156200050a578251825591602001919060010190620004ed565b50620005189291506200051c565b5090565b5b808211156200051857600081556001016200051d565b60006040828403121562000545578081fd5b62000551604062000713565b9050815162000560816200073a565b808252506020820151602082015292915050565b60006020828403121562000586578081fd5b8151620002f6816200073a565b60008060008060808587031215620005a9578283fd5b8451935060208086015193506040808701519350606087015160018060401b0380821115620005d6578485fd5b818901915089601f830112620005ea578485fd5b815181811115620005f9578586fd5b62000608858683020162000713565b8181528581019250838601858302850187018d101562000626578788fd5b8794505b8285101562000654576200063f8d8262000533565b8452600194909401939286019285016200062a565b50989b979a50959850505050505050565b90815260200190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f45524332303a207472616e73666572206973206e6f7420616c6c6f7765640000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b6040518181016001600160401b03811182821017156200073257600080fd5b604052919050565b6001600160a01b03811681146200075057600080fd5b50565b60805160601c60a05160c05160601c6115c3620007a46000398061043152806107d35250806105c352806106ec52806107895250806106c8528061075d52806107f4528061089852506115c36000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80638622a689116100ad578063adf898a411610071578063adf898a41461024b578063be040fb014610253578063c39ef8551461025d578063dd62ed3e14610265578063f9e54234146102785761012c565b80638622a6891461020d57806395d89b4114610215578063a457c2d71461021d578063a9059cbb14610230578063adb61832146102435761012c565b806339509351116100f457806339509351146101ac5780635aa6e675146101bf5780635c23bdf5146101d45780635d4545a0146101e757806370a08231146101fa5761012c565b806306fdde0314610131578063095ea7b31461014f57806318160ddd1461016f57806323b872dd14610184578063313ce56714610197575b600080fd5b610139610298565b604051610146919061116f565b60405180910390f35b61016261015d366004610fb5565b61032e565b604051610146919061115b565b61017761034b565b6040516101469190611166565b610162610192366004610f75565b610351565b61019f6103d8565b604051610146919061145e565b6101626101ba366004610fb5565b6103e1565b6101c761042f565b60405161014691906110e1565b6101c76101e2366004611095565b610453565b6101626101f5366004610f05565b610591565b610177610208366004610f05565b6105a6565b6101776105c1565b6101396105e5565b61016261022b366004610fb5565b610646565b61016261023e366004610fb5565b6106ae565b6101776106c2565b6101c76106c6565b61025b6106ea565b005b61025b610787565b610177610273366004610f3d565b6108c1565b61028b610286366004610fe0565b6108ec565b604051610146919061110e565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103245780601f106102f957610100808354040283529160200191610324565b820191906000526020600020905b81548152906001019060200180831161030757829003601f168201915b5050505050905090565b600061034261033b6109b7565b84846109bb565b50600192915050565b60025490565b600061035e848484610a6f565b6103ce8461036a6109b7565b6103c985604051806060016040528060288152602001611541602891396001600160a01b038a166000908152600160205260408120906103a86109b7565b6001600160a01b031681526020810191909152604001600020549190610b84565b6109bb565b5060019392505050565b60055460ff1690565b60006103426103ee6109b7565b846103c985600160006103ff6109b7565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061098d565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008061045e610bb0565b60011461047f57738595bfb0d940dfedc98943fa8a907091203f25ee610490565b6e0c2e074ec69a0dfb2997ba6c7d2e1e5b604051630178b8bf60e01b81529091506001600160a01b03821690630178b8bf906104bf908690600401611166565b60206040518083038186803b1580156104d757600080fd5b505afa1580156104eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050f9190610f21565b6001600160a01b0316633b3b57de846040518263ffffffff1660e01b815260040161053a9190611166565b60206040518083038186803b15801561055257600080fd5b505afa158015610566573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058a9190610f21565b9392505050565b60066020526000908152604090205460ff1681565b6001600160a01b031660009081526020819052604090205490565b7f000000000000000000000000000000000000000000000000000000000000000081565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103245780601f106102f957610100808354040283529160200191610324565b60006103426106536109b7565b846103c985604051806060016040528060258152602001611569602591396001600061067d6109b7565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610b84565b60006103426106bb6109b7565b8484610a6f565b4290565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006107136106c2565b106107395760405162461bcd60e51b81526004016107309061125e565b60405180910390fd5b6000610744336105a6565b90506107503382610bb4565b6107846001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383610c96565b50565b7f00000000000000000000000000000000000000000000000000000000000000006107b06106c2565b10156107ce5760405162461bcd60e51b815260040161073090611295565b6108bf7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161083e91906110e1565b60206040518083038186803b15801561085657600080fd5b505afa15801561086a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088e91906110ad565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190610c96565b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060815167ffffffffffffffff8111801561090657600080fd5b50604051908082528060200260200182016040528015610930578160200160208202803683370190505b50905060005b82518110156109875761095b83828151811061094e57fe5b6020026020010151610453565b82828151811061096757fe5b6001600160a01b0390921660209283029190910190910152600101610936565b50919050565b60008282018381101561058a5760405162461bcd60e51b815260040161073090611227565b505050565b3390565b6001600160a01b0383166109e15760405162461bcd60e51b815260040161073090611399565b6001600160a01b038216610a075760405162461bcd60e51b8152600401610730906111e5565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610a62908590611166565b60405180910390a3505050565b6001600160a01b038316610a955760405162461bcd60e51b815260040161073090611354565b6001600160a01b038216610abb5760405162461bcd60e51b8152600401610730906111a2565b610ac6838383610cec565b610b038160405180606001604052806026815260200161151b602691396001600160a01b0386166000908152602081905260409020549190610b84565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610b32908261098d565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610a62908590611166565b60008184841115610ba85760405162461bcd60e51b8152600401610730919061116f565b505050900390565b4690565b6001600160a01b038216610bda5760405162461bcd60e51b815260040161073090611313565b610be682600083610cec565b610c23816040518060600160405280602281526020016114f9602291396001600160a01b0385166000908152602081905260409020549190610b84565b6001600160a01b038316600090815260208190526040902055600254610c499082610d53565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610c8a908590611166565b60405180910390a35050565b6109b28363a9059cbb60e01b8484604051602401610cb59291906110f5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610d95565b610cf78383836109b2565b6001600160a01b0382161580610d1457506001600160a01b038316155b80610d3757506001600160a01b03831660009081526006602052604090205460ff165b6109b25760405162461bcd60e51b8152600401610730906112dc565b600061058a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610b84565b6060610dea826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610e249092919063ffffffff16565b8051909150156109b25780806020019051810190610e089190611075565b6109b25760405162461bcd60e51b815260040161073090611414565b6060610e338484600085610e3b565b949350505050565b6060610e4685610eff565b610e625760405162461bcd60e51b8152600401610730906113dd565b60006060866001600160a01b03168587604051610e7f91906110c5565b60006040518083038185875af1925050503d8060008114610ebc576040519150601f19603f3d011682016040523d82523d6000602084013e610ec1565b606091505b50915091508115610ed5579150610e339050565b805115610ee55780518082602001fd5b8360405162461bcd60e51b8152600401610730919061116f565b3b151590565b600060208284031215610f16578081fd5b813561058a816114e3565b600060208284031215610f32578081fd5b815161058a816114e3565b60008060408385031215610f4f578081fd5b8235610f5a816114e3565b91506020830135610f6a816114e3565b809150509250929050565b600080600060608486031215610f89578081fd5b8335610f94816114e3565b92506020840135610fa4816114e3565b929592945050506040919091013590565b60008060408385031215610fc7578182fd5b8235610fd2816114e3565b946020939093013593505050565b60006020808385031215610ff2578182fd5b823567ffffffffffffffff811115611008578283fd5b8301601f81018513611018578283fd5b803561102b61102682611493565b61146c565b8181528381019083850185840285018601891015611047578687fd5b8694505b8385101561106957803583526001949094019391850191850161104b565b50979650505050505050565b600060208284031215611086578081fd5b8151801515811461058a578182fd5b6000602082840312156110a6578081fd5b5035919050565b6000602082840312156110be578081fd5b5051919050565b600082516110d78184602087016114b3565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b8181101561114f5783516001600160a01b03168352928401929184019160010161112a565b50909695505050505050565b901515815260200190565b90815260200190565b600060208252825180602084015261118e8160408501602087016114b3565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601f908201527f41697264726f702072656465656d20706572696f642068617320656e64656400604082015260600190565b60208082526027908201527f41697264726f702072656465656d20706572696f6420686173206e6f7420656e604082015266191959081e595d60ca1b606082015260800190565b6020808252601e908201527f45524332303a207472616e73666572206973206e6f7420616c6c6f7765640000604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60ff91909116815260200190565b60405181810167ffffffffffffffff8111828210171561148b57600080fd5b604052919050565b600067ffffffffffffffff8211156114a9578081fd5b5060209081020190565b60005b838110156114ce5781810151838201526020016114b6565b838111156114dd576000848401525b50505050565b6001600160a01b038116811461078457600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212209b2d6f14167bc062b61418b8fca6b7946d243420e3df874c9632acb30079c69b64736f6c634300060c0033546f726e61646f4361736820766f756368657220666f72206561726c792061646f7074657273";class pd extends Ka{constructor(...e){e.length>1?super(...e):super(cd,rd,e[0])}getDeployTransaction(e,t,a,n,b){return super.getDeployTransaction(e,t,a,n,b||{})}deploy(e,t,a,n,b){return super.deploy(e,t,a,n,b||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(cd)}static connect(e,t){return new $a(e,cd,t)}}pd.bytecode=rd,pd.abi=cd;var ud=Object.freeze({__proto__:null,Airdrop__factory:ed,ERC20Permit__factory:ad,TORN__factory:fd,Vesting__factory:sd,Voucher__factory:pd,ensSol:Cf,mocks:Yf});const od=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"_admin",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"callToOwner",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"changeOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"delegateToOwner",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"getCurrentOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeToOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],yd="0x608060405260405162000e6738038062000e67833981810160405260608110156200002957600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200005557600080fd5b9083019060208201858111156200006b57600080fd5b82516401000000008111828201881017156200008657600080fd5b82525081516020918201929091019080838360005b83811015620000b55781810151838201526020016200009b565b50505050905090810190601f168015620000e35780820380516001836020036101000a031916815260200191505b5060405250849150839050828282828281620000ff82620001f6565b805115620001bd576000826001600160a01b0316826040518082805190602001908083835b60208310620001455780518252601f19909201916020918201910162000124565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114620001a7576040519150601f19603f3d011682016040523d82523d6000602084013e620001ac565b606091505b5050905080620001bb57600080fd5b505b50620001c69050565b620001d1826200026d565b505050505050620001ed336200029160201b620008ab1760201c565b50505062000308565b6200020c81620002bd60201b620008d51760201c565b620002495760405162461bcd60e51b815260040180806020018281038252603681526020018062000e316036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b806200029c620002c3565b80546001600160a01b0319166001600160a01b039290921691909117905550565b3b151590565b604080517fb4d03667d60278cc15e9a68fa7679dc39ebe71350c4566a2c23c26580da4e0b3602080830191909152825180830382018152918301909252805191012090565b610b1980620003186000396000f3fe6080604052600436106100955760003560e01c80635c60da1b116100595780635c60da1b146102fe5780638f2839701461032f578063a18a186b14610362578063a6f9dae114610377578063f851a440146103aa576100a4565b806323711ab1146100ac57806323c735f1146101625780632e44e0e0146101955780633659cfe61461024b5780634f1ef2861461027e576100a4565b366100a4576100a26103bf565b005b6100a26103bf565b6100a2600480360360408110156100c257600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100ed57600080fd5b8201836020820111156100ff57600080fd5b8035906020019184600183028401116401000000008311171561012157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103d9945050505050565b34801561016e57600080fd5b506100a26004803603602081101561018557600080fd5b50356001600160a01b03166104e7565b6100a2600480360360408110156101ab57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156101d657600080fd5b8201836020820111156101e857600080fd5b8035906020019184600183028401116401000000008311171561020a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610546945050505050565b34801561025757600080fd5b506100a26004803603602081101561026e57600080fd5b50356001600160a01b031661063a565b6100a26004803603604081101561029457600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156102bf57600080fd5b8201836020820111156102d157600080fd5b803590602001918460018302840111640100000000831117156102f357600080fd5b509092509050610671565b34801561030a57600080fd5b5061031361071e565b604080516001600160a01b039092168252519081900360200190f35b34801561033b57600080fd5b506100a26004803603602081101561035257600080fd5b50356001600160a01b031661075b565b34801561036e57600080fd5b50610313610815565b34801561038357600080fd5b506100a26004803603602081101561039a57600080fd5b50356001600160a01b0316610824565b3480156103b657600080fd5b50610313610880565b6103c76103d7565b6103d76103d26108db565b610900565b565b336103e2610924565b6001600160a01b03161461042c576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b6020831061046a5780518252601f19909201916020918201910161044b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146104ca576040519150601f19603f3d011682016040523d82523d6000602084013e6104cf565b606091505b5091509150816104e157805181602001fd5b50505050565b336104f0610924565b6001600160a01b03161461053a576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b6105438161093d565b50565b3361054f610924565b6001600160a01b031614610599576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b60006060836001600160a01b031634846040518082805190602001908083835b602083106105d85780518252601f1990920191602091820191016105b9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146104ca576040519150601f19603f3d011682016040523d82523d6000602084013e6104cf565b61064261097d565b6001600160a01b0316336001600160a01b03161415610669576106648161093d565b610543565b6105436103bf565b61067961097d565b6001600160a01b0316336001600160a01b031614156107115761069b8361093d565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146106f8576040519150601f19603f3d011682016040523d82523d6000602084013e6106fd565b606091505b505090508061070b57600080fd5b50610719565b6107196103bf565b505050565b600061072861097d565b6001600160a01b0316336001600160a01b03161415610750576107496108db565b9050610758565b6107586103bf565b90565b61076361097d565b6001600160a01b0316336001600160a01b03161415610669576001600160a01b0381166107c15760405162461bcd60e51b815260040180806020018281038252603a815260200180610a74603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6107ea61097d565b604080516001600160a01b03928316815291841660208301528051918290030190a1610664816109a2565b600061081f610924565b905090565b3361082d610924565b6001600160a01b031614610877576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b610543816108ab565b600061088a61097d565b6001600160a01b0316336001600160a01b031614156107505761074961097d565b806108b46109c6565b80546001600160a01b0319166001600160a01b039290921691909117905550565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561091f573d6000f35b3d6000fd5b600061092e6109c6565b546001600160a01b0316919050565b61094681610a0b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b604080517fb4d03667d60278cc15e9a68fa7679dc39ebe71350c4566a2c23c26580da4e0b3602080830191909152825180830382018152918301909252805191012090565b610a14816108d5565b610a4f5760405162461bcd60e51b8152600401808060200182810382526036815260200180610aae6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a264697066735822122001f07e10d1eeadbd61da070e50227b529a3ec4b8f2e780a0e6bc1dc6028ba95764736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class ld extends Ka{constructor(...e){e.length>1?super(...e):super(od,yd,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(od)}static connect(e,t){return new $a(e,od,t)}}ld.bytecode=yd,ld.abi=od;const md=[{inputs:[{internalType:"address",name:"_torn",type:"address"},{internalType:"address",name:"_governance",type:"address"},{internalType:"address",name:"_registry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"instance",type:"address"},{indexed:!1,internalType:"uint256",name:"newFee",type:"uint256"}],name:"FeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint24",name:"newFee",type:"uint24"}],name:"UniswapTornPoolSwappingFeeChanged",type:"event"},{inputs:[],name:"PROTOCOL_FEE_DIVIDER",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"calculatePoolFee",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeDeviations",outputs:[{components:[{internalType:"address",name:"instance",type:"address"},{internalType:"int256",name:"deviation",type:"int256"}],internalType:"struct FeeManager.Deviation[]",name:"results",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint24",name:"_uniswapPoolSwappingFee",type:"uint24"}],name:"getTokenPriceRatio",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],name:"instanceFee",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],name:"instanceFeeUpdated",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"instanceFeeWithUpdate",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"registry",outputs:[{internalType:"contract InstanceRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"newPeriod",type:"uint32"}],name:"setPeriodForTWAPOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"},{internalType:"uint256",name:"_price",type:"uint256"}],name:"setTokenPrice",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"_uniswapTornPoolSwappingFee",type:"uint24"}],name:"setUniswapTornPoolSwappingFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"newLimit",type:"uint24"}],name:"setUpdateFeeTimeLimit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"uniswapTimePeriod",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"uniswapTornPoolSwappingFee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"updateAllFees",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"updateFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateFeeTimeLimit",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance[]",name:"_instances",type:"address[]"}],name:"updateFees",outputs:[],stateMutability:"nonpayable",type:"function"}],Td="0x60e06040523480156200001157600080fd5b5060405162001ca738038062001ca783398101604081905262000034916200005c565b6001600160601b0319606093841b811660805291831b821660a05290911b1660c052620000c8565b60008060006060848603121562000071578283fd5b83516200007e81620000af565b60208501519093506200009181620000af565b6040850151909250620000a481620000af565b809150509250925092565b6001600160a01b0381168114620000c557600080fd5b50565b60805160601c60a05160601c60c05160601c611b866200012160003980610350528061061452806108915280610a42525080610539528061064c528061072d528061082252508061059852806107ad5250611b866000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806380eb7bf0116100ad578063bcc5ee6411610071578063bcc5ee641461024b578063c51c229714610253578063d8718fb114610266578063e1f121561461027b578063f522d6d61461028e5761012c565b806380eb7bf014610202578063a028752014610215578063adf898a414610228578063aeb3077a14610230578063b19a2972146102385761012c565b8063603a54fe116100f4578063603a54fe146101ac57806369574fef146101bf5780637b103999146101d25780637ccd2f48146101da57806380679eb3146101ef5761012c565b806305e34364146101315780632efbf3841461015a578063431f63c91461017a5780634bf0a5421461018f5780635aa6e675146101a4575b600080fd5b61014461013f366004611848565b610296565b6040516101519190611ab4565b60405180910390f35b61016d610168366004611848565b6102a8565b60405161015191906118d5565b61018d6101883660046115bc565b610305565b005b61019761034b565b6040516101519190611911565b61016d610537565b61016d6101ba366004611848565b61055b565b6101446101cd366004611584565b610576565b61016d610612565b6101e2610636565b6040516101519190611aa4565b61018d6101fd366004611898565b610641565b61018d610210366004611848565b61069c565b61018d610223366004611864565b610722565b61016d6107ab565b6101446107cf565b61018d6102463660046115e7565b6107d5565b6101e2610805565b61018d610261366004611864565b610817565b61026e610874565b6040516101519190611abd565b61016d610289366004611848565b610887565b61018d610a3d565b60026020526000908152604090205481565b600080546001600160a01b038316825260026020526040822054600160381b90910462ffffff16429190910311156102e3576102e38261069c565b506001600160a01b03808216600090815260016020526040902054165b919050565b3361030e610ad7565b6001600160a01b03161461033d5760405162461bcd60e51b815260040161033490611a06565b60405180910390fd5b6103478282610af0565b5050565b6060807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166310c13ac36040518163ffffffff1660e01b815260040160006040518083038186803b1580156103a757600080fd5b505afa1580156103bb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103e3919081019061167f565b9050805167ffffffffffffffff811180156103fd57600080fd5b5060405190808252806020026020018201604052801561043757816020015b6104246114b2565b81526020019060019003908161041c5790505b50915060005b815181101561053257600061046483838151811061045757fe5b6020026020010151610887565b6001600160a01b03169050600081156104e0576103e8826001600087878151811061048b57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b03166103e8026001600160a01b0316816104db57fe5b040390505b60405180604001604052808585815181106104f757fe5b60200260200101516001600160a01b031681526020018281525085848151811061051d57fe5b6020908102919091010152505060010161043d565b505090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001602052600090815260409020546001600160a01b031681565b600061058183610b19565b610600576040805180820182526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682528516602080830191909152825180840190935260005462ffffff80821685528616918401919091526105fb929063ffffffff630100000090910416610b44565b610609565b61060983610b19565b90505b92915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005462ffffff1681565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461067657600080fd5b6000805463ffffffff90921663010000000266ffffffff00000019909216919091179055565b60006106a782610887565b6001600160a01b03838116600081815260016020908152604080832080546001600160a01b03191695871695909517909455600290528290204290559051919250907f6f0eaf2c2f89fb4cfe96a1dee5e764d60b52c7f48aaa590f0850e308aa1b953a906107169084906118d5565b60405180910390a25050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461075757600080fd5b6000805462ffffff191662ffffff83811691909117918290556040517fbfe65cfc2359076c4468c9b895156c309c78f94fb09f6d2fc0463c4ca9a71ac2926107a0921690611aa4565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b61271081565b60005b8151811015610347576107fd8282815181106107f057fe5b602002602001015161069c565b6001016107d8565b600054600160381b900462ffffff1681565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461084c57600080fd5b6000805462ffffff909216600160381b0269ffffff0000000000000019909216919091179055565b6000546301000000900463ffffffff1681565b60008060008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663032bb443876040518263ffffffff1660e01b81526004016108db91906118d5565b60a06040518083038186803b1580156108f357600080fd5b505afa158015610907573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092b91906117cd565b9450945050935093508063ffffffff1660001415610950576000945050505050610300565b6001600160a01b038316158015610965575083155b61096f5782610985565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b925060006109938484610576565b9050610a32612710610a2c8463ffffffff16610a2685610a2c670de0b6b3a76400008e6001600160a01b0316638bca6d166040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ee57600080fd5b505afa158015610a02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a269190611880565b90610b90565b90610bca565b979650505050505050565b610ad57f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166310c13ac36040518163ffffffff1660e01b815260040160006040518083038186803b158015610a9957600080fd5b505afa158015610aad573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610246919081019061167f565b565b6000610ae1610c0c565b546001600160a01b0316919050565b6000610afa610c61565b6001600160a01b03909316600090815260209390935250604090912055565b600080610b24610c61565b6001600160a01b0390931660009081526020939093525050604090205490565b60208084015190830151600091610b5b9184610c98565b84518451610b7e91670de0b6b3a764000091610b78919087610c98565b90610cc2565b81610b8557fe5b0490505b9392505050565b600082610b9f5750600061060c565b82820282848281610bac57fe5b04146106095760405162461bcd60e51b815260040161033490611a63565b600061060983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610ce6565b6000807fb4d03667d60278cc15e9a68fa7679dc39ebe71350c4566a2c23c26580da4e0b360001c604051602001610c439190611ab4565b60408051601f19818403018152919052805160209091012092915050565b6000807f6521c13ddfc30471ec629848a30b01f73c36737d417c11843e7a9afa6985e84860001c604051602001610c439190611ab4565b6000610cba8473c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28585610d1d565b949350505050565b6000821580610cdd57505081810281838281610cda57fe5b04145b61060c57600080fd5b60008183610d075760405162461bcd60e51b815260040161033491906119b3565b506000838581610d1357fe5b0495945050505050565b600080846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5957600080fd5b505afa158015610d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9191906118b4565b60ff16600a0a90506001600160a01b038681169086161415610dbd576001600160801b03169050610cba565b604051630b4c774160e11b8152610e5e90610e5690731f98431c8ad98523631ae4a59f267346ea31f98490631698ee8290610e00908b908b908b906004016118e9565b60206040518083038186803b158015610e1857600080fd5b505afa158015610e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e509190611568565b85610e6f565b828888611004565b915050610cba565b50949350505050565b600063ffffffff8216610e945760405162461bcd60e51b815260040161033490611a2c565b60408051600280825260608083018452926020830190803683370190505090508281600081518110610ec257fe5b602002602001019063ffffffff16908163ffffffff1681525050600081600181518110610eeb57fe5b63ffffffff9092166020928302919091019091015260405163883bdbfd60e01b81526060906001600160a01b0386169063883bdbfd90610f2f908590600401611969565b60006040518083038186803b158015610f4757600080fd5b505afa158015610f5b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f83919081019061170b565b509050600081600081518110610f9557fe5b602002602001015182600181518110610faa57fe5b60200260200101510390508463ffffffff168160060b81610fc757fe5b05935060008160060b128015610fee57508463ffffffff168160060b81610fea57fe5b0715155b15610ffb57600019909301925b50505092915050565b600080611010866110ee565b90506001600160801b036001600160a01b0382161161107f576001600160a01b038082168002908481169086161061105f5761105a600160c01b876001600160801b031683611407565b611077565b61107781876001600160801b0316600160c01b611407565b925050610e66565b600061109e6001600160a01b0383168068010000000000000000611407565b9050836001600160a01b0316856001600160a01b0316106110d6576110d1600160801b876001600160801b031683611407565b610a32565b610a3281876001600160801b0316600160801b611407565b60008060008360020b12611105578260020b61110d565b8260020b6000035b9050620d89e88111156111325760405162461bcd60e51b815260040161033490611a48565b60006001821661114657600160801b611158565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff169050600282161561118c576ffff97272373d413259a46990580e213a0260801c5b60048216156111ab576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b60088216156111ca576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b60108216156111e9576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615611208576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615611227576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615611246576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615611266576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615611286576ff987a7253ac413176f2b074cf7815e540260801c5b6104008216156112a6576ff3392b0822b70005940c7a398e4b70f30260801c5b6108008216156112c6576fe7159475a2c29b7443b29c7fa6e889d90260801c5b6110008216156112e6576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615611306576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615611326576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615611346576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615611367576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b62020000821615611387576e5d6af8dedb81196699c329225ee6040260801c5b620400008216156113a6576d2216e584f5fa1ea926041bedfe980260801c5b620800008216156113c3576b048a170391f7dc42444e8fa20260801c5b60008460020b13156113de5780600019816113da57fe5b0490505b6401000000008106156113f25760016113f5565b60005b60ff16602082901c0192505050919050565b600080806000198587098686029250828110908390030390508061143d576000841161143257600080fd5b508290049050610b89565b80841161144957600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b604080518082019091526000808252602082015290565b600082601f8301126114d9578081fd5b81516114ec6114e782611af5565b611ace565b81815291506020808301908481018184028601820187101561150d57600080fd5b60005b8481101561153557815161152381611b15565b84529282019290820190600101611510565b505050505092915050565b803561060c81611b15565b805161060c81611b15565b8051600681900b811461060c57600080fd5b600060208284031215611579578081fd5b815161060981611b15565b60008060408385031215611596578081fd5b82356115a181611b15565b915060208301356115b181611b2d565b809150509250929050565b600080604083850312156115ce578182fd5b82356115d981611b15565b946020939093013593505050565b600060208083850312156115f9578182fd5b823567ffffffffffffffff81111561160f578283fd5b8301601f8101851361161f578283fd5b803561162d6114e782611af5565b8181528381019083850185840285018601891015611649578687fd5b8694505b838510156116735761165f8982611540565b83526001949094019391850191850161164d565b50979650505050505050565b60006020808385031215611691578182fd5b825167ffffffffffffffff8111156116a7578283fd5b8301601f810185136116b7578283fd5b80516116c56114e782611af5565b81815283810190838501858402850186018910156116e1578687fd5b8694505b83851015611673576116f7898261154b565b8352600194909401939185019185016116e5565b6000806040838503121561171d578182fd5b825167ffffffffffffffff80821115611734578384fd5b818501915085601f830112611747578384fd5b81516117556114e782611af5565b80828252602080830192508086018a828387028901011115611775578889fd5b8896505b8487101561179f5761178b8b82611556565b845260019690960195928101928101611779565b5088015190965093505050808211156117b6578283fd5b506117c3858286016114c9565b9150509250929050565b600080600080600060a086880312156117e4578081fd5b855180151581146117f3578182fd5b602087015190955061180481611b15565b604087015190945060028110611818578182fd5b606087015190935061182981611b2d565b608087015190925061183a81611b3e565b809150509295509295909350565b600060208284031215611859578081fd5b813561060981611b15565b600060208284031215611875578081fd5b813561060981611b2d565b600060208284031215611891578081fd5b5051919050565b6000602082840312156118a9578081fd5b813561060981611b3e565b6000602082840312156118c5578081fd5b815160ff81168114610609578182fd5b6001600160a01b0391909116815260200190565b6001600160a01b03938416815291909216602082015262ffffff909116604082015260600190565b602080825282518282018190526000919060409081850190868401855b8281101561195c57815180516001600160a01b0316855286015186850152928401929085019060010161192e565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156119a757835163ffffffff1683529284019291840191600101611985565b50909695505050505050565b6000602080835283518082850152825b818110156119df578581018301518582016040015282016119c3565b818111156119f05783604083870101525b50601f01601f1916929092016040019392505050565b6020808252600c908201526b2737ba1030b71037bbb732b960a11b604082015260600190565b602080825260029082015261042560f41b604082015260600190565b6020808252600190820152601560fa1b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b62ffffff91909116815260200190565b90815260200190565b63ffffffff91909116815260200190565b60405181810167ffffffffffffffff81118282101715611aed57600080fd5b604052919050565b600067ffffffffffffffff821115611b0b578081fd5b5060209081020190565b6001600160a01b0381168114611b2a57600080fd5b50565b62ffffff81168114611b2a57600080fd5b63ffffffff81168114611b2a57600080fdfea2646970667358221220e716ce7751ca9331e897d31f3744c6916e2f742be6df42551b069b566751df4c64736f6c634300060c0033";class hd extends Ka{constructor(...e){e.length>1?super(...e):super(md,Td,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(md)}static connect(e,t){return new $a(e,md,t)}}hd.bytecode=Td,hd.abi=md;const gd=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"callToOwner",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"changeOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"delegateToOwner",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"getCurrentOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeToOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],wd="0x608060405260405162000e6038038062000e60833981810160405260408110156200002957600080fd5b8151602083018051604051929492938301929190846401000000008211156200005157600080fd5b9083019060208201858111156200006757600080fd5b82516401000000008111828201881017156200008257600080fd5b82525081516020918201929091019080838360005b83811015620000b157818101518382015260200162000097565b50505050905090810190601f168015620000df5780820380516001836020036101000a031916815260200191505b50604052508391508290508130828281620000fa82620001ef565b805115620001b8576000826001600160a01b0316826040518082805190602001908083835b60208310620001405780518252601f1990920191602091820191016200011f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114620001a2576040519150601f19603f3d011682016040523d82523d6000602084013e620001a7565b606091505b5050905080620001b657600080fd5b505b50620001c19050565b620001cc8262000266565b5050505050620001e7336200028a60201b620008ab1760201c565b505062000301565b6200020581620002b660201b620008d51760201c565b620002425760405162461bcd60e51b815260040180806020018281038252603681526020018062000e2a6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b8062000295620002bc565b80546001600160a01b0319166001600160a01b039290921691909117905550565b3b151590565b604080517fb4d03667d60278cc15e9a68fa7679dc39ebe71350c4566a2c23c26580da4e0b3602080830191909152825180830382018152918301909252805191012090565b610b1980620003116000396000f3fe6080604052600436106100955760003560e01c80635c60da1b116100595780635c60da1b146102fe5780638f2839701461032f578063a18a186b14610362578063a6f9dae114610377578063f851a440146103aa576100a4565b806323711ab1146100ac57806323c735f1146101625780632e44e0e0146101955780633659cfe61461024b5780634f1ef2861461027e576100a4565b366100a4576100a26103bf565b005b6100a26103bf565b6100a2600480360360408110156100c257600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100ed57600080fd5b8201836020820111156100ff57600080fd5b8035906020019184600183028401116401000000008311171561012157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506103d9945050505050565b34801561016e57600080fd5b506100a26004803603602081101561018557600080fd5b50356001600160a01b03166104e7565b6100a2600480360360408110156101ab57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156101d657600080fd5b8201836020820111156101e857600080fd5b8035906020019184600183028401116401000000008311171561020a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610546945050505050565b34801561025757600080fd5b506100a26004803603602081101561026e57600080fd5b50356001600160a01b031661063a565b6100a26004803603604081101561029457600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156102bf57600080fd5b8201836020820111156102d157600080fd5b803590602001918460018302840111640100000000831117156102f357600080fd5b509092509050610671565b34801561030a57600080fd5b5061031361071e565b604080516001600160a01b039092168252519081900360200190f35b34801561033b57600080fd5b506100a26004803603602081101561035257600080fd5b50356001600160a01b031661075b565b34801561036e57600080fd5b50610313610815565b34801561038357600080fd5b506100a26004803603602081101561039a57600080fd5b50356001600160a01b0316610824565b3480156103b657600080fd5b50610313610880565b6103c76103d7565b6103d76103d26108db565b610900565b565b336103e2610924565b6001600160a01b03161461042c576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b6020831061046a5780518252601f19909201916020918201910161044b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146104ca576040519150601f19603f3d011682016040523d82523d6000602084013e6104cf565b606091505b5091509150816104e157805181602001fd5b50505050565b336104f0610924565b6001600160a01b03161461053a576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b6105438161093d565b50565b3361054f610924565b6001600160a01b031614610599576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b60006060836001600160a01b031634846040518082805190602001908083835b602083106105d85780518252601f1990920191602091820191016105b9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146104ca576040519150601f19603f3d011682016040523d82523d6000602084013e6104cf565b61064261097d565b6001600160a01b0316336001600160a01b03161415610669576106648161093d565b610543565b6105436103bf565b61067961097d565b6001600160a01b0316336001600160a01b031614156107115761069b8361093d565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146106f8576040519150601f19603f3d011682016040523d82523d6000602084013e6106fd565b606091505b505090508061070b57600080fd5b50610719565b6107196103bf565b505050565b600061072861097d565b6001600160a01b0316336001600160a01b03161415610750576107496108db565b9050610758565b6107586103bf565b90565b61076361097d565b6001600160a01b0316336001600160a01b03161415610669576001600160a01b0381166107c15760405162461bcd60e51b815260040180806020018281038252603a815260200180610a74603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6107ea61097d565b604080516001600160a01b03928316815291841660208301528051918290030190a1610664816109a2565b600061081f610924565b905090565b3361082d610924565b6001600160a01b031614610877576040805162461bcd60e51b815260206004820152600c60248201526b2737ba1030b71037bbb732b960a11b604482015290519081900360640190fd5b610543816108ab565b600061088a61097d565b6001600160a01b0316336001600160a01b031614156107505761074961097d565b806108b46109c6565b80546001600160a01b0319166001600160a01b039290921691909117905550565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561091f573d6000f35b3d6000fd5b600061092e6109c6565b546001600160a01b0316919050565b61094681610a0b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b604080517fb4d03667d60278cc15e9a68fa7679dc39ebe71350c4566a2c23c26580da4e0b3602080830191909152825180830382018152918301909252805191012090565b610a14816108d5565b610a4f5760405162461bcd60e51b8152600401808060200182810382526036815260200180610aae6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a2646970667358221220486b8f46c84e133fdcdf09d6e85ae28603a923477471dc965d4d7f5f3634234c64736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class vd extends Ka{constructor(...e){e.length>1?super(...e):super(gd,wd,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(gd)}static connect(e,t){return new $a(e,gd,t)}}vd.bytecode=wd,vd.abi=gd;var Md=Object.freeze({__proto__:null,TestnetAdminProxy__factory:ld,TestnetFeeManager__factory:hd,TestnetGovernanceProxy__factory:vd});const _d=[{inputs:[{internalType:"address",name:"account",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"}];class xd{static createInterface(){return new ba(_d)}static connect(e,t){return new $a(e,_d,t)}}xd.abi=_d;const Id=[{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawTorn",outputs:[],stateMutability:"nonpayable",type:"function"}];let Ed=class{static createInterface(){return new ba(Id)}static connect(e,t){return new $a(e,Id,t)}};Ed.abi=Id;const Rd=[{inputs:[{internalType:"address",name:"governanceAddress",type:"address"},{internalType:"address",name:"tornAddress",type:"address"},{internalType:"address",name:"_relayerRegistry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!1,internalType:"uint256",name:"rewardsClaimed",type:"uint256"}],name:"RewardsClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!1,internalType:"uint256",name:"rewards",type:"uint256"}],name:"RewardsUpdated",type:"event"},{inputs:[],name:"Governance",outputs:[{internalType:"contract ITornadoGovernance",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"accumulatedRewardPerTorn",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"accumulatedRewardRateOnLastUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"accumulatedRewards",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"addBurnRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"checkReward",outputs:[{internalType:"uint256",name:"rewards",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ratioConstant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"relayerRegistry",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"setReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amountLockedBeforehand",type:"uint256"}],name:"updateRewardsOnLockedBalanceChange",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawTorn",outputs:[],stateMutability:"nonpayable",type:"function"}],Od="0x6101006040523480156200001257600080fd5b50604051620011e4380380620011e48339810160408190526200003591620000e0565b6001600160601b0319606084811b821660a05283811b821660c05282901b1660e052604080516318160ddd60e01b815290516001600160a01b038416916318160ddd916004808301926020929190829003018186803b1580156200009857600080fd5b505afa158015620000ad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d3919062000133565b6080525062000165915050565b600080600060608486031215620000f5578283fd5b835162000102816200014c565b602085015190935062000115816200014c565b604085015190925062000128816200014c565b809150509250925092565b60006020828403121562000145578081fd5b5051919050565b6001600160a01b03811681146200016257600080fd5b50565b60805160a05160601c60c05160601c60e05160601c610ff0620001f4600039806101eb52806104f652508061023a52806104815280610574528061084252806108d75250806101b9528061026952806103ab5280610550528061059b52806106e5528061078052806107e452806108f952508061036a528061052c528061065f52806109f55250610ff06000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063adf898a41161008c578063e0d3265211610066578063e0d326521461016d578063e113335f14610175578063eacccaf014610188578063f58073b11461019b576100cf565b8063adf898a41461013f578063c3c90e6414610147578063d7ada20d1461015a576100cf565b8063338610af146100d45780633d18b912146100e957806347ff589d146100f157806373f273fc1461010f57806380a120411461012f5780639453911214610137575b600080fd5b6100e76100e2366004610d78565b6101ae565b005b6100e76103a3565b6100f96104f4565b6040516101069190610dc4565b60405180910390f35b61012261011d366004610cf5565b610518565b6040516101069190610f6c565b61012261052a565b6100f961054e565b6100f9610572565b610122610155366004610cf5565b610596565b610122610168366004610cf5565b6106c2565b6101226106d4565b6100e7610183366004610d11565b6106da565b6100e7610196366004610d11565b610775565b6100e76101a9366004610d78565b6107d9565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061020d5750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b6102325760405162461bcd60e51b815260040161022990610ec5565b60405180910390fd5b61039d6103947f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a082317f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639daafec76040518163ffffffff1660e01b815260040160206040518083038186803b1580156102c057600080fd5b505afa1580156102d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f89190610d5c565b6040518263ffffffff1660e01b81526004016103149190610dc4565b60206040518083038186803b15801561032c57600080fd5b505afa158015610340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103649190610d90565b61038e847f0000000000000000000000000000000000000000000000000000000000000000610921565b90610964565b600154906109a6565b60015550565b600061044a337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639ae697bf336040518263ffffffff1660e01b81526004016103f59190610dc4565b60206040518083038186803b15801561040d57600080fd5b505afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104459190610d90565b6109cb565b336000908152600360205260409020549091506104689082906109a6565b336000818152600360205260408120559091506104b0907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083610a85565b336001600160a01b03167ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe826040516104e99190610f6c565b60405180910390a250565b7f000000000000000000000000000000000000000000000000000000000000000081565b60036020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639ae697bf846040518263ffffffff1660e01b81526004016105e59190610dc4565b60206040518083038186803b1580156105fd57600080fd5b505afa158015610611573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106359190610d90565b90508015610697576001600160a01b038316600090815260026020526040902054600154610694917f00000000000000000000000000000000000000000000000000000000000000009161038e91859161068e91610ae0565b90610921565b91505b6001600160a01b0383166000908152600360205260409020546106bb9083906109a6565b9392505050565b60026020526000908152604090205481565b60015481565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107225760405162461bcd60e51b815260040161022990610e5b565b600061072e83836109cb565b6001600160a01b03841660009081526003602052604090205490915061075490826109a6565b6001600160a01b039093166000908152600360205260409020929092555050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107bd5760405162461bcd60e51b815260040161022990610e5b565b6001600160a01b03909116600090815260036020526040902055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108215760405162461bcd60e51b815260040161022990610e5b565b6000198114156108ca576040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610877903090600401610dc4565b60206040518083038186803b15801561088f57600080fd5b505afa1580156108a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c79190610d90565b90505b61091e6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083610a85565b50565b6000826109305750600061095e565b8282028284828161093d57fe5b041461095b5760405162461bcd60e51b815260040161022990610e84565b90505b92915050565b600061095b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610b22565b60008282018381101561095b5760405162461bcd60e51b815260040161022990610e24565b60008115610a27576001600160a01b038316600090815260026020526040902054600154610a24917f00000000000000000000000000000000000000000000000000000000000000009161038e91869161068e91610ae0565b90505b6001546001600160a01b038416600081815260026020526040908190209290925590517f39fe62076cf7adf3c60e355a2da5a4f17a958ca319e8eba385a6c09a8b64901690610a77908490610f6c565b60405180910390a292915050565b610adb8363a9059cbb60e01b8484604051602401610aa4929190610dd8565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b59565b505050565b600061095b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610be8565b60008183610b435760405162461bcd60e51b81526004016102299190610df1565b506000838581610b4f57fe5b0495945050505050565b6060610bae826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c149092919063ffffffff16565b805190915015610adb5780806020019051810190610bcc9190610d3c565b610adb5760405162461bcd60e51b815260040161022990610f22565b60008184841115610c0c5760405162461bcd60e51b81526004016102299190610df1565b505050900390565b6060610c238484600085610c2b565b949350505050565b6060610c3685610cef565b610c525760405162461bcd60e51b815260040161022990610eeb565b60006060866001600160a01b03168587604051610c6f9190610da8565b60006040518083038185875af1925050503d8060008114610cac576040519150601f19603f3d011682016040523d82523d6000602084013e610cb1565b606091505b50915091508115610cc5579150610c239050565b805115610cd55780518082602001fd5b8360405162461bcd60e51b81526004016102299190610df1565b3b151590565b600060208284031215610d06578081fd5b813561095b81610fa5565b60008060408385031215610d23578081fd5b8235610d2e81610fa5565b946020939093013593505050565b600060208284031215610d4d578081fd5b8151801515811461095b578182fd5b600060208284031215610d6d578081fd5b815161095b81610fa5565b600060208284031215610d89578081fd5b5035919050565b600060208284031215610da1578081fd5b5051919050565b60008251610dba818460208701610f75565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6000602082528251806020840152610e10816040850160208701610f75565b601f01601f19169190910160400192915050565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252600f908201526e6f6e6c7920676f7665726e616e636560881b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600c908201526b1d5b985d5d1a1bdc9a5e995960a21b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b90815260200190565b60005b83811015610f90578181015183820152602001610f78565b83811115610f9f576000848401525b50505050565b6001600160a01b038116811461091e57600080fdfea2646970667358221220007ef4aab133b842800388614e081de933a2da981d94088bca1e1a924db5174764736f6c634300060c0033";class kd extends Ka{constructor(...e){e.length>1?super(...e):super(Rd,Od,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Rd)}static connect(e,t){return new $a(e,Rd,t)}}kd.bytecode=Od,kd.abi=Rd;var Pd=Object.freeze({__proto__:null,ITornadoGovernance__factory:xd,ITornadoVault__factory:Ed,TornadoStakingRewards__factory:kd});const Ad=[{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"}];class Cd{static createInterface(){return new ba(Ad)}static connect(e,t){return new $a(e,Ad,t)}}Cd.abi=Ad;const Nd=[{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"}];class Dd{static createInterface(){return new ba(Nd)}static connect(e,t){return new $a(e,Nd,t)}}Dd.abi=Nd;const Sd=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"feeProtocol0Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol0New",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1New",type:"uint8"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Swap",type:"event"}];class Ud{static createInterface(){return new ba(Sd)}static connect(e,t){return new $a(e,Sd,t)}}Ud.abi=Sd;const Vd=[{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}];class Ld{static createInterface(){return new ba(Vd)}static connect(e,t){return new $a(e,Vd,t)}}Ld.abi=Vd;const Fd=[{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"feeProtocol0",type:"uint8"},{internalType:"uint8",name:"feeProtocol1",type:"uint8"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"}];class Gd{static createInterface(){return new ba(Fd)}static connect(e,t){return new $a(e,Fd,t)}}Gd.abi=Fd;const Bd=[{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"_liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint8",name:"feeProtocol",type:"uint8"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int16",name:"wordPosition",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tick",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"}];class jd{static createInterface(){return new ba(Bd)}static connect(e,t){return new $a(e,Bd,t)}}jd.abi=Bd;var Hd=Object.freeze({__proto__:null,IUniswapV3PoolActions__factory:Cd,IUniswapV3PoolDerivedState__factory:Dd,IUniswapV3PoolEvents__factory:Ud,IUniswapV3PoolImmutables__factory:Ld,IUniswapV3PoolOwnerActions__factory:Gd,IUniswapV3PoolState__factory:jd});const zd=[{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!0,internalType:"int24",name:"tickSpacing",type:"int24"}],name:"FeeAmountEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"int24",name:"tickSpacing",type:"int24"},{indexed:!1,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"createPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],name:"enableFeeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"}],name:"feeAmountTickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"getPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"}];class $d{static createInterface(){return new ba(zd)}static connect(e,t){return new $a(e,zd,t)}}$d.abi=zd;const Xd=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"feeProtocol0Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol0New",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1New",type:"uint8"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Swap",type:"event"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"_liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"feeProtocol0",type:"uint8"},{internalType:"uint8",name:"feeProtocol1",type:"uint8"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint8",name:"feeProtocol",type:"uint8"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int16",name:"wordPosition",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tick",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}];class Wd{static createInterface(){return new ba(Xd)}static connect(e,t){return new $a(e,Xd,t)}}Wd.abi=Xd;var qd=Object.freeze({__proto__:null,IUniswapV3Factory__factory:$d,IUniswapV3Pool__factory:Wd,pool:Hd}),Jd=Object.freeze({__proto__:null,interfaces:qd}),Kd=Object.freeze({__proto__:null,contracts:Jd}),Yd=Object.freeze({__proto__:null,v3Core:Kd});const Zd=[{inputs:[],name:"denomination",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"commitment",type:"bytes32"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"proof",type:"bytes"},{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"bytes32",name:"nullifierHash",type:"bytes32"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"address payable",name:"relayer",type:"address"},{internalType:"uint256",name:"fee",type:"uint256"},{internalType:"uint256",name:"refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"}];class Qd{static createInterface(){return new ba(Zd)}static connect(e,t){return new $a(e,Zd,t)}}Qd.abi=Zd;var ei=Object.freeze({__proto__:null,ITornadoInstance__factory:Qd});const ti=[{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"}];class ai{static createInterface(){return new ba(ti)}static connect(e,t){return new $a(e,ti,t)}}ai.abi=ti;var ni=Object.freeze({__proto__:null,IERC20Decimals__factory:ai}),bi=Object.freeze({__proto__:null,uniswapV3OracleHelperSol:ni});const fi=[{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"value",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],di="0x608060405234801561001057600080fd5b50610278806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80631f1bd692146100465780633fa4f245146100c35780638129fc1c146100dd575b600080fd5b61004e6100e7565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100cb610174565b60408051918252519081900360200190f35b6100e561017a565b005b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561016c5780601f106101415761010080835404028352916020019161016c565b820191906000526020600020905b81548152906001019060200180831161014f57829003601f168201915b505050505081565b60005481565b600160008190556040805180820190915260058082526464756d6d7960d81b60209092019182526101ac9291906101af565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101f057805160ff191683800117855561021d565b8280016001018555821561021d579182015b8281111561021d578251825591602001919060010190610202565b5061022992915061022d565b5090565b5b80821115610229576000815560010161022e56fea26469706673582212204b4d54284aeff9c7c570415da4a9efb9bf7115fe94a322210f9981c1c7ae107a64736f6c634300060c0033";class ii extends Ka{constructor(...e){e.length>1?super(...e):super(fi,di,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(fi)}static connect(e,t){return new $a(e,fi,t)}}ii.bytecode=di,ii.abi=fi;const si=[{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"value",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],ci="0x608060405234801561001057600080fd5b50610278806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80631f1bd692146100465780633fa4f245146100c35780638129fc1c146100dd575b600080fd5b61004e6100e7565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100cb610174565b60408051918252519081900360200190f35b6100e561017a565b005b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561016c5780601f106101415761010080835404028352916020019161016c565b820191906000526020600020905b81548152906001019060200180831161014f57829003601f168201915b505050505081565b60005481565b600260005560408051808201909152600680825265323ab6b6bc9960d11b60209092019182526101ac916001916101af565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101f057805160ff191683800117855561021d565b8280016001018555821561021d579182015b8281111561021d578251825591602001919060010190610202565b5061022992915061022d565b5090565b5b80821115610229576000815560010161022e56fea2646970667358221220056d994e19772e421a19f4bcf8cb09061d5645867c4c352106bf6b809fb5de3664736f6c634300060c0033";class ri extends Ka{constructor(...e){e.length>1?super(...e):super(si,ci,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(si)}static connect(e,t){return new $a(e,si,t)}}ri.bytecode=ci,ri.abi=si;var pi=Object.freeze({__proto__:null,DummySecond__factory:ri,Dummy__factory:ii});const ui=[{inputs:[{internalType:"uint256",name:"delay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"}];class oi{static createInterface(){return new ba(ui)}static connect(e,t){return new $a(e,ui,t)}}oi.abi=ui;const yi=[{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"}],li="0x608060405234801561001057600080fd5b5060c48061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063373058b814602d575b600080fd5b60336035565b005b6040805163e4917d9f60e01b81526203f48060048201529051309163e4917d9f91602480830192600092919082900301818387803b158015607557600080fd5b505af11580156088573d6000803e3d6000fd5b5050505056fea264697066735822122080cc4a797d58ff69ba6d6a0d2a3849574ef67da2d75c41e66a86d3f6e162209d64736f6c634300060c0033";class mi extends Ka{constructor(...e){e.length>1?super(...e):super(yi,li,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(yi)}static connect(e,t){return new $a(e,yi,t)}}mi.bytecode=li,mi.abi=yi;var Ti=Object.freeze({__proto__:null,IGovernance__factory:oi,ProposalStateChangeGovernance__factory:mi});const hi=[{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"}];class gi{static createInterface(){return new ba(hi)}static connect(e,t){return new $a(e,hi,t)}}gi.abi=hi;const wi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"x",type:"uint256"}],name:"Overriden",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"newVariable",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"time_",type:"uint256"}],name:"setTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"torna",type:"address"}],name:"setTorn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"time",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],vi="0x6080604052426041553480156200001557600080fd5b50600054610100900460ff168062000032575062000032620000cd565b8062000041575060005460ff16155b620000695760405162461bcd60e51b8152600401620000609062000114565b60405180910390fd5b600054610100900460ff1615801562000095576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000b3620000d3565b8015620000c6576000805461ff00191690555b5062000162565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6123ac80620001726000396000f3fe60806040526004361061023b5760003560e01c8063a0a2b5731161012e578063ce25d71c116100ab578063e4917d9f1161006f578063e4917d9f14610664578063ea0217cf14610684578063ece40cc1146106a4578063f0b76892146106c4578063fe0d94c1146106e45761023b565b8063ce25d71c146105d8578063d6159fe5146105ed578063d6f0948c14610602578063da35c66414610622578063e23a9a52146106375761023b565b8063b54426c8116100f2578063b54426c814610538578063b5f6a74314610558578063b859f11b14610578578063c0c0e82014610598578063c4d66de8146105b85761023b565b8063a0a2b573146104b9578063a6c26603146104d9578063a72edda3146104ee578063adf898a41461050e578063b1610d7e146105235761023b565b80636198e339116101bc57806370b0f6601161018057806370b0f6601461042f5780638d7a72f31461044f57806392ab89bb146104645780639a9e3b6e146104795780639ae697bf146104995761023b565b80636198e3391461039857806365da1264146103b8578063671dd275146103e55780636a661755146103fa5780636dc2dc6c1461040f5761023b565b806337f135d71161020357806337f135d7146103015780633e4f49e614610316578063587a6ecb1461034357806358e9fff0146103585780635c19a95c146103785761023b565b8063013cf08b1461024057806302ec8f9e1461027d57806315373e3d1461029f57806316ada547146102bf57806317977c61146102e1575b600080fd5b34801561024c57600080fd5b5061026061025b366004611cd6565b6106f7565b604051610274989796959493929190611de5565b60405180910390f35b34801561028957600080fd5b5061029d610298366004611cd6565b61075c565b005b3480156102ab57600080fd5b5061029d6102ba366004611d1a565b610789565b3480156102cb57600080fd5b506102d4610798565b6040516102749190612323565b3480156102ed57600080fd5b506102d46102fc366004611acd565b61079e565b34801561030d57600080fd5b506102d46107b0565b34801561032257600080fd5b50610336610331366004611cd6565b6107b6565b6040516102749190611ea3565b34801561034f57600080fd5b506102d46108f9565b34801561036457600080fd5b506102d4610373366004611ae8565b6108ff565b34801561038457600080fd5b5061029d610393366004611acd565b61094d565b3480156103a457600080fd5b5061029d6103b3366004611cd6565b610a6f565b3480156103c457600080fd5b506103d86103d3366004611acd565b610ba6565b6040516102749190611d94565b3480156103f157600080fd5b506102d4610bc1565b34801561040657600080fd5b506102d4610bc7565b34801561041b57600080fd5b5061029d61042a366004611cd6565b610bcd565b34801561043b57600080fd5b5061029d61044a366004611cd6565b610c12565b34801561045b57600080fd5b506102d4610c36565b34801561047057600080fd5b5061029d610c3c565b34801561048557600080fd5b5061029d610494366004611cd6565b610cc3565b3480156104a557600080fd5b506102d46104b4366004611acd565b610ce7565b3480156104c557600080fd5b5061029d6104d4366004611cd6565b610cf9565b3480156104e557600080fd5b506102d4610cfe565b3480156104fa57600080fd5b506102d4610509366004611acd565b610d04565b34801561051a57600080fd5b506103d8610d16565b34801561052f57600080fd5b506102d4610d25565b34801561054457600080fd5b5061029d610553366004611cd6565b610d2b565b34801561056457600080fd5b5061029d610573366004611acd565b610d35565b34801561058457600080fd5b5061029d610593366004611bf5565b610d57565b3480156105a457600080fd5b5061029d6105b3366004611cd6565b610e0e565b3480156105c457600080fd5b5061029d6105d3366004611acd565b610e32565b3480156105e457600080fd5b506102d4611075565b3480156105f957600080fd5b506102d461107b565b34801561060e57600080fd5b506102d461061d366004611b48565b611081565b34801561062e57600080fd5b506102d4611097565b34801561064357600080fd5b50610657610652366004611cee565b6110a1565b60405161027491906122fe565b34801561067057600080fd5b5061029d61067f366004611cd6565b611113565b34801561069057600080fd5b5061029d61069f366004611cd6565b611137565b3480156106b057600080fd5b5061029d6106bf366004611cd6565b61115b565b3480156106d057600080fd5b5061029d6106df366004611b96565b61117f565b61029d6106f2366004611cd6565b6111ff565b603d818154811061070457fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b3330146107845760405162461bcd60e51b815260040161077b90612101565b60405180910390fd5b603555565b610794338383611240565b5050565b60415481565b603e6020526000908152604090205481565b60335481565b60006107c0611097565b82111580156107cf5750600082115b6107eb5760405162461bcd60e51b815260040161077b90612237565b6000603d83815481106107fa57fe5b906000526020600020906008020190508060020154610817611471565b116108265760009150506108f4565b8060030154610833611471565b116108425760019150506108f4565b8060050154816004015411158061086457506035548160050154826004015401105b156108735760029150506108f4565b600681015460ff161561088a5760059150506108f4565b6108af6034546108a9603354846003015461147790919063ffffffff16565b90611477565b6108b7611471565b106108c65760069150506108f4565b60335460038201546108d791611477565b6108df611471565b106108ee5760049150506108f4565b60039150505b919050565b603a5481565b6001600160a01b038381166000908152603c6020526040812054909116331461093a5760405162461bcd60e51b815260040161077b906122c7565b61094584848461149c565b949350505050565b336000818152603c60205260409020546001600160a01b03908116919083161480159061098357506001600160a01b0382163014155b801561099757506001600160a01b03821615155b80156109b55750806001600160a01b0316826001600160a01b031614155b6109d15760405162461bcd60e51b815260040161077b90612138565b6001600160a01b03811615610a17576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000908152603f6020526040902054610a87611471565b11610aa45760405162461bcd60e51b815260040161077b90612064565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054610af29183906117ea565b336000818152603b602052604090819020929092558154915163a9059cbb60e01b81526001600160a01b039092169163a9059cbb91610b35918590600401611da8565b602060405180830381600087803b158015610b4f57600080fd5b505af1158015610b63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b879190611cba565b610ba35760405162461bcd60e51b815260040161077b9061209b565b50565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610bec5760405162461bcd60e51b815260040161077b90612101565b6033548110610c0d5760405162461bcd60e51b815260040161077b90612020565b603a55565b333014610c315760405162461bcd60e51b815260040161077b90612101565b603755565b60425481565b336000908152603c60205260409020546001600160a01b031680610c725760405162461bcd60e51b815260040161077b9061227d565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b333014610ce25760405162461bcd60e51b815260040161077b90612101565b603455565b603b6020526000908152604090205481565b604155565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b610ba33382611816565b604080546001600160a01b0319166001600160a01b0392909216919091179055565b60005b8351811015610de857336001600160a01b0316603c6000868481518110610d7d57fe5b6020908102919091018101516001600160a01b03908116835290820192909252604001600020541614610dc25760405162461bcd60e51b815260040161077b906122c7565b610de0848281518110610dd157fe5b60200260200101518484611240565b600101610d5a565b50336000908152603b602052604090205415610e0957610e09338383611240565b505050565b333014610e2d5760405162461bcd60e51b815260040161077b90612101565b603955565b600054610100900460ff1680610e4b5750610e4b6118fb565b80610e59575060005460ff16155b610e755760405162461bcd60e51b815260040161077b906121e9565b600054610100900460ff16158015610ea0576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff199094169390931716919091179055611060611901565b8015610794576000805461ff00191690555050565b60395481565b60375481565b600061108e33848461149c565b90505b92915050565b603d546000190190565b6110a96119c7565b603d83815481106110b657fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146111325760405162461bcd60e51b815260040161077b90612101565b603355565b3330146111565760405162461bcd60e51b815260040161077b90612101565b603855565b33301461117a5760405162461bcd60e51b815260040161077b90612101565b603655565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf906111bb90899030908a908a908a908a908a90600401611e2b565b600060405180830381600087803b1580156111d557600080fd5b505af11580156111e9573d6000803e3d6000fd5b505050506111f78686611816565b505050505050565b6103e76042556040517fc22c84ebcf25b30190d2b53474def7b552efd2018ef8acaf6bed1b67e8d2be7c90611235908390612323565b60405180910390a150565b600161124b836107b6565b600681111561125657fe5b146112735760405162461bcd60e51b815260040161077b90611f45565b6000603d838154811061128257fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b9094529190942054929450101590806112e15760405162461bcd60e51b815260040161077b9061216f565b825460ff1615611330578254610100900460ff1615611317576001830154600485015461130d91611942565b6004850155611330565b6001830154600585015461132a91611942565b60058501555b841561134f5760048401546113459082611477565b6004850155611364565b600584015461135e9082611477565b60058501555b6006840154610100900460ff161580156113945750603954611392611387611471565b600387015490611942565b105b156113d85760058401546004850154111582151581146113d65760068501805461ff001916610100179055603a5460038601546113d091611477565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a546003870154611423938b9361141e9391926108a992839190611477565b611984565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b5846040516114609190612323565b60405180910390a450505050505050565b60415490565b60008282018381101561108e5760405162461bcd60e51b815260040161077b90611fe9565b6001600160a01b0383166000908152603b60205260408120546036548110156114d75760405162461bcd60e51b815260040161077b90611f8c565b6114e0846119c1565b6114fc5760405162461bcd60e51b815260040161077b906121a6565b6001600160a01b0385166000908152603e6020526040902054801561156e576000611526826107b6565b9050600181600681111561153657fe5b141580156115505750600081600681111561154d57fe5b14155b61156c5760405162461bcd60e51b815260040161077b90611eca565b505b600061157e6037546108a9611471565b905060006115976038548361147790919063ffffffff16565b90506115a16119e7565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff19909316929092179490941617905590611753611097565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350611795928d9261141e9290916108a9919082908a90611477565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516117d59493929190611e6c565b60405180910390a39998505050505050505050565b6000818484111561180e5760405162461bcd60e51b815260040161077b9190611eb7565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd9061184a90859030908690600401611dc1565b602060405180830381600087803b15801561186457600080fd5b505af1158015611878573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061189c9190611cba565b6118b85760405162461bcd60e51b815260040161077b906120ca565b6001600160a01b0382166000908152603b60205260409020546118db9082611477565b6001600160a01b039092166000908152603b602052604090209190915550565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b600061108e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506117ea565b6001600160a01b0382166000908152603f6020526040902054811115610794576001600160a01b03919091166000908152603f6020526040902055565b3b151590565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b038116811461109157600080fd5b803561109181612368565b600082601f830112611a74578081fd5b813567ffffffffffffffff811115611a8a578182fd5b611a9d601f8201601f191660200161232c565b9150808252836020828501011115611ab457600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611ade578081fd5b61108e8383611a42565b600080600060608486031215611afc578182fd5b8335611b0781612353565b92506020840135611b1781612353565b9150604084013567ffffffffffffffff811115611b32578182fd5b611b3e86828701611a64565b9150509250925092565b60008060408385031215611b5a578182fd5b8235611b6581612353565b9150602083013567ffffffffffffffff811115611b80578182fd5b611b8c85828601611a64565b9150509250929050565b60008060008060008060c08789031215611bae578182fd5b611bb88888611a42565b95506020870135945060408701359350606087013560ff81168114611bdb578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215611c09578283fd5b833567ffffffffffffffff80821115611c20578485fd5b818601915086601f830112611c33578485fd5b813581811115611c41578586fd5b60209150818102611c5383820161232c565b8281528381019085850183870186018c1015611c6d57898afd5b8996505b84871015611c9757611c838c82611a42565b835260019690960195918501918501611c71565b5097505050508501359250611cb190508560408601611a59565b90509250925092565b600060208284031215611ccb578081fd5b815161108e81612368565b600060208284031215611ce7578081fd5b5035919050565b60008060408385031215611d00578182fd5b82359150611d118460208501611a42565b90509250929050565b60008060408385031215611d2c578182fd5b823591506020830135611d3e81612368565b809150509250929050565b60008151808452815b81811015611d6e57602081850181015186830182015201611d52565b81811115611d7f5782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152611e996080830184611d49565b9695505050505050565b6020810160078310611eb157fe5b91905290565b60006020825261108e6020830184611d49565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b6020808252601590820152741513d4938e881d1c985b9cd9995c8819985a5b1959605a1b604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561234b57600080fd5b604052919050565b6001600160a01b0381168114610ba357600080fd5b8015158114610ba357600080fdfea264697066735822122077147b2d24ffd383c4a2d0eb254eb72ba4274421278e284354c4848ff7c9df0164736f6c634300060c0033";class Mi extends Ka{constructor(...e){e.length>1?super(...e):super(wi,vi,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(wi)}static connect(e,t){return new $a(e,wi,t)}}Mi.bytecode=vi,Mi.abi=wi;const _i=[{inputs:[{internalType:"address",name:"_newLogic",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"newLogic",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],xi="0x60a060405234801561001057600080fd5b506040516101da3803806101da83398101604081905261002f91610044565b60601b6001600160601b031916608052610072565b600060208284031215610055578081fd5b81516001600160a01b038116811461006b578182fd5b9392505050565b60805160601c610148610092600039806065528060a252506101486000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806305ccb23e1461003b578063373058b814610059575b600080fd5b610043610063565b60405161005091906100fe565b60405180910390f35b610061610087565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b604051631b2ce7f360e11b81523090633659cfe6906100ca907f0000000000000000000000000000000000000000000000000000000000000000906004016100fe565b600060405180830381600087803b1580156100e457600080fd5b505af11580156100f8573d6000803e3d6000fd5b50505050565b6001600160a01b039190911681526020019056fea26469706673582212207d2c2c988cd8f64fa7efb7ef33cfeee3b01f81a501e4a71ae8a63d6a5e269eb664736f6c634300060c0033";class Ii extends Ka{constructor(...e){e.length>1?super(...e):super(_i,xi,e[0])}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}deploy(e,t){return super.deploy(e,t||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(_i)}static connect(e,t){return new $a(e,_i,t)}}Ii.bytecode=xi,Ii.abi=_i;var Ei=Object.freeze({__proto__:null,IProxy__factory:gi,NewImplementation__factory:Mi,ProposalUpgrade__factory:Ii});const Ri=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"time_",type:"uint256"}],name:"setTimestamp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"torna",type:"address"}],name:"setTorn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"time",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],Oi="0x6080604052426041553480156200001557600080fd5b50600054610100900460ff168062000032575062000032620000cd565b8062000041575060005460ff16155b620000695760405162461bcd60e51b8152600401620000609062000114565b60405180910390fd5b600054610100900460ff1615801562000095576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000b3620000d3565b8015620000c6576000805461ff00191690555b5062000162565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6125c980620001726000396000f3fe6080604052600436106102305760003560e01c8063a0a2b5731161012e578063ce25d71c116100ab578063e4917d9f1161006f578063e4917d9f14610644578063ea0217cf14610664578063ece40cc114610684578063f0b76892146106a4578063fe0d94c1146106c457610230565b8063ce25d71c146105b8578063d6159fe5146105cd578063d6f0948c146105e2578063da35c66414610602578063e23a9a521461061757610230565b8063b54426c8116100f2578063b54426c814610518578063b5f6a74314610538578063b859f11b14610558578063c0c0e82014610578578063c4d66de81461059857610230565b8063a0a2b57314610499578063a6c26603146104b9578063a72edda3146104ce578063adf898a4146104ee578063b1610d7e1461050357610230565b80635c19a95c116101bc5780636dc2dc6c116101805780636dc2dc6c1461040457806370b0f6601461042457806392ab89bb146104445780639a9e3b6e146104595780639ae697bf1461047957610230565b80635c19a95c1461036d5780636198e3391461038d57806365da1264146103ad578063671dd275146103da5780636a661755146103ef57610230565b806317977c611161020357806317977c61146102d657806337f135d7146102f65780633e4f49e61461030b578063587a6ecb1461033857806358e9fff01461034d57610230565b8063013cf08b1461023557806302ec8f9e1461027257806315373e3d1461029457806316ada547146102b4575b600080fd5b34801561024157600080fd5b50610255610250366004611e01565b6106d7565b604051610269989796959493929190611f0d565b60405180910390f35b34801561027e57600080fd5b5061029261028d366004611e01565b61073c565b005b3480156102a057600080fd5b506102926102af366004611e45565b610769565b3480156102c057600080fd5b506102c9610778565b6040516102699190612510565b3480156102e257600080fd5b506102c96102f1366004611bf8565b61077e565b34801561030257600080fd5b506102c9610790565b34801561031757600080fd5b5061032b610326366004611e01565b610796565b6040516102699190611fcb565b34801561034457600080fd5b506102c96108d9565b34801561035957600080fd5b506102c9610368366004611c13565b6108df565b34801561037957600080fd5b50610292610388366004611bf8565b61092d565b34801561039957600080fd5b506102926103a8366004611e01565b610a4f565b3480156103b957600080fd5b506103cd6103c8366004611bf8565b610b86565b6040516102699190611ebc565b3480156103e657600080fd5b506102c9610ba1565b3480156103fb57600080fd5b506102c9610ba7565b34801561041057600080fd5b5061029261041f366004611e01565b610bad565b34801561043057600080fd5b5061029261043f366004611e01565b610bf2565b34801561045057600080fd5b50610292610c16565b34801561046557600080fd5b50610292610474366004611e01565b610c9d565b34801561048557600080fd5b506102c9610494366004611bf8565b610cc1565b3480156104a557600080fd5b506102926104b4366004611e01565b610cd3565b3480156104c557600080fd5b506102c9610cd8565b3480156104da57600080fd5b506102c96104e9366004611bf8565b610cde565b3480156104fa57600080fd5b506103cd610cf0565b34801561050f57600080fd5b506102c9610cff565b34801561052457600080fd5b50610292610533366004611e01565b610d05565b34801561054457600080fd5b50610292610553366004611bf8565b610d0f565b34801561056457600080fd5b50610292610573366004611d20565b610d31565b34801561058457600080fd5b50610292610593366004611e01565b610de8565b3480156105a457600080fd5b506102926105b3366004611bf8565b610e0c565b3480156105c457600080fd5b506102c961104f565b3480156105d957600080fd5b506102c9611055565b3480156105ee57600080fd5b506102c96105fd366004611c73565b61105b565b34801561060e57600080fd5b506102c9611071565b34801561062357600080fd5b50610637610632366004611e19565b61107b565b60405161026991906124eb565b34801561065057600080fd5b5061029261065f366004611e01565b6110ed565b34801561067057600080fd5b5061029261067f366004611e01565b611111565b34801561069057600080fd5b5061029261069f366004611e01565b611135565b3480156106b057600080fd5b506102926106bf366004611cc1565b611159565b6102926106d2366004611e01565b6111d9565b603d81815481106106e457fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b3330146107645760405162461bcd60e51b815260040161075b906122b7565b60405180910390fd5b603555565b61077433838361136b565b5050565b60415481565b603e6020526000908152604090205481565b60335481565b60006107a0611071565b82111580156107af5750600082115b6107cb5760405162461bcd60e51b815260040161075b906123ed565b6000603d83815481106107da57fe5b9060005260206000209060080201905080600201546107f761159c565b116108065760009150506108d4565b806003015461081361159c565b116108225760019150506108d4565b8060050154816004015411158061084457506035548160050154826004015401105b156108535760029150506108d4565b600681015460ff161561086a5760059150506108d4565b61088f60345461088960335484600301546115a290919063ffffffff16565b906115a2565b61089761159c565b106108a65760069150506108d4565b60335460038201546108b7916115a2565b6108bf61159c565b106108ce5760049150506108d4565b60039150505b919050565b603a5481565b6001600160a01b038381166000908152603c6020526040812054909116331461091a5760405162461bcd60e51b815260040161075b9061247d565b6109258484846115c7565b949350505050565b336000818152603c60205260409020546001600160a01b03908116919083161480159061096357506001600160a01b0382163014155b801561097757506001600160a01b03821615155b80156109955750806001600160a01b0316826001600160a01b031614155b6109b15760405162461bcd60e51b815260040161075b906122ee565b6001600160a01b038116156109f7576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000908152603f6020526040902054610a6761159c565b11610a845760405162461bcd60e51b815260040161075b9061221a565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054610ad2918390611915565b336000818152603b602052604090819020929092558154915163a9059cbb60e01b81526001600160a01b039092169163a9059cbb91610b15918590600401611ed0565b602060405180830381600087803b158015610b2f57600080fd5b505af1158015610b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b679190611de5565b610b835760405162461bcd60e51b815260040161075b90612251565b50565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610bcc5760405162461bcd60e51b815260040161075b906122b7565b6033548110610bed5760405162461bcd60e51b815260040161075b906121d6565b603a55565b333014610c115760405162461bcd60e51b815260040161075b906122b7565b603755565b336000908152603c60205260409020546001600160a01b031680610c4c5760405162461bcd60e51b815260040161075b90612433565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b333014610cbc5760405162461bcd60e51b815260040161075b906122b7565b603455565b603b6020526000908152604090205481565b604155565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b610b833382611941565b604080546001600160a01b0319166001600160a01b0392909216919091179055565b60005b8351811015610dc257336001600160a01b0316603c6000868481518110610d5757fe5b6020908102919091018101516001600160a01b03908116835290820192909252604001600020541614610d9c5760405162461bcd60e51b815260040161075b9061247d565b610dba848281518110610dab57fe5b6020026020010151848461136b565b600101610d34565b50336000908152603b602052604090205415610de357610de333838361136b565b505050565b333014610e075760405162461bcd60e51b815260040161075b906122b7565b603955565b600054610100900460ff1680610e255750610e25611a26565b80610e33575060005460ff16155b610e4f5760405162461bcd60e51b815260040161075b9061239f565b600054610100900460ff16158015610e7a576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff19909416939093171691909117905561103a611a2c565b8015610774576000805461ff00191690555050565b60395481565b60375481565b60006110683384846115c7565b90505b92915050565b603d546000190190565b611083611af2565b603d838154811061109057fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b33301461110c5760405162461bcd60e51b815260040161075b906122b7565b603355565b3330146111305760405162461bcd60e51b815260040161075b906122b7565b603855565b3330146111545760405162461bcd60e51b815260040161075b906122b7565b603655565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf9061119590899030908a908a908a908a908a90600401611f53565b600060405180830381600087803b1580156111af57600080fd5b505af11580156111c3573d6000803e3d6000fd5b505050506111d18686611941565b505050505050565b60046111e482610796565b60068111156111ef57fe5b1461120c5760405162461bcd60e51b815260040161075b90612035565b6000603d828154811061121b57fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b031661125681611a6d565b6112725760405162461bcd60e51b815260040161075b90611ff2565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b038516916112b691611ea0565b600060405180830381855af49150503d80600081146112f1576040519150601f19603f3d011682016040523d82523d6000602084013e6112f6565b606091505b50915091508161133957805115611321578060405162461bcd60e51b815260040161075b9190611fdf565b60405162461bcd60e51b815260040161075b906124b4565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b600161137683610796565b600681111561138157fe5b1461139e5760405162461bcd60e51b815260040161075b906120fb565b6000603d83815481106113ad57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b90945291909420549294501015908061140c5760405162461bcd60e51b815260040161075b90612325565b825460ff161561145b578254610100900460ff1615611442576001830154600485015461143891611a73565b600485015561145b565b6001830154600585015461145591611a73565b60058501555b841561147a57600484015461147090826115a2565b600485015561148f565b600584015461148990826115a2565b60058501555b6006840154610100900460ff161580156114bf57506039546114bd6114b261159c565b600387015490611a73565b105b156115035760058401546004850154111582151581146115015760068501805461ff001916610100179055603a5460038601546114fb916115a2565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a54600387015461154e938b93611549939192610889928391906115a2565b611ab5565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b58460405161158b9190612510565b60405180910390a450505050505050565b60415490565b6000828201838110156110685760405162461bcd60e51b815260040161075b9061219f565b6001600160a01b0383166000908152603b60205260408120546036548110156116025760405162461bcd60e51b815260040161075b90612142565b61160b84611a6d565b6116275760405162461bcd60e51b815260040161075b9061235c565b6001600160a01b0385166000908152603e6020526040902054801561169957600061165182610796565b9050600181600681111561166157fe5b1415801561167b5750600081600681111561167857fe5b14155b6116975760405162461bcd60e51b815260040161075b90612080565b505b60006116a960375461088961159c565b905060006116c2603854836115a290919063ffffffff16565b90506116cc611b12565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff1990931692909217949094161790559061187e611071565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a549293506118c0928d92611549929091610889919082908a906115a2565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516119009493929190611f94565b60405180910390a39998505050505050505050565b600081848411156119395760405162461bcd60e51b815260040161075b9190611fdf565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd9061197590859030908690600401611ee9565b602060405180830381600087803b15801561198f57600080fd5b505af11580156119a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c79190611de5565b6119e35760405162461bcd60e51b815260040161075b90612280565b6001600160a01b0382166000908152603b6020526040902054611a0690826115a2565b6001600160a01b039092166000908152603b602052604090209190915550565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b3b151590565b600061106883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611915565b6001600160a01b0382166000908152603f6020526040902054811115610774576001600160a01b03919091166000908152603f6020526040902055565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b038116811461106b57600080fd5b803561106b81612585565b600082601f830112611b9f578081fd5b813567ffffffffffffffff811115611bb5578182fd5b611bc8601f8201601f1916602001612519565b9150808252836020828501011115611bdf57600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611c09578081fd5b6110688383611b6d565b600080600060608486031215611c27578182fd5b8335611c3281612570565b92506020840135611c4281612570565b9150604084013567ffffffffffffffff811115611c5d578182fd5b611c6986828701611b8f565b9150509250925092565b60008060408385031215611c85578182fd5b8235611c9081612570565b9150602083013567ffffffffffffffff811115611cab578182fd5b611cb785828601611b8f565b9150509250929050565b60008060008060008060c08789031215611cd9578182fd5b611ce38888611b6d565b95506020870135945060408701359350606087013560ff81168114611d06578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215611d34578283fd5b833567ffffffffffffffff80821115611d4b578485fd5b818601915086601f830112611d5e578485fd5b813581811115611d6c578586fd5b60209150818102611d7e838201612519565b8281528381019085850183870186018c1015611d9857898afd5b8996505b84871015611dc257611dae8c82611b6d565b835260019690960195918501918501611d9c565b5097505050508501359250611ddc90508560408601611b84565b90509250925092565b600060208284031215611df6578081fd5b815161106881612585565b600060208284031215611e12578081fd5b5035919050565b60008060408385031215611e2b578182fd5b82359150611e3c8460208501611b6d565b90509250929050565b60008060408385031215611e57578182fd5b823591506020830135611e6981612585565b809150509250929050565b60008151808452611e8c816020860160208601612540565b601f01601f19169290920160200192915050565b60008251611eb2818460208701612540565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152611fc16080830184611e74565b9695505050505050565b6020810160078310611fd957fe5b91905290565b6000602082526110686020830184611e74565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b6020808252601590820152741513d4938e881d1c985b9cd9995c8819985a5b1959605a1b604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561253857600080fd5b604052919050565b60005b8381101561255b578181015183820152602001612543565b8381111561256a576000848401525b50505050565b6001600160a01b0381168114610b8357600080fd5b8015158114610b8357600080fdfea264697066735822122079a24ea0dc3d5ef34041a37a137cef69305763e031faa841e2db8f078345f2af64736f6c634300060c0033";class ki extends Ka{constructor(...e){e.length>1?super(...e):super(Ri,Oi,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ri)}static connect(e,t){return new $a(e,Ri,t)}}ki.bytecode=Oi,ki.abi=Ri;const Pi=[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"output",type:"address"}],name:"Debug",type:"event"},{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"}],Ai="0x608060405234801561001057600080fd5b506103d5806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063373058b814610030575b600080fd5b61003861003a565b005b6000604051610048906100fa565b604051809103906000f080158015610064573d6000803e3d6000fd5b509050806001600160a01b0316638129fc1c6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156100a257600080fd5b505af11580156100b6573d6000803e3d6000fd5b5050604080516001600160a01b038516815290517f330da4cde831ccab151372275307c2f0cce2bcce846635cd66e6908f10d203639350908190036020019150a150565b610298806101088339019056fe608060405234801561001057600080fd5b50610278806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80631f1bd692146100465780633fa4f245146100c35780638129fc1c146100dd575b600080fd5b61004e6100e7565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100cb610174565b60408051918252519081900360200190f35b6100e561017a565b005b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561016c5780601f106101415761010080835404028352916020019161016c565b820191906000526020600020905b81548152906001019060200180831161014f57829003601f168201915b505050505081565b60005481565b600160008190556040805180820190915260058082526464756d6d7960d81b60209092019182526101ac9291906101af565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101f057805160ff191683800117855561021d565b8280016001018555821561021d579182015b8281111561021d578251825591602001919060010190610202565b5061022992915061022d565b5090565b5b80821115610229576000815560010161022e56fea26469706673582212204b4d54284aeff9c7c570415da4a9efb9bf7115fe94a322210f9981c1c7ae107a64736f6c634300060c0033a26469706673582212205967b156db23a5fd2372953049f5c366f68a9f95cfa116f9fbd6d0c8e7bdaa6364736f6c634300060c0033";class Ci extends Ka{constructor(...e){e.length>1?super(...e):super(Pi,Ai,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Pi)}static connect(e,t){return new $a(e,Pi,t)}}Ci.bytecode=Ai,Ci.abi=Pi;var Ni=Object.freeze({__proto__:null,MockGovernance__factory:ki,Proposal__factory:Ci,dummySol:pi,proposalStateChangeGovernanceSol:Ti,proposalUpgradeSol:Ei});const Di=[{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"}],Si="0x608060405234801561001057600080fd5b50610563806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063a6c2660311610097578063d6159fe511610066578063d6159fe5146101e2578063e4917d9f146101ea578063ea0217cf14610207578063ece40cc11461022457610100565b8063a6c26603146101ad578063b1610d7e146101b5578063c0c0e820146101bd578063ce25d71c146101da57610100565b80636a661755116100d35780636a6617551461014e5780636dc2dc6c1461015657806370b0f660146101735780639a9e3b6e1461019057610100565b806302ec8f9e1461010557806337f135d714610124578063587a6ecb1461013e578063671dd27514610146575b600080fd5b6101226004803603602081101561011b57600080fd5b5035610241565b005b61012c610288565b60408051918252519081900360200190f35b61012c61028e565b61012c610294565b61012c61029a565b6101226004803603602081101561016c57600080fd5b50356102a0565b6101226004803603602081101561018957600080fd5b5035610327565b610122600480360360208110156101a657600080fd5b503561036e565b61012c6103b5565b61012c6103bb565b610122600480360360208110156101d357600080fd5b50356103c1565b61012c610408565b61012c61040e565b6101226004803603602081101561020057600080fd5b5035610414565b6101226004803603602081101561021d57600080fd5b503561045b565b6101226004803603602081101561023a57600080fd5b50356104a2565b333014610283576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600255565b60005481565b60075481565b60025481565b60015481565b3330146102e2576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b60005481106103225760405162461bcd60e51b81526004018080602001828103825260248152602001806104ea6024913960400191505060405180910390fd5b600755565b333014610369576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600455565b3330146103b0576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600155565b60035481565b60055481565b333014610403576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600655565b60065481565b60045481565b333014610456576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600055565b33301461049d576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b600555565b3330146104e4576040805162461bcd60e51b8152602060048201526018602482015260008051602061050e833981519152604482015290519081900360640190fd5b60035556fe476f7665726e616e63653a20696e636f727265637420766f7465457874656e6454696d65476f7665726e616e63653a20756e617574686f72697a65640000000000000000a26469706673582212208fff4d62d622acc801ece8b6a7cc281f67f5959bf09e0ca68afde2a0ab0bc83164736f6c634300060c0033";class Ui extends Ka{constructor(...e){e.length>1?super(...e):super(Di,Si,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Di)}static connect(e,t){return new $a(e,Di,t)}}Ui.bytecode=Si,Ui.abi=Di;const Vi=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}];class Li{static createInterface(){return new ba(Vi)}static connect(e,t){return new $a(e,Vi,t)}}Li.abi=Vi;const Fi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"}];class Gi{static createInterface(){return new ba(Fi)}static connect(e,t){return new $a(e,Fi,t)}}Gi.abi=Fi;const Bi=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"}],ji="0x60806040523480156200001157600080fd5b50600054610100900460ff16806200002e57506200002e620000c9565b806200003d575060005460ff16155b620000655760405162461bcd60e51b81526004016200005c9062000110565b60405180910390fd5b600054610100900460ff1615801562000091576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000af620000cf565b8015620000c2576000805461ff00191690555b506200015e565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b612524806200016e6000396000f3fe60806040526004361061020f5760003560e01c8063a6c2660311610118578063d6159fe5116100a0578063e4917d9f1161006f578063e4917d9f146105ce578063ea0217cf146105ee578063ece40cc11461060e578063f0b768921461062e578063fe0d94c11461064e5761020f565b8063d6159fe514610557578063d6f0948c1461056c578063da35c6641461058c578063e23a9a52146105a15761020f565b8063b54426c8116100e7578063b54426c8146104c2578063b859f11b146104e2578063c0c0e82014610502578063c4d66de814610522578063ce25d71c146105425761020f565b8063a6c2660314610463578063a72edda314610478578063adf898a414610498578063b1610d7e146104ad5761020f565b80636198e3391161019b5780636dc2dc6c1161016a5780636dc2dc6c146103ce57806370b0f660146103ee57806392ab89bb1461040e5780639a9e3b6e146104235780639ae697bf146104435761020f565b80636198e3391461035757806365da126414610377578063671dd275146103a45780636a661755146103b95761020f565b806337f135d7116101e257806337f135d7146102c05780633e4f49e6146102d5578063587a6ecb1461030257806358e9fff0146103175780635c19a95c146103375761020f565b8063013cf08b1461021457806302ec8f9e1461025157806315373e3d1461027357806317977c6114610293575b600080fd5b34801561022057600080fd5b5061023461022f366004611d5c565b610661565b604051610248989796959493929190611e68565b60405180910390f35b34801561025d57600080fd5b5061027161026c366004611d5c565b6106c6565b005b34801561027f57600080fd5b5061027161028e366004611da0565b6106f3565b34801561029f57600080fd5b506102b36102ae366004611b53565b610702565b604051610248919061246b565b3480156102cc57600080fd5b506102b3610714565b3480156102e157600080fd5b506102f56102f0366004611d5c565b61071a565b6040516102489190611f26565b34801561030e57600080fd5b506102b361085d565b34801561032357600080fd5b506102b3610332366004611b6e565b610863565b34801561034357600080fd5b50610271610352366004611b53565b6108b1565b34801561036357600080fd5b50610271610372366004611d5c565b6109d3565b34801561038357600080fd5b50610397610392366004611b53565b610b0a565b6040516102489190611e17565b3480156103b057600080fd5b506102b3610b25565b3480156103c557600080fd5b506102b3610b2b565b3480156103da57600080fd5b506102716103e9366004611d5c565b610b31565b3480156103fa57600080fd5b50610271610409366004611d5c565b610b76565b34801561041a57600080fd5b50610271610b9a565b34801561042f57600080fd5b5061027161043e366004611d5c565b610c21565b34801561044f57600080fd5b506102b361045e366004611b53565b610c45565b34801561046f57600080fd5b506102b3610c57565b34801561048457600080fd5b506102b3610493366004611b53565b610c5d565b3480156104a457600080fd5b50610397610c6f565b3480156104b957600080fd5b506102b3610c7e565b3480156104ce57600080fd5b506102716104dd366004611d5c565b610c84565b3480156104ee57600080fd5b506102716104fd366004611c7b565b610c8e565b34801561050e57600080fd5b5061027161051d366004611d5c565b610d45565b34801561052e57600080fd5b5061027161053d366004611b53565b610d69565b34801561054e57600080fd5b506102b3610fac565b34801561056357600080fd5b506102b3610fb2565b34801561057857600080fd5b506102b3610587366004611bce565b610fb8565b34801561059857600080fd5b506102b3610fce565b3480156105ad57600080fd5b506105c16105bc366004611d74565b610fd8565b6040516102489190612446565b3480156105da57600080fd5b506102716105e9366004611d5c565b61104a565b3480156105fa57600080fd5b50610271610609366004611d5c565b61106e565b34801561061a57600080fd5b50610271610629366004611d5c565b611092565b34801561063a57600080fd5b50610271610649366004611c1c565b6110b6565b61027161065c366004611d5c565b611136565b603d818154811061066e57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b3330146106ee5760405162461bcd60e51b81526004016106e590612212565b60405180910390fd5b603555565b6106fe3383836112c8565b5050565b603e6020526000908152604090205481565b60335481565b6000610724610fce565b82111580156107335750600082115b61074f5760405162461bcd60e51b81526004016106e590612348565b6000603d838154811061075e57fe5b90600052602060002090600802019050806002015461077b6114f9565b1161078a576000915050610858565b80600301546107976114f9565b116107a6576001915050610858565b806005015481600401541115806107c857506035548160050154826004015401105b156107d7576002915050610858565b600681015460ff16156107ee576005915050610858565b61081360345461080d60335484600301546114fd90919063ffffffff16565b906114fd565b61081b6114f9565b1061082a576006915050610858565b603354600382015461083b916114fd565b6108436114f9565b10610852576004915050610858565b60039150505b919050565b603a5481565b6001600160a01b038381166000908152603c6020526040812054909116331461089e5760405162461bcd60e51b81526004016106e5906123d8565b6108a9848484611522565b949350505050565b336000818152603c60205260409020546001600160a01b0390811691908316148015906108e757506001600160a01b0382163014155b80156108fb57506001600160a01b03821615155b80156109195750806001600160a01b0316826001600160a01b031614155b6109355760405162461bcd60e51b81526004016106e590612249565b6001600160a01b0381161561097b576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000908152603f60205260409020546109eb6114f9565b11610a085760405162461bcd60e51b81526004016106e590612175565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054610a56918390611870565b336000818152603b602052604090819020929092558154915163a9059cbb60e01b81526001600160a01b039092169163a9059cbb91610a99918590600401611e2b565b602060405180830381600087803b158015610ab357600080fd5b505af1158015610ac7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aeb9190611d40565b610b075760405162461bcd60e51b81526004016106e5906121ac565b50565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610b505760405162461bcd60e51b81526004016106e590612212565b6033548110610b715760405162461bcd60e51b81526004016106e590612131565b603a55565b333014610b955760405162461bcd60e51b81526004016106e590612212565b603755565b336000908152603c60205260409020546001600160a01b031680610bd05760405162461bcd60e51b81526004016106e59061238e565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b333014610c405760405162461bcd60e51b81526004016106e590612212565b603455565b603b6020526000908152604090205481565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b610b07338261189c565b60005b8351811015610d1f57336001600160a01b0316603c6000868481518110610cb457fe5b6020908102919091018101516001600160a01b03908116835290820192909252604001600020541614610cf95760405162461bcd60e51b81526004016106e5906123d8565b610d17848281518110610d0857fe5b602002602001015184846112c8565b600101610c91565b50336000908152603b602052604090205415610d4057610d403383836112c8565b505050565b333014610d645760405162461bcd60e51b81526004016106e590612212565b603955565b600054610100900460ff1680610d825750610d82611981565b80610d90575060005460ff16155b610dac5760405162461bcd60e51b81526004016106e5906122fa565b600054610100900460ff16158015610dd7576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff199094169390931716919091179055610f97611987565b80156106fe576000805461ff00191690555050565b60395481565b60375481565b6000610fc5338484611522565b90505b92915050565b603d546000190190565b610fe0611a4d565b603d8381548110610fed57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146110695760405162461bcd60e51b81526004016106e590612212565b603355565b33301461108d5760405162461bcd60e51b81526004016106e590612212565b603855565b3330146110b15760405162461bcd60e51b81526004016106e590612212565b603655565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf906110f290899030908a908a908a908a908a90600401611eae565b600060405180830381600087803b15801561110c57600080fd5b505af1158015611120573d6000803e3d6000fd5b5050505061112e868661189c565b505050505050565b60046111418261071a565b600681111561114c57fe5b146111695760405162461bcd60e51b81526004016106e590611f90565b6000603d828154811061117857fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b03166111b3816119c8565b6111cf5760405162461bcd60e51b81526004016106e590611f4d565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161121391611dfb565b600060405180830381855af49150503d806000811461124e576040519150601f19603f3d011682016040523d82523d6000602084013e611253565b606091505b5091509150816112965780511561127e578060405162461bcd60e51b81526004016106e59190611f3a565b60405162461bcd60e51b81526004016106e59061240f565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b60016112d38361071a565b60068111156112de57fe5b146112fb5760405162461bcd60e51b81526004016106e590612056565b6000603d838154811061130a57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b9094529190942054929450101590806113695760405162461bcd60e51b81526004016106e590612280565b825460ff16156113b8578254610100900460ff161561139f5760018301546004850154611395916119ce565b60048501556113b8565b600183015460058501546113b2916119ce565b60058501555b84156113d75760048401546113cd90826114fd565b60048501556113ec565b60058401546113e690826114fd565b60058501555b6006840154610100900460ff1615801561141c575060395461141a61140f6114f9565b6003870154906119ce565b105b1561146057600584015460048501541115821515811461145e5760068501805461ff001916610100179055603a546003860154611458916114fd565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a5460038701546114ab938b936114a693919261080d928391906114fd565b611a10565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b5846040516114e8919061246b565b60405180910390a450505050505050565b4290565b600082820183811015610fc55760405162461bcd60e51b81526004016106e5906120fa565b6001600160a01b0383166000908152603b602052604081205460365481101561155d5760405162461bcd60e51b81526004016106e59061209d565b611566846119c8565b6115825760405162461bcd60e51b81526004016106e5906122b7565b6001600160a01b0385166000908152603e602052604090205480156115f45760006115ac8261071a565b905060018160068111156115bc57fe5b141580156115d6575060008160068111156115d357fe5b14155b6115f25760405162461bcd60e51b81526004016106e590611fdb565b505b600061160460375461080d6114f9565b9050600061161d603854836114fd90919063ffffffff16565b9050611627611a6d565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff199093169290921794909416179055906117d9610fce565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a5492935061181b928d926114a692909161080d919082908a906114fd565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d60405161185b9493929190611eef565b60405180910390a39998505050505050505050565b600081848411156118945760405162461bcd60e51b81526004016106e59190611f3a565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd906118d090859030908690600401611e44565b602060405180830381600087803b1580156118ea57600080fd5b505af11580156118fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119229190611d40565b61193e5760405162461bcd60e51b81526004016106e5906121db565b6001600160a01b0382166000908152603b602052604090205461196190826114fd565b6001600160a01b039092166000908152603b602052604090209190915550565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b3b151590565b6000610fc583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611870565b6001600160a01b0382166000908152603f60205260409020548111156106fe576001600160a01b03919091166000908152603f6020526040902055565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b0381168114610fc857600080fd5b8035610fc8816124e0565b600082601f830112611afa578081fd5b813567ffffffffffffffff811115611b10578182fd5b611b23601f8201601f1916602001612474565b9150808252836020828501011115611b3a57600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611b64578081fd5b610fc58383611ac8565b600080600060608486031215611b82578182fd5b8335611b8d816124cb565b92506020840135611b9d816124cb565b9150604084013567ffffffffffffffff811115611bb8578182fd5b611bc486828701611aea565b9150509250925092565b60008060408385031215611be0578182fd5b8235611beb816124cb565b9150602083013567ffffffffffffffff811115611c06578182fd5b611c1285828601611aea565b9150509250929050565b60008060008060008060c08789031215611c34578182fd5b611c3e8888611ac8565b95506020870135945060408701359350606087013560ff81168114611c61578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215611c8f578283fd5b833567ffffffffffffffff80821115611ca6578485fd5b818601915086601f830112611cb9578485fd5b813581811115611cc7578586fd5b60209150818102611cd9838201612474565b8281528381019085850183870186018c1015611cf357898afd5b8996505b84871015611d1d57611d098c82611ac8565b835260019690960195918501918501611cf7565b5097505050508501359250611d3790508560408601611adf565b90509250925092565b600060208284031215611d51578081fd5b8151610fc5816124e0565b600060208284031215611d6d578081fd5b5035919050565b60008060408385031215611d86578182fd5b82359150611d978460208501611ac8565b90509250929050565b60008060408385031215611db2578182fd5b823591506020830135611dc4816124e0565b809150509250929050565b60008151808452611de781602086016020860161249b565b601f01601f19169290920160200192915050565b60008251611e0d81846020870161249b565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152611f1c6080830184611dcf565b9695505050505050565b6020810160078310611f3457fe5b91905290565b600060208252610fc56020830184611dcf565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b6020808252601590820152741513d4938e881d1c985b9cd9995c8819985a5b1959605a1b604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561249357600080fd5b604052919050565b60005b838110156124b657818101518382015260200161249e565b838111156124c5576000848401525b50505050565b6001600160a01b0381168114610b0757600080fd5b8015158114610b0757600080fdfea26469706673582212208c8a57d0dd9da76417112ba79eab1d38dbdf5e0a8bc014651f10bebe82ce8f9b64736f6c634300060c0033";class Hi extends Ka{constructor(...e){e.length>1?super(...e):super(Bi,ji,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Bi)}static connect(e,t){return new $a(e,Bi,t)}}Hi.bytecode=ji,Hi.abi=Bi;var zi=Object.freeze({__proto__:null,Configuration__factory:Ui,Core__factory:Li,Delegation__factory:Gi,Governance__factory:Hi,mocks:Ni});const $i=[{inputs:[{internalType:"address",name:"_gasCompensationVault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"gasCompensationVault",outputs:[{internalType:"contract IGasCompensationVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_gasCompensationsLimit",type:"uint256"}],name:"setGasCompensations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawFromHelper",outputs:[],stateMutability:"nonpayable",type:"function"}];class Xi{static createInterface(){return new ba($i)}static connect(e,t){return new $a(e,$i,t)}}Xi.abi=$i;const Wi=[{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"gasAmount",type:"uint256"}],name:"compensateGas",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawToGovernance",outputs:[],stateMutability:"nonpayable",type:"function"}];class qi{static createInterface(){return new ba(Wi)}static connect(e,t){return new $a(e,Wi,t)}}qi.abi=Wi;var Ji=Object.freeze({__proto__:null,GasCompensator__factory:Xi,IGasCompensationVault__factory:qi});const Ki=[{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawTorn",outputs:[],stateMutability:"nonpayable",type:"function"}];class Yi{static createInterface(){return new ba(Ki)}static connect(e,t){return new $a(e,Ki,t)}}Yi.abi=Ki;var Zi=Object.freeze({__proto__:null,ITornadoVault__factory:Yi});const Qi=[{inputs:[{internalType:"address",name:"_gasCompLogic",type:"address"},{internalType:"address",name:"_userVault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"checkIfQuorumReached",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"gasCompensationVault",outputs:[{internalType:"contract IGasCompensationVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"account",type:"address"}],name:"hasAccountVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"returnMultisigAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"gasCompensationsLimit",type:"uint256"}],name:"setGasCompensations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawFromHelper",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],es="0x60c06040523480156200001157600080fd5b5060405162002e3138038062002e31833981016040819052620000349162000153565b60005482908290610100900460ff1680620000545750620000546200010c565b8062000063575060005460ff16155b6200008b5760405162461bcd60e51b8152600401620000829062000191565b60405180910390fd5b600054610100900460ff16158015620000b7576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000d562000112565b8015620000e8576000805461ff00191690555b506001600160601b0319606091821b811660805291901b1660a05250620001f89050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6000806040838503121562000166578182fd5b82516200017381620001df565b60208401519092506200018681620001df565b809150509250929050565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6001600160a01b0381168114620001f557600080fd5b50565b60805160601c60a05160601c612bf162000240600039806108c55280610e525280610f4a52806114505280611ee1525080610d545280610fb75280611cf75250612bf16000f3fe60806040526004361061026b5760003560e01c80639ae697bf11610144578063d6159fe5116100b6578063e525aa081161007a578063e525aa08146106ff578063ea0217cf1461071f578063ece40cc11461073f578063ef3f8bb11461075f578063f0b768921461077f578063fe0d94c11461079f57610272565b8063d6159fe514610668578063d6f0948c1461067d578063da35c6641461069d578063e23a9a52146106b2578063e4917d9f146106df57610272565b8063b1610d7e11610108578063b1610d7e146105be578063b54426c8146105d3578063b859f11b146105f3578063c0c0e82014610613578063c4d66de814610633578063ce25d71c1461065357610272565b80639ae697bf1461053f5780639daafec71461055f578063a6c2660314610574578063a72edda314610589578063adf898a4146105a957610272565b80635c19a95c116101dd5780636dc2dc6c116101a15780636dc2dc6c1461049557806370b0f660146104b55780638b34a960146104d557806392ab89bb146104ea578063932d5157146104ff5780639a9e3b6e1461051f57610272565b80635c19a95c1461040b5780636198e3391461042b57806365da12641461044b578063671dd2751461046b5780636a6617551461048057610272565b806332687ec11161022f57806332687ec11461034557806337f135d7146103725780633e4f49e61461038757806354fd4d50146103b4578063587a6ecb146103d657806358e9fff0146103eb57610272565b8063013cf08b1461027757806302ec8f9e146102b457806315373e3d146102d657806317977c61146102f657806324b0435f1461032357610272565b3661027257005b600080fd5b34801561028357600080fd5b506102976102923660046123c5565b6107b2565b6040516102ab9897969594939291906124d1565b60405180910390f35b3480156102c057600080fd5b506102d46102cf3660046123c5565b610817565b005b3480156102e257600080fd5b506102d46102f1366004612409565b610844565b34801561030257600080fd5b506103166103113660046121bc565b610947565b6040516102ab9190612b38565b34801561032f57600080fd5b50610338610959565b6040516102ab9190612480565b34801561035157600080fd5b506103656103603660046123c5565b610971565b6040516102ab919061258f565b34801561037e57600080fd5b506103166109bf565b34801561039357600080fd5b506103a76103a23660046123c5565b6109c5565b6040516102ab919061259a565b3480156103c057600080fd5b506103c9610b01565b6040516102ab91906125ae565b3480156103e257600080fd5b50610316610b38565b3480156103f757600080fd5b506103166104063660046121d7565b610b3e565b34801561041757600080fd5b506102d46104263660046121bc565b610b8c565b34801561043757600080fd5b506102d46104463660046123c5565b610cae565b34801561045757600080fd5b506103386104663660046121bc565b610dc0565b34801561047757600080fd5b50610316610ddb565b34801561048c57600080fd5b50610316610de1565b3480156104a157600080fd5b506102d46104b03660046123c5565b610de7565b3480156104c157600080fd5b506102d46104d03660046123c5565b610e2c565b3480156104e157600080fd5b50610338610e50565b3480156104f657600080fd5b506102d4610e74565b34801561050b57600080fd5b506102d461051a3660046123c5565b610efb565b34801561052b57600080fd5b506102d461053a3660046123c5565b610f7f565b34801561054b57600080fd5b5061031661055a3660046121bc565b610fa3565b34801561056b57600080fd5b50610338610fb5565b34801561058057600080fd5b50610316610fd9565b34801561059557600080fd5b506103166105a43660046121bc565b610fdf565b3480156105b557600080fd5b50610338610ff1565b3480156105ca57600080fd5b50610316611000565b3480156105df57600080fd5b506102d46105ee3660046123c5565b611006565b3480156105ff57600080fd5b506102d461060e3660046122e4565b611013565b34801561061f57600080fd5b506102d461062e3660046123c5565b611061565b34801561063f57600080fd5b506102d461064e3660046121bc565b611085565b34801561065f57600080fd5b506103166112c9565b34801561067457600080fd5b506103166112cf565b34801561068957600080fd5b50610316610698366004612237565b6112d5565b3480156106a957600080fd5b506103166112eb565b3480156106be57600080fd5b506106d26106cd3660046123dd565b6112f5565b6040516102ab9190612b13565b3480156106eb57600080fd5b506102d46106fa3660046123c5565b611367565b34801561070b57600080fd5b5061036561071a3660046123dd565b61138b565b34801561072b57600080fd5b506102d461073a3660046123c5565b6113ce565b34801561074b57600080fd5b506102d461075a3660046123c5565b6113f2565b34801561076b57600080fd5b506102d461077a3660046123c5565b611416565b34801561078b57600080fd5b506102d461079a366004612285565b6114a5565b6102d46107ad3660046123c5565b611525565b603d81815481106107bf57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461083f5760405162461bcd60e51b815260040161083690612881565b60405180910390fd5b603555565b3361084f833361138b565b158015610862575061086083610971565b155b333214610870576000610874565b6152085b61ffff1681156109355760005a905061088e3387876116b7565b60006108ab6127106108a5856108a55a87906118e8565b9061192a565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce807906108fc9088908590600401612494565b600060405180830381600087803b15801561091657600080fd5b505af115801561092a573d6000803e3d6000fd5b505050505050610940565b6109403386866116b7565b5050505050565b603e6020526000908152604090205481565b73b04e030140b30c27bcdfaafffa98c57d80eda7b490565b6000603554603d838154811061098357fe5b906000526020600020906008020160050154603d84815481106109a257fe5b90600052602060002090600802016004015401101590505b919050565b60335481565b60006109cf6112eb565b82111580156109de5750600082115b6109fa5760405162461bcd60e51b8152600401610836906129de565b6000603d8381548110610a0957fe5b906000526020600020906008020190508060020154610a2661194f565b11610a355760009150506109ba565b8060030154610a4261194f565b11610a515760019150506109ba565b80600501548160040154111580610a7357506035548160050154826004015401105b15610a825760029150506109ba565b600681015460ff1615610a995760059150506109ba565b610ab86034546108a5603354846003015461192a90919063ffffffff16565b610ac061194f565b10610acf5760069150506109ba565b6033546003820154610ae09161192a565b610ae861194f565b10610af75760049150506109ba565b60039150506109ba565b60408051808201909152601981527f322e6c6f74746572792d616e642d6761732d7570677261646500000000000000602082015290565b603a5481565b6001600160a01b038381166000908152603c60205260408120549091163314610b795760405162461bcd60e51b815260040161083690612a6e565b610b84848484611953565b949350505050565b336000818152603c60205260409020546001600160a01b039081169190831614801590610bc257506001600160a01b0382163014155b8015610bd657506001600160a01b03821615155b8015610bf45750806001600160a01b0316826001600160a01b031614155b610c105760405162461bcd60e51b8152600401610836906128b8565b6001600160a01b03811615610c56576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000908152603f6020526040902054610cc661194f565b11610ce35760405162461bcd60e51b8152600401610836906127e9565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054610d31918390611ca1565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610d9291908590600401612494565b600060405180830381600087803b158015610dac57600080fd5b505af1158015610940573d6000803e3d6000fd5b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610e065760405162461bcd60e51b815260040161083690612881565b6033548110610e275760405162461bcd60e51b8152600401610836906127a5565b603a55565b333014610e4b5760405162461bcd60e51b815260040161083690612881565b603755565b7f000000000000000000000000000000000000000000000000000000000000000081565b336000908152603c60205260409020546001600160a01b031680610eaa5760405162461bcd60e51b815260040161083690612a24565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b610f03610959565b6001600160a01b0316336001600160a01b031614610f335760405162461bcd60e51b8152600401610836906129b7565b604051633a08bde160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e822f78490610d92908490600401612b38565b333014610f9e5760405162461bcd60e51b815260040161083690612881565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b6110103382611ccd565b50565b60008351116110345760405162461bcd60e51b815260040161083690612857565b61105c838383611044863361138b565b158015611057575061105586610971565b155b611dd2565b505050565b3330146110805760405162461bcd60e51b815260040161083690612881565b603955565b600054610100900460ff168061109e575061109e612016565b806110ac575060005460ff16155b6110c85760405162461bcd60e51b815260040161083690612969565b600054610100900460ff161580156110f3576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff1990941693909317169190911790556112b361201c565b80156112c5576000805461ff00191690555b5050565b60395481565b60375481565b60006112e2338484611953565b90505b92915050565b603d546000190190565b6112fd6120b6565b603d838154811061130a57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146113865760405162461bcd60e51b815260040161083690612881565b603355565b6000603d838154811061139a57fe5b600091825260208083206001600160a01b03861684526007600890930201919091019052604090205460ff16905092915050565b3330146113ed5760405162461bcd60e51b815260040161083690612881565b603855565b3330146114115760405162461bcd60e51b815260040161083690612881565b603655565b61141e610959565b6001600160a01b0316336001600160a01b03161461144e5760405162461bcd60e51b8152600401610836906129b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fc611485834761205d565b6040518115909202916000818181858888f1935050505061101057600080fd5b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf906114e190899030908a908a908a908a908a90600401612517565b600060405180830381600087803b1580156114fb57600080fd5b505af115801561150f573d6000803e3d6000fd5b5050505061151d8686611ccd565b505050505050565b6004611530826109c5565b600681111561153b57fe5b146115585760405162461bcd60e51b815260040161083690612604565b6000603d828154811061156757fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b03166115a281612073565b6115be5760405162461bcd60e51b8152600401610836906125c1565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161160291612464565b600060405180830381855af49150503d806000811461163d576040519150601f19603f3d011682016040523d82523d6000602084013e611642565b606091505b5091509150816116855780511561166d578060405162461bcd60e51b815260040161083691906125ae565b60405162461bcd60e51b815260040161083690612aa5565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b60016116c2836109c5565b60068111156116cd57fe5b146116ea5760405162461bcd60e51b8152600401610836906126ca565b6000603d83815481106116f957fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b9094529190942054929450101590806117585760405162461bcd60e51b8152600401610836906128ef565b825460ff16156117a7578254610100900460ff161561178e5760018301546004850154611784916118e8565b60048501556117a7565b600183015460058501546117a1916118e8565b60058501555b84156117c65760048401546117bc908261192a565b60048501556117db565b60058401546117d5908261192a565b60058501555b6006840154610100900460ff1615801561180b57506039546118096117fe61194f565b6003870154906118e8565b105b1561184f57600584015460048501541115821515811461184d5760068501805461ff001916610100179055603a5460038601546118479161192a565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a54600387015461189a938b936118959391926108a59283919061192a565b612079565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b5846040516118d79190612b38565b60405180910390a450505050505050565b60006112e283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ca1565b6000828201838110156112e25760405162461bcd60e51b81526004016108369061276e565b4290565b6001600160a01b0383166000908152603b602052604081205460365481101561198e5760405162461bcd60e51b815260040161083690612711565b61199784612073565b6119b35760405162461bcd60e51b815260040161083690612926565b6001600160a01b0385166000908152603e60205260409020548015611a255760006119dd826109c5565b905060018160068111156119ed57fe5b14158015611a0757506000816006811115611a0457fe5b14155b611a235760405162461bcd60e51b81526004016108369061264f565b505b6000611a356037546108a561194f565b90506000611a4e6038548361192a90919063ffffffff16565b9050611a586120d6565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff19909316929092179490941617905590611c0a6112eb565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350611c4c928d926118959290916108a5919082908a9061192a565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d604051611c8c9493929190612558565b60405180910390a39998505050505050505050565b60008184841115611cc55760405162461bcd60e51b815260040161083691906125ae565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd90611d219085907f00000000000000000000000000000000000000000000000000000000000000009086906004016124ad565b602060405180830381600087803b158015611d3b57600080fd5b505af1158015611d4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7391906123a9565b611d8f5760405162461bcd60e51b815260040161083690612820565b6001600160a01b0382166000908152603b6020526040902054611db2908261192a565b6001600160a01b039092166000908152603b602052604090209190915550565b3381328214611de2576000611de6565b6152085b61ffff168115611f515760005a905060005b8851811015611eaf576000898281518110611e0f57fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611e4f57506001600160a01b03811633145b611e6b5760405162461bcd60e51b815260040161083690612a6e565b861580611e7f5750611e7d898261138b565b155b611e9b5760405162461bcd60e51b815260040161083690612adc565b611ea6818a8a6116b7565b50600101611df8565b506000611ec76127106108a5856108a55a87906118e8565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce80790611f189088908590600401612494565b600060405180830381600087803b158015611f3257600080fd5b505af1158015611f46573d6000803e3d6000fd5b50505050505061200d565b60005b875181101561200b576000888281518110611f6b57fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611fab57506001600160a01b03811633145b611fc75760405162461bcd60e51b815260040161083690612a6e565b851580611fdb5750611fd9888261138b565b155b611ff75760405162461bcd60e51b815260040161083690612adc565b6120028189896116b7565b50600101611f54565b505b50505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b600081831061206c57816112e2565b5090919050565b3b151590565b6001600160a01b0382166000908152603f60205260409020548111156112c5576001600160a01b03919091166000908152603f6020526040902055565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b03811681146112e557600080fd5b80356112e581612bad565b600082601f830112612163578081fd5b813567ffffffffffffffff811115612179578182fd5b61218c601f8201601f1916602001612b41565b91508082528360208285010111156121a357600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156121cd578081fd5b6112e28383612131565b6000806000606084860312156121eb578182fd5b83356121f681612b98565b9250602084013561220681612b98565b9150604084013567ffffffffffffffff811115612221578182fd5b61222d86828701612153565b9150509250925092565b60008060408385031215612249578182fd5b823561225481612b98565b9150602083013567ffffffffffffffff81111561226f578182fd5b61227b85828601612153565b9150509250929050565b60008060008060008060c0878903121561229d578182fd5b6122a78888612131565b95506020870135945060408701359350606087013560ff811681146122ca578283fd5b9598949750929560808101359460a0909101359350915050565b6000806000606084860312156122f8578283fd5b833567ffffffffffffffff8082111561230f578485fd5b818601915086601f830112612322578485fd5b813581811115612330578586fd5b60209150818102612342838201612b41565b8281528381019085850183870186018c101561235c57898afd5b8996505b84871015612386576123728c82612131565b835260019690960195918501918501612360565b50975050505085013592506123a090508560408601612148565b90509250925092565b6000602082840312156123ba578081fd5b81516112e281612bad565b6000602082840312156123d6578081fd5b5035919050565b600080604083850312156123ef578182fd5b823591506124008460208501612131565b90509250929050565b6000806040838503121561241b578182fd5b82359150602083013561242d81612bad565b809150509250929050565b60008151808452612450816020860160208601612b68565b601f01601f19169290920160200192915050565b60008251612476818460208701612b68565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b0386168252846020830152836040830152608060608301526125856080830184612438565b9695505050505050565b901515815260200190565b60208101600783106125a857fe5b91905290565b6000602082526112e26020830184612438565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526010908201526f43616e206e6f7420626520656d70747960801b604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600d908201526c6f6e6c79206d756c746973696760981b604082015260600190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b60208082526019908201527f476f7665726e616e63653a20766f74656420616c726561647900000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715612b6057600080fd5b604052919050565b60005b83811015612b83578181015183820152602001612b6b565b83811115612b92576000848401525b50505050565b6001600160a01b038116811461101057600080fd5b801515811461101057600080fdfea2646970667358221220a9ae24380315e86f1632949f167f44c17322fe48a1385357edbfdf8bc543469764736f6c634300060c0033";class ts extends Ka{constructor(...e){e.length>1?super(...e):super(Qi,es,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Qi)}static connect(e,t){return new $a(e,Qi,t)}}ts.bytecode=es,ts.abi=Qi;const as=[{inputs:[{internalType:"address",name:"_userVault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"}],ns="0x60a06040523480156200001157600080fd5b506040516200277e3803806200277e833981016040819052620000349162000142565b600054610100900460ff168062000050575062000050620000fb565b806200005f575060005460ff16155b620000875760405162461bcd60e51b81526004016200007e9062000172565b60405180910390fd5b600054610100900460ff16158015620000b3576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000d162000101565b8015620000e4576000805461ff00191690555b5060601b6001600160601b031916608052620001c0565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b60006020828403121562000154578081fd5b81516001600160a01b03811681146200016b578182fd5b9392505050565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60805160601c612596620001e860003980610af15280610cb3528061194752506125966000f3fe6080604052600436106102255760003560e01c80639daafec711610123578063ce25d71c116100ab578063e4917d9f1161006f578063e4917d9f1461061b578063ea0217cf1461063b578063ece40cc11461065b578063f0b768921461067b578063fe0d94c11461069b57610225565b8063ce25d71c1461058f578063d6159fe5146105a4578063d6f0948c146105b9578063da35c664146105d9578063e23a9a52146105ee57610225565b8063b1610d7e116100f2578063b1610d7e146104fa578063b54426c81461050f578063b859f11b1461052f578063c0c0e8201461054f578063c4d66de81461056f57610225565b80639daafec71461049b578063a6c26603146104b0578063a72edda3146104c5578063adf898a4146104e557610225565b80635c19a95c116101b15780636dc2dc6c116101755780636dc2dc6c1461040657806370b0f6601461042657806392ab89bb146104465780639a9e3b6e1461045b5780639ae697bf1461047b57610225565b80635c19a95c1461036f5780636198e3391461038f57806365da1264146103af578063671dd275146103dc5780636a661755146103f157610225565b806337f135d7116101f857806337f135d7146102d65780633e4f49e6146102eb57806354fd4d5014610318578063587a6ecb1461033a57806358e9fff01461034f57610225565b8063013cf08b1461022a57806302ec8f9e1461026757806315373e3d1461028957806317977c61146102a9575b600080fd5b34801561023657600080fd5b5061024a610245366004611dfd565b6106ae565b60405161025e989796959493929190611f09565b60405180910390f35b34801561027357600080fd5b50610287610282366004611dfd565b610713565b005b34801561029557600080fd5b506102876102a4366004611e41565b610740565b3480156102b557600080fd5b506102c96102c4366004611bf4565b61074f565b60405161025e91906124dd565b3480156102e257600080fd5b506102c9610761565b3480156102f757600080fd5b5061030b610306366004611dfd565b610767565b60405161025e9190611fc7565b34801561032457600080fd5b5061032d6108aa565b60405161025e9190611fdb565b34801561034657600080fd5b506102c96108d5565b34801561035b57600080fd5b506102c961036a366004611c0f565b6108db565b34801561037b57600080fd5b5061028761038a366004611bf4565b610929565b34801561039b57600080fd5b506102876103aa366004611dfd565b610a4b565b3480156103bb57600080fd5b506103cf6103ca366004611bf4565b610b64565b60405161025e9190611eb8565b3480156103e857600080fd5b506102c9610b7f565b3480156103fd57600080fd5b506102c9610b85565b34801561041257600080fd5b50610287610421366004611dfd565b610b8b565b34801561043257600080fd5b50610287610441366004611dfd565b610bd0565b34801561045257600080fd5b50610287610bf4565b34801561046757600080fd5b50610287610476366004611dfd565b610c7b565b34801561048757600080fd5b506102c9610496366004611bf4565b610c9f565b3480156104a757600080fd5b506103cf610cb1565b3480156104bc57600080fd5b506102c9610cd5565b3480156104d157600080fd5b506102c96104e0366004611bf4565b610cdb565b3480156104f157600080fd5b506103cf610ced565b34801561050657600080fd5b506102c9610cfc565b34801561051b57600080fd5b5061028761052a366004611dfd565b610d02565b34801561053b57600080fd5b5061028761054a366004611d1c565b610d0f565b34801561055b57600080fd5b5061028761056a366004611dfd565b610dc6565b34801561057b57600080fd5b5061028761058a366004611bf4565b610dea565b34801561059b57600080fd5b506102c961102d565b3480156105b057600080fd5b506102c9611033565b3480156105c557600080fd5b506102c96105d4366004611c6f565b611039565b3480156105e557600080fd5b506102c961104f565b3480156105fa57600080fd5b5061060e610609366004611e15565b611059565b60405161025e91906124b8565b34801561062757600080fd5b50610287610636366004611dfd565b6110cb565b34801561064757600080fd5b50610287610656366004611dfd565b6110ef565b34801561066757600080fd5b50610287610676366004611dfd565b611113565b34801561068757600080fd5b50610287610696366004611cbd565b611137565b6102876106a9366004611dfd565b6111b7565b603d81815481106106bb57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461073b5760405162461bcd60e51b815260040161073290612284565b60405180910390fd5b603555565b61074b338383611349565b5050565b603e6020526000908152604090205481565b60335481565b600061077161104f565b82111580156107805750600082115b61079c5760405162461bcd60e51b8152600401610732906123ba565b6000603d83815481106107ab57fe5b9060005260206000209060080201905080600201546107c861157a565b116107d75760009150506108a5565b80600301546107e461157a565b116107f35760019150506108a5565b8060050154816004015411158061081557506035548160050154826004015401105b156108245760029150506108a5565b600681015460ff161561083b5760059150506108a5565b61086060345461085a603354846003015461157e90919063ffffffff16565b9061157e565b61086861157a565b106108775760069150506108a5565b60335460038201546108889161157e565b61089061157a565b1061089f5760049150506108a5565b60039150505b919050565b60408051808201909152601181527019173b30bab63a16b6b4b3b930ba34b7b760791b602082015290565b603a5481565b6001600160a01b038381166000908152603c602052604081205490911633146109165760405162461bcd60e51b81526004016107329061244a565b6109218484846115a3565b949350505050565b336000818152603c60205260409020546001600160a01b03908116919083161480159061095f57506001600160a01b0382163014155b801561097357506001600160a01b03821615155b80156109915750806001600160a01b0316826001600160a01b031614155b6109ad5760405162461bcd60e51b8152600401610732906122bb565b6001600160a01b038116156109f3576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000908152603f6020526040902054610a6361157a565b11610a805760405162461bcd60e51b815260040161073290612216565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054610ace9183906118f1565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610b2f91908590600401611ecc565b600060405180830381600087803b158015610b4957600080fd5b505af1158015610b5d573d6000803e3d6000fd5b5050505050565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610baa5760405162461bcd60e51b815260040161073290612284565b6033548110610bcb5760405162461bcd60e51b8152600401610732906121d2565b603a55565b333014610bef5760405162461bcd60e51b815260040161073290612284565b603755565b336000908152603c60205260409020546001600160a01b031680610c2a5760405162461bcd60e51b815260040161073290612400565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b333014610c9a5760405162461bcd60e51b815260040161073290612284565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b610d0c338261191d565b50565b60005b8351811015610da057336001600160a01b0316603c6000868481518110610d3557fe5b6020908102919091018101516001600160a01b03908116835290820192909252604001600020541614610d7a5760405162461bcd60e51b81526004016107329061244a565b610d98848281518110610d8957fe5b60200260200101518484611349565b600101610d12565b50336000908152603b602052604090205415610dc157610dc1338383611349565b505050565b333014610de55760405162461bcd60e51b815260040161073290612284565b603955565b600054610100900460ff1680610e035750610e03611a22565b80610e11575060005460ff16155b610e2d5760405162461bcd60e51b81526004016107329061236c565b600054610100900460ff16158015610e58576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff199094169390931716919091179055611018611a28565b801561074b576000805461ff00191690555050565b60395481565b60375481565b60006110463384846115a3565b90505b92915050565b603d546000190190565b611061611aee565b603d838154811061106e57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146110ea5760405162461bcd60e51b815260040161073290612284565b603355565b33301461110e5760405162461bcd60e51b815260040161073290612284565b603855565b3330146111325760405162461bcd60e51b815260040161073290612284565b603655565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf9061117390899030908a908a908a908a908a90600401611f4f565b600060405180830381600087803b15801561118d57600080fd5b505af11580156111a1573d6000803e3d6000fd5b505050506111af868661191d565b505050505050565b60046111c282610767565b60068111156111cd57fe5b146111ea5760405162461bcd60e51b815260040161073290612031565b6000603d82815481106111f957fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b031661123481611a69565b6112505760405162461bcd60e51b815260040161073290611fee565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161129491611e9c565b600060405180830381855af49150503d80600081146112cf576040519150601f19603f3d011682016040523d82523d6000602084013e6112d4565b606091505b509150915081611317578051156112ff578060405162461bcd60e51b81526004016107329190611fdb565b60405162461bcd60e51b815260040161073290612481565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b600161135483610767565b600681111561135f57fe5b1461137c5760405162461bcd60e51b8152600401610732906120f7565b6000603d838154811061138b57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b9094529190942054929450101590806113ea5760405162461bcd60e51b8152600401610732906122f2565b825460ff1615611439578254610100900460ff1615611420576001830154600485015461141691611a6f565b6004850155611439565b6001830154600585015461143391611a6f565b60058501555b841561145857600484015461144e908261157e565b600485015561146d565b6005840154611467908261157e565b60058501555b6006840154610100900460ff1615801561149d575060395461149b61149061157a565b600387015490611a6f565b105b156114e15760058401546004850154111582151581146114df5760068501805461ff001916610100179055603a5460038601546114d99161157e565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a54600387015461152c938b9361152793919261085a9283919061157e565b611ab1565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b58460405161156991906124dd565b60405180910390a450505050505050565b4290565b6000828201838110156110465760405162461bcd60e51b81526004016107329061219b565b6001600160a01b0383166000908152603b60205260408120546036548110156115de5760405162461bcd60e51b81526004016107329061213e565b6115e784611a69565b6116035760405162461bcd60e51b815260040161073290612329565b6001600160a01b0385166000908152603e6020526040902054801561167557600061162d82610767565b9050600181600681111561163d57fe5b141580156116575750600081600681111561165457fe5b14155b6116735760405162461bcd60e51b81526004016107329061207c565b505b600061168560375461085a61157a565b9050600061169e6038548361157e90919063ffffffff16565b90506116a8611b0e565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff1990931692909217949094161790559061185a61104f565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a5492935061189c928d9261152792909161085a919082908a9061157e565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516118dc9493929190611f90565b60405180910390a39998505050505050505050565b600081848411156119155760405162461bcd60e51b81526004016107329190611fdb565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd906119719085907f0000000000000000000000000000000000000000000000000000000000000000908690600401611ee5565b602060405180830381600087803b15801561198b57600080fd5b505af115801561199f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c39190611de1565b6119df5760405162461bcd60e51b81526004016107329061224d565b6001600160a01b0382166000908152603b6020526040902054611a02908261157e565b6001600160a01b039092166000908152603b602052604090209190915550565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b3b151590565b600061104683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506118f1565b6001600160a01b0382166000908152603f602052604090205481111561074b576001600160a01b03919091166000908152603f6020526040902055565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b038116811461104957600080fd5b803561104981612552565b600082601f830112611b9b578081fd5b813567ffffffffffffffff811115611bb1578182fd5b611bc4601f8201601f19166020016124e6565b9150808252836020828501011115611bdb57600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611c05578081fd5b6110468383611b69565b600080600060608486031215611c23578182fd5b8335611c2e8161253d565b92506020840135611c3e8161253d565b9150604084013567ffffffffffffffff811115611c59578182fd5b611c6586828701611b8b565b9150509250925092565b60008060408385031215611c81578182fd5b8235611c8c8161253d565b9150602083013567ffffffffffffffff811115611ca7578182fd5b611cb385828601611b8b565b9150509250929050565b60008060008060008060c08789031215611cd5578182fd5b611cdf8888611b69565b95506020870135945060408701359350606087013560ff81168114611d02578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215611d30578283fd5b833567ffffffffffffffff80821115611d47578485fd5b818601915086601f830112611d5a578485fd5b813581811115611d68578586fd5b60209150818102611d7a8382016124e6565b8281528381019085850183870186018c1015611d9457898afd5b8996505b84871015611dbe57611daa8c82611b69565b835260019690960195918501918501611d98565b5097505050508501359250611dd890508560408601611b80565b90509250925092565b600060208284031215611df2578081fd5b815161104681612552565b600060208284031215611e0e578081fd5b5035919050565b60008060408385031215611e27578182fd5b82359150611e388460208501611b69565b90509250929050565b60008060408385031215611e53578182fd5b823591506020830135611e6581612552565b809150509250929050565b60008151808452611e8881602086016020860161250d565b601f01601f19169290920160200192915050565b60008251611eae81846020870161250d565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152611fbd6080830184611e70565b9695505050505050565b6020810160078310611fd557fe5b91905290565b6000602082526110466020830184611e70565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561250557600080fd5b604052919050565b60005b83811015612528578181015183820152602001612510565b83811115612537576000848401525b50505050565b6001600160a01b0381168114610d0c57600080fd5b8015158114610d0c57600080fdfea26469706673582212204b0042571b6576e17c0708c8f251958898bb0e0a9f340387b1eed439d732af7264736f6c634300060c0033";class bs extends Ka{constructor(...e){e.length>1?super(...e):super(as,ns,e[0])}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}deploy(e,t){return super.deploy(e,t||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(as)}static connect(e,t){return new $a(e,as,t)}}bs.bytecode=ns,bs.abi=as;var fs=Object.freeze({__proto__:null,GovernanceGasUpgrade__factory:ts,GovernanceVaultUpgrade__factory:bs,gasCompensatorSol:Ji,interfaces:Zi});const ds=[{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amountLockedBeforehand",type:"uint256"}],name:"updateRewardsOnLockedBalanceChange",outputs:[],stateMutability:"nonpayable",type:"function"}];class is{static createInterface(){return new ba(ds)}static connect(e,t){return new $a(e,ds,t)}}is.abi=ds;var ss=Object.freeze({__proto__:null,ITornadoStakingRewards__factory:is});const cs=[{inputs:[{internalType:"address",name:"stakingRewardsAddress",type:"address"},{internalType:"address",name:"gasCompLogic",type:"address"},{internalType:"address",name:"userVaultAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"bytes",name:"errorData",type:"bytes"}],name:"RewardUpdateFailed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"RewardUpdateSuccessful",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"Staking",outputs:[{internalType:"contract ITornadoStakingRewards",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"checkIfQuorumReached",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"gasCompensationVault",outputs:[{internalType:"contract IGasCompensationVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"account",type:"address"}],name:"hasAccountVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"returnMultisigAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"gasCompensationsLimit",type:"uint256"}],name:"setGasCompensations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawFromHelper",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],rs="0x60e06040523480156200001157600080fd5b50604051620032a6380380620032a6833981016040819052620000349162000165565b81818181600060019054906101000a900460ff1680620000595750620000596200011e565b8062000068575060005460ff16155b620000905760405162461bcd60e51b81526004016200008790620001b8565b60405180910390fd5b600054610100900460ff16158015620000bc576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000da62000124565b8015620000ed576000805461ff00191690555b506001600160601b0319606091821b811660805291811b821660a0529590951b90941660c052506200021f92505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6000806000606084860312156200017a578283fd5b8351620001878162000206565b60208501519093506200019a8162000206565b6040850151909250620001ad8162000206565b809150509250925092565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6001600160a01b03811681146200021c57600080fd5b50565b60805160601c60a05160601c60c05160601c6130246200028260003980610cf652806110b7528061169852806117c95250806108e55280610ead5280610fa552806116145280612164525080611040528061200d528061240e52506130246000f3fe6080604052600436106102765760003560e01c80639ae697bf1161014f578063d6159fe5116100c1578063ea0217cf1161007a578063ea0217cf1461072a578063ece40cc11461074a578063ef3f8bb11461076a578063f0b768921461078a578063f57df22e146107aa578063fe0d94c1146107bf5761027d565b8063d6159fe514610673578063d6f0948c14610688578063da35c664146106a8578063e23a9a52146106bd578063e4917d9f146106ea578063e525aa081461070a5761027d565b8063b1610d7e11610113578063b1610d7e146105c9578063b54426c8146105de578063b859f11b146105fe578063c0c0e8201461061e578063c4d66de81461063e578063ce25d71c1461065e5761027d565b80639ae697bf1461054a5780639daafec71461056a578063a6c266031461057f578063a72edda314610594578063adf898a4146105b45761027d565b80635c19a95c116101e85780636dc2dc6c116101ac5780636dc2dc6c146104a057806370b0f660146104c05780638b34a960146104e057806392ab89bb146104f5578063932d51571461050a5780639a9e3b6e1461052a5761027d565b80635c19a95c146104165780636198e3391461043657806365da126414610456578063671dd275146104765780636a6617551461048b5761027d565b806332687ec11161023a57806332687ec11461035057806337f135d71461037d5780633e4f49e61461039257806354fd4d50146103bf578063587a6ecb146103e157806358e9fff0146103f65761027d565b8063013cf08b1461028257806302ec8f9e146102bf57806315373e3d146102e157806317977c611461030157806324b0435f1461032e5761027d565b3661027d57005b600080fd5b34801561028e57600080fd5b506102a261029d3660046127f8565b6107d2565b6040516102b6989796959493929190612904565b60405180910390f35b3480156102cb57600080fd5b506102df6102da3660046127f8565b610837565b005b3480156102ed57600080fd5b506102df6102fc36600461283c565b610864565b34801561030d57600080fd5b5061032161031c3660046125ef565b610967565b6040516102b69190612f6b565b34801561033a57600080fd5b50610343610979565b6040516102b691906128b3565b34801561035c57600080fd5b5061037061036b3660046127f8565b610991565b6040516102b691906129c2565b34801561038957600080fd5b506103216109df565b34801561039e57600080fd5b506103b26103ad3660046127f8565b6109e5565b6040516102b691906129cd565b3480156103cb57600080fd5b506103d4610b21565b6040516102b691906129e1565b3480156103ed57600080fd5b50610321610b58565b34801561040257600080fd5b5061032161041136600461260a565b610b5e565b34801561042257600080fd5b506102df6104313660046125ef565b610bac565b34801561044257600080fd5b506102df6104513660046127f8565b610cce565b34801561046257600080fd5b506103436104713660046125ef565b610e1b565b34801561048257600080fd5b50610321610e36565b34801561049757600080fd5b50610321610e3c565b3480156104ac57600080fd5b506102df6104bb3660046127f8565b610e42565b3480156104cc57600080fd5b506102df6104db3660046127f8565b610e87565b3480156104ec57600080fd5b50610343610eab565b34801561050157600080fd5b506102df610ecf565b34801561051657600080fd5b506102df6105253660046127f8565b610f56565b34801561053657600080fd5b506102df6105453660046127f8565b611008565b34801561055657600080fd5b506103216105653660046125ef565b61102c565b34801561057657600080fd5b5061034361103e565b34801561058b57600080fd5b50610321611062565b3480156105a057600080fd5b506103216105af3660046125ef565b611068565b3480156105c057600080fd5b5061034361107a565b3480156105d557600080fd5b50610321611089565b3480156105ea57600080fd5b506102df6105f93660046127f8565b61108f565b34801561060a57600080fd5b506102df610619366004612717565b6111d8565b34801561062a57600080fd5b506102df6106393660046127f8565b611226565b34801561064a57600080fd5b506102df6106593660046125ef565b61124a565b34801561066a57600080fd5b5061032161148d565b34801561067f57600080fd5b50610321611493565b34801561069457600080fd5b506103216106a336600461266a565b611499565b3480156106b457600080fd5b506103216114af565b3480156106c957600080fd5b506106dd6106d8366004612810565b6114b9565b6040516102b69190612f46565b3480156106f657600080fd5b506102df6107053660046127f8565b61152b565b34801561071657600080fd5b50610370610725366004612810565b61154f565b34801561073657600080fd5b506102df6107453660046127f8565b611592565b34801561075657600080fd5b506102df6107653660046127f8565b6115b6565b34801561077657600080fd5b506102df6107853660046127f8565b6115da565b34801561079657600080fd5b506102df6107a53660046126b8565b61166c565b3480156107b657600080fd5b506103436117c7565b6102df6107cd3660046127f8565b6117eb565b603d81815481106107df57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461085f5760405162461bcd60e51b815260040161085690612cb4565b60405180910390fd5b603555565b3361086f833361154f565b158015610882575061088083610991565b155b333214610890576000610894565b6152085b61ffff1681156109555760005a90506108ae33878761197d565b60006108cb6127106108c5856108c55a8790611bae565b90611bf0565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce8079061091c90889085906004016128c7565b600060405180830381600087803b15801561093657600080fd5b505af115801561094a573d6000803e3d6000fd5b505050505050610960565b61096033868661197d565b5050505050565b603e6020526000908152604090205481565b73b04e030140b30c27bcdfaafffa98c57d80eda7b490565b6000603554603d83815481106109a357fe5b906000526020600020906008020160050154603d84815481106109c257fe5b90600052602060002090600802016004015401101590505b919050565b60335481565b60006109ef6114af565b82111580156109fe5750600082115b610a1a5760405162461bcd60e51b815260040161085690612e11565b6000603d8381548110610a2957fe5b906000526020600020906008020190508060020154610a46611c15565b11610a555760009150506109da565b8060030154610a62611c15565b11610a715760019150506109da565b80600501548160040154111580610a9357506035548160050154826004015401105b15610aa25760029150506109da565b600681015460ff1615610ab95760059150506109da565b610ad86034546108c56033548460030154611bf090919063ffffffff16565b610ae0611c15565b10610aef5760069150506109da565b6033546003820154610b0091611bf0565b610b08611c15565b10610b175760049150506109da565b60039150506109da565b60408051808201909152601981527f322e6c6f74746572792d616e642d6761732d7570677261646500000000000000602082015290565b603a5481565b6001600160a01b038381166000908152603c60205260408120549091163314610b995760405162461bcd60e51b815260040161085690612ea1565b610ba4848484611c19565b949350505050565b336000818152603c60205260409020546001600160a01b039081169190831614801590610be257506001600160a01b0382163014155b8015610bf657506001600160a01b03821615155b8015610c145750806001600160a01b0316826001600160a01b031614155b610c305760405162461bcd60e51b815260040161085690612ceb565b6001600160a01b03811615610c76576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f91610d2b9185916004016128c7565b600060405180830381600087803b158015610d4557600080fd5b505af1925050508015610d56575060015b610dd9573d808015610d84576040519150601f19603f3d011682016040523d82523d6000602084013e610d89565b606091505b5080604051610d989190612897565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a350610e0e565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e1782611f67565b5050565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610e615760405162461bcd60e51b815260040161085690612cb4565b6033548110610e825760405162461bcd60e51b815260040161085690612bd8565b603a55565b333014610ea65760405162461bcd60e51b815260040161085690612cb4565b603755565b7f000000000000000000000000000000000000000000000000000000000000000081565b336000908152603c60205260409020546001600160a01b031680610f055760405162461bcd60e51b815260040161085690612e57565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b610f5e610979565b6001600160a01b0316336001600160a01b031614610f8e5760405162461bcd60e51b815260040161085690612dea565b604051633a08bde160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e822f78490610fda908490600401612f6b565b600060405180830381600087803b158015610ff457600080fd5b505af1158015610960573d6000803e3d6000fd5b3330146110275760405162461bcd60e51b815260040161085690612cb4565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916110ec9185916004016128c7565b600060405180830381600087803b15801561110657600080fd5b505af1925050508015611117575060015b61119a573d808015611145576040519150601f19603f3d011682016040523d82523d6000602084013e61114a565b606091505b50806040516111599190612897565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506111cf565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e178261204b565b60008351116111f95760405162461bcd60e51b815260040161085690612c8a565b611221838383611209863361154f565b15801561121c575061121a86610991565b155b612055565b505050565b3330146112455760405162461bcd60e51b815260040161085690612cb4565b603955565b600054610100900460ff16806112635750611263612298565b80611271575060005460ff16155b61128d5760405162461bcd60e51b815260040161085690612d9c565b600054610100900460ff161580156112b8576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff19909416939093171691909117905561147861229e565b8015610e17576000805461ff00191690555050565b60395481565b60375481565b60006114a6338484611c19565b90505b92915050565b603d546000190190565b6114c16124e9565b603d83815481106114ce57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b33301461154a5760405162461bcd60e51b815260040161085690612cb4565b603355565b6000603d838154811061155e57fe5b600091825260208083206001600160a01b03861684526007600890930201919091019052604090205460ff16905092915050565b3330146115b15760405162461bcd60e51b815260040161085690612cb4565b603855565b3330146115d55760405162461bcd60e51b815260040161085690612cb4565b603655565b6115e2610979565b6001600160a01b0316336001600160a01b0316146116125760405162461bcd60e51b815260040161085690612dea565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fc61164983476122df565b6040518115909202916000818181858888f1935050505061166957600080fd5b50565b6001600160a01b038087166000908152603b60205260409081902054905163e113335f60e01b815288927f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916116cd9185916004016128c7565b600060405180830381600087803b1580156116e757600080fd5b505af19250505080156116f8575060015b61177b573d808015611726576040519150601f19603f3d011682016040523d82523d6000602084013e61172b565b606091505b508060405161173a9190612897565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506117b0565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b6117be8787878787876122f5565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60046117f6826109e5565b600681111561180157fe5b1461181e5760405162461bcd60e51b815260040161085690612a37565b6000603d828154811061182d57fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b031661186881612375565b6118845760405162461bcd60e51b8152600401610856906129f4565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b038516916118c891612897565b600060405180830381855af49150503d8060008114611903576040519150601f19603f3d011682016040523d82523d6000602084013e611908565b606091505b50915091508161194b57805115611933578060405162461bcd60e51b815260040161085691906129e1565b60405162461bcd60e51b815260040161085690612ed8565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b6001611988836109e5565b600681111561199357fe5b146119b05760405162461bcd60e51b815260040161085690612afd565b6000603d83815481106119bf57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b909452919094205492945010159080611a1e5760405162461bcd60e51b815260040161085690612d22565b825460ff1615611a6d578254610100900460ff1615611a545760018301546004850154611a4a91611bae565b6004850155611a6d565b60018301546005850154611a6791611bae565b60058501555b8415611a8c576004840154611a829082611bf0565b6004850155611aa1565b6005840154611a9b9082611bf0565b60058501555b6006840154610100900460ff16158015611ad15750603954611acf611ac4611c15565b600387015490611bae565b105b15611b15576005840154600485015411158215158114611b135760068501805461ff001916610100179055603a546003860154611b0d91611bf0565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a546003870154611b60938b93611b5b9391926108c592839190611bf0565b61237b565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b584604051611b9d9190612f6b565b60405180910390a450505050505050565b60006114a683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506123b8565b6000828201838110156114a65760405162461bcd60e51b815260040161085690612ba1565b4290565b6001600160a01b0383166000908152603b6020526040812054603654811015611c545760405162461bcd60e51b815260040161085690612b44565b611c5d84612375565b611c795760405162461bcd60e51b815260040161085690612d59565b6001600160a01b0385166000908152603e60205260409020548015611ceb576000611ca3826109e5565b90506001816006811115611cb357fe5b14158015611ccd57506000816006811115611cca57fe5b14155b611ce95760405162461bcd60e51b815260040161085690612a82565b505b6000611cfb6037546108c5611c15565b90506000611d1460385483611bf090919063ffffffff16565b9050611d1e612509565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff19909316929092179490941617905590611ed06114af565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350611f12928d92611b5b9290916108c5919082908a90611bf0565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d604051611f52949392919061298b565b60405180910390a39998505050505050505050565b336000908152603f6020526040902054611f7f611c15565b11611f9c5760405162461bcd60e51b815260040161085690612c1c565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054611fea9183906123b8565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610fda919085906004016128c7565b61166933826123e4565b3381328214612065576000612069565b6152085b61ffff1681156121d45760005a905060005b885181101561213257600089828151811061209257fe5b6020908102919091018101516001600160a01b038082166000908152603c909352604090922054909250163314806120d257506001600160a01b03811633145b6120ee5760405162461bcd60e51b815260040161085690612ea1565b8615806121025750612100898261154f565b155b61211e5760405162461bcd60e51b815260040161085690612f0f565b612129818a8a61197d565b5060010161207b565b50600061214a6127106108c5856108c55a8790611bae565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce8079061219b90889085906004016128c7565b600060405180830381600087803b1580156121b557600080fd5b505af11580156121c9573d6000803e3d6000fd5b5050505050506117be565b60005b875181101561228e5760008882815181106121ee57fe5b6020908102919091018101516001600160a01b038082166000908152603c9093526040909220549092501633148061222e57506001600160a01b03811633145b61224a5760405162461bcd60e51b815260040161085690612ea1565b85158061225e575061225c888261154f565b155b61227a5760405162461bcd60e51b815260040161085690612f0f565b61228581898961197d565b506001016121d7565b5050505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b60008183106122ee57816114a6565b5090919050565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf9061233190899030908a908a908a908a908a9060040161294a565b600060405180830381600087803b15801561234b57600080fd5b505af115801561235f573d6000803e3d6000fd5b5050505061236d86866123e4565b505050505050565b3b151590565b6001600160a01b0382166000908152603f6020526040902054811115610e17576001600160a01b03919091166000908152603f6020526040902055565b600081848411156123dc5760405162461bcd60e51b815260040161085691906129e1565b505050900390565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd906124389085907f00000000000000000000000000000000000000000000000000000000000000009086906004016128e0565b602060405180830381600087803b15801561245257600080fd5b505af1158015612466573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061248a91906127dc565b6124a65760405162461bcd60e51b815260040161085690612c53565b6001600160a01b0382166000908152603b60205260409020546124c99082611bf0565b6001600160a01b039092166000908152603b602052604090209190915550565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b03811681146114a957600080fd5b80356114a981612fe0565b600082601f830112612596578081fd5b813567ffffffffffffffff8111156125ac578182fd5b6125bf601f8201601f1916602001612f74565b91508082528360208285010111156125d657600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215612600578081fd5b6114a68383612564565b60008060006060848603121561261e578182fd5b833561262981612fcb565b9250602084013561263981612fcb565b9150604084013567ffffffffffffffff811115612654578182fd5b61266086828701612586565b9150509250925092565b6000806040838503121561267c578182fd5b823561268781612fcb565b9150602083013567ffffffffffffffff8111156126a2578182fd5b6126ae85828601612586565b9150509250929050565b60008060008060008060c087890312156126d0578182fd5b6126da8888612564565b95506020870135945060408701359350606087013560ff811681146126fd578283fd5b9598949750929560808101359460a0909101359350915050565b60008060006060848603121561272b578283fd5b833567ffffffffffffffff80821115612742578485fd5b818601915086601f830112612755578485fd5b813581811115612763578586fd5b60209150818102612775838201612f74565b8281528381019085850183870186018c101561278f57898afd5b8996505b848710156127b9576127a58c82612564565b835260019690960195918501918501612793565b50975050505085013592506127d39050856040860161257b565b90509250925092565b6000602082840312156127ed578081fd5b81516114a681612fe0565b600060208284031215612809578081fd5b5035919050565b60008060408385031215612822578182fd5b823591506128338460208501612564565b90509250929050565b6000806040838503121561284e578182fd5b82359150602083013561286081612fe0565b809150509250929050565b60008151808452612883816020860160208601612f9b565b601f01601f19169290920160200192915050565b600082516128a9818460208701612f9b565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b0386168252846020830152836040830152608060608301526129b8608083018461286b565b9695505050505050565b901515815260200190565b60208101600783106129db57fe5b91905290565b6000602082526114a6602083018461286b565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526010908201526f43616e206e6f7420626520656d70747960801b604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600d908201526c6f6e6c79206d756c746973696760981b604082015260600190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b60208082526019908201527f476f7665726e616e63653a20766f74656420616c726561647900000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715612f9357600080fd5b604052919050565b60005b83811015612fb6578181015183820152602001612f9e565b83811115612fc5576000848401525b50505050565b6001600160a01b038116811461166957600080fd5b801515811461166957600080fdfea2646970667358221220e1f35bea256ff1c0e43f98312094903f31941303df43a2edbe8b9bd0fa323c8864736f6c634300060c0033";class ps extends Ka{constructor(...e){e.length>1?super(...e):super(cs,rs,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(cs)}static connect(e,t){return new $a(e,cs,t)}}ps.bytecode=rs,ps.abi=cs;var us=Object.freeze({__proto__:null,GovernanceStakingUpgrade__factory:ps,interfaces:ss});const os=[{inputs:[{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"address",name:"implementationContract",type:"address"},{internalType:"bytes",name:"metamorphicContractInitializationCalldata",type:"bytes"}],name:"deployMetamorphicContractFromExistingImplementation",outputs:[{internalType:"address",name:"metamorphicContractAddress",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"findMetamorphicContractAddress",outputs:[{internalType:"address",name:"metamorphicContractAddress",type:"address"}],stateMutability:"view",type:"function"}];class ys{static createInterface(){return new ba(os)}static connect(e,t){return new $a(e,os,t)}}ys.abi=os;var ls=Object.freeze({__proto__:null,IMetamorphicContractFactory__factory:ys});const ms=[{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"num",type:"uint256"}],name:"MockExecuted",type:"event"},{inputs:[],name:"emergencyStop",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"}],Ts="0x608060405234801561001057600080fd5b5060c08061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c8063373058b814603757806363a599a414603f575b600080fd5b603d6045565b005b603d607d565b7f2ff532ec74fd1130db9b7b6800e0992b2363095b00331a891a27edfab97c45406001604051607391906081565b60405180910390a1565b6000ff5b9081526020019056fea264697066735822122018779fa63005d6573862657b4a5cd55f75b705b28a7ff69222461665b78f408a64736f6c634300060c0033";class hs extends Ka{constructor(...e){e.length>1?super(...e):super(ms,Ts,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(ms)}static connect(e,t){return new $a(e,ms,t)}}hs.bytecode=Ts,hs.abi=ms;const gs=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"num",type:"uint256"}],name:"MockExecuted",type:"event"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"emergencyStop",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"}],ws="0x60a060405234801561001057600080fd5b5033606081901b6080526102746100366000398061012952806101b052506102746000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063373058b81461004657806363a599a414610050578063d5f3948814610058575b600080fd5b61004e610076565b005b61004e6101aa565b6100606101ae565b60405161006d9190610211565b60405180910390f35b6040516370a0823160e01b81527377777feddddffc19ff86db637967013e6c6a116c9060009082906370a08231906100b2903090600401610211565b60206040518083038186803b1580156100ca57600080fd5b505afa1580156100de573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061010291906101f9565b60405163a9059cbb60e01b81529091506001600160a01b0383169063a9059cbb90610153907f0000000000000000000000000000000000000000000000000000000000000000908590600401610225565b602060405180830381600087803b15801561016d57600080fd5b505af1158015610181573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a591906101d2565b505050565b6000ff5b7f000000000000000000000000000000000000000000000000000000000000000081565b6000602082840312156101e3578081fd5b815180151581146101f2578182fd5b9392505050565b60006020828403121561020a578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b0392909216825260208201526040019056fea2646970667358221220c120adf2a3856eb39e4d2305abf19175fb5f11d87cd96e5c70ce2a9f702ba53664736f6c634300060c0033";class vs extends Ka{constructor(...e){e.length>1?super(...e):super(gs,ws,e[0])}getDeployTransaction(e){return super.getDeployTransaction(e||{})}deploy(e){return super.deploy(e||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(gs)}static connect(e,t){return new $a(e,gs,t)}}vs.bytecode=ws,vs.abi=gs;var Ms=Object.freeze({__proto__:null,InitialProposal__factory:hs,MaliciousProposal__factory:vs}),_s=Object.freeze({__proto__:null,mockProposalsSol:Ms});const xs=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"_admin",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],Is="0x60806040526040516108403803806108408339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b50604052508491508390508282816100f1826101c5565b8051156101a9576000826001600160a01b0316826040518082805190602001908083835b602083106101345780518252601f199092019160209182019101610115565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610194576040519150601f19603f3d011682016040523d82523d6000602084013e610199565b606091505b50509050806101a757600080fd5b505b506101b19050565b6101ba82610237565b505050505050610261565b6101d88161025b60201b6103b41760201c565b6102135760405162461bcd60e51b815260040180806020018281038252603681526020018061080a6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b3b151590565b61059a806102706000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996101a9565b6101a96101a46103ba565b6103df565b565b6101b3610403565b6001600160a01b0316336001600160a01b031614156101da576101d581610428565b6101e2565b6101e2610191565b50565b6101ed610403565b6001600160a01b0316336001600160a01b031614156102855761020f83610428565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd6103ba565b90506102cc565b6102cc610191565b90565b6102d7610403565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b815260040180806020018281038252603a8152602001806104f5603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610403565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d581610468565b6000610393610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd610403565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156103fe573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6104318161048c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b610495816103b4565b6104d05760405162461bcd60e51b815260040180806020018281038252603681526020018061052f6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a26469706673582212203c0c6456361fbff816ff53c5547d39ad0e807130f877d2661772f7bffc95b82764736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";let Es=class extends Ka{constructor(...e){e.length>1?super(...e):super(xs,Is,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(xs)}static connect(e,t){return new $a(e,xs,t)}};Es.bytecode=Is,Es.abi=xs;const Rs=[{inputs:[{internalType:"address",name:"stakingRewardsAddress",type:"address"},{internalType:"address",name:"gasCompLogic",type:"address"},{internalType:"address",name:"userVaultAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"bytes",name:"errorData",type:"bytes"}],name:"RewardUpdateFailed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"RewardUpdateSuccessful",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"Staking",outputs:[{internalType:"contract ITornadoStakingRewards",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"checkIfQuorumReached",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"gasCompensationVault",outputs:[{internalType:"contract IGasCompensationVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"account",type:"address"}],name:"hasAccountVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposalCodehashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"returnMultisigAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"gasCompensationsLimit",type:"uint256"}],name:"setGasCompensations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawFromHelper",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],Os="0x60e06040523480156200001157600080fd5b50604051620034343803806200343483398101604081905262000034916200016b565b82828281818181600060019054906101000a900460ff16806200005c57506200005c62000124565b806200006b575060005460ff16155b620000935760405162461bcd60e51b81526004016200008a90620001be565b60405180910390fd5b600054610100900460ff16158015620000bf576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000dd6200012a565b8015620000f0576000805461ff00191690555b506001600160601b0319606091821b811660805291811b821660a0529590951b90941660c052506200022595505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b60008060006060848603121562000180578283fd5b83516200018d816200020c565b6020850151909350620001a0816200020c565b6040850151909250620001b3816200020c565b809150509250925092565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6001600160a01b03811681146200022257600080fd5b50565b60805160601c60a05160601c60c05160601c6131ac6200028860003980610d1352806110d452806116c752806117f85250806109105280610eca5280610fc252806116435280611d6d52508061105d5280611c1652806124f152506131ac6000f3fe6080604052600436106102815760003560e01c80639daafec71161014f578063d6f0948c116100c1578063ea0217cf1161007a578063ea0217cf14610755578063ece40cc114610775578063ef3f8bb114610795578063f0b76892146107b5578063f57df22e146107d5578063fe0d94c1146107ea57610288565b8063d6f0948c14610693578063da35c664146106b3578063e01f5237146106c8578063e23a9a52146106e8578063e4917d9f14610715578063e525aa081461073557610288565b8063b54426c811610113578063b54426c8146105e9578063b859f11b14610609578063c0c0e82014610629578063c4d66de814610649578063ce25d71c14610669578063d6159fe51461067e57610288565b80639daafec714610575578063a6c266031461058a578063a72edda31461059f578063adf898a4146105bf578063b1610d7e146105d457610288565b80635c19a95c116101f357806370b0f660116101ac57806370b0f660146104cb5780638b34a960146104eb57806392ab89bb14610500578063932d5157146105155780639a9e3b6e146105355780639ae697bf1461055557610288565b80635c19a95c146104215780636198e3391461044157806365da126414610461578063671dd275146104815780636a661755146104965780636dc2dc6c146104ab57610288565b806332687ec11161024557806332687ec11461035b57806337f135d7146103885780633e4f49e61461039d57806354fd4d50146103ca578063587a6ecb146103ec57806358e9fff01461040157610288565b8063013cf08b1461028d57806302ec8f9e146102ca57806315373e3d146102ec57806317977c611461030c57806324b0435f1461033957610288565b3661028857005b600080fd5b34801561029957600080fd5b506102ad6102a83660046128e1565b6107fd565b6040516102c19897969594939291906129ed565b60405180910390f35b3480156102d657600080fd5b506102ea6102e53660046128e1565b610862565b005b3480156102f857600080fd5b506102ea610307366004612925565b61088f565b34801561031857600080fd5b5061032c6103273660046126d8565b610992565b6040516102c19190612ab6565b34801561034557600080fd5b5061034e6109a4565b6040516102c1919061299c565b34801561036757600080fd5b5061037b6103763660046128e1565b6109bc565b6040516102c19190612aab565b34801561039457600080fd5b5061032c610a0a565b3480156103a957600080fd5b506103bd6103b83660046128e1565b610a10565b6040516102c19190612abf565b3480156103d657600080fd5b506103df610b4c565b6040516102c19190612ad3565b3480156103f857600080fd5b5061032c610b75565b34801561040d57600080fd5b5061032c61041c3660046126f3565b610b7b565b34801561042d57600080fd5b506102ea61043c3660046126d8565b610bc9565b34801561044d57600080fd5b506102ea61045c3660046128e1565b610ceb565b34801561046d57600080fd5b5061034e61047c3660046126d8565b610e38565b34801561048d57600080fd5b5061032c610e53565b3480156104a257600080fd5b5061032c610e59565b3480156104b757600080fd5b506102ea6104c63660046128e1565b610e5f565b3480156104d757600080fd5b506102ea6104e63660046128e1565b610ea4565b3480156104f757600080fd5b5061034e610ec8565b34801561050c57600080fd5b506102ea610eec565b34801561052157600080fd5b506102ea6105303660046128e1565b610f73565b34801561054157600080fd5b506102ea6105503660046128e1565b611025565b34801561056157600080fd5b5061032c6105703660046126d8565b611049565b34801561058157600080fd5b5061034e61105b565b34801561059657600080fd5b5061032c61107f565b3480156105ab57600080fd5b5061032c6105ba3660046126d8565b611085565b3480156105cb57600080fd5b5061034e611097565b3480156105e057600080fd5b5061032c6110a6565b3480156105f557600080fd5b506102ea6106043660046128e1565b6110ac565b34801561061557600080fd5b506102ea610624366004612800565b6111f5565b34801561063557600080fd5b506102ea6106443660046128e1565b611243565b34801561065557600080fd5b506102ea6106643660046126d8565b611267565b34801561067557600080fd5b5061032c6114aa565b34801561068a57600080fd5b5061032c6114b0565b34801561069f57600080fd5b5061032c6106ae366004612753565b6114b6565b3480156106bf57600080fd5b5061032c6114cc565b3480156106d457600080fd5b5061032c6106e33660046128e1565b6114d6565b3480156106f457600080fd5b506107086107033660046128f9565b6114e8565b6040516102c191906130db565b34801561072157600080fd5b506102ea6107303660046128e1565b61155a565b34801561074157600080fd5b5061037b6107503660046128f9565b61157e565b34801561076157600080fd5b506102ea6107703660046128e1565b6115c1565b34801561078157600080fd5b506102ea6107903660046128e1565b6115e5565b3480156107a157600080fd5b506102ea6107b03660046128e1565b611609565b3480156107c157600080fd5b506102ea6107d03660046127a1565b61169b565b3480156107e157600080fd5b5061034e6117f6565b6102ea6107f83660046128e1565b61181a565b603d818154811061080a57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461088a5760405162461bcd60e51b815260040161088190612e49565b60405180910390fd5b603555565b3361089a833361157e565b1580156108ad57506108ab836109bc565b155b3332146108bb5760006108bf565b6152085b61ffff1681156109805760005a90506108d93387876118ac565b60006108f66127106108f0856108f05a8790611add565b90611b1f565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce8079061094790889085906004016129b0565b600060405180830381600087803b15801561096157600080fd5b505af1158015610975573d6000803e3d6000fd5b50505050505061098b565b61098b3386866118ac565b5050505050565b603e6020526000908152604090205481565b73b04e030140b30c27bcdfaafffa98c57d80eda7b490565b6000603554603d83815481106109ce57fe5b906000526020600020906008020160050154603d84815481106109ed57fe5b90600052602060002090600802016004015401101590505b919050565b60335481565b6000610a1a6114cc565b8211158015610a295750600082115b610a455760405162461bcd60e51b815260040161088190612fa6565b6000603d8381548110610a5457fe5b906000526020600020906008020190508060020154610a71611b44565b11610a80576000915050610a05565b8060030154610a8d611b44565b11610a9c576001915050610a05565b80600501548160040154111580610abe57506035548160050154826004015401105b15610acd576002915050610a05565b600681015460ff1615610ae4576005915050610a05565b610b036034546108f06033548460030154611b1f90919063ffffffff16565b610b0b611b44565b10610b1a576006915050610a05565b6033546003820154610b2b91611b1f565b610b33611b44565b10610b42576004915050610a05565b6003915050610a05565b60408051808201909152600f81526e0d0b9c185d18da0b595e1c1b1bda5d608a1b602082015290565b603a5481565b6001600160a01b038381166000908152603c60205260408120549091163314610bb65760405162461bcd60e51b815260040161088190613036565b610bc1848484611b48565b949350505050565b336000818152603c60205260409020546001600160a01b039081169190831614801590610bff57506001600160a01b0382163014155b8015610c1357506001600160a01b03821615155b8015610c315750806001600160a01b0316826001600160a01b031614155b610c4d5760405162461bcd60e51b815260040161088190612e80565b6001600160a01b03811615610c93576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f91610d489185916004016129b0565b600060405180830381600087803b158015610d6257600080fd5b505af1925050508015610d73575060015b610df6573d808015610da1576040519150601f19603f3d011682016040523d82523d6000602084013e610da6565b606091505b5080604051610db59190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a350610e2b565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3482611b70565b5050565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610e7e5760405162461bcd60e51b815260040161088190612e49565b6033548110610e9f5760405162461bcd60e51b815260040161088190612d6d565b603a55565b333014610ec35760405162461bcd60e51b815260040161088190612e49565b603755565b7f000000000000000000000000000000000000000000000000000000000000000081565b336000908152603c60205260409020546001600160a01b031680610f225760405162461bcd60e51b815260040161088190612fec565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b610f7b6109a4565b6001600160a01b0316336001600160a01b031614610fab5760405162461bcd60e51b815260040161088190612f7f565b604051633a08bde160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e822f78490610ff7908490600401612ab6565b600060405180830381600087803b15801561101157600080fd5b505af115801561098b573d6000803e3d6000fd5b3330146110445760405162461bcd60e51b815260040161088190612e49565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916111099185916004016129b0565b600060405180830381600087803b15801561112357600080fd5b505af1925050508015611134575060015b6111b7573d808015611162576040519150601f19603f3d011682016040523d82523d6000602084013e611167565b606091505b50806040516111769190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506111ec565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3482611c54565b60008351116112165760405162461bcd60e51b815260040161088190612e1f565b61123e838383611226863361157e565b1580156112395750611237866109bc565b155b611c5e565b505050565b3330146112625760405162461bcd60e51b815260040161088190612e49565b603955565b600054610100900460ff16806112805750611280611ea1565b8061128e575060005460ff16155b6112aa5760405162461bcd60e51b815260040161088190612f31565b600054610100900460ff161580156112d5576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff199094169390931716919091179055611495611ea7565b8015610e34576000805461ff00191690555050565b60395481565b60375481565b60006114c3338484611b48565b90505b92915050565b603d546000190190565b60416020526000908152604090205481565b6114f06125d2565b603d83815481106114fd57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146115795760405162461bcd60e51b815260040161088190612e49565b603355565b6000603d838154811061158d57fe5b600091825260208083206001600160a01b03861684526007600890930201919091019052604090205460ff16905092915050565b3330146115e05760405162461bcd60e51b815260040161088190612e49565b603855565b3330146116045760405162461bcd60e51b815260040161088190612e49565b603655565b6116116109a4565b6001600160a01b0316336001600160a01b0316146116415760405162461bcd60e51b815260040161088190612f7f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fc6116788347611ee8565b6040518115909202916000818181858888f1935050505061169857600080fd5b50565b6001600160a01b038087166000908152603b60205260409081902054905163e113335f60e01b815288927f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916116fc9185916004016129b0565b600060405180830381600087803b15801561171657600080fd5b505af1925050508015611727575060015b6117aa573d808015611755576040519150601f19603f3d011682016040523d82523d6000602084013e61175a565b606091505b50806040516117699190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506117df565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b6117ed878787878787611efe565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b3330141561183a5760405162461bcd60e51b815260040161088190612c36565b6000603d828154811061184957fe5b6000918252602080832060016008909302019182015485845260419091526040909220549092506001600160a01b0390911690813f90811461189d5760405162461bcd60e51b815260040161088190612d17565b6118a684611f7e565b50505050565b60016118b783610a10565b60068111156118c257fe5b146118df5760405162461bcd60e51b815260040161088190612bef565b6000603d83815481106118ee57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b90945291909420549294501015908061194d5760405162461bcd60e51b815260040161088190612eb7565b825460ff161561199c578254610100900460ff1615611983576001830154600485015461197991611add565b600485015561199c565b6001830154600585015461199691611add565b60058501555b84156119bb5760048401546119b19082611b1f565b60048501556119d0565b60058401546119ca9082611b1f565b60058501555b6006840154610100900460ff16158015611a0057506039546119fe6119f3611b44565b600387015490611add565b105b15611a44576005840154600485015411158215158114611a425760068501805461ff001916610100179055603a546003860154611a3c91611b1f565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a546003870154611a8f938b93611a8a9391926108f092839190611b1f565b612110565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b584604051611acc9190612ab6565b60405180910390a450505050505050565b60006114c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061214d565b6000828201838110156114c35760405162461bcd60e51b815260040161088190612ce0565b4290565b6000611b55848484612179565b6000818152604160205260409020933f909355509092915050565b336000908152603f6020526040902054611b88611b44565b11611ba55760405162461bcd60e51b815260040161088190612db1565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054611bf391839061214d565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610ff7919085906004016129b0565b61169833826124c7565b3381328214611c6e576000611c72565b6152085b61ffff168115611ddd5760005a905060005b8851811015611d3b576000898281518110611c9b57fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611cdb57506001600160a01b03811633145b611cf75760405162461bcd60e51b815260040161088190613036565b861580611d0b5750611d09898261157e565b155b611d275760405162461bcd60e51b8152600401610881906130a4565b611d32818a8a6118ac565b50600101611c84565b506000611d536127106108f0856108f05a8790611add565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce80790611da490889085906004016129b0565b600060405180830381600087803b158015611dbe57600080fd5b505af1158015611dd2573d6000803e3d6000fd5b5050505050506117ed565b60005b8751811015611e97576000888281518110611df757fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611e3757506001600160a01b03811633145b611e535760405162461bcd60e51b815260040161088190613036565b851580611e675750611e65888261157e565b155b611e835760405162461bcd60e51b8152600401610881906130a4565b611e8e8189896118ac565b50600101611de0565b5050505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6000818310611ef757816114c3565b5090919050565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf90611f3a90899030908a908a908a908a908a90600401612a33565b600060405180830381600087803b158015611f5457600080fd5b505af1158015611f68573d6000803e3d6000fd5b50505050611f7686866124c7565b505050505050565b6004611f8982610a10565b6006811115611f9457fe5b14611fb15760405162461bcd60e51b815260040161088190612b29565b6000603d8281548110611fc057fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b0316611ffb816125cc565b6120175760405162461bcd60e51b815260040161088190612ae6565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161205b91612980565b600060405180830381855af49150503d8060008114612096576040519150601f19603f3d011682016040523d82523d6000602084013e61209b565b606091505b5091509150816120de578051156120c6578060405162461bcd60e51b81526004016108819190612ad3565b60405162461bcd60e51b81526004016108819061306d565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b6001600160a01b0382166000908152603f6020526040902054811115610e34576001600160a01b03919091166000908152603f6020526040902055565b600081848411156121715760405162461bcd60e51b81526004016108819190612ad3565b505050900390565b6001600160a01b0383166000908152603b60205260408120546036548110156121b45760405162461bcd60e51b815260040161088190612c83565b6121bd846125cc565b6121d95760405162461bcd60e51b815260040161088190612eee565b6001600160a01b0385166000908152603e6020526040902054801561224b57600061220382610a10565b9050600181600681111561221357fe5b1415801561222d5750600081600681111561222a57fe5b14155b6122495760405162461bcd60e51b815260040161088190612b74565b505b600061225b6037546108f0611b44565b9050600061227460385483611b1f90919063ffffffff16565b905061227e6125f2565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff199093169290921794909416179055906124306114cc565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350612472928d92611a8a9290916108f0919082908a90611b1f565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516124b29493929190612a74565b60405180910390a39998505050505050505050565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd9061251b9085907f00000000000000000000000000000000000000000000000000000000000000009086906004016129c9565b602060405180830381600087803b15801561253557600080fd5b505af1158015612549573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256d91906128c5565b6125895760405162461bcd60e51b815260040161088190612de8565b6001600160a01b0382166000908152603b60205260409020546125ac9082611b1f565b6001600160a01b039092166000908152603b602052604090209190915550565b3b151590565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b03811681146114c657600080fd5b80356114c681613168565b600082601f83011261267f578081fd5b813567ffffffffffffffff811115612695578182fd5b6126a8601f8201601f1916602001613100565b91508082528360208285010111156126bf57600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156126e9578081fd5b6114c3838361264d565b600080600060608486031215612707578182fd5b833561271281613153565b9250602084013561272281613153565b9150604084013567ffffffffffffffff81111561273d578182fd5b6127498682870161266f565b9150509250925092565b60008060408385031215612765578182fd5b823561277081613153565b9150602083013567ffffffffffffffff81111561278b578182fd5b6127978582860161266f565b9150509250929050565b60008060008060008060c087890312156127b9578182fd5b6127c3888861264d565b95506020870135945060408701359350606087013560ff811681146127e6578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215612814578283fd5b833567ffffffffffffffff8082111561282b578485fd5b818601915086601f83011261283e578485fd5b81358181111561284c578586fd5b6020915081810261285e838201613100565b8281528381019085850183870186018c101561287857898afd5b8996505b848710156128a25761288e8c8261264d565b83526001969096019591850191850161287c565b50975050505085013592506128bc90508560408601612664565b90509250925092565b6000602082840312156128d6578081fd5b81516114c381613168565b6000602082840312156128f2578081fd5b5035919050565b6000806040838503121561290b578182fd5b8235915061291c846020850161264d565b90509250929050565b60008060408385031215612937578182fd5b82359150602083013561294981613168565b809150509250929050565b6000815180845261296c816020860160208601613127565b601f01601f19169290920160200192915050565b60008251612992818460208701613127565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152612aa16080830184612954565b9695505050505050565b901515815260200190565b90815260200190565b6020810160078310612acd57fe5b91905290565b6000602082526114c36020830184612954565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252602d908201527f476f7665726e616e63653a3a70726f706f73653a2070736575646f2d6578746560408201526c393730b610333ab731ba34b7b760991b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526036908201527f476f7665726e616e63653a3a70726f706f73653a206d6574616d6f72706869636040820152750818dbdb9d1c9858dd1cc81b9bdd08185b1b1bddd95960521b606082015260800190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526010908201526f43616e206e6f7420626520656d70747960801b604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600d908201526c6f6e6c79206d756c746973696760981b604082015260600190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b60208082526019908201527f476f7665726e616e63653a20766f74656420616c726561647900000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b60405181810167ffffffffffffffff8111828210171561311f57600080fd5b604052919050565b60005b8381101561314257818101518382015260200161312a565b838111156118a65750506000910152565b6001600160a01b038116811461169857600080fd5b801515811461169857600080fdfea2646970667358221220b75004153b6c8b4905c018daca78cb0fa6d3859298be55252bcf6ba75ea68d0e64736f6c634300060c0033";class ks extends Ka{constructor(...e){e.length>1?super(...e):super(Rs,Os,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Rs)}static connect(e,t){return new $a(e,Rs,t)}}ks.bytecode=Os,ks.abi=Rs;const Ps=[{inputs:[{internalType:"address",name:"_deployedStakingProxyContractAddress",type:"address"},{internalType:"address",name:"_deployedRelayerRegistryImplementationAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"TORN",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployedRelayerRegistryImplementationAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployedStakingProxyContractAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"executeProposal",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"gasCompensationVaultAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"governanceProxyAddress",outputs:[{internalType:"address payable",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"oldStakingProxyAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registryProxyAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"userVaultAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],As="0x60c060405234801561001057600080fd5b50604051613adb380380613adb83398101604081905261002f9161004d565b6001600160601b0319606092831b8116608052911b1660a05261009e565b6000806040838503121561005f578182fd5b825161006a81610086565b602084015190925061007b81610086565b809150509250929050565b6001600160a01b038116811461009b57600080fd5b50565b60805160601c60a05160601c613a056100d66000398061027a52806104985250806102f952806103f452806104bc5250613a056000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063373058b811610066578063373058b8146100ce5780634655478f146100d857806361697d64146100e05780636fc6091d146100e85780639b49989a146100f057610093565b80630cc784761461009857806313f32237146100b657806324044543146100be57806332bf1039146100c6575b600080fd5b6100a06100f8565b6040516100ad9190610542565b60405180910390f35b6100a0610110565b6100a0610128565b6100a0610140565b6100d6610158565b005b6100a061047e565b6100a0610496565b6100a06104ba565b6100a06104de565b7358e8dcc13be9780fc42e8723d8ead4cf46943df281565b732fc93484614a34f26f7970cbb94615ba109bb4bf81565b73fa4c1f3f7d5dd7c12a9adb82cd7dda542e3d59ef81565b7377777feddddffc19ff86db637967013e6c6a116c81565b6040516370a0823160e01b8152732fc93484614a34f26f7970cbb94615ba109bb4bf90819063f58073b1907377777feddddffc19ff86db637967013e6c6a116c906370a08231906101ad908590600401610542565b60206040518083038186803b1580156101c557600080fd5b505afa1580156101d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fd919061052a565b6040518263ffffffff1660e01b81526004016102199190610592565b600060405180830381600087803b15801561023357600080fd5b505af1158015610247573d6000803e3d6000fd5b5050604051631b2ce7f360e11b81527358e8dcc13be9780fc42e8723d8ead4cf46943df29250633659cfe691506102a2907f000000000000000000000000000000000000000000000000000000000000000090600401610542565b600060405180830381600087803b1580156102bc57600080fd5b505af11580156102d0573d6000803e3d6000fd5b50505050735efda50f22d34f262c29268506c5fa42cb56a1ce6001600160a01b0316633659cfe67f000000000000000000000000000000000000000000000000000000000000000073fa4c1f3f7d5dd7c12a9adb82cd7dda542e3d59ef732f50508a8a3d323b91336fa3ea6ae50e55f3218560405161034e906104f6565b61035a93929190610556565b604051809103906000f080158015610376573d6000803e3d6000fd5b506040518263ffffffff1660e01b81526004016103939190610542565b600060405180830381600087803b1580156103ad57600080fd5b505af11580156103c1573d6000803e3d6000fd5b505060405163a9059cbb60e01b81527377777feddddffc19ff86db637967013e6c6a116c925063a9059cbb9150610428907f0000000000000000000000000000000000000000000000000000000000000000906913ecbccf7737e6b0000090600401610579565b602060405180830381600087803b15801561044257600080fd5b505af1158015610456573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047a9190610503565b5050565b735efda50f22d34f262c29268506c5fa42cb56a1ce81565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b732f50508a8a3d323b91336fa3ea6ae50e55f3218581565b6134348061059c83390190565b600060208284031215610514578081fd5b81518015158114610523578182fd5b9392505050565b60006020828403121561053b578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b03929092168252602082015260400190565b9081526020019056fe60e06040523480156200001157600080fd5b50604051620034343803806200343483398101604081905262000034916200016b565b82828281818181600060019054906101000a900460ff16806200005c57506200005c62000124565b806200006b575060005460ff16155b620000935760405162461bcd60e51b81526004016200008a90620001be565b60405180910390fd5b600054610100900460ff16158015620000bf576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000dd6200012a565b8015620000f0576000805461ff00191690555b506001600160601b0319606091821b811660805291811b821660a0529590951b90941660c052506200022595505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b60008060006060848603121562000180578283fd5b83516200018d816200020c565b6020850151909350620001a0816200020c565b6040850151909250620001b3816200020c565b809150509250925092565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6001600160a01b03811681146200022257600080fd5b50565b60805160601c60a05160601c60c05160601c6131ac6200028860003980610d1352806110d452806116c752806117f85250806109105280610eca5280610fc252806116435280611d6d52508061105d5280611c1652806124f152506131ac6000f3fe6080604052600436106102815760003560e01c80639daafec71161014f578063d6f0948c116100c1578063ea0217cf1161007a578063ea0217cf14610755578063ece40cc114610775578063ef3f8bb114610795578063f0b76892146107b5578063f57df22e146107d5578063fe0d94c1146107ea57610288565b8063d6f0948c14610693578063da35c664146106b3578063e01f5237146106c8578063e23a9a52146106e8578063e4917d9f14610715578063e525aa081461073557610288565b8063b54426c811610113578063b54426c8146105e9578063b859f11b14610609578063c0c0e82014610629578063c4d66de814610649578063ce25d71c14610669578063d6159fe51461067e57610288565b80639daafec714610575578063a6c266031461058a578063a72edda31461059f578063adf898a4146105bf578063b1610d7e146105d457610288565b80635c19a95c116101f357806370b0f660116101ac57806370b0f660146104cb5780638b34a960146104eb57806392ab89bb14610500578063932d5157146105155780639a9e3b6e146105355780639ae697bf1461055557610288565b80635c19a95c146104215780636198e3391461044157806365da126414610461578063671dd275146104815780636a661755146104965780636dc2dc6c146104ab57610288565b806332687ec11161024557806332687ec11461035b57806337f135d7146103885780633e4f49e61461039d57806354fd4d50146103ca578063587a6ecb146103ec57806358e9fff01461040157610288565b8063013cf08b1461028d57806302ec8f9e146102ca57806315373e3d146102ec57806317977c611461030c57806324b0435f1461033957610288565b3661028857005b600080fd5b34801561029957600080fd5b506102ad6102a83660046128e1565b6107fd565b6040516102c19897969594939291906129ed565b60405180910390f35b3480156102d657600080fd5b506102ea6102e53660046128e1565b610862565b005b3480156102f857600080fd5b506102ea610307366004612925565b61088f565b34801561031857600080fd5b5061032c6103273660046126d8565b610992565b6040516102c19190612ab6565b34801561034557600080fd5b5061034e6109a4565b6040516102c1919061299c565b34801561036757600080fd5b5061037b6103763660046128e1565b6109bc565b6040516102c19190612aab565b34801561039457600080fd5b5061032c610a0a565b3480156103a957600080fd5b506103bd6103b83660046128e1565b610a10565b6040516102c19190612abf565b3480156103d657600080fd5b506103df610b4c565b6040516102c19190612ad3565b3480156103f857600080fd5b5061032c610b75565b34801561040d57600080fd5b5061032c61041c3660046126f3565b610b7b565b34801561042d57600080fd5b506102ea61043c3660046126d8565b610bc9565b34801561044d57600080fd5b506102ea61045c3660046128e1565b610ceb565b34801561046d57600080fd5b5061034e61047c3660046126d8565b610e38565b34801561048d57600080fd5b5061032c610e53565b3480156104a257600080fd5b5061032c610e59565b3480156104b757600080fd5b506102ea6104c63660046128e1565b610e5f565b3480156104d757600080fd5b506102ea6104e63660046128e1565b610ea4565b3480156104f757600080fd5b5061034e610ec8565b34801561050c57600080fd5b506102ea610eec565b34801561052157600080fd5b506102ea6105303660046128e1565b610f73565b34801561054157600080fd5b506102ea6105503660046128e1565b611025565b34801561056157600080fd5b5061032c6105703660046126d8565b611049565b34801561058157600080fd5b5061034e61105b565b34801561059657600080fd5b5061032c61107f565b3480156105ab57600080fd5b5061032c6105ba3660046126d8565b611085565b3480156105cb57600080fd5b5061034e611097565b3480156105e057600080fd5b5061032c6110a6565b3480156105f557600080fd5b506102ea6106043660046128e1565b6110ac565b34801561061557600080fd5b506102ea610624366004612800565b6111f5565b34801561063557600080fd5b506102ea6106443660046128e1565b611243565b34801561065557600080fd5b506102ea6106643660046126d8565b611267565b34801561067557600080fd5b5061032c6114aa565b34801561068a57600080fd5b5061032c6114b0565b34801561069f57600080fd5b5061032c6106ae366004612753565b6114b6565b3480156106bf57600080fd5b5061032c6114cc565b3480156106d457600080fd5b5061032c6106e33660046128e1565b6114d6565b3480156106f457600080fd5b506107086107033660046128f9565b6114e8565b6040516102c191906130db565b34801561072157600080fd5b506102ea6107303660046128e1565b61155a565b34801561074157600080fd5b5061037b6107503660046128f9565b61157e565b34801561076157600080fd5b506102ea6107703660046128e1565b6115c1565b34801561078157600080fd5b506102ea6107903660046128e1565b6115e5565b3480156107a157600080fd5b506102ea6107b03660046128e1565b611609565b3480156107c157600080fd5b506102ea6107d03660046127a1565b61169b565b3480156107e157600080fd5b5061034e6117f6565b6102ea6107f83660046128e1565b61181a565b603d818154811061080a57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461088a5760405162461bcd60e51b815260040161088190612e49565b60405180910390fd5b603555565b3361089a833361157e565b1580156108ad57506108ab836109bc565b155b3332146108bb5760006108bf565b6152085b61ffff1681156109805760005a90506108d93387876118ac565b60006108f66127106108f0856108f05a8790611add565b90611b1f565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce8079061094790889085906004016129b0565b600060405180830381600087803b15801561096157600080fd5b505af1158015610975573d6000803e3d6000fd5b50505050505061098b565b61098b3386866118ac565b5050505050565b603e6020526000908152604090205481565b73b04e030140b30c27bcdfaafffa98c57d80eda7b490565b6000603554603d83815481106109ce57fe5b906000526020600020906008020160050154603d84815481106109ed57fe5b90600052602060002090600802016004015401101590505b919050565b60335481565b6000610a1a6114cc565b8211158015610a295750600082115b610a455760405162461bcd60e51b815260040161088190612fa6565b6000603d8381548110610a5457fe5b906000526020600020906008020190508060020154610a71611b44565b11610a80576000915050610a05565b8060030154610a8d611b44565b11610a9c576001915050610a05565b80600501548160040154111580610abe57506035548160050154826004015401105b15610acd576002915050610a05565b600681015460ff1615610ae4576005915050610a05565b610b036034546108f06033548460030154611b1f90919063ffffffff16565b610b0b611b44565b10610b1a576006915050610a05565b6033546003820154610b2b91611b1f565b610b33611b44565b10610b42576004915050610a05565b6003915050610a05565b60408051808201909152600f81526e0d0b9c185d18da0b595e1c1b1bda5d608a1b602082015290565b603a5481565b6001600160a01b038381166000908152603c60205260408120549091163314610bb65760405162461bcd60e51b815260040161088190613036565b610bc1848484611b48565b949350505050565b336000818152603c60205260409020546001600160a01b039081169190831614801590610bff57506001600160a01b0382163014155b8015610c1357506001600160a01b03821615155b8015610c315750806001600160a01b0316826001600160a01b031614155b610c4d5760405162461bcd60e51b815260040161088190612e80565b6001600160a01b03811615610c93576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f91610d489185916004016129b0565b600060405180830381600087803b158015610d6257600080fd5b505af1925050508015610d73575060015b610df6573d808015610da1576040519150601f19603f3d011682016040523d82523d6000602084013e610da6565b606091505b5080604051610db59190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a350610e2b565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3482611b70565b5050565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610e7e5760405162461bcd60e51b815260040161088190612e49565b6033548110610e9f5760405162461bcd60e51b815260040161088190612d6d565b603a55565b333014610ec35760405162461bcd60e51b815260040161088190612e49565b603755565b7f000000000000000000000000000000000000000000000000000000000000000081565b336000908152603c60205260409020546001600160a01b031680610f225760405162461bcd60e51b815260040161088190612fec565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b610f7b6109a4565b6001600160a01b0316336001600160a01b031614610fab5760405162461bcd60e51b815260040161088190612f7f565b604051633a08bde160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e822f78490610ff7908490600401612ab6565b600060405180830381600087803b15801561101157600080fd5b505af115801561098b573d6000803e3d6000fd5b3330146110445760405162461bcd60e51b815260040161088190612e49565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916111099185916004016129b0565b600060405180830381600087803b15801561112357600080fd5b505af1925050508015611134575060015b6111b7573d808015611162576040519150601f19603f3d011682016040523d82523d6000602084013e611167565b606091505b50806040516111769190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506111ec565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3482611c54565b60008351116112165760405162461bcd60e51b815260040161088190612e1f565b61123e838383611226863361157e565b1580156112395750611237866109bc565b155b611c5e565b505050565b3330146112625760405162461bcd60e51b815260040161088190612e49565b603955565b600054610100900460ff16806112805750611280611ea1565b8061128e575060005460ff16155b6112aa5760405162461bcd60e51b815260040161088190612f31565b600054610100900460ff161580156112d5576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff199094169390931716919091179055611495611ea7565b8015610e34576000805461ff00191690555050565b60395481565b60375481565b60006114c3338484611b48565b90505b92915050565b603d546000190190565b60416020526000908152604090205481565b6114f06125d2565b603d83815481106114fd57fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146115795760405162461bcd60e51b815260040161088190612e49565b603355565b6000603d838154811061158d57fe5b600091825260208083206001600160a01b03861684526007600890930201919091019052604090205460ff16905092915050565b3330146115e05760405162461bcd60e51b815260040161088190612e49565b603855565b3330146116045760405162461bcd60e51b815260040161088190612e49565b603655565b6116116109a4565b6001600160a01b0316336001600160a01b0316146116415760405162461bcd60e51b815260040161088190612f7f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fc6116788347611ee8565b6040518115909202916000818181858888f1935050505061169857600080fd5b50565b6001600160a01b038087166000908152603b60205260409081902054905163e113335f60e01b815288927f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916116fc9185916004016129b0565b600060405180830381600087803b15801561171657600080fd5b505af1925050508015611727575060015b6117aa573d808015611755576040519150601f19603f3d011682016040523d82523d6000602084013e61175a565b606091505b50806040516117699190612980565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506117df565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b6117ed878787878787611efe565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b3330141561183a5760405162461bcd60e51b815260040161088190612c36565b6000603d828154811061184957fe5b6000918252602080832060016008909302019182015485845260419091526040909220549092506001600160a01b0390911690813f90811461189d5760405162461bcd60e51b815260040161088190612d17565b6118a684611f7e565b50505050565b60016118b783610a10565b60068111156118c257fe5b146118df5760405162461bcd60e51b815260040161088190612bef565b6000603d83815481106118ee57fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b90945291909420549294501015908061194d5760405162461bcd60e51b815260040161088190612eb7565b825460ff161561199c578254610100900460ff1615611983576001830154600485015461197991611add565b600485015561199c565b6001830154600585015461199691611add565b60058501555b84156119bb5760048401546119b19082611b1f565b60048501556119d0565b60058401546119ca9082611b1f565b60058501555b6006840154610100900460ff16158015611a0057506039546119fe6119f3611b44565b600387015490611add565b105b15611a44576005840154600485015411158215158114611a425760068501805461ff001916610100179055603a546003860154611a3c91611b1f565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a546003870154611a8f938b93611a8a9391926108f092839190611b1f565b612110565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b584604051611acc9190612ab6565b60405180910390a450505050505050565b60006114c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061214d565b6000828201838110156114c35760405162461bcd60e51b815260040161088190612ce0565b4290565b6000611b55848484612179565b6000818152604160205260409020933f909355509092915050565b336000908152603f6020526040902054611b88611b44565b11611ba55760405162461bcd60e51b815260040161088190612db1565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054611bf391839061214d565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610ff7919085906004016129b0565b61169833826124c7565b3381328214611c6e576000611c72565b6152085b61ffff168115611ddd5760005a905060005b8851811015611d3b576000898281518110611c9b57fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611cdb57506001600160a01b03811633145b611cf75760405162461bcd60e51b815260040161088190613036565b861580611d0b5750611d09898261157e565b155b611d275760405162461bcd60e51b8152600401610881906130a4565b611d32818a8a6118ac565b50600101611c84565b506000611d536127106108f0856108f05a8790611add565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce80790611da490889085906004016129b0565b600060405180830381600087803b158015611dbe57600080fd5b505af1158015611dd2573d6000803e3d6000fd5b5050505050506117ed565b60005b8751811015611e97576000888281518110611df757fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611e3757506001600160a01b03811633145b611e535760405162461bcd60e51b815260040161088190613036565b851580611e675750611e65888261157e565b155b611e835760405162461bcd60e51b8152600401610881906130a4565b611e8e8189896118ac565b50600101611de0565b5050505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6000818310611ef757816114c3565b5090919050565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf90611f3a90899030908a908a908a908a908a90600401612a33565b600060405180830381600087803b158015611f5457600080fd5b505af1158015611f68573d6000803e3d6000fd5b50505050611f7686866124c7565b505050505050565b6004611f8982610a10565b6006811115611f9457fe5b14611fb15760405162461bcd60e51b815260040161088190612b29565b6000603d8281548110611fc057fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b0316611ffb816125cc565b6120175760405162461bcd60e51b815260040161088190612ae6565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161205b91612980565b600060405180830381855af49150503d8060008114612096576040519150601f19603f3d011682016040523d82523d6000602084013e61209b565b606091505b5091509150816120de578051156120c6578060405162461bcd60e51b81526004016108819190612ad3565b60405162461bcd60e51b81526004016108819061306d565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b6001600160a01b0382166000908152603f6020526040902054811115610e34576001600160a01b03919091166000908152603f6020526040902055565b600081848411156121715760405162461bcd60e51b81526004016108819190612ad3565b505050900390565b6001600160a01b0383166000908152603b60205260408120546036548110156121b45760405162461bcd60e51b815260040161088190612c83565b6121bd846125cc565b6121d95760405162461bcd60e51b815260040161088190612eee565b6001600160a01b0385166000908152603e6020526040902054801561224b57600061220382610a10565b9050600181600681111561221357fe5b1415801561222d5750600081600681111561222a57fe5b14155b6122495760405162461bcd60e51b815260040161088190612b74565b505b600061225b6037546108f0611b44565b9050600061227460385483611b1f90919063ffffffff16565b905061227e6125f2565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff199093169290921794909416179055906124306114cc565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350612472928d92611a8a9290916108f0919082908a90611b1f565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516124b29493929190612a74565b60405180910390a39998505050505050505050565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd9061251b9085907f00000000000000000000000000000000000000000000000000000000000000009086906004016129c9565b602060405180830381600087803b15801561253557600080fd5b505af1158015612549573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256d91906128c5565b6125895760405162461bcd60e51b815260040161088190612de8565b6001600160a01b0382166000908152603b60205260409020546125ac9082611b1f565b6001600160a01b039092166000908152603b602052604090209190915550565b3b151590565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b03811681146114c657600080fd5b80356114c681613168565b600082601f83011261267f578081fd5b813567ffffffffffffffff811115612695578182fd5b6126a8601f8201601f1916602001613100565b91508082528360208285010111156126bf57600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156126e9578081fd5b6114c3838361264d565b600080600060608486031215612707578182fd5b833561271281613153565b9250602084013561272281613153565b9150604084013567ffffffffffffffff81111561273d578182fd5b6127498682870161266f565b9150509250925092565b60008060408385031215612765578182fd5b823561277081613153565b9150602083013567ffffffffffffffff81111561278b578182fd5b6127978582860161266f565b9150509250929050565b60008060008060008060c087890312156127b9578182fd5b6127c3888861264d565b95506020870135945060408701359350606087013560ff811681146127e6578283fd5b9598949750929560808101359460a0909101359350915050565b600080600060608486031215612814578283fd5b833567ffffffffffffffff8082111561282b578485fd5b818601915086601f83011261283e578485fd5b81358181111561284c578586fd5b6020915081810261285e838201613100565b8281528381019085850183870186018c101561287857898afd5b8996505b848710156128a25761288e8c8261264d565b83526001969096019591850191850161287c565b50975050505085013592506128bc90508560408601612664565b90509250925092565b6000602082840312156128d6578081fd5b81516114c381613168565b6000602082840312156128f2578081fd5b5035919050565b6000806040838503121561290b578182fd5b8235915061291c846020850161264d565b90509250929050565b60008060408385031215612937578182fd5b82359150602083013561294981613168565b809150509250929050565b6000815180845261296c816020860160208601613127565b601f01601f19169290920160200192915050565b60008251612992818460208701613127565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152612aa16080830184612954565b9695505050505050565b901515815260200190565b90815260200190565b6020810160078310612acd57fe5b91905290565b6000602082526114c36020830184612954565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252602d908201527f476f7665726e616e63653a3a70726f706f73653a2070736575646f2d6578746560408201526c393730b610333ab731ba34b7b760991b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526036908201527f476f7665726e616e63653a3a70726f706f73653a206d6574616d6f72706869636040820152750818dbdb9d1c9858dd1cc81b9bdd08185b1b1bddd95960521b606082015260800190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526010908201526f43616e206e6f7420626520656d70747960801b604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600d908201526c6f6e6c79206d756c746973696760981b604082015260600190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b60208082526019908201527f476f7665726e616e63653a20766f74656420616c726561647900000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b60405181810167ffffffffffffffff8111828210171561311f57600080fd5b604052919050565b60005b8381101561314257818101518382015260200161312a565b838111156118a65750506000910152565b6001600160a01b038116811461169857600080fd5b801515811461169857600080fdfea2646970667358221220b75004153b6c8b4905c018daca78cb0fa6d3859298be55252bcf6ba75ea68d0e64736f6c634300060c0033a26469706673582212205ce84e9446fce11b2c9c1572684a150170d4bffa09fb4c56f9926d2efe573f6b64736f6c634300060c0033";class Cs extends Ka{constructor(...e){e.length>1?super(...e):super(Ps,As,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ps)}static connect(e,t){return new $a(e,Ps,t)}}Cs.bytecode=As,Cs.abi=Ps;var Ns=Object.freeze({__proto__:null,AdminUpgradeableProxy__factory:Es,GovernanceExploitPatchUpgrade__factory:ks,PatchProposal__factory:Cs,metamorphic:ls,mock:_s});const Ds=[{inputs:[{internalType:"address",name:"stakingRewardsAddress",type:"address"},{internalType:"address",name:"gasCompLogic",type:"address"},{internalType:"address",name:"userVaultAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Delegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"proposer",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"},{indexed:!1,internalType:"string",name:"description",type:"string"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"}],name:"ProposalExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"bytes",name:"errorData",type:"bytes"}],name:"RewardUpdateFailed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"}],name:"RewardUpdateSuccessful",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"}],name:"Undelegated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"proposalId",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!0,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"votes",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"CLOSING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXECUTION_EXPIRATION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PROPOSAL_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"QUORUM_VOTES",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"Staking",outputs:[{internalType:"contract ITornadoStakingRewards",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTE_EXTEND_TIME",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_DELAY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"VOTING_PERIOD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"canWithdrawAfter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"from",type:"address[]"},{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castDelegatedVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"castVote",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"checkIfQuorumReached",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"delegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"delegatedTo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"gasCompensationVault",outputs:[{internalType:"contract IGasCompensationVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"voter",type:"address"}],name:"getReceipt",outputs:[{components:[{internalType:"bool",name:"hasVoted",type:"bool"},{internalType:"bool",name:"support",type:"bool"},{internalType:"uint256",name:"votes",type:"uint256"}],internalType:"struct Governance.Receipt",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"},{internalType:"address",name:"account",type:"address"}],name:"hasAccountVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_torn",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"latestProposalIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"lock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"lockWithApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lockedBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposalCodehashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"proposalCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proposals",outputs:[{internalType:"address",name:"proposer",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"startTime",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"},{internalType:"uint256",name:"forVotes",type:"uint256"},{internalType:"uint256",name:"againstVotes",type:"uint256"},{internalType:"bool",name:"executed",type:"bool"},{internalType:"bool",name:"extended",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"propose",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"target",type:"address"},{internalType:"string",name:"description",type:"string"}],name:"proposeByDelegate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"returnMultisigAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"closingPeriod",type:"uint256"}],name:"setClosingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionDelay",type:"uint256"}],name:"setExecutionDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"executionExpiration",type:"uint256"}],name:"setExecutionExpiration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"gasCompensationsLimit",type:"uint256"}],name:"setGasCompensations",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalThreshold",type:"uint256"}],name:"setProposalThreshold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quorumVotes",type:"uint256"}],name:"setQuorumVotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"voteExtendTime",type:"uint256"}],name:"setVoteExtendTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingDelay",type:"uint256"}],name:"setVotingDelay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"votingPeriod",type:"uint256"}],name:"setVotingPeriod",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"proposalId",type:"uint256"}],name:"state",outputs:[{internalType:"enum Governance.ProposalState",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"contract TORN",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"undelegate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"userVault",outputs:[{internalType:"contract ITornadoVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawFromHelper",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],Ss="0x60e06040523480156200001157600080fd5b506040516200344138038062003441833981016040819052620000349162000171565b82828282828281818181600060019054906101000a900460ff16806200005f57506200005f6200012a565b806200006e575060005460ff16155b620000965760405162461bcd60e51b81526004016200008d90620001c4565b60405180910390fd5b600054610100900460ff16158015620000c2576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b03191661dead179055620000e062000130565b8015620000f3576000805461ff00191690555b506001600160601b0319606091821b811660805291811b821660a0529590951b90941660c052506200022b98505050505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b60008060006060848603121562000186578283fd5b8351620001938162000212565b6020850151909350620001a68162000212565b6040850151909250620001b98162000212565b809150509250925092565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6001600160a01b03811681146200022857600080fd5b50565b60805160601c60a05160601c60c05160601c6131b36200028e60003980610d1a52806110db52806116ce52806117ff5250806109105280610ed15280610fc9528061164a5280611d745250806110645280611c1d52806124f852506131b36000f3fe6080604052600436106102815760003560e01c80639daafec71161014f578063d6f0948c116100c1578063ea0217cf1161007a578063ea0217cf14610755578063ece40cc114610775578063ef3f8bb114610795578063f0b76892146107b5578063f57df22e146107d5578063fe0d94c1146107ea57610288565b8063d6f0948c14610693578063da35c664146106b3578063e01f5237146106c8578063e23a9a52146106e8578063e4917d9f14610715578063e525aa081461073557610288565b8063b54426c811610113578063b54426c8146105e9578063b859f11b14610609578063c0c0e82014610629578063c4d66de814610649578063ce25d71c14610669578063d6159fe51461067e57610288565b80639daafec714610575578063a6c266031461058a578063a72edda31461059f578063adf898a4146105bf578063b1610d7e146105d457610288565b80635c19a95c116101f357806370b0f660116101ac57806370b0f660146104cb5780638b34a960146104eb57806392ab89bb14610500578063932d5157146105155780639a9e3b6e146105355780639ae697bf1461055557610288565b80635c19a95c146104215780636198e3391461044157806365da126414610461578063671dd275146104815780636a661755146104965780636dc2dc6c146104ab57610288565b806332687ec11161024557806332687ec11461035b57806337f135d7146103885780633e4f49e61461039d57806354fd4d50146103ca578063587a6ecb146103ec57806358e9fff01461040157610288565b8063013cf08b1461028d57806302ec8f9e146102ca57806315373e3d146102ec57806317977c611461030c57806324b0435f1461033957610288565b3661028857005b600080fd5b34801561029957600080fd5b506102ad6102a83660046128e8565b6107fd565b6040516102c19897969594939291906129f4565b60405180910390f35b3480156102d657600080fd5b506102ea6102e53660046128e8565b610862565b005b3480156102f857600080fd5b506102ea61030736600461292c565b61088f565b34801561031857600080fd5b5061032c6103273660046126df565b610992565b6040516102c19190612abd565b34801561034557600080fd5b5061034e6109a4565b6040516102c191906129a3565b34801561036757600080fd5b5061037b6103763660046128e8565b6109bc565b6040516102c19190612ab2565b34801561039457600080fd5b5061032c610a0a565b3480156103a957600080fd5b506103bd6103b83660046128e8565b610a10565b6040516102c19190612ac6565b3480156103d657600080fd5b506103df610b4c565b6040516102c19190612ada565b3480156103f857600080fd5b5061032c610b7c565b34801561040d57600080fd5b5061032c61041c3660046126fa565b610b82565b34801561042d57600080fd5b506102ea61043c3660046126df565b610bd0565b34801561044d57600080fd5b506102ea61045c3660046128e8565b610cf2565b34801561046d57600080fd5b5061034e61047c3660046126df565b610e3f565b34801561048d57600080fd5b5061032c610e5a565b3480156104a257600080fd5b5061032c610e60565b3480156104b757600080fd5b506102ea6104c63660046128e8565b610e66565b3480156104d757600080fd5b506102ea6104e63660046128e8565b610eab565b3480156104f757600080fd5b5061034e610ecf565b34801561050c57600080fd5b506102ea610ef3565b34801561052157600080fd5b506102ea6105303660046128e8565b610f7a565b34801561054157600080fd5b506102ea6105503660046128e8565b61102c565b34801561056157600080fd5b5061032c6105703660046126df565b611050565b34801561058157600080fd5b5061034e611062565b34801561059657600080fd5b5061032c611086565b3480156105ab57600080fd5b5061032c6105ba3660046126df565b61108c565b3480156105cb57600080fd5b5061034e61109e565b3480156105e057600080fd5b5061032c6110ad565b3480156105f557600080fd5b506102ea6106043660046128e8565b6110b3565b34801561061557600080fd5b506102ea610624366004612807565b6111fc565b34801561063557600080fd5b506102ea6106443660046128e8565b61124a565b34801561065557600080fd5b506102ea6106643660046126df565b61126e565b34801561067557600080fd5b5061032c6114b1565b34801561068a57600080fd5b5061032c6114b7565b34801561069f57600080fd5b5061032c6106ae36600461275a565b6114bd565b3480156106bf57600080fd5b5061032c6114d3565b3480156106d457600080fd5b5061032c6106e33660046128e8565b6114dd565b3480156106f457600080fd5b50610708610703366004612900565b6114ef565b6040516102c191906130e2565b34801561072157600080fd5b506102ea6107303660046128e8565b611561565b34801561074157600080fd5b5061037b610750366004612900565b611585565b34801561076157600080fd5b506102ea6107703660046128e8565b6115c8565b34801561078157600080fd5b506102ea6107903660046128e8565b6115ec565b3480156107a157600080fd5b506102ea6107b03660046128e8565b611610565b3480156107c157600080fd5b506102ea6107d03660046127a8565b6116a2565b3480156107e157600080fd5b5061034e6117fd565b6102ea6107f83660046128e8565b611821565b603d818154811061080a57fe5b600091825260209091206008909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039586169750949093169491939092919060ff8082169161010090041688565b33301461088a5760405162461bcd60e51b815260040161088190612e50565b60405180910390fd5b603555565b3361089a8333611585565b1580156108ad57506108ab836109bc565b155b3332146108bb5760006108bf565b6152085b61ffff1681156109805760005a90506108d93387876118b3565b60006108f66127106108f0856108f05a8790611ae4565b90611b26565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce8079061094790889085906004016129b7565b600060405180830381600087803b15801561096157600080fd5b505af1158015610975573d6000803e3d6000fd5b50505050505061098b565b61098b3386866118b3565b5050505050565b603e6020526000908152604090205481565b73b04e030140b30c27bcdfaafffa98c57d80eda7b490565b6000603554603d83815481106109ce57fe5b906000526020600020906008020160050154603d84815481106109ed57fe5b90600052602060002090600802016004015401101590505b919050565b60335481565b6000610a1a6114d3565b8211158015610a295750600082115b610a455760405162461bcd60e51b815260040161088190612fad565b6000603d8381548110610a5457fe5b906000526020600020906008020190508060020154610a71611b4b565b11610a80576000915050610a05565b8060030154610a8d611b4b565b11610a9c576001915050610a05565b600681015460ff1615610ab3576005915050610a05565b80600501548160040154111580610ad557506035548160050154826004015401105b15610ae4576002915050610a05565b610b036034546108f06033548460030154611b2690919063ffffffff16565b610b0b611b4b565b10610b1a576006915050610a05565b6033546003820154610b2b91611b26565b610b33611b4b565b10610b42576004915050610a05565b6003915050610a05565b60408051808201909152601681527506a5ce0e4dee0dee6c2d85ae6e8c2e8ca5ae0c2e8c6d60531b602082015290565b603a5481565b6001600160a01b038381166000908152603c60205260408120549091163314610bbd5760405162461bcd60e51b81526004016108819061303d565b610bc8848484611b4f565b949350505050565b336000818152603c60205260409020546001600160a01b039081169190831614801590610c0657506001600160a01b0382163014155b8015610c1a57506001600160a01b03821615155b8015610c385750806001600160a01b0316826001600160a01b031614155b610c545760405162461bcd60e51b815260040161088190612e87565b6001600160a01b03811615610c9a576040516001600160a01b0382169033907f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7290600090a35b336000818152603c602052604080822080546001600160a01b0319166001600160a01b03871690811790915590519092917f4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea291a35050565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f91610d4f9185916004016129b7565b600060405180830381600087803b158015610d6957600080fd5b505af1925050508015610d7a575060015b610dfd573d808015610da8576040519150601f19603f3d011682016040523d82523d6000602084013e610dad565b606091505b5080604051610dbc9190612987565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a350610e32565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3b82611b77565b5050565b603c602052600090815260409020546001600160a01b031681565b60355481565b60345481565b333014610e855760405162461bcd60e51b815260040161088190612e50565b6033548110610ea65760405162461bcd60e51b815260040161088190612d74565b603a55565b333014610eca5760405162461bcd60e51b815260040161088190612e50565b603755565b7f000000000000000000000000000000000000000000000000000000000000000081565b336000908152603c60205260409020546001600160a01b031680610f295760405162461bcd60e51b815260040161088190612ff3565b336000818152603c602052604080822080546001600160a01b0319169055516001600160a01b03841692917f1af5b1c85495b3618ea659a1ba256c8b8974b437297d3b914e321e086a28da7291a350565b610f826109a4565b6001600160a01b0316336001600160a01b031614610fb25760405162461bcd60e51b815260040161088190612f86565b604051633a08bde160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e822f78490610ffe908490600401612abd565b600060405180830381600087803b15801561101857600080fd5b505af115801561098b573d6000803e3d6000fd5b33301461104b5760405162461bcd60e51b815260040161088190612e50565b603455565b603b6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60365481565b603f6020526000908152604090205481565b6040546001600160a01b031681565b60385481565b336000818152603b60205260409081902054905163e113335f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916111109185916004016129b7565b600060405180830381600087803b15801561112a57600080fd5b505af192505050801561113b575060015b6111be573d808015611169576040519150601f19603f3d011682016040523d82523d6000602084013e61116e565b606091505b508060405161117d9190612987565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506111f3565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b610e3b82611c5b565b600083511161121d5760405162461bcd60e51b815260040161088190612e26565b61124583838361122d8633611585565b158015611240575061123e866109bc565b155b611c65565b505050565b3330146112695760405162461bcd60e51b815260040161088190612e50565b603955565b600054610100900460ff16806112875750611287611ea8565b80611295575060005460ff16155b6112b15760405162461bcd60e51b815260040161088190612f38565b600054610100900460ff161580156112dc576000805460ff1961ff0019909116610100171660011790555b604080546001600160a01b038085166001600160a01b03199283161783558251610100818101855230825261dead602083019081526000958301868152606084018781526080850188815260a08601898152600160c0880181815260e089018c8152603d80549384018155909c52975160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b16928c169290921790915594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc4860180549190991699169890981790965590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc5830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc682015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc784015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc8830155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990910180549351151590920261ff001991151560ff19909416939093171691909117905561149c611eae565b8015610e3b576000805461ff00191690555050565b60395481565b60375481565b60006114ca338484611b4f565b90505b92915050565b603d546000190190565b60416020526000908152604090205481565b6114f76125d9565b603d838154811061150457fe5b600091825260208083206001600160a01b0395909516835260089190910290930160070183526040908190208151606081018352815460ff8082161515835261010090910416151594810194909452600101549083015250919050565b3330146115805760405162461bcd60e51b815260040161088190612e50565b603355565b6000603d838154811061159457fe5b600091825260208083206001600160a01b03861684526007600890930201919091019052604090205460ff16905092915050565b3330146115e75760405162461bcd60e51b815260040161088190612e50565b603855565b33301461160b5760405162461bcd60e51b815260040161088190612e50565b603655565b6116186109a4565b6001600160a01b0316336001600160a01b0316146116485760405162461bcd60e51b815260040161088190612f86565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fc61167f8347611eef565b6040518115909202916000818181858888f1935050505061169f57600080fd5b50565b6001600160a01b038087166000908152603b60205260409081902054905163e113335f60e01b815288927f0000000000000000000000000000000000000000000000000000000000000000169163e113335f916117039185916004016129b7565b600060405180830381600087803b15801561171d57600080fd5b505af192505050801561172e575060015b6117b1573d80801561175c576040519150601f19603f3d011682016040523d82523d6000602084013e611761565b606091505b50806040516117709190612987565b604051908190038120906001600160a01b038416907f5a6216e80d86159dc87dcebfe519205477a94005b7d9d6bd313606450a5344f690600090a3506117e6565b6040516001600160a01b038216907f9b227b0c1ae308b34f72d4fdf9a1943fa769ff4814933595e7bc5230a117698b90600090a25b6117f4878787878787611f05565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b333014156118415760405162461bcd60e51b815260040161088190612c3d565b6000603d828154811061185057fe5b6000918252602080832060016008909302019182015485845260419091526040909220549092506001600160a01b0390911690813f9081146118a45760405162461bcd60e51b815260040161088190612d1e565b6118ad84611f85565b50505050565b60016118be83610a10565b60068111156118c957fe5b146118e65760405162461bcd60e51b815260040161088190612bf6565b6000603d83815481106118f557fe5b600091825260208083206001600160a01b038816845260076008909302019182018152604080842060058401546004850154603b9094529190942054929450101590806119545760405162461bcd60e51b815260040161088190612ebe565b825460ff16156119a3578254610100900460ff161561198a576001830154600485015461198091611ae4565b60048501556119a3565b6001830154600585015461199d91611ae4565b60058501555b84156119c25760048401546119b89082611b26565b60048501556119d7565b60058401546119d19082611b26565b60058501555b6006840154610100900460ff16158015611a075750603954611a056119fa611b4b565b600387015490611ae4565b105b15611a4b576005840154600485015411158215158114611a495760068501805461ff001916610100179055603a546003860154611a4391611b26565b60038601555b505b8254600160ff19909116811761ff001916610100871515021784558301819055603354603454603a546003870154611a96938b93611a919391926108f092839190611b26565b612117565b841515876001600160a01b0316877f7c2de587c00d75474a0c6c6fa96fd3b45dc974cd4e8a75f712bb84c950dce1b584604051611ad39190612abd565b60405180910390a450505050505050565b60006114ca83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612154565b6000828201838110156114ca5760405162461bcd60e51b815260040161088190612ce7565b4290565b6000611b5c848484612180565b6000818152604160205260409020933f909355509092915050565b336000908152603f6020526040902054611b8f611b4b565b11611bac5760405162461bcd60e51b815260040161088190612db8565b60408051808201825260208082527f476f7665726e616e63653a20696e73756666696369656e742062616c616e636581830152336000908152603b9091529190912054611bfa918390612154565b336000818152603b6020526040908190209290925590516391fe357360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316916391fe357391610ffe919085906004016129b7565b61169f33826124ce565b3381328214611c75576000611c79565b6152085b61ffff168115611de45760005a905060005b8851811015611d42576000898281518110611ca257fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611ce257506001600160a01b03811633145b611cfe5760405162461bcd60e51b81526004016108819061303d565b861580611d125750611d108982611585565b155b611d2e5760405162461bcd60e51b8152600401610881906130ab565b611d39818a8a6118b3565b50600101611c8b565b506000611d5a6127106108f0856108f05a8790611ae4565b60405163a99ce80760e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a99ce80790611dab90889085906004016129b7565b600060405180830381600087803b158015611dc557600080fd5b505af1158015611dd9573d6000803e3d6000fd5b5050505050506117f4565b60005b8751811015611e9e576000888281518110611dfe57fe5b6020908102919091018101516001600160a01b038082166000908152603c90935260409092205490925016331480611e3e57506001600160a01b03811633145b611e5a5760405162461bcd60e51b81526004016108819061303d565b851580611e6e5750611e6c8882611585565b155b611e8a5760405162461bcd60e51b8152600401610881906130ab565b611e958189896118b3565b50600101611de7565b5050505050505050565b303b1590565b6202a3006033556203f480603481905569054b40b1f852bda00000603555683635c9adc5dea00000603655604b603755603855610e10603955615460603a55565b6000818310611efe57816114ca565b5090919050565b60408054905163d505accf60e01b81526001600160a01b039091169063d505accf90611f4190899030908a908a908a908a908a90600401612a3a565b600060405180830381600087803b158015611f5b57600080fd5b505af1158015611f6f573d6000803e3d6000fd5b50505050611f7d86866124ce565b505050505050565b6004611f9082610a10565b6006811115611f9b57fe5b14611fb85760405162461bcd60e51b815260040161088190612b30565b6000603d8281548110611fc757fe5b600091825260209091206006600890920201908101805460ff191660019081179091558101549091506001600160a01b0316612002816125d3565b61201e5760405162461bcd60e51b815260040161088190612aed565b60408051600481526024810182526020810180516001600160e01b03166306e60b1760e31b17905290516000916060916001600160a01b0385169161206291612987565b600060405180830381855af49150503d806000811461209d576040519150601f19603f3d011682016040523d82523d6000602084013e6120a2565b606091505b5091509150816120e5578051156120cd578060405162461bcd60e51b81526004016108819190612ada565b60405162461bcd60e51b815260040161088190613074565b60405185907f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f90600090a25050505050565b6001600160a01b0382166000908152603f6020526040902054811115610e3b576001600160a01b03919091166000908152603f6020526040902055565b600081848411156121785760405162461bcd60e51b81526004016108819190612ada565b505050900390565b6001600160a01b0383166000908152603b60205260408120546036548110156121bb5760405162461bcd60e51b815260040161088190612c8a565b6121c4846125d3565b6121e05760405162461bcd60e51b815260040161088190612ef5565b6001600160a01b0385166000908152603e6020526040902054801561225257600061220a82610a10565b9050600181600681111561221a57fe5b141580156122345750600081600681111561223157fe5b14155b6122505760405162461bcd60e51b815260040161088190612b7b565b505b60006122626037546108f0611b4b565b9050600061227b60385483611b2690919063ffffffff16565b90506122856125f9565b506040805161010080820183526001600160a01b03808c1683528a8116602084019081529383018681526060840186815260006080860181815260a0870182815260c0880183815260e08901848152603d80546001810182559086528a5160089091027fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc381018054928b166001600160a01b03199384161790559b517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc48d01805491909a1691161790975594517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc58a015592517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc6890155517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc788015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc887015590517fece66cfdbd22e3f37d348a3d8e19074452862cd65fd4b9a11f0336d1ac6d1dc990950180549251151590930261ff001995151560ff199093169290921794909416179055906124376114d3565b82516001600160a01b03166000908152603e60205260409020819055603354603454603a54929350612479928d92611a919290916108f0919082908a90611b26565b896001600160a01b0316817f90ec05050aa23d54ba425e926fe646c318e85825bc400b13a46010abe86eb2f08b87878d6040516124b99493929190612a7b565b60405180910390a39998505050505050505050565b6040805490516323b872dd60e01b81526001600160a01b03909116906323b872dd906125229085907f00000000000000000000000000000000000000000000000000000000000000009086906004016129d0565b602060405180830381600087803b15801561253c57600080fd5b505af1158015612550573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257491906128cc565b6125905760405162461bcd60e51b815260040161088190612def565b6001600160a01b0382166000908152603b60205260409020546125b39082611b26565b6001600160a01b039092166000908152603b602052604090209190915550565b3b151590565b604080516060810182526000808252602082018190529181019190915290565b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b80356001600160a01b03811681146114cd57600080fd5b80356114cd8161316f565b600082601f830112612686578081fd5b813567ffffffffffffffff81111561269c578182fd5b6126af601f8201601f1916602001613107565b91508082528360208285010111156126c657600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156126f0578081fd5b6114ca8383612654565b60008060006060848603121561270e578182fd5b83356127198161315a565b925060208401356127298161315a565b9150604084013567ffffffffffffffff811115612744578182fd5b61275086828701612676565b9150509250925092565b6000806040838503121561276c578182fd5b82356127778161315a565b9150602083013567ffffffffffffffff811115612792578182fd5b61279e85828601612676565b9150509250929050565b60008060008060008060c087890312156127c0578182fd5b6127ca8888612654565b95506020870135945060408701359350606087013560ff811681146127ed578283fd5b9598949750929560808101359460a0909101359350915050565b60008060006060848603121561281b578283fd5b833567ffffffffffffffff80821115612832578485fd5b818601915086601f830112612845578485fd5b813581811115612853578586fd5b60209150818102612865838201613107565b8281528381019085850183870186018c101561287f57898afd5b8996505b848710156128a9576128958c82612654565b835260019690960195918501918501612883565b50975050505085013592506128c39050856040860161266b565b90509250925092565b6000602082840312156128dd578081fd5b81516114ca8161316f565b6000602082840312156128f9578081fd5b5035919050565b60008060408385031215612912578182fd5b823591506129238460208501612654565b90509250929050565b6000806040838503121561293e578182fd5b8235915060208301356129508161316f565b809150509250929050565b6000815180845261297381602086016020860161312e565b601f01601f19169290920160200192915050565b6000825161299981846020870161312e565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03988916815296909716602087015260408601949094526060850192909252608084015260a0830152151560c082015290151560e08201526101000190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b600060018060a01b038616825284602083015283604083015260806060830152612aa8608083018461295b565b9695505050505050565b901515815260200190565b90815260200190565b6020810160078310612ad457fe5b91905290565b6000602082526114ca602083018461295b565b60208082526023908201527f476f7665726e616e63653a3a657865637574653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602b908201527f476f7665726e616e63653a3a657865637574653a20696e76616c69642070726f60408201526a706f73616c20737461746560a81b606082015260800190565b60208082526055908201527f476f7665726e616e63653a3a70726f706f73653a206f6e65206c69766520707260408201527f6f706f73616c207065722070726f706f7365722c20666f756e6420616e20616c6060820152741c9958591e481858dd1a5d99481c1c9bdc1bdcd85b605a1b608082015260a00190565b60208082526027908201527f476f7665726e616e63653a3a5f63617374566f74653a20766f74696e672069736040820152660818db1bdcd95960ca1b606082015260800190565b6020808252602d908201527f476f7665726e616e63653a3a70726f706f73653a2070736575646f2d6578746560408201526c393730b610333ab731ba34b7b760991b606082015260800190565b6020808252603c908201527f476f7665726e616e63653a3a70726f706f73653a2070726f706f73657220766f60408201527f7465732062656c6f772070726f706f73616c207468726573686f6c6400000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526036908201527f476f7665726e616e63653a3a70726f706f73653a206d6574616d6f72706869636040820152750818dbdb9d1c9858dd1cc81b9bdd08185b1b1bddd95960521b606082015260800190565b60208082526024908201527f476f7665726e616e63653a20696e636f727265637420766f7465457874656e6460408201526354696d6560e01b606082015260800190565b6020808252601d908201527f476f7665726e616e63653a20746f6b656e7320617265206c6f636b6564000000604082015260600190565b60208082526019908201527f544f524e3a207472616e7366657246726f6d206661696c656400000000000000604082015260600190565b60208082526010908201526f43616e206e6f7420626520656d70747960801b604082015260600190565b60208082526018908201527f476f7665726e616e63653a20756e617574686f72697a65640000000000000000604082015260600190565b6020808252601d908201527f476f7665726e616e63653a20696e76616c69642064656c656761746565000000604082015260600190565b60208082526018908201527f476f7665726e616e63653a2062616c616e636520697320300000000000000000604082015260600190565b60208082526023908201527f476f7665726e616e63653a3a70726f706f73653a206e6f74206120636f6e74726040820152621858dd60ea1b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252600d908201526c6f6e6c79206d756c746973696760981b604082015260600190565b60208082526026908201527f476f7665726e616e63653a3a73746174653a20696e76616c69642070726f706f6040820152651cd85b081a5960d21b606082015260800190565b6020808252602a908201527f476f7665726e616e63653a20746f6b656e732061726520616c726561647920756040820152691b99195b1959d85d195960b21b606082015260800190565b6020808252601a908201527f476f7665726e616e63653a206e6f7420617574686f72697a6564000000000000604082015260600190565b60208082526019908201527f50726f706f73616c20657865637574696f6e206661696c656400000000000000604082015260600190565b60208082526019908201527f476f7665726e616e63653a20766f74656420616c726561647900000000000000604082015260600190565b8151151581526020808301511515908201526040918201519181019190915260600190565b60405181810167ffffffffffffffff8111828210171561312657600080fd5b604052919050565b60005b83811015613149578181015183820152602001613131565b838111156118ad5750506000910152565b6001600160a01b038116811461169f57600080fd5b801515811461169f57600080fdfea26469706673582212209ae80078297b488112cf4c0eaef3af85f34156332aa7d60065ce1ebb90ab93c264736f6c634300060c0033";class Us extends Ka{constructor(...e){e.length>1?super(...e):super(Ds,Ss,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ds)}static connect(e,t){return new $a(e,Ds,t)}}Us.bytecode=Ss,Us.abi=Ds;var Vs=Object.freeze({__proto__:null,GovernanceProposalStateUpgrade__factory:Us});const Ls=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"_admin",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],Fs="0x60806040526040516108403803806108408339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b50604052508491508390508282816100f1826101c5565b8051156101a9576000826001600160a01b0316826040518082805190602001908083835b602083106101345780518252601f199092019160209182019101610115565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610194576040519150601f19603f3d011682016040523d82523d6000602084013e610199565b606091505b50509050806101a757600080fd5b505b506101b19050565b6101ba82610237565b505050505050610261565b6101d88161025b60201b6103b41760201c565b6102135760405162461bcd60e51b815260040180806020018281038252603681526020018061080a6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b3b151590565b61059a806102706000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996101a9565b6101a96101a46103ba565b6103df565b565b6101b3610403565b6001600160a01b0316336001600160a01b031614156101da576101d581610428565b6101e2565b6101e2610191565b50565b6101ed610403565b6001600160a01b0316336001600160a01b031614156102855761020f83610428565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd6103ba565b90506102cc565b6102cc610191565b90565b6102d7610403565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b815260040180806020018281038252603a8152602001806104f5603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610403565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d581610468565b6000610393610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd610403565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156103fe573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6104318161048c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b610495816103b4565b6104d05760405162461bcd60e51b815260040180806020018281038252603681526020018061052f6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a2646970667358221220f9da162f8a2d779a4f5f08577ac886bc4694791f749bd6ecc5d270427405583364736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class Gs extends Ka{constructor(...e){e.length>1?super(...e):super(Ls,Fs,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ls)}static connect(e,t){return new $a(e,Ls,t)}}Gs.bytecode=Fs,Gs.abi=Ls;const Bs=[{inputs:[{internalType:"address",name:"_torn",type:"address"},{internalType:"address",name:"_governance",type:"address"},{internalType:"address",name:"_registry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"instance",type:"address"},{indexed:!1,internalType:"uint256",name:"newFee",type:"uint256"}],name:"FeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint24",name:"newFee",type:"uint24"}],name:"UniswapTornPoolSwappingFeeChanged",type:"event"},{inputs:[],name:"PROTOCOL_FEE_DIVIDER",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"calculatePoolFee",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeDeviations",outputs:[{components:[{internalType:"address",name:"instance",type:"address"},{internalType:"int256",name:"deviation",type:"int256"}],internalType:"struct FeeManager.Deviation[]",name:"results",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],name:"instanceFee",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"",type:"address"}],name:"instanceFeeUpdated",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"instanceFeeWithUpdate",outputs:[{internalType:"uint160",name:"",type:"uint160"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"registry",outputs:[{internalType:"contract InstanceRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"newPeriod",type:"uint32"}],name:"setPeriodForTWAPOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"_uniswapTornPoolSwappingFee",type:"uint24"}],name:"setUniswapTornPoolSwappingFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"newLimit",type:"uint24"}],name:"setUpdateFeeTimeLimit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"torn",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"uniswapTimePeriod",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"uniswapTornPoolSwappingFee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"updateAllFees",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_instance",type:"address"}],name:"updateFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateFeeTimeLimit",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ITornadoInstance[]",name:"_instances",type:"address[]"}],name:"updateFees",outputs:[],stateMutability:"nonpayable",type:"function"}],js="0x60e06040523480156200001157600080fd5b5060405162001a8938038062001a8983398101604081905262000034916200005c565b6001600160601b0319606093841b811660805291831b821660a05290911b1660c052620000c8565b60008060006060848603121562000071578283fd5b83516200007e81620000af565b60208501519093506200009181620000af565b6040850151909250620000a481620000af565b809150509250925092565b6001600160a01b0381168114620000c557600080fd5b50565b60805160601c60a05160601c60c05160601c61196862000121600039806102ce52806104f6528061077752806109945250806104b7528061052e528061060f528061070852508061068f528061087e52506119686000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063a0287520116100a2578063bcc5ee6411610071578063bcc5ee641461020f578063c51c229714610217578063d8718fb11461022a578063e1f121561461023f578063f522d6d61461025257610116565b8063a0287520146101d9578063adf898a4146101ec578063aeb3077a146101f4578063b19a2972146101fc57610116565b8063603a54fe116100e9578063603a54fe146101815780637b103999146101945780637ccd2f481461019c57806380679eb3146101b157806380eb7bf0146101c657610116565b806305e343641461011b5780632efbf384146101445780634bf0a542146101645780635aa6e67514610179575b600080fd5b61012e610129366004611650565b61025a565b60405161013b9190611896565b60405180910390f35b610157610152366004611650565b61026c565b60405161013b91906116dd565b61016c6102c9565b60405161013b9190611719565b6101576104b5565b61015761018f366004611650565b6104d9565b6101576104f4565b6101a4610518565b60405161013b9190611886565b6101c46101bf3660046116a0565b610523565b005b6101c46101d4366004611650565b61057e565b6101c46101e736600461166c565b610604565b61015761068d565b61012e6106b1565b6101c461020a3660046113ef565b6106b7565b6101a46106eb565b6101c461022536600461166c565b6106fd565b61023261075a565b60405161013b919061189f565b61015761024d366004611650565b61076d565b6101c461098f565b60026020526000908152604090205481565b600080546001600160a01b038316825260026020526040822054600160381b90910462ffffff16429190910311156102a7576102a78261057e565b506001600160a01b03808216600090815260016020526040902054165b919050565b6060807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166310c13ac36040518163ffffffff1660e01b815260040160006040518083038186803b15801561032557600080fd5b505afa158015610339573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103619190810190611487565b9050805167ffffffffffffffff8111801561037b57600080fd5b506040519080825280602002602001820160405280156103b557816020015b6103a261131d565b81526020019060019003908161039a5790505b50915060005b81518110156104b05760006103e28383815181106103d557fe5b602002602001015161076d565b6001600160a01b031690506000811561045e576103e8826001600087878151811061040957fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b03166103e8026001600160a01b03168161045957fe5b040390505b604051806040016040528085858151811061047557fe5b60200260200101516001600160a01b031681526020018281525085848151811061049b57fe5b602090810291909101015250506001016103bb565b505090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001602052600090815260409020546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005462ffffff1681565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461055857600080fd5b6000805463ffffffff90921663010000000266ffffffff00000019909216919091179055565b60006105898261076d565b6001600160a01b03838116600081815260016020908152604080832080546001600160a01b03191695871695909517909455600290528290204290559051919250907f6f0eaf2c2f89fb4cfe96a1dee5e764d60b52c7f48aaa590f0850e308aa1b953a906105f89084906116dd565b60405180910390a25050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461063957600080fd5b6000805462ffffff191662ffffff83811691909117918290556040517fbfe65cfc2359076c4468c9b895156c309c78f94fb09f6d2fc0463c4ca9a71ac292610682921690611886565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b61271081565b60005b81518110156106e7576106df8282815181106106d257fe5b602002602001015161057e565b6001016106ba565b5050565b600054600160381b900462ffffff1681565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461073257600080fd5b6000805462ffffff909216600160381b0269ffffff0000000000000019909216919091179055565b6000546301000000900463ffffffff1681565b60008060008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663032bb443876040518263ffffffff1660e01b81526004016107c191906116dd565b60a06040518083038186803b1580156107d957600080fd5b505afa1580156107ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081191906115d5565b9450945050935093508063ffffffff16600014156108365760009450505050506102c4565b6001600160a01b03831615801561084b575083155b610855578261086b565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b6040805180820182526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081168252831660208083019190915282518084019093526000805462ffffff80821686528816928501929092529396506108e5929063ffffffff630100000090910416610a29565b905061098461271061097e8463ffffffff166109788561097e670de0b6b3a76400008e6001600160a01b0316638bca6d166040518163ffffffff1660e01b815260040160206040518083038186803b15801561094057600080fd5b505afa158015610954573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109789190611688565b90610a75565b90610ac1565b979650505050505050565b610a277f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166310c13ac36040518163ffffffff1660e01b815260040160006040518083038186803b1580156109eb57600080fd5b505afa1580156109ff573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261020a9190810190611487565b565b60208084015190830151600091610a409184610b03565b84518451610a6391670de0b6b3a764000091610a5d919087610b03565b90610b2d565b81610a6a57fe5b0490505b9392505050565b600082610a8457506000610abb565b82820282848281610a9157fe5b0414610ab85760405162461bcd60e51b8152600401610aaf90611845565b60405180910390fd5b90505b92915050565b6000610ab883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610b51565b6000610b258473c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28585610b88565b949350505050565b6000821580610b4857505081810281838281610b4557fe5b04145b610abb57600080fd5b60008183610b725760405162461bcd60e51b8152600401610aaf91906117bb565b506000838581610b7e57fe5b0495945050505050565b600080846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610bc457600080fd5b505afa158015610bd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfc91906116bc565b60ff16600a0a90506001600160a01b038681169086161415610c28576001600160801b03169050610b25565b604051630b4c774160e11b8152610cc990610cc190731f98431c8ad98523631ae4a59f267346ea31f98490631698ee8290610c6b908b908b908b906004016116f1565b60206040518083038186803b158015610c8357600080fd5b505afa158015610c97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbb91906113d3565b85610cda565b828888610e6f565b915050610b25565b50949350505050565b600063ffffffff8216610cff5760405162461bcd60e51b8152600401610aaf9061180e565b60408051600280825260608083018452926020830190803683370190505090508281600081518110610d2d57fe5b602002602001019063ffffffff16908163ffffffff1681525050600081600181518110610d5657fe5b63ffffffff9092166020928302919091019091015260405163883bdbfd60e01b81526060906001600160a01b0386169063883bdbfd90610d9a908590600401611771565b60006040518083038186803b158015610db257600080fd5b505afa158015610dc6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610dee9190810190611513565b509050600081600081518110610e0057fe5b602002602001015182600181518110610e1557fe5b60200260200101510390508463ffffffff168160060b81610e3257fe5b05935060008160060b128015610e5957508463ffffffff168160060b81610e5557fe5b0715155b15610e6657600019909301925b50505092915050565b600080610e7b86610f59565b90506001600160801b036001600160a01b03821611610eea576001600160a01b0380821680029084811690861610610eca57610ec5600160c01b876001600160801b031683611272565b610ee2565b610ee281876001600160801b0316600160c01b611272565b925050610cd1565b6000610f096001600160a01b0383168068010000000000000000611272565b9050836001600160a01b0316856001600160a01b031610610f4157610f3c600160801b876001600160801b031683611272565b610984565b61098481876001600160801b0316600160801b611272565b60008060008360020b12610f70578260020b610f78565b8260020b6000035b9050620d89e8811115610f9d5760405162461bcd60e51b8152600401610aaf9061182a565b600060018216610fb157600160801b610fc3565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff1690506002821615610ff7576ffff97272373d413259a46990580e213a0260801c5b6004821615611016576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615611035576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615611054576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615611073576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615611092576fff2ea16466c96a3843ec78b326b528610260801c5b60808216156110b1576ffe5dee046a99a2a811c461f1969c30530260801c5b6101008216156110d1576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b6102008216156110f1576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615611111576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615611131576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615611151576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615611171576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615611191576f70d869a156d2a1b890bb3df62baf32f70260801c5b6180008216156111b1576f31be135f97d08fd981231505542fcfa60260801c5b620100008216156111d2576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b620200008216156111f2576e5d6af8dedb81196699c329225ee6040260801c5b62040000821615611211576d2216e584f5fa1ea926041bedfe980260801c5b6208000082161561122e576b048a170391f7dc42444e8fa20260801c5b60008460020b131561124957806000198161124557fe5b0490505b64010000000081061561125d576001611260565b60005b60ff16602082901c0192505050919050565b60008080600019858709868602925082811090839003039050806112a8576000841161129d57600080fd5b508290049050610a6e565b8084116112b457600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b604080518082019091526000808252602082015290565b600082601f830112611344578081fd5b8151611357611352826118d7565b6118b0565b81815291506020808301908481018184028601820187101561137857600080fd5b60005b848110156113a057815161138e816118f7565b8452928201929082019060010161137b565b505050505092915050565b8035610abb816118f7565b8051610abb816118f7565b8051600681900b8114610abb57600080fd5b6000602082840312156113e4578081fd5b8151610ab8816118f7565b60006020808385031215611401578182fd5b823567ffffffffffffffff811115611417578283fd5b8301601f81018513611427578283fd5b8035611435611352826118d7565b8181528381019083850185840285018601891015611451578687fd5b8694505b8385101561147b5761146789826113ab565b835260019490940193918501918501611455565b50979650505050505050565b60006020808385031215611499578182fd5b825167ffffffffffffffff8111156114af578283fd5b8301601f810185136114bf578283fd5b80516114cd611352826118d7565b81815283810190838501858402850186018910156114e9578687fd5b8694505b8385101561147b576114ff89826113b6565b8352600194909401939185019185016114ed565b60008060408385031215611525578081fd5b825167ffffffffffffffff8082111561153c578283fd5b818501915085601f83011261154f578283fd5b815161155d611352826118d7565b80828252602080830192508086018a82838702890101111561157d578788fd5b8796505b848710156115a7576115938b826113c1565b845260019690960195928101928101611581565b5088015190965093505050808211156115be578283fd5b506115cb85828601611334565b9150509250929050565b600080600080600060a086880312156115ec578081fd5b855180151581146115fb578182fd5b602087015190955061160c816118f7565b604087015190945060028110611620578182fd5b60608701519093506116318161190f565b608087015190925061164281611920565b809150509295509295909350565b600060208284031215611661578081fd5b8135610ab8816118f7565b60006020828403121561167d578081fd5b8135610ab88161190f565b600060208284031215611699578081fd5b5051919050565b6000602082840312156116b1578081fd5b8135610ab881611920565b6000602082840312156116cd578081fd5b815160ff81168114610ab8578182fd5b6001600160a01b0391909116815260200190565b6001600160a01b03938416815291909216602082015262ffffff909116604082015260600190565b602080825282518282018190526000919060409081850190868401855b8281101561176457815180516001600160a01b03168552860151868501529284019290850190600101611736565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156117af57835163ffffffff168352928401929184019160010161178d565b50909695505050505050565b6000602080835283518082850152825b818110156117e7578581018301518582016040015282016117cb565b818111156117f85783604083870101525b50601f01601f1916929092016040019392505050565b602080825260029082015261042560f41b604082015260600190565b6020808252600190820152601560fa1b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b62ffffff91909116815260200190565b90815260200190565b63ffffffff91909116815260200190565b60405181810167ffffffffffffffff811182821017156118cf57600080fd5b604052919050565b600067ffffffffffffffff8211156118ed578081fd5b5060209081020190565b6001600160a01b038116811461190c57600080fd5b50565b62ffffff8116811461190c57600080fd5b63ffffffff8116811461190c57600080fdfea26469706673582212205690be246e00d9bf30da35441a160026439ececfa962348f01e498d25f89f5d164736f6c634300060c0033";class Hs extends Ka{constructor(...e){e.length>1?super(...e):super(Bs,js,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Bs)}static connect(e,t){return new $a(e,Bs,t)}}Hs.bytecode=js,Hs.abi=Bs;const zs=[{inputs:[{internalType:"address",name:"_governance",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"GovernanceAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"gasAmount",type:"uint256"}],name:"compensateGas",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawToGovernance",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],$s="0x60a0604052348015600f57600080fd5b50604051610472380380610472833981016040819052602c91603c565b6001600160a01b0316608052606a565b600060208284031215604d57600080fd5b81516001600160a01b0381168114606357600080fd5b9392505050565b6080516103da6100986000396000818160560152818160e101528181610212015261027701526103da6000f3fe6080604052600436106100385760003560e01c8063a3221c2e14610044578063a99ce80714610094578063e822f784146100b657600080fd5b3661003f57005b600080fd5b34801561005057600080fd5b506100787f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156100a057600080fd5b506100b46100af366004610328565b6100d6565b005b3480156100c257600080fd5b506100b46100d1366004610360565b610207565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461013e5760405162461bcd60e51b815260206004820152600860248201526737b7363c9033b7bb60c11b60448201526064015b60405180910390fd5b47600061014b4884610379565b90508160000361015b5750505050565b6000846001600160a01b03168383116101745782610176565b835b604051600081818185875af1925050503d80600081146101b2576040519150601f19603f3d011682016040523d82523d6000602084013e6101b7565b606091505b50509050806102005760405162461bcd60e51b815260206004820152601560248201527418dbdb5c195b9cd85d194819d85cc819985a5b1959605a1b6044820152606401610135565b5050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461026a5760405162461bcd60e51b815260206004820152600860248201526737b7363c9033b7bb60c11b6044820152606401610135565b4760006001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284116102a457836102a6565b825b604051600081818185875af1925050503d80600081146102e2576040519150601f19603f3d011682016040523d82523d6000602084013e6102e7565b606091505b50509050806103235760405162461bcd60e51b81526020600482015260086024820152671c185e4819985a5b60c21b6044820152606401610135565b505050565b6000806040838503121561033b57600080fd5b82356001600160a01b038116811461035257600080fd5b946020939093013593505050565b60006020828403121561037257600080fd5b5035919050565b808202811582820484141761039e57634e487b7160e01b600052601160045260246000fd5b9291505056fea264697066735822122073841dd5b5d8687d927814633a2fcb7944a306bb89a9b65a0aab4cc361c8312264736f6c63430008190033";class Xs extends Ka{constructor(...e){e.length>1?super(...e):super(zs,$s,e[0])}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}deploy(e,t){return super.deploy(e,t||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(zs)}static connect(e,t){return new $a(e,zs,t)}}Xs.bytecode=$s,Xs.abi=zs;const Ws=[{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],qs="0x608060405260405161083b38038061083b8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052508391503090508282816100ed826101c0565b8051156101a5576000826001600160a01b0316826040518082805190602001908083835b602083106101305780518252601f199092019160209182019101610111565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610190576040519150601f19603f3d011682016040523d82523d6000602084013e610195565b606091505b50509050806101a357600080fd5b505b506101ad9050565b6101b682610232565b505050505061025c565b6101d38161025660201b6103b41760201c565b61020e5760405162461bcd60e51b81526004018080602001828103825260368152602001806108056036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b3b151590565b61059a8061026b6000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996101a9565b6101a96101a46103ba565b6103df565b565b6101b3610403565b6001600160a01b0316336001600160a01b031614156101da576101d581610428565b6101e2565b6101e2610191565b50565b6101ed610403565b6001600160a01b0316336001600160a01b031614156102855761020f83610428565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd6103ba565b90506102cc565b6102cc610191565b90565b6102d7610403565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b815260040180806020018281038252603a8152602001806104f5603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610403565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d581610468565b6000610393610403565b6001600160a01b0316336001600160a01b031614156102c4576102bd610403565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156103fe573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6104318161048c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b610495816103b4565b6104d05760405162461bcd60e51b815260040180806020018281038252603681526020018061052f6036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a264697066735822122014d721b179bdff3154685a6f1f0fecdd0d99b7cfc61b3f1a2f7a95c6f6d2c2ae64736f6c634300060c00335570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374";class Js extends Ka{constructor(...e){e.length>1?super(...e):super(Ws,qs,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ws)}static connect(e,t){return new $a(e,Ws,t)}}Js.bytecode=qs,Js.abi=Ws;const Ks=[{inputs:[{internalType:"address",name:"_governance",type:"address"},{internalType:"address",name:"_instanceRegistry",type:"address"},{internalType:"address",name:"_relayerRegistry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bytes",name:"encryptedNote",type:"bytes"}],name:"EncryptedNote",type:"event"},{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address",name:"_spender",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"approveExactToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"_encryptedNotes",type:"bytes[]"}],name:"backupNotes",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_tornado",type:"address"},{internalType:"bytes32",name:"_commitment",type:"bytes32"},{internalType:"bytes",name:"_encryptedNote",type:"bytes"}],name:"deposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"instanceRegistry",outputs:[{internalType:"contract InstanceRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"relayerRegistry",outputs:[{internalType:"contract RelayerRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"_token",type:"address"},{internalType:"address payable",name:"_to",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"rescueTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ITornadoInstance",name:"_tornado",type:"address"},{internalType:"bytes",name:"_proof",type:"bytes"},{internalType:"bytes32",name:"_root",type:"bytes32"},{internalType:"bytes32",name:"_nullifierHash",type:"bytes32"},{internalType:"address payable",name:"_recipient",type:"address"},{internalType:"address payable",name:"_relayer",type:"address"},{internalType:"uint256",name:"_fee",type:"uint256"},{internalType:"uint256",name:"_refund",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"payable",type:"function"}],Ys="0x60e060405234801561001057600080fd5b5060405161128438038061128483398101604081905261002f91610056565b6001600160601b0319606093841b811660805291831b821660a05290911b1660c0526100ba565b60008060006060848603121561006a578283fd5b8351610075816100a2565b6020850151909350610086816100a2565b6040850151909250610097816100a2565b809150509250925092565b6001600160a01b03811681146100b757600080fd5b50565b60805160601c60a05160601c60c05160601c61117c610108600039806103ff528061059e525080610164528061037a52806103a752806104c8525080610423528061068e525061117c6000f3fe60806040526004361061007b5760003560e01c80635aa6e6751161004e5780635aa6e675146100f55780636485ba2a1461010a578063b438689f1461012a578063cea9d26f1461013d5761007b565b806313d98d131461008057806336a3874b146100955780633ef10783146100c057806347ff589d146100e0575b600080fd5b61009361008e366004610c77565b61015d565b005b3480156100a157600080fd5b506100aa610378565b6040516100b79190610dd0565b60405180910390f35b3480156100cc57600080fd5b506100936100db366004610c37565b61039c565b3480156100ec57600080fd5b506100aa6103fd565b34801561010157600080fd5b506100aa610421565b34801561011657600080fd5b50610093610125366004610b26565b610445565b610093610138366004610cd1565b6104ae565b34801561014957600080fd5b50610093610158366004610c37565b610683565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663032bb443886040518263ffffffff1660e01b81526004016101ae9190610dd0565b60a06040518083038186803b1580156101c657600080fd5b505afa1580156101da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fe9190610bb1565b5092955090935091506000905081600181111561021757fe5b141561023e5760405162461bcd60e51b815260040161023590610f00565b60405180910390fd5b82156102cc576102cc3330896001600160a01b0316638bca6d166040518163ffffffff1660e01b815260040160206040518083038186803b15801561028257600080fd5b505afa158015610296573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ba9190610d72565b6001600160a01b038616929190610817565b60405163b214faa560e01b81526001600160a01b0388169063b214faa59034906102fa908a90600401610e5e565b6000604051808303818588803b15801561031357600080fd5b505af1158015610327573d6000803e3d6000fd5b5050505050336001600160a01b03167ffa28df43db3553771f7209dcef046f3bdfea15870ab625dcda30ac58b82b40088686604051610367929190610e67565b60405180910390a250505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103e45760405162461bcd60e51b815260040161023590611087565b6103f86001600160a01b0384168383610875565b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005b818110156103f857337ffa28df43db3553771f7209dcef046f3bdfea15870ab625dcda30ac58b82b400884848481811061047e57fe5b905060200281019061049091906110af565b60405161049e929190610e67565b60405180910390a2600101610448565b60405163032bb44360e01b81526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063032bb443906104fd908d90600401610dd0565b60a06040518083038186803b15801561051557600080fd5b505afa158015610529573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054d9190610bb1565b509093506000925061055d915050565b81600181111561056957fe5b14156105875760405162461bcd60e51b815260040161023590610f00565b604051631168473b60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906345a11cec906105d790339088908f90600401610de4565b600060405180830381600087803b1580156105f157600080fd5b505af1158015610605573d6000803e3d6000fd5b50506040516310d056db60e11b81526001600160a01b038d1692506321a0adb691503490610645908d908d908d908d908d908d908d908d90600401610e7b565b6000604051808303818588803b15801561065e57600080fd5b505af1158015610672573d6000803e3d6000fd5b505050505050505050505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106cb5760405162461bcd60e51b815260040161023590611087565b6001600160a01b0382166106f15760405162461bcd60e51b815260040161023590610f6e565b6001600160a01b03831661074d5747600061070c8284610938565b6040519091506001600160a01b0385169082156108fc029083906000818181858888f19350505050158015610745573d6000803e3d6000fd5b5050506103f8565b6040516370a0823160e01b81526000906001600160a01b038516906370a082319061077c903090600401610dd0565b60206040518083038186803b15801561079457600080fd5b505afa1580156107a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cc9190610d72565b905060006107da8284610938565b9050600081116107fc5760405162461bcd60e51b815260040161023590610ffa565b6108106001600160a01b0386168583610950565b5050505050565b61086f846323b872dd60e01b85858560405160240161083893929190610e21565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261096f565b50505050565b8015806108fd5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906108ab9030908690600401610e07565b60206040518083038186803b1580156108c357600080fd5b505afa1580156108d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fb9190610d72565b155b6109195760405162461bcd60e51b815260040161023590611031565b6103f88363095ea7b360e01b8484604051602401610838929190610e45565b60008183106109475781610949565b825b9392505050565b6103f88363a9059cbb60e01b8484604051602401610838929190610e45565b60606109c4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166109fe9092919063ffffffff16565b8051909150156103f857808060200190518101906109e29190610b95565b6103f85760405162461bcd60e51b815260040161023590610fb0565b6060610a0d8484600085610a15565b949350505050565b6060610a2085610ad9565b610a3c5760405162461bcd60e51b815260040161023590610f37565b60006060866001600160a01b03168587604051610a599190610db4565b60006040518083038185875af1925050503d8060008114610a96576040519150601f19603f3d011682016040523d82523d6000602084013e610a9b565b606091505b50915091508115610aaf579150610a0d9050565b805115610abf5780518082602001fd5b8360405162461bcd60e51b81526004016102359190610ecd565b3b151590565b60008083601f840112610af0578182fd5b50813567ffffffffffffffff811115610b07578182fd5b602083019150836020828501011115610b1f57600080fd5b9250929050565b60008060208385031215610b38578182fd5b823567ffffffffffffffff80821115610b4f578384fd5b818501915085601f830112610b62578384fd5b813581811115610b70578485fd5b8660208083028501011115610b83578485fd5b60209290920196919550909350505050565b600060208284031215610ba6578081fd5b815161094981611138565b600080600080600060a08688031215610bc8578081fd5b8551610bd381611138565b6020870151909550610be481611120565b604087015190945060028110610bf8578182fd5b606087015190935062ffffff81168114610c10578182fd5b608087015190925063ffffffff81168114610c29578182fd5b809150509295509295909350565b600080600060608486031215610c4b578283fd5b8335610c5681611120565b92506020840135610c6681611120565b929592945050506040919091013590565b60008060008060608587031215610c8c578384fd5b8435610c9781611120565b935060208501359250604085013567ffffffffffffffff811115610cb9578283fd5b610cc587828801610adf565b95989497509550505050565b60008060008060008060008060006101008a8c031215610cef578384fd5b8935610cfa81611120565b985060208a013567ffffffffffffffff811115610d15578485fd5b610d218c828d01610adf565b90995097505060408a0135955060608a0135945060808a0135610d4381611120565b935060a08a0135610d5381611120565b8093505060c08a0135915060e08a013590509295985092959850929598565b600060208284031215610d83578081fd5b5051919050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008251610dc68184602087016110f4565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b90815260200190565b600060208252610a0d602083018486610d8a565b600060e08252610e8f60e083018a8c610d8a565b60208301989098525060408101959095526001600160a01b03938416606086015291909216608084015260a083019190915260c09091015292915050565b6000602082528251806020840152610eec8160408501602087016110f4565b601f01601f19169190910160400192915050565b6020808252601d908201527f54686520696e7374616e6365206973206e6f7420737570706f72746564000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526022908201527f544f524e3a2063616e206e6f742073656e6420746f207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601e908201527f544f524e3a20747279696e6720746f2073656e6420302062616c616e63650000604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b6000808335601e198436030181126110c5578283fd5b83018035915067ffffffffffffffff8211156110df578283fd5b602001915036819003821315610b1f57600080fd5b60005b8381101561110f5781810151838201526020016110f7565b8381111561086f5750506000910152565b6001600160a01b038116811461113557600080fd5b50565b801515811461113557600080fdfea264697066735822122004c0e245ab0b87d2916977a9650f299de2e526143487c917a63e4b88e54387e364736f6c634300060c0033";class Zs extends Ka{constructor(...e){e.length>1?super(...e):super(Ks,Ys,e[0])}getDeployTransaction(e,t,a,n){return super.getDeployTransaction(e,t,a,n||{})}deploy(e,t,a,n){return super.deploy(e,t,a,n||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Ks)}static connect(e,t){return new $a(e,Ks,t)}}Zs.bytecode=Ys,Zs.abi=Ks;const Qs=[{inputs:[{internalType:"address",name:"_torn",type:"address"},{internalType:"address",name:"_governance",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdrawTorn",outputs:[],stateMutability:"nonpayable",type:"function"}],ec="0x60c060405234801561001057600080fd5b506040516104aa3803806104aa8339818101604052604081101561003357600080fd5b5080516020909101516001600160601b0319606092831b8116608052911b1660a05260805160601c60a05160601c61042e61007c60003980606952508060d3525061042e6000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806391fe357314610030575b600080fd5b61005c6004803603604081101561004657600080fd5b506001600160a01b03813516906020013561005e565b005b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100c6576040805162461bcd60e51b815260206004820152600860248201526737b7363c9033b7bb60c11b604482015290519081900360640190fd5b6100fa6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683836100fe565b5050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610150908490610155565b505050565b60606101aa826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166102069092919063ffffffff16565b805190915015610150578080602001905160208110156101c957600080fd5b50516101505760405162461bcd60e51b815260040180806020018281038252602a8152602001806103cf602a913960400191505060405180910390fd5b6060610215848460008561021d565b949350505050565b6060610228856103c8565b610279576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106102b85780518252601f199092019160209182019101610299565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461031a576040519150601f19603f3d011682016040523d82523d6000602084013e61031f565b606091505b509150915081156103335791506102159050565b8051156103435780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561038d578181015183820152602001610375565b50505050905090810190601f1680156103ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3b15159056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208fc65ae8299d617f6cff836a2822363849c7fb35b0b27a6f0aebfa62084005c764736f6c634300060c0033";class tc extends Ka{constructor(...e){e.length>1?super(...e):super(Qs,ec,e[0])}getDeployTransaction(e,t,a){return super.getDeployTransaction(e,t,a||{})}deploy(e,t,a){return super.deploy(e,t,a||{})}connect(e){return super.connect(e)}static createInterface(){return new ba(Qs)}static connect(e,t){return new $a(e,Qs,t)}}tc.bytecode=ec,tc.abi=Qs;var ac=Object.freeze({__proto__:null,AdminUpgradeableProxy__factory:Gs,FeeManager__factory:Hs,GasCompensationVault__factory:Xs,LoopbackProxy__factory:Js,TornadoRouter__factory:Zs,TornadoVault__factory:tc,aggregator:nf,deployerSol:rf,instanceRegistrySol:mf,interfaces:ei,libraries:bi,relayerRegistrySol:xf,testnet:Md,torn:ud,tornadoStakingRewardsSol:Pd,uniswap:Yd,v1:zi,v2VaultAndGas:fs,v3RelayerRegistry:us,v4ExploitPatch:Ns,v5ProposalStatePatch:Vs}),nc=Object.freeze({__proto__:null,classic:Gb,governance:ac}),bc=Object.freeze({__proto__:null,contracts:nc,openzeppelin:Bn});const fc=[{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes[]",name:"returnData",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3[]",name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3Value[]",name:"calls",type:"tuple[]"}],name:"aggregate3Value",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"blockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getBasefee",outputs:[{internalType:"uint256",name:"basefee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBlockNumber",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"chainid",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockCoinbase",outputs:[{internalType:"address",name:"coinbase",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockDifficulty",outputs:[{internalType:"uint256",name:"difficulty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockGasLimit",outputs:[{internalType:"uint256",name:"gaslimit",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"}],name:"getEthBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryAggregate",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryBlockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"}];class dc{static createInterface(){return new ba(fc)}static connect(e,t){return new $a(e,fc,t)}}dc.abi=fc;const ic=[{inputs:[{internalType:"contract MultiWrapper",name:"_multiWrapper",type:"address"},{internalType:"contract IOracle[]",name:"existingOracles",type:"address[]"},{internalType:"enum OffchainOracle.OracleType[]",name:"oracleTypes",type:"uint8[]"},{internalType:"contract IERC20[]",name:"existingConnectors",type:"address[]"},{internalType:"contract IERC20",name:"wBase",type:"address"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ArraysLengthMismatch",type:"error"},{inputs:[],name:"ConnectorAlreadyAdded",type:"error"},{inputs:[],name:"InvalidOracleTokenKind",type:"error"},{inputs:[],name:"OracleAlreadyAdded",type:"error"},{inputs:[],name:"SameTokens",type:"error"},{inputs:[],name:"TooBigThreshold",type:"error"},{inputs:[],name:"UnknownConnector",type:"error"},{inputs:[],name:"UnknownOracle",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IERC20",name:"connector",type:"address"}],name:"ConnectorAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IERC20",name:"connector",type:"address"}],name:"ConnectorRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract MultiWrapper",name:"multiWrapper",type:"address"}],name:"MultiWrapperUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IOracle",name:"oracle",type:"address"},{indexed:!1,internalType:"enum OffchainOracle.OracleType",name:"oracleType",type:"uint8"}],name:"OracleAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"contract IOracle",name:"oracle",type:"address"},{indexed:!1,internalType:"enum OffchainOracle.OracleType",name:"oracleType",type:"uint8"}],name:"OracleRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[{internalType:"contract IERC20",name:"connector",type:"address"}],name:"addConnector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IOracle",name:"oracle",type:"address"},{internalType:"enum OffchainOracle.OracleType",name:"oracleKind",type:"uint8"}],name:"addOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"connectors",outputs:[{internalType:"contract IERC20[]",name:"allConnectors",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"}],name:"getRate",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"}],name:"getRateToEth",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"},{internalType:"contract IERC20[]",name:"customConnectors",type:"address[]"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateToEthWithCustomConnectors",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"bool",name:"useSrcWrappers",type:"bool"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateToEthWithThreshold",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"},{internalType:"contract IERC20[]",name:"customConnectors",type:"address[]"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateWithCustomConnectors",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"srcToken",type:"address"},{internalType:"contract IERC20",name:"dstToken",type:"address"},{internalType:"bool",name:"useWrappers",type:"bool"},{internalType:"uint256",name:"thresholdFilter",type:"uint256"}],name:"getRateWithThreshold",outputs:[{internalType:"uint256",name:"weightedRate",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"multiWrapper",outputs:[{internalType:"contract MultiWrapper",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"oracles",outputs:[{internalType:"contract IOracle[]",name:"allOracles",type:"address[]"},{internalType:"enum OffchainOracle.OracleType[]",name:"oracleTypes",type:"uint8[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"connector",type:"address"}],name:"removeConnector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IOracle",name:"oracle",type:"address"},{internalType:"enum OffchainOracle.OracleType",name:"oracleKind",type:"uint8"}],name:"removeOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract MultiWrapper",name:"_multiWrapper",type:"address"}],name:"setMultiWrapper",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class sc{static createInterface(){return new ba(ic)}static connect(e,t){return new $a(e,ic,t)}}sc.abi=ic;const cc=[{inputs:[{internalType:"address",name:"_owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"DecimalsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"GasPriceUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"L1BaseFeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"OverheadUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"ScalarUpdated",type:"event"},{inputs:[],name:"decimals",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"gasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_data",type:"bytes"}],name:"getL1Fee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_data",type:"bytes"}],name:"getL1GasUsed",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"l1BaseFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"overhead",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"scalar",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_decimals",type:"uint256"}],name:"setDecimals",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_gasPrice",type:"uint256"}],name:"setGasPrice",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_baseFee",type:"uint256"}],name:"setL1BaseFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_overhead",type:"uint256"}],name:"setOverhead",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_scalar",type:"uint256"}],name:"setScalar",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];class rc{static createInterface(){return new ba(cc)}static connect(e,t){return new $a(e,cc,t)}}rc.abi=cc;const pc=[{inputs:[{internalType:"contract ENS",name:"_ens",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address[]",name:"addresses",type:"address[]"}],name:"getNames",outputs:[{internalType:"string[]",name:"r",type:"string[]"}],stateMutability:"view",type:"function"}];class uc{static createInterface(){return new ba(pc)}static connect(e,t){return new $a(e,pc,t)}}return uc.abi=pc,t})())); \ No newline at end of file diff --git a/package.json b/package.json index 56b8546..012f99c 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "bn.js": "^5.2.1", "circomlibjs": "0.1.7", "cross-fetch": "^4.0.0", - "ethers": "^6.13.2", + "ethers": "^6.13.3", "ffjavascript": "0.2.48", "fflate": "^0.8.2", "idb": "^8.0.0" @@ -52,23 +52,23 @@ "@typechain/ethers-v6": "^0.5.1", "@types/bn.js": "^5.1.6", "@types/circomlibjs": "^0.1.6", - "@types/node": "^22.7.4", + "@types/node": "^22.7.5", "@types/node-fetch": "^2.6.11", - "@typescript-eslint/eslint-plugin": "^8.7.0", - "@typescript-eslint/parser": "^8.7.0", + "@typescript-eslint/eslint-plugin": "^8.8.1", + "@typescript-eslint/parser": "^8.8.1", "esbuild-loader": "^4.2.2", "eslint": "8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.3", - "eslint-plugin-import": "^2.30.0", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-prettier": "^5.2.1", "node-polyfill-webpack-plugin": "^4.0.0", "prettier": "^3.3.3", - "rollup": "^4.22.5", + "rollup": "^4.24.0", "rollup-plugin-esbuild": "^6.1.1", "tsc": "^2.0.4", "typechain": "^8.3.2", - "typescript": "^5.6.2", + "typescript": "^5.6.3", "webpack": "^5.95.0", "webpack-cli": "^5.1.4" } diff --git a/yarn.lock b/yarn.lock index c081d1e..0336b1b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -765,85 +765,85 @@ estree-walker "^2.0.2" picomatch "^2.3.1" -"@rollup/rollup-android-arm-eabi@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.5.tgz#e0f5350845090ca09690fe4a472717f3b8aae225" - integrity sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww== +"@rollup/rollup-android-arm-eabi@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz#1661ff5ea9beb362795304cb916049aba7ac9c54" + integrity sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA== -"@rollup/rollup-android-arm64@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.5.tgz#08270faef6747e2716d3e978a8bbf479f75fb19a" - integrity sha512-S4pit5BP6E5R5C8S6tgU/drvgjtYW76FBuG6+ibG3tMvlD1h9LHVF9KmlmaUBQ8Obou7hEyS+0w+IR/VtxwNMQ== +"@rollup/rollup-android-arm64@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.0.tgz#2ffaa91f1b55a0082b8a722525741aadcbd3971e" + integrity sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA== -"@rollup/rollup-darwin-arm64@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.5.tgz#691671133b350661328d42c8dbdedd56dfb97dfd" - integrity sha512-250ZGg4ipTL0TGvLlfACkIxS9+KLtIbn7BCZjsZj88zSg2Lvu3Xdw6dhAhfe/FjjXPVNCtcSp+WZjVsD3a/Zlw== +"@rollup/rollup-darwin-arm64@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.0.tgz#627007221b24b8cc3063703eee0b9177edf49c1f" + integrity sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA== -"@rollup/rollup-darwin-x64@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.5.tgz#b2ec52a1615f24b1cd40bc8906ae31af81e8a342" - integrity sha512-D8brJEFg5D+QxFcW6jYANu+Rr9SlKtTenmsX5hOSzNYVrK5oLAEMTUgKWYJP+wdKyCdeSwnapLsn+OVRFycuQg== +"@rollup/rollup-darwin-x64@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.0.tgz#0605506142b9e796c370d59c5984ae95b9758724" + integrity sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ== -"@rollup/rollup-linux-arm-gnueabihf@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.5.tgz#217f01f304808920680bd269002df38e25d9205f" - integrity sha512-PNqXYmdNFyWNg0ma5LdY8wP+eQfdvyaBAojAXgO7/gs0Q/6TQJVXAXe8gwW9URjbS0YAammur0fynYGiWsKlXw== +"@rollup/rollup-linux-arm-gnueabihf@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.0.tgz#62dfd196d4b10c0c2db833897164d2d319ee0cbb" + integrity sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA== -"@rollup/rollup-linux-arm-musleabihf@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.5.tgz#93ac1c5a1e389f4482a2edaeec41fcffee54a930" - integrity sha512-kSSCZOKz3HqlrEuwKd9TYv7vxPYD77vHSUvM2y0YaTGnFc8AdI5TTQRrM1yIp3tXCKrSL9A7JLoILjtad5t8pQ== +"@rollup/rollup-linux-arm-musleabihf@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.0.tgz#53ce72aeb982f1f34b58b380baafaf6a240fddb3" + integrity sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw== -"@rollup/rollup-linux-arm64-gnu@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.5.tgz#a7f146787d6041fecc4ecdf1aa72234661ca94a4" - integrity sha512-oTXQeJHRbOnwRnRffb6bmqmUugz0glXaPyspp4gbQOPVApdpRrY/j7KP3lr7M8kTfQTyrBUzFjj5EuHAhqH4/w== +"@rollup/rollup-linux-arm64-gnu@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.0.tgz#1632990f62a75c74f43e4b14ab3597d7ed416496" + integrity sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA== -"@rollup/rollup-linux-arm64-musl@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.5.tgz#6a37236189648e678bd564d6e8ca798f42cf42c5" - integrity sha512-qnOTIIs6tIGFKCHdhYitgC2XQ2X25InIbZFor5wh+mALH84qnFHvc+vmWUpyX97B0hNvwNUL4B+MB8vJvH65Fw== +"@rollup/rollup-linux-arm64-musl@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.0.tgz#8c03a996efb41e257b414b2e0560b7a21f2d9065" + integrity sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw== -"@rollup/rollup-linux-powerpc64le-gnu@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.5.tgz#5661420dc463bec31ecb2d17d113de858cfcfe2d" - integrity sha512-TMYu+DUdNlgBXING13rHSfUc3Ky5nLPbWs4bFnT+R6Vu3OvXkTkixvvBKk8uO4MT5Ab6lC3U7x8S8El2q5o56w== +"@rollup/rollup-linux-powerpc64le-gnu@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.0.tgz#5b98729628d5bcc8f7f37b58b04d6845f85c7b5d" + integrity sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw== -"@rollup/rollup-linux-riscv64-gnu@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.5.tgz#cb00342b7432bdef723aa606281de2f522d6dcf7" - integrity sha512-PTQq1Kz22ZRvuhr3uURH+U/Q/a0pbxJoICGSprNLAoBEkyD3Sh9qP5I0Asn0y0wejXQBbsVMRZRxlbGFD9OK4A== +"@rollup/rollup-linux-riscv64-gnu@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.0.tgz#48e42e41f4cabf3573cfefcb448599c512e22983" + integrity sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg== -"@rollup/rollup-linux-s390x-gnu@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.5.tgz#0708889674dccecccd28e2befccf791e0767fcb7" - integrity sha512-bR5nCojtpuMss6TDEmf/jnBnzlo+6n1UhgwqUvRoe4VIotC7FG1IKkyJbwsT7JDsF2jxR+NTnuOwiGv0hLyDoQ== +"@rollup/rollup-linux-s390x-gnu@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.0.tgz#e0b4f9a966872cb7d3e21b9e412a4b7efd7f0b58" + integrity sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g== -"@rollup/rollup-linux-x64-gnu@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.5.tgz#a135b040b21582e91cfed2267ccfc7d589e1dbc6" - integrity sha512-N0jPPhHjGShcB9/XXZQWuWBKZQnC1F36Ce3sDqWpujsGjDz/CQtOL9LgTrJ+rJC8MJeesMWrMWVLKKNR/tMOCA== +"@rollup/rollup-linux-x64-gnu@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz#78144741993100f47bd3da72fce215e077ae036b" + integrity sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A== -"@rollup/rollup-linux-x64-musl@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.5.tgz#88395a81a3ab7ee3dc8dc31a73ff62ed3185f34d" - integrity sha512-uBa2e28ohzNNwjr6Uxm4XyaA1M/8aTgfF2T7UIlElLaeXkgpmIJ2EitVNQxjO9xLLLy60YqAgKn/AqSpCUkE9g== +"@rollup/rollup-linux-x64-musl@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.0.tgz#d9fe32971883cd1bd858336bd33a1c3ca6146127" + integrity sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ== -"@rollup/rollup-win32-arm64-msvc@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.5.tgz#12ee49233b1125f2c1da38392f63b1dbb0c31bba" - integrity sha512-RXT8S1HP8AFN/Kr3tg4fuYrNxZ/pZf1HemC5Tsddc6HzgGnJm0+Lh5rAHJkDuW3StI0ynNXukidROMXYl6ew8w== +"@rollup/rollup-win32-arm64-msvc@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.0.tgz#71fa3ea369316db703a909c790743972e98afae5" + integrity sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ== -"@rollup/rollup-win32-ia32-msvc@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.5.tgz#0f987b134c6b3123c22842b33ba0c2b6fb78cc3b" - integrity sha512-ElTYOh50InL8kzyUD6XsnPit7jYCKrphmddKAe1/Ytt74apOxDq5YEcbsiKs0fR3vff3jEneMM+3I7jbqaMyBg== +"@rollup/rollup-win32-ia32-msvc@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.0.tgz#653f5989a60658e17d7576a3996deb3902e342e2" + integrity sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ== -"@rollup/rollup-win32-x64-msvc@4.22.5": - version "4.22.5" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.5.tgz#f2feb149235a5dc1deb5439758f8871255e5a161" - integrity sha512-+lvL/4mQxSV8MukpkKyyvfwhH266COcWlXE/1qxwN08ajovta3459zrjLghYMgDerlzNwLAcFpvU+WWE5y6nAQ== +"@rollup/rollup-win32-x64-msvc@4.24.0": + version "4.24.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.0.tgz#0574d7e87b44ee8511d08cc7f914bcb802b70818" + integrity sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw== "@rtsao/scc@^1.1.0": version "1.1.0" @@ -973,10 +973,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469" integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== -"@types/node@^22.7.4": - version "22.7.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.4.tgz#e35d6f48dca3255ce44256ddc05dee1c23353fcc" - integrity sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg== +"@types/node@^22.7.5": + version "22.7.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.5.tgz#cfde981727a7ab3611a481510b473ae54442b92b" + integrity sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ== dependencies: undici-types "~6.19.2" @@ -990,62 +990,62 @@ resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== -"@typescript-eslint/eslint-plugin@^8.7.0": - version "8.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz#d0070f206daad26253bf00ca5b80f9b54f9e2dd0" - integrity sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A== +"@typescript-eslint/eslint-plugin@^8.8.1": + version "8.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.1.tgz#9364b756d4d78bcbdf6fd3e9345e6924c68ad371" + integrity sha512-xfvdgA8AP/vxHgtgU310+WBnLB4uJQ9XdyP17RebG26rLtDrQJV3ZYrcopX91GrHmMoH8bdSwMRh2a//TiJ1jQ== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.7.0" - "@typescript-eslint/type-utils" "8.7.0" - "@typescript-eslint/utils" "8.7.0" - "@typescript-eslint/visitor-keys" "8.7.0" + "@typescript-eslint/scope-manager" "8.8.1" + "@typescript-eslint/type-utils" "8.8.1" + "@typescript-eslint/utils" "8.8.1" + "@typescript-eslint/visitor-keys" "8.8.1" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^8.7.0": - version "8.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.7.0.tgz#a567b0890d13db72c7348e1d88442ea8ab4e9173" - integrity sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ== +"@typescript-eslint/parser@^8.8.1": + version "8.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.8.1.tgz#5952ba2a83bd52024b872f3fdc8ed2d3636073b8" + integrity sha512-hQUVn2Lij2NAxVFEdvIGxT9gP1tq2yM83m+by3whWFsWC+1y8pxxxHUFE1UqDu2VsGi2i6RLcv4QvouM84U+ow== dependencies: - "@typescript-eslint/scope-manager" "8.7.0" - "@typescript-eslint/types" "8.7.0" - "@typescript-eslint/typescript-estree" "8.7.0" - "@typescript-eslint/visitor-keys" "8.7.0" + "@typescript-eslint/scope-manager" "8.8.1" + "@typescript-eslint/types" "8.8.1" + "@typescript-eslint/typescript-estree" "8.8.1" + "@typescript-eslint/visitor-keys" "8.8.1" debug "^4.3.4" -"@typescript-eslint/scope-manager@8.7.0": - version "8.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz#90ee7bf9bc982b9260b93347c01a8bc2b595e0b8" - integrity sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg== +"@typescript-eslint/scope-manager@8.8.1": + version "8.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.8.1.tgz#b4bea1c0785aaebfe3c4ab059edaea1c4977e7ff" + integrity sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA== dependencies: - "@typescript-eslint/types" "8.7.0" - "@typescript-eslint/visitor-keys" "8.7.0" + "@typescript-eslint/types" "8.8.1" + "@typescript-eslint/visitor-keys" "8.8.1" -"@typescript-eslint/type-utils@8.7.0": - version "8.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz#d56b104183bdcffcc434a23d1ce26cde5e42df93" - integrity sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ== +"@typescript-eslint/type-utils@8.8.1": + version "8.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.8.1.tgz#31f59ec46e93a02b409fb4d406a368a59fad306e" + integrity sha512-qSVnpcbLP8CALORf0za+vjLYj1Wp8HSoiI8zYU5tHxRVj30702Z1Yw4cLwfNKhTPWp5+P+k1pjmD5Zd1nhxiZA== dependencies: - "@typescript-eslint/typescript-estree" "8.7.0" - "@typescript-eslint/utils" "8.7.0" + "@typescript-eslint/typescript-estree" "8.8.1" + "@typescript-eslint/utils" "8.8.1" debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@8.7.0": - version "8.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.7.0.tgz#21d987201c07b69ce7ddc03451d7196e5445ad19" - integrity sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w== +"@typescript-eslint/types@8.8.1": + version "8.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.8.1.tgz#ebe85e0fa4a8e32a24a56adadf060103bef13bd1" + integrity sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q== -"@typescript-eslint/typescript-estree@8.7.0": - version "8.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz#6c7db6baa4380b937fa81466c546d052f362d0e8" - integrity sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg== +"@typescript-eslint/typescript-estree@8.8.1": + version "8.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.1.tgz#34649f4e28d32ee49152193bc7dedc0e78e5d1ec" + integrity sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg== dependencies: - "@typescript-eslint/types" "8.7.0" - "@typescript-eslint/visitor-keys" "8.7.0" + "@typescript-eslint/types" "8.8.1" + "@typescript-eslint/visitor-keys" "8.8.1" debug "^4.3.4" fast-glob "^3.3.2" is-glob "^4.0.3" @@ -1053,22 +1053,22 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@8.7.0": - version "8.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.7.0.tgz#cef3f70708b5b5fd7ed8672fc14714472bd8a011" - integrity sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw== +"@typescript-eslint/utils@8.8.1": + version "8.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.8.1.tgz#9e29480fbfa264c26946253daa72181f9f053c9d" + integrity sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "8.7.0" - "@typescript-eslint/types" "8.7.0" - "@typescript-eslint/typescript-estree" "8.7.0" + "@typescript-eslint/scope-manager" "8.8.1" + "@typescript-eslint/types" "8.8.1" + "@typescript-eslint/typescript-estree" "8.8.1" -"@typescript-eslint/visitor-keys@8.7.0": - version "8.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz#5e46f1777f9d69360a883c1a56ac3c511c9659a8" - integrity sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ== +"@typescript-eslint/visitor-keys@8.8.1": + version "8.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.1.tgz#0fb1280f381149fc345dfde29f7542ff4e587fc5" + integrity sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag== dependencies: - "@typescript-eslint/types" "8.7.0" + "@typescript-eslint/types" "8.8.1" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": @@ -2325,17 +2325,24 @@ eslint-import-resolver-typescript@^3.6.3: is-bun-module "^1.0.2" is-glob "^4.0.3" -eslint-module-utils@^2.8.1, eslint-module-utils@^2.9.0: +eslint-module-utils@^2.12.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz#fe4cfb948d61f49203d7b08871982b65b9af0b0b" + integrity sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg== + dependencies: + debug "^3.2.7" + +eslint-module-utils@^2.8.1: version "2.11.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.11.0.tgz#b99b211ca4318243f09661fae088f373ad5243c4" integrity sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ== dependencies: debug "^3.2.7" -eslint-plugin-import@^2.30.0: - version "2.30.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz#21ceea0fc462657195989dd780e50c92fe95f449" - integrity sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw== +eslint-plugin-import@^2.31.0: + version "2.31.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz#310ce7e720ca1d9c0bb3f69adfd1c6bdd7d9e0e7" + integrity sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A== dependencies: "@rtsao/scc" "^1.1.0" array-includes "^3.1.8" @@ -2345,7 +2352,7 @@ eslint-plugin-import@^2.30.0: debug "^3.2.7" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.9" - eslint-module-utils "^2.9.0" + eslint-module-utils "^2.12.0" hasown "^2.0.2" is-core-module "^2.15.1" is-glob "^4.0.3" @@ -2354,6 +2361,7 @@ eslint-plugin-import@^2.30.0: object.groupby "^1.0.3" object.values "^1.2.0" semver "^6.3.1" + string.prototype.trimend "^1.0.8" tsconfig-paths "^3.15.0" eslint-plugin-prettier@^5.2.1: @@ -2594,10 +2602,10 @@ ethers@^5.5.1: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" -ethers@^6.13.2, ethers@^6.4.0: - version "6.13.2" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.2.tgz#4b67d4b49e69b59893931a032560999e5e4419fe" - integrity sha512-9VkriTTed+/27BGuY1s0hf441kqwHJ1wtN2edksEtiRvXx+soxRX3iSXTfFqq2+YwrOqbDoTHjIhQnjJRlzKmg== +ethers@^6.13.3, ethers@^6.4.0: + version "6.13.3" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.3.tgz#b87afdadb91cc8df5f56b9c59c96e5b206f4a600" + integrity sha512-/DzbZOLVtoO4fKvvQwpEucHAQgIwBGWuRvBdwE/lMXgXvvHHTSkn7XqAQ2b+gjJzZDJjWA9OD05bVceVOsBHbg== dependencies: "@adraffy/ens-normalize" "1.10.1" "@noble/curves" "1.2.0" @@ -4336,29 +4344,29 @@ rollup-plugin-esbuild@^6.1.1: es-module-lexer "^1.3.1" get-tsconfig "^4.7.2" -rollup@^4.22.5: - version "4.22.5" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.5.tgz#d5108cc470249417e50492456253884d19f5d40f" - integrity sha512-WoinX7GeQOFMGznEcWA1WrTQCd/tpEbMkc3nuMs9BT0CPjMdSjPMTVClwWd4pgSQwJdP65SK9mTCNvItlr5o7w== +rollup@^4.24.0: + version "4.24.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.24.0.tgz#c14a3576f20622ea6a5c9cad7caca5e6e9555d05" + integrity sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg== dependencies: "@types/estree" "1.0.6" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.22.5" - "@rollup/rollup-android-arm64" "4.22.5" - "@rollup/rollup-darwin-arm64" "4.22.5" - "@rollup/rollup-darwin-x64" "4.22.5" - "@rollup/rollup-linux-arm-gnueabihf" "4.22.5" - "@rollup/rollup-linux-arm-musleabihf" "4.22.5" - "@rollup/rollup-linux-arm64-gnu" "4.22.5" - "@rollup/rollup-linux-arm64-musl" "4.22.5" - "@rollup/rollup-linux-powerpc64le-gnu" "4.22.5" - "@rollup/rollup-linux-riscv64-gnu" "4.22.5" - "@rollup/rollup-linux-s390x-gnu" "4.22.5" - "@rollup/rollup-linux-x64-gnu" "4.22.5" - "@rollup/rollup-linux-x64-musl" "4.22.5" - "@rollup/rollup-win32-arm64-msvc" "4.22.5" - "@rollup/rollup-win32-ia32-msvc" "4.22.5" - "@rollup/rollup-win32-x64-msvc" "4.22.5" + "@rollup/rollup-android-arm-eabi" "4.24.0" + "@rollup/rollup-android-arm64" "4.24.0" + "@rollup/rollup-darwin-arm64" "4.24.0" + "@rollup/rollup-darwin-x64" "4.24.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.24.0" + "@rollup/rollup-linux-arm-musleabihf" "4.24.0" + "@rollup/rollup-linux-arm64-gnu" "4.24.0" + "@rollup/rollup-linux-arm64-musl" "4.24.0" + "@rollup/rollup-linux-powerpc64le-gnu" "4.24.0" + "@rollup/rollup-linux-riscv64-gnu" "4.24.0" + "@rollup/rollup-linux-s390x-gnu" "4.24.0" + "@rollup/rollup-linux-x64-gnu" "4.24.0" + "@rollup/rollup-linux-x64-musl" "4.24.0" + "@rollup/rollup-win32-arm64-msvc" "4.24.0" + "@rollup/rollup-win32-ia32-msvc" "4.24.0" + "@rollup/rollup-win32-x64-msvc" "4.24.0" fsevents "~2.3.2" run-async@^2.2.0: @@ -4972,10 +4980,10 @@ typed-array-length@^1.0.6: is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" -typescript@^5.6.2: - version "5.6.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0" - integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== +typescript@^5.6.3: + version "5.6.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" + integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== typical@^4.0.0: version "4.0.0"