@aeternity/aepp-sdk 13.3.0 → 13.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see aepp-sdk.browser-script.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Aeternity=t():e.Aeternity=t()}(self,(function(){return function(){var e={9226:function(e,t,n){const r=n(9986),i=n(7776),a=n(9101),o=n(2813),s=n(8836),{FateTypeCalldata:c,FateTypeString:u}=n(3182),l=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new o,this._canonicalMapper=new s}encodeCall(e,t,n){const{types:r,required:i}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<i)throw new l(`Non matching number of arguments. ${t} expects between ${i} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode(c(t,r),n)}decodeCall(e,t,n){const{types:r,_required:i}=this._typeResolver.getCallTypes(e,t),a=c(t,r);return this._byteArrayEncoder.decodeWithType(n,a)}decodeResult(e,t,n,r="ok"){if("ok"===r){const r=this._typeResolver.getReturnType(e,t);return this._byteArrayEncoder.decodeWithType(n,r)}if("error"===r){const e=new TextDecoder,t=this._apiEncoder.decodeWithType(n,"contract_bytearray");return e.decode(t)}if("revert"===r)return this._byteArrayEncoder.decodeWithType(n,u());throw new l(`Unknown call result type: "${r}"`)}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}}},7776:function(e,t,n){const r=n(7815),i=n(4495),{FateTypeEvent:a}=n(3182),o=({type:e})=>{let t,n=e;var r;return(r=n)&&"object"==typeof r&&r.constructor===Object&&([[n,t]]=Object.entries(n)),"option"===n};e.exports=class extends r{constructor(e){super(),this.aci=e}getCallTypes(e,t){const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(n){const e=n.arguments.map((e=>this.resolveType(e.type))),t=n.arguments.filter(o);return{types:e,required:e.length-t.length}}if("init"===t)return{types:[],required:0};throw new i(`Unknown function ${t}`)}getReturnType(e,t){if("init"===t)return this.resolveType("void");const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(!n)throw new i(`Unknown function ${t}`);return this.resolveType(n.returns)}getEventType(e,t){const n=this.getNamespaceAci(e);if(!n.hasOwnProperty("event"))throw new i("Missing event declaration");return a(this.resolveType(n.event),t)}isCustomType(e){if("string"!=typeof e)return!1;if(this.isStdType(e))return!1;const[t,n]=e.split(".");return!!this.getNamespaceAci(t)}isStdType(e){return"Set.set"===e}getNamespaceAci(e){for(const t of this.aci){const[[n,r]]=Object.entries(t);if(r.name===e)return r}return null}resolveTypeDef(e,t=[]){const[n,r]=e.split("."),a=this.getNamespaceAci(n);if(!a)throw new i("Unknown namespace for "+JSON.stringify(e));if(a.name===e)return["contract_pubkey",[]];const o=[...a.typedefs||a.type_defs,...a.state?[{name:"state",typedef:a.state,vars:[]}]:[]].find((e=>e.name===r));if(!o)throw new i("Unknown type definition: "+JSON.stringify(e));const s={};return o.vars.forEach(((e,n)=>{const[[r,i]]=Object.entries(e);s[i]=t[n]})),[s.hasOwnProperty(o.typedef)?s[o.typedef]:o.typedef,s]}}},9101:function(e,t,n){const r=n(2122),i=n(6911),a=n(5450),o=n(5345),s={key_block_hash:{tag:"kh",size:32,encoder:i},micro_block_hash:{tag:"mh",size:32,encoder:i},block_pof_hash:{tag:"bf",size:32,encoder:i},block_tx_hash:{tag:"bx",size:32,encoder:i},block_state_hash:{tag:"bs",size:32,encoder:i},contract_bytearray:{tag:"cb",size:0,encoder:r},contract_pubkey:{tag:"ct",size:32,encoder:i},account_pubkey:{tag:"ak",size:32,encoder:i},channel:{tag:"ch",size:32,encoder:i},oracle_pubkey:{tag:"ok",size:32,encoder:i},oracle_query_id:{tag:"oq",size:32,encoder:i},peer_pubkey:{tag:"pp",size:32,encoder:i},name:{tag:"nm",size:0,encoder:i},tx_hash:{tag:"th",size:32,encoder:i},signature:{tag:"sg",size:64,encoder:i},commitment:{tag:"cm",size:32,encoder:i},bytearray:{tag:"ba",size:0,encoder:r}},c={kh:"key_block_hash",mh:"micro_block_hash",bf:"block_pof_hash",bx:"block_tx_hash",bs:"block_state_hash",cb:"contract_bytearray",ct:"contract_pubkey",ak:"account_pubkey",ch:"channel",ok:"oracle_pubkey",oq:"oracle_query_id",pp:"peer_pubkey",nm:"name",th:"tx_hash",sg:"signature",cm:"commitment",ba:"bytearray"};e.exports=class{encode(e,t){if(!s.hasOwnProperty(e))throw new o(e,`Unsupported API type ${e}`);const n=s[e];if(n.size>0&&t.length!==n.size)throw new o(e,`Invalid payload. Expected size ${n.size}, but got ${t.length}`);const r=n.encoder.encode(t);return`${n.tag}_${r}`}decode(e){const t=e.substring(0,2);if(!c.hasOwnProperty(t))throw new a(`Invalid API data format. Unsupported tag: ${t}`);if("_"!==e[2])throw new a(`Invalid API data format. Expected _ separator on position 2, got ${e[2]}`);const n=s[c[t]],r=e.substring(3),i=n.encoder.decode(r);if(n.size>0&&i.length!==n.size)throw new a(`Invalid API data format. Expected size ${n.size}, but got ${i.length}`);return i}decodeWithType(e,t){const n=e.substring(0,2);if(!s.hasOwnProperty(t))throw new o(t,"Unsupported API type");const r=s[t].tag;if(n!==r){const n=this.capitalizeType(t);throw new o(t,`${n} should start with ${r}_, got ${e} instead`)}return this.decode(e)}capitalizeType(e){const t=e.replace("_"," ");return t.charAt(0).toUpperCase()+t.slice(1)}}},146:function(e,t,n){const r=n(9986),i=n(5192),a=n(9101),o=n(2813),{FateTypeCalldata:s,FateTypeString:c}=n(3182),u=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new o}encodeCall(e,t){const{types:n,required:r}=this._typeResolver.getCallTypes(e);if(t.length>n.length||t.length<r)throw new u(`Non matching number of arguments. ${e} expects between ${r} and ${n.length} number of arguments but got ${t.length}`);return this._byteArrayEncoder.encode(s(e,n),t)}decodeCall(e){const{functionId:t,args:n}=this._byteArrayEncoder.decodeWithType(e,s());return{functionId:t,functionName:this._typeResolver.getFunctionName(t),args:n}}decodeResult(e,t,n="ok"){if("ok"===n){const n=this._typeResolver.getReturnType(e);return this._byteArrayEncoder.decodeWithType(t,n)}if("error"===n){const e=new TextDecoder,n=this._apiEncoder.decodeWithType(t,"contract_bytearray");return e.decode(n)}if("revert"===n)return this._byteArrayEncoder.decodeWithType(t,c());throw new u(`Unknown call resutls type: "${n}"`)}}},5192:function(e,t,n){const r=n(9479),i=n(4495),{FateTypeVoid:a,FateTypeTuple:o,FateTypeEvent:s,FateTypeList:c,FateTypeMap:u,FateTypeVariant:l,FateTypeOracleAddress:A,FateTypeOracleQueryAddress:d}=n(3182);e.exports=class{constructor(e){this._contractEncoder=new r,this._encodedContract=e,this._contract=null}get _bytecode(){return null===this._contract&&(this._contract=this._contractEncoder.decode(this._encodedContract)),this._contract.bytecode}getFunctionId(e){const{symbols:t}=this._bytecode;return Object.keys(t).find((n=>t[n]===e))}getFunction(e){const{functions:t}=this._bytecode;return t.find((t=>t.id===e))}getFunctionName(e){const{name:t}=this.getFunction(e);return t}getCallTypes(e){const t=this.getFunction(this.getFunctionId(e));if(t){const e=t.args.valueTypes.map((e=>this.resolveType(e)));return{types:e,required:e.length}}if("init"===e)return{types:[],required:0};throw new i(`Unknown function ${e}`)}getReturnType(e){if("init"===e)return a();const t=this.getFunction(this.getFunctionId(e));if(t)return this.resolveType(t.returnType);throw new i(`Unknown function ${e}`)}getEventType(e){const t=this.getFunction(this.getFunctionId("Chain.event"));if(!t)throw new i("The contract does not have event declaration");const n=t.args.valueTypes[0];return s(this.resolveType(n),e)}resolveType(e){if("variant"===e.name){const t=e.variants.map(((e,t)=>({[t]:e.valueTypes.map((e=>this.resolveType(e)))})));return l(t)}let t=[];return Array.isArray(e.valueTypes)&&(t=e.valueTypes.map((e=>this.resolveType(e)))),"tuple"===e.name?o(t):"list"===e.name?c(...t):"map"===e.name?u(...t):"oracle"===e.name?A(...t):"oracle_query"===e.name?d(...t):e}}},9986:function(e,t,n){const r=n(9945),i=n(9101),a=n(8836),o=n(7746);e.exports=class{constructor(){this._serializer=new r,this._apiEncoder=new i,this._externalDataFactory=new o,this._canonicalMapper=new a}encode(e,t){const n=this._externalDataFactory.create(e,t),r=this._serializer.serialize(n),i=new Uint8Array(r.flat(1/0));return this._apiEncoder.encode("contract_bytearray",i)}decode(e){const t=this._apiEncoder.decodeWithType(e,"contract_bytearray"),n=this._serializer.deserialize(t);return this._canonicalMapper.toCanonical(n)}decodeWithType(e,t){const n=this._apiEncoder.decodeWithType(e,"contract_bytearray"),r=this._serializer.deserializeWithType(n,t);return this._canonicalMapper.toCanonical(r)}}},9479:function(e,t,n){const r=n(858),i=n(9101),a=n(9945),o=n(2664),{byteArray2Int:s,byteArray2Hex:c}=n(1247);e.exports=class{constructor(){this._apiEncoder=new i,this._bytecodeSerializer=new o(new a)}decode(e){const t=this._apiEncoder.decodeWithType(e,"contract_bytearray"),n=r.decode(t,!0),i=new TextDecoder;return{tag:s(n.data[0]),vsn:s(n.data[1]),sourceHash:c(n.data[2]),aevmTypeInfo:n.data[3],compilerVersion:i.decode(n.data[5]),payable:Boolean(n.data[6][0]),bytecode:this._bytecodeSerializer.deserialize(new Uint8Array(n.data[4]))}}}},8269:function(e){e.exports=class{constructor(e){this._valueFactory=e}get valueFactory(){return this._valueFactory}supports({_name:e,_valueTypes:t}){return!1}create(e,t){throw new Error("Not implemented.")}}},8824:function(e,t,n){const r=n(1047),i=n(4537),a=n(8269),o=["bls12_381.fr","bls12_381.fp"];e.exports=class extends a{supports({name:e,_valueTypes:t}){return o.includes(e)}create(e,t){switch(e.name){case"bls12_381.fr":return new r(t);case"bls12_381.fp":return new i(t);default:throw new Error(`Unsupported type "${e.name}"`)}}}},9310:function(e,t,n){const{symbolIdentifier:r}=n(7439),i=n(5345),a=n(3585),o=n(8269);e.exports=class extends o{supports({name:e,_valueTypes:t}){return"calldata"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate calldata arguments must be an Array, got ${t} instead`);const n=this.valueFactory.createMultiple(e.argumentTypes,t),o=r(e.functionName);return new a(o,e.argumentTypes,n)}}},6753:function(e,t,n){const r=n(6949),i=n(7412),a=n(715),o=n(5542),s=n(344),c=n(2182),u=n(9398),l=n(329),A=n(6571),d=n(7196),p=n(8824),m=n(9310);e.exports=class{constructor(){this._factories=[new a(this),new o(this),new s(this),new c(this),new u(this),new l(this),new d(this),new A(this),new p(this),new m(this)]}createMultiple(e,t){return r(t.length===e.length,`Number of types (${e.length}) and values (${t.length}) should match`),i(e,t).map((e=>this.create(...e)))}create(e,t){const n=this._factories.find((t=>t.supports(e)));return r(n,`Unsupported type "${e.name}"`),n.create(e,t)}}},7196:function(e,t,n){const{hash:r}=n(7439),{byteArray2Int:i}=n(1247),a=n(4495),o=n(8269),s=["string","signature","bytes"];e.exports=class extends o{supports({name:e,_valueTypes:t}){return"event"===e}create({variantType:e,topics:t},n){const[o,...s]=t;if("bigint"!=typeof o)throw new a(`Event name hash (first topic) should be of type "BigInt", got "${typeof o}" instead.`);const c=e.variants.map((e=>i(r(Object.keys(e)[0])))).findIndex((e=>e===o));if(-1===c)throw new a("Event name hash does not match any event variant constructor");const u=e.variants[c],l=Object.keys(u)[0],[A]=Object.values(u),d=A.map((e=>this._isData(e)?n:s.shift()));return this.valueFactory.create(e,{[l]:d})}_isData(e){return!(!s.includes(e.name)||"bytes"===e.name&&e.size<=32)}}},5542:function(e,t,n){const r=n(889),i=n(5345),a=n(8269);e.exports=class extends a{supports({name:e,_valueTypes:t}){return"list"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate list must be an Array, got ${t} instead`);const n=t.map((t=>this.valueFactory.create(e.valuesType,t)));return new r(e.valuesType,n)}}},2182:function(e,t,n){const r=n(5603),i=n(8269);e.exports=class extends i{supports({name:e,_valueTypes:t}){return"map"===e}create(e,t){const n=[];for(const r of t)n.push([this.valueFactory.create(e.keyType,r[0]),this.valueFactory.create(e.valueType,r[1])]);return new r(e.keyType,e.valueType,n)}}},715:function(e,t,n){const r=n(9512),i=n(6465),a=n(2280),o=n(1649),s=n(1143),c=n(1794),u=n(2325),l=n(9640),A=n(8767),d=n(9216),p=n(9511),m=n(3131),h=n(8269),g=["int","bool","string","bits","hash","bytes","signature","account_pubkey","contract_pubkey","channel","oracle_pubkey","oracle_query_id"];e.exports=class extends h{supports({name:e,_valueTypes:t}){return g.includes(e)}create(e,t){switch(e.name){case"int":return new r(t);case"bool":return new i(t);case"string":return new a(t);case"bits":return new u(t);case"hash":return new o(t);case"bytes":return new c(t,e.valueTypes);case"signature":return new s(t);case"account_pubkey":return new l(t);case"contract_pubkey":return new A(t);case"channel":return new d(t);case"oracle_pubkey":return new p(t);case"oracle_query_id":return new m(t);default:throw new Error(`Unsupported type "${e.name}"`)}}}},329:function(e,t,n){const r=n(8269),i=n(4899),{FateTypeRecord:a}=n(3182),o=n(5345);e.exports=class extends r{supports({name:e,_valueTypes:t}){return"record"===e}create(e,t){if("object"!=typeof t)throw new o(e.name,`Fate record must be an Object, got ${t} instead`);const n=Object.keys(t).length;if(n!==e.keys.length)throw new o(e.name,`Number of expected keys (${e.keys.length}) and actual keys (${n}) should match`);const r=e.valueTypes.map(((n,r)=>{const i=e.keys[r];return this.valueFactory.create(n,t[i])}));return 1===r.length?r[0]:new i(a(e.keys,e.valueTypes),r)}}},344:function(e,t,n){const r=n(5981),i=n(8269);e.exports=class extends i{supports({name:e,_valueTypes:t}){return"set"===e}create(e,t){const n=[];for(const r of t)n.push(this.valueFactory.create(e.valuesType,r));return new r(e.valuesType,n)}}},9398:function(e,t,n){const r=n(4899),i=n(5345),a=n(8269);e.exports=class extends a{supports({name:e,_valueTypes:t}){return"tuple"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate tuple must be an Array, got ${t} instead`);const n=e.valueTypes.map(((e,n)=>this.valueFactory.create(e,t[n])));return 1===n.length?n[0]:new r(e.valueTypes,n)}}},6571:function(e,t,n){const r=n(9560),i=n(5345),a=n(8269),o=["variant","Chain.ttl","AENS.pointee","AENSv2.pointee","AENS.name","AENSv2.name"];e.exports=class extends a{supports({name:e,_valueTypes:t}){return o.includes(e)}create(e,t){if(!this.isValid(t))throw new i(e.name,`Variant should be an object mapping constructor to array of values, got "${t}" instead`);const[n,a]=Object.entries(t)[0],o=e.variants.map((e=>{const[[,t]]=Object.entries(e);return t.length})),s=e.variants.findIndex((e=>{const[[t,r]]=Object.entries(e);return t===n}));if(-1===s)throw new i(e.name,`Unknown variant constructor: ${n}`);const[[,c]]=Object.entries(e.variants[s]);if(a.length!==c.length)throw new i(e.name,`"${n}" variant constructor expects ${c.length} argument(s) but got ${a.length} instead`);const u=this.valueFactory.createMultiple(c,a);return new r(o,s,u,c,e.variants)}isValid(e){return"object"==typeof e&&null!==e&&1===Object.entries(e).length&&Array.isArray(Object.values(e)[0])}}},4841:function(e,t,n){const r=n(9986),i=n(7776),a=n(9101),o=n(2813),s=n(8836),{FateTypeCalldata:c,FateTypeString:u}=n(3182),l=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new o,this._canonicalMapper=new s}encode(e,t,n){const{types:r,required:i}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<i)throw new l(`Non matching number of arguments. ${t} expects between ${i} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode(c(t,r),n)}decode(e,t,n){const r=this._typeResolver.getReturnType(e,t);return this._byteArrayEncoder.decodeWithType(n,r)}decodeContractByteArray(e){return this._byteArrayEncoder.decode(e)}decodeString(e){const t=new TextDecoder,n=this._apiEncoder.decodeWithType(e,"contract_bytearray");return t.decode(n)}decodeFateString(e){return this._byteArrayEncoder.decodeWithType(e,u())}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}}},7611:function(e){class t extends Error{constructor(e){super(e),this.name="EncoderError"}}e.exports=t},3541:function(e){class t extends Error{constructor(e){super("Invalid FATE prefix: 0b"+e.toString(2).padStart(8,"0")),this.name="FatePrefixError",this.prefix=e}}e.exports=t},5345:function(e){class t extends Error{constructor(e,t){super(t),this.name="FateTypeError",this.type=e}}e.exports=t},5450:function(e){class t extends Error{constructor(e){super(e),this.name="FormatError"}}e.exports=t},9520:function(e){class t extends Error{constructor(e){super(e),this.name="InternalError"}}e.exports=t},4275:function(e){class t extends Error{constructor(e){super(e),this.name="SerializerError"}}e.exports=t},4495:function(e){class t extends Error{constructor(e){super(e),this.name="TypeResolveError"}}e.exports=t},2813:function(e,t,n){const r=n(9101),i=n(6753),a=n(8836);e.exports=class{constructor(){this._dataFactory=new i,this._apiEncoder=new r,this._canonicalMapper=new a}decodeWithType(e,t){const n=this._apiEncoder.decode(e),r=this._dataFactory.create(t,n);return this._canonicalMapper.toCanonical(r)}}},7746:function(e,t,n){const r=n(6753),i=n(991);e.exports=class extends r{constructor(){super(),this._mapper=new i}create(e,t){const n=this._mapper.toInternal(e,t);return super.create(e,n)}}},5167:function(e,t,n){const r=n(6949),i=n(889),a=n(4899),{FateTypeTuple:o,FateTypeInt:s}=n(3182),c=(e,t)=>{if(0===e.length)return-1;if(0===t.length)return 1;const n=p(e.itemsType);for(let r=0;r<e.length;r++){if(void 0===t.items[r])return 1;const i=n(e.items[r],t.items[r]);if(0!==i)return i}return e.length===t.length?0:-1},u=e=>{const t=p(e);return(e,n)=>t(e.key,n.key)},l=(e,t)=>{const n=new i(s(),e.valueOf()),r=new i(s(),t.valueOf());return c(n,r)},A=(e,t)=>Number(BigInt(e)-BigInt(t)),d={int:A,bool:(e,t)=>e-t,string:(e,t)=>{const n=new TextEncoder,r=e.toString(),i=t.toString();return r.length===i.length?l(n.encode(e),n.encode(t)):r.length-i.length},bits:(e,t)=>e<0||t<0?-A(e,t):A(e,t),list:c,tuple:(e,t)=>{if(0===e.size)return-1;const n=e.size-t.size;if(0!==n)return n;for(let n=0;n<e.size;n++){const r=e.valueTypes[n],i=p(r)(e.items[n],t.items[n]);if(0!==i)return i}return 0},variant:(e,t)=>{const n=e.arities.length-t.arities.length;if(0!==n)return n;const r=new i(e.aritiesType,e.arities),s=new i(t.aritiesType,t.arities),c=p(r)(r,s);if(0!==c)return c;const u=e.tag-t.tag;return 0!==u?u:p(o())(new a(e.valueTypes,e.value),new a(t.valueTypes,t.value))},map:(e,t)=>{const n=[...e.items],r=[...t.items];n.sort(u(e.keyType)),r.sort(u(t.keyType));const i=p(e.keyType),a=p(e.valueType);for(let e=0;e<n.length;e++){if(void 0===r[e])return 1;const t=n[e],o=r[e],s=i(t.key,o.key);if(0!==s)return s;const c=a(t.value,o.value);if(0!==c)return c}return n.length===r.length?0:-1},bytes:l,account_pubkey:l,channel:l,contract_pubkey:l,oracle_query_id:l,oracle_pubkey:l},p=e=>(r(e.hasOwnProperty("name"),`Cannot determine type name of ${JSON.stringify(e)}`),r(d.hasOwnProperty(e.name),`Unsupported comparator for ${e.name}`),d[e.name]);e.exports=p},7824:function(e){e.exports=Object.freeze({0:{mnemonic:"RETURN",args:0,end:!0},1:{mnemonic:"RETURNR",args:1,end:!0},2:{mnemonic:"CALL",args:1,end:!0},3:{mnemonic:"CALL_R",args:5,end:!0},4:{mnemonic:"CALL_T",args:1,end:!0},5:{mnemonic:"CALL_GR",args:6,end:!0},6:{mnemonic:"JUMP",args:1,end:!0},7:{mnemonic:"JUMPIF",args:2,end:!0},8:{mnemonic:"SWITCH_V2",args:3,end:!0},9:{mnemonic:"SWITCH_V3",args:4,end:!0},10:{mnemonic:"SWITCH_VN",args:2,end:!0},11:{mnemonic:"CALL_VALUE",args:1,end:!1},12:{mnemonic:"PUSH",args:1,end:!1},13:{mnemonic:"DUPA",args:0,end:!1},14:{mnemonic:"DUP",args:1,end:!1},15:{mnemonic:"POP",args:1,end:!1},16:{mnemonic:"INCA",args:0,end:!1},17:{mnemonic:"INC",args:1,end:!1},18:{mnemonic:"DECA",args:0,end:!1},19:{mnemonic:"DEC",args:1,end:!1},20:{mnemonic:"ADD",args:3,end:!1},21:{mnemonic:"SUB",args:3,end:!1},22:{mnemonic:"MUL",args:3,end:!1},23:{mnemonic:"DIV",args:3,end:!1},24:{mnemonic:"MOD",args:3,end:!1},25:{mnemonic:"POW",args:3,end:!1},26:{mnemonic:"STORE",args:2,end:!1},27:{mnemonic:"SHA3",args:2,end:!1},28:{mnemonic:"SHA256",args:2,end:!1},29:{mnemonic:"BLAKE2B",args:2,end:!1},30:{mnemonic:"LT",args:3,end:!1},31:{mnemonic:"GT",args:3,end:!1},32:{mnemonic:"EQ",args:3,end:!1},33:{mnemonic:"ELT",args:3,end:!1},34:{mnemonic:"EGT",args:3,end:!1},35:{mnemonic:"NEQ",args:3,end:!1},36:{mnemonic:"AND",args:3,end:!1},37:{mnemonic:"OR",args:3,end:!1},38:{mnemonic:"NOT",args:2,end:!1},39:{mnemonic:"TUPLE",args:2,end:!1},40:{mnemonic:"ELEMENT",args:3,end:!1},41:{mnemonic:"SETELEMENT",args:4,end:!1},42:{mnemonic:"MAP_EMPTY",args:1,end:!1},43:{mnemonic:"MAP_LOOKUP",args:3,end:!1},44:{mnemonic:"MAP_LOOKUPD",args:4,end:!1},45:{mnemonic:"MAP_UPDATE",args:4,end:!1},46:{mnemonic:"MAP_DELETE",args:3,end:!1},47:{mnemonic:"MAP_MEMBER",args:3,end:!1},48:{mnemonic:"MAP_FROM_LIST",args:2,end:!1},49:{mnemonic:"MAP_SIZE",args:2,end:!1},50:{mnemonic:"MAP_TO_LIST",args:2,end:!1},51:{mnemonic:"IS_NIL",args:2,end:!1},52:{mnemonic:"CONS",args:3,end:!1},53:{mnemonic:"HD",args:2,end:!1},54:{mnemonic:"TL",args:2,end:!1},55:{mnemonic:"LENGTH",args:2,end:!1},56:{mnemonic:"NIL",args:1,end:!1},57:{mnemonic:"APPEND",args:3,end:!1},58:{mnemonic:"STR_JOIN",args:3,end:!1},59:{mnemonic:"INT_TO_STR",args:2,end:!1},60:{mnemonic:"ADDR_TO_STR",args:2,end:!1},61:{mnemonic:"STR_REVERSE",args:2,end:!1},62:{mnemonic:"STR_LENGTH",args:2,end:!1},63:{mnemonic:"BYTES_TO_INT",args:2,end:!1},64:{mnemonic:"BYTES_TO_STR",args:2,end:!1},65:{mnemonic:"BYTES_CONCAT",args:3,end:!1},66:{mnemonic:"BYTES_SPLIT",args:3,end:!1},67:{mnemonic:"INT_TO_ADDR",args:2,end:!1},68:{mnemonic:"VARIANT",args:4,end:!1},69:{mnemonic:"VARIANT_TEST",args:3,end:!1},70:{mnemonic:"VARIANT_ELEMENT",args:3,end:!1},71:{mnemonic:"BITS_NONEA",args:0,end:!1},72:{mnemonic:"BITS_NONE",args:1,end:!1},73:{mnemonic:"BITS_ALLA",args:0,end:!1},74:{mnemonic:"BITS_ALL",args:1,end:!1},75:{mnemonic:"BITS_ALL_N",args:2,end:!1},76:{mnemonic:"BITS_SET",args:3,end:!1},77:{mnemonic:"BITS_CLEAR",args:3,end:!1},78:{mnemonic:"BITS_TEST",args:3,end:!1},79:{mnemonic:"BITS_SUM",args:2,end:!1},80:{mnemonic:"BITS_OR",args:3,end:!1},81:{mnemonic:"BITS_AND",args:3,end:!1},82:{mnemonic:"BITS_DIFF",args:3,end:!1},83:{mnemonic:"BALANCE",args:1,end:!1},84:{mnemonic:"ORIGIN",args:1,end:!1},85:{mnemonic:"CALLER",args:1,end:!1},86:{mnemonic:"BLOCKHASH",args:2,end:!1},87:{mnemonic:"BENEFICIARY",args:1,end:!1},88:{mnemonic:"TIMESTAMP",args:1,end:!1},89:{mnemonic:"GENERATION",args:1,end:!1},90:{mnemonic:"MICROBLOCK",args:1,end:!1},91:{mnemonic:"DIFFICULTY",args:1,end:!1},92:{mnemonic:"GASLIMIT",args:1,end:!1},93:{mnemonic:"GAS",args:1,end:!1},94:{mnemonic:"ADDRESS",args:1,end:!1},95:{mnemonic:"GASPRICE",args:1,end:!1},96:{mnemonic:"LOG0",args:1,end:!1},97:{mnemonic:"LOG1",args:2,end:!1},98:{mnemonic:"LOG2",args:3,end:!1},99:{mnemonic:"LOG3",args:4,end:!1},100:{mnemonic:"LOG4",args:5,end:!1},101:{mnemonic:"SPEND",args:2,end:!1},102:{mnemonic:"ORACLE_REGISTER",args:7,end:!1},103:{mnemonic:"ORACLE_QUERY",args:8,end:!1},104:{mnemonic:"ORACLE_RESPOND",args:6,end:!1},105:{mnemonic:"ORACLE_EXTEND",args:3,end:!1},106:{mnemonic:"ORACLE_GET_ANSWER",args:5,end:!1},107:{mnemonic:"ORACLE_GET_QUESTION",args:5,end:!1},108:{mnemonic:"ORACLE_QUERY_FEE",args:2,end:!1},109:{mnemonic:"AENS_RESOLVE",args:4,end:!1},110:{mnemonic:"AENS_PRECLAIM",args:3,end:!1},111:{mnemonic:"AENS_CLAIM",args:5,end:!1},112:{mnemonic:"AENS_UPDATE",args:6,end:!1},113:{mnemonic:"AENS_TRANSFER",args:4,end:!1},114:{mnemonic:"AENS_REVOKE",args:3,end:!1},115:{mnemonic:"BALANCE_OTHER",args:2,end:!1},116:{mnemonic:"VERIFY_SIG",args:4,end:!1},117:{mnemonic:"VERIFY_SIG_SECP256K1",args:4,end:!1},118:{mnemonic:"CONTRACT_TO_ADDRESS",args:2,end:!1},119:{mnemonic:"AUTH_TX_HASH",args:1,end:!1},120:{mnemonic:"ORACLE_CHECK",args:4,end:!1},121:{mnemonic:"ORACLE_CHECK_QUERY",args:5,end:!1},122:{mnemonic:"IS_ORACLE",args:2,end:!1},123:{mnemonic:"IS_CONTRACT",args:2,end:!1},124:{mnemonic:"IS_PAYABLE",args:2,end:!1},125:{mnemonic:"CREATOR",args:1,end:!1},126:{mnemonic:"ECVERIFY_SECP256K1",args:4,end:!1},127:{mnemonic:"ECRECOVER_SECP256K1",args:3,end:!1},128:{mnemonic:"ADDRESS_TO_CONTRACT",args:2,end:!1},129:{mnemonic:"BLS12_381_G1_NEG",args:2,end:!1},130:{mnemonic:"BLS12_381_G1_NORM",args:2,end:!1},131:{mnemonic:"BLS12_381_G1_VALID",args:2,end:!1},132:{mnemonic:"BLS12_381_G1_IS_ZERO",args:2,end:!1},133:{mnemonic:"BLS12_381_G1_ADD",args:3,end:!1},134:{mnemonic:"BLS12_381_G1_MUL",args:3,end:!1},135:{mnemonic:"BLS12_381_G2_NEG",args:2,end:!1},136:{mnemonic:"BLS12_381_G2_NORM",args:2,end:!1},137:{mnemonic:"BLS12_381_G2_VALID",args:2,end:!1},138:{mnemonic:"BLS12_381_G2_IS_ZERO",args:2,end:!1},139:{mnemonic:"BLS12_381_G2_ADD",args:3,end:!1},140:{mnemonic:"BLS12_381_G2_MUL",args:3,end:!1},141:{mnemonic:"BLS12_381_GT_INV",args:2,end:!1},142:{mnemonic:"BLS12_381_GT_ADD",args:3,end:!1},143:{mnemonic:"BLS12_381_GT_MUL",args:3,end:!1},144:{mnemonic:"BLS12_381_GT_POW",args:3,end:!1},145:{mnemonic:"BLS12_381_GT_IS_ONE",args:2,end:!1},146:{mnemonic:"BLS12_381_PAIRING",args:3,end:!1},147:{mnemonic:"BLS12_381_MILLER_LOOP",args:3,end:!1},148:{mnemonic:"BLS12_381_FINAL_EXP",args:2,end:!1},149:{mnemonic:"BLS12_381_INT_TO_FR",args:2,end:!1},150:{mnemonic:"BLS12_381_INT_TO_FP",args:2,end:!1},151:{mnemonic:"BLS12_381_FR_TO_INT",args:2,end:!1},152:{mnemonic:"BLS12_381_FP_TO_INT",args:2,end:!1},153:{mnemonic:"AENS_LOOKUP",args:2,end:!1},154:{mnemonic:"ORACLE_EXPIRY",args:2,end:!1},155:{mnemonic:"AUTH_TX",args:1,end:!1},156:{mnemonic:"STR_TO_LIST",args:2,end:!1},157:{mnemonic:"STR_FROM_LIST",args:2,end:!1},158:{mnemonic:"STR_TO_UPPER",args:2,end:!1},159:{mnemonic:"STR_TO_LOWER",args:2,end:!1},160:{mnemonic:"CHAR_TO_INT",args:2,end:!1},161:{mnemonic:"CHAR_FROM_INT",args:2,end:!1},162:{mnemonic:"CALL_PGR",args:7,end:!0},163:{mnemonic:"CREATE",args:3,end:!0},164:{mnemonic:"CLONE",args:4,end:!0},165:{mnemonic:"CLONE_G",args:5,end:!0},166:{mnemonic:"BYTECODE_HASH",args:2,end:!1},167:{mnemonic:"FEE",args:1,end:!1},168:{mnemonic:"ADDRESS_TO_BYTES",args:2,end:!1},169:{mnemonic:"POSEIDON",args:3,end:!1},170:{mnemonic:"MULMOD",args:4,end:!1},171:{mnemonic:"BAND",args:3,end:!1},172:{mnemonic:"BOR",args:3,end:!1},173:{mnemonic:"BXOR",args:3,end:!1},174:{mnemonic:"BNOT",args:2,end:!1},175:{mnemonic:"BSL",args:3,end:!1},176:{mnemonic:"BSR",args:3,end:!1},250:{mnemonic:"DEACTIVATE",args:0,end:!1},251:{mnemonic:"ABORT",args:1,end:!0},252:{mnemonic:"EXIT",args:1,end:!0},253:{mnemonic:"NOP",args:0,end:!1},254:{mnemonic:"FUNCTION",args:0,end:!1},255:{mnemonic:"EXTEND",args:0,end:!1}})},8707:function(e){e.exports=Object.freeze({SMALL_INT:0,LONG_STRING:1,SHORT_STRING:1,SHORT_LIST:3,TYPE_INTEGER:7,TYPE_BOOLEAN:23,TYPE_LIST:39,TYPE_TUPLE:55,TYPE_OBJECT:71,TYPE_BITS:87,TYPE_MAP:103,TYPE_STRING:119,TYPE_VARIANT:135,TYPE_BYTES:151,TYPE_CONTRACT_BYTEARRAY:167,TYPE_VAR:231,TYPE_ANY:247,LONG_TUPLE:11,SHORT_TUPLE:11,LONG_LIST:31,MAP:47,EMPTY_TUPLE:63,POS_BITS:79,EMPTY_STRING:95,POS_BIG_INT:111,FALSE:127,OBJECT:159,VARIANT:175,MAP_ID:191,NEG_BITS:207,EMPTY_MAP:223,NEG_BIG_INT:239,TRUE:255,OTYPE_ADDRESS:0,OTYPE_BYTES:1,OTYPE_CONTRACT:2,OTYPE_ORACLE:3,OTYPE_ORACLE_QUERY:4,OTYPE_CHANNEL:5})},3182:function(e){const t=e=>({name:"bytes",size:e}),n=(e,t)=>({name:"map",keyType:e,valueType:t}),r=e=>({name:"variant",variants:e}),i=()=>r([{RelativeTTL:[{name:"int"}]},{FixedTTL:[{name:"int"}]}]),a=()=>r([{"AENS.AccountPt":[{name:"account_pubkey"}]},{"AENS.OraclePt":[{name:"account_pubkey"}]},{"AENS.ContractPt":[{name:"account_pubkey"}]},{"AENS.ChannelPt":[{name:"account_pubkey"}]}]),o=()=>{const e=[{"AENSv2.AccountPt":[{name:"account_pubkey"}]},{"AENSv2.OraclePt":[{name:"account_pubkey"}]},{"AENSv2.ContractPt":[{name:"account_pubkey"}]},{"AENSv2.ChannelPt":[{name:"account_pubkey"}]},{"AENSv2.DataPt":[t()]}];return r(e)};e.exports={FateTypeVoid:()=>({name:"void"}),FateTypeInt:()=>({name:"int"}),FateTypeBool:()=>({name:"bool"}),FateTypeString:()=>({name:"string"}),FateTypeBits:()=>({name:"bits"}),FateTypeBytes:t,FateTypeHash:()=>({name:"hash"}),FateTypeSignature:()=>({name:"signature"}),FateTypeAccountAddress:()=>({name:"account_pubkey"}),FateTypeContractAddress:()=>({name:"contract_pubkey"}),FateTypeChannelAddress:()=>({name:"channel"}),FateTypeOracleAddress:(e,t)=>({name:"oracle_pubkey",questionType:e,answerType:t}),FateTypeOracleQueryAddress:(e,t)=>({name:"oracle_query_id",questionType:e,answerType:t}),FateTypeByteArray:()=>({name:"byte_array"}),FateTypeList:e=>({name:"list",valuesType:e}),FateTypeTuple:(e=[])=>({name:"tuple",valueTypes:e}),FateTypeRecord:(e,t)=>({name:"record",keys:e,valueTypes:t}),FateTypeSet:e=>({name:"set",valuesType:e}),FateTypeMap:n,FateTypeVariant:r,FateTypeType:e=>({name:"type",type:e}),FateTypeOption:e=>r([{None:[]},{Some:e}]),FateTypeChainTTL:i,FateTypeChainGAMetaTx:()=>r([{"Chain.GAMetaTx":[{name:"account_pubkey"},{name:"int"}]}]),FateTypeChainPayingForTx:()=>r([{"Chain.PayingForTx":[{name:"account_pubkey"},{name:"int"}]}]),FateTypeChainBaseTx:()=>r([{"Chain.SpendTx":[{name:"account_pubkey"},{name:"int"},{name:"string"}]},{"Chain.OracleRegisterTx":[]},{"Chain.OracleQueryTx":[]},{"Chain.OracleResponseTx":[]},{"Chain.OracleExtendTx":[]},{"Chain.NamePreclaimTx":[]},{"Chain.NameClaimTx":[{name:"string"}]},{"Chain.NameUpdateTx":[{name:"hash"}]},{"Chain.NameRevokeTx":[{name:"hash"}]},{"Chain.NameTransferTx":[{name:"account_pubkey"},{name:"hash"}]},{"Chain.ChannelCreateTx":[{name:"account_pubkey"}]},{"Chain.ChannelDepositTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelWithdrawTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelForceProgressTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseMutualTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseSoloTx":[{name:"account_pubkey"}]},{"Chain.ChannelSlashTx":[{name:"account_pubkey"}]},{"Chain.ChannelSettleTx":[{name:"account_pubkey"}]},{"Chain.ChannelSnapshotSoloTx":[{name:"account_pubkey"}]},{"Chain.ContractCreateTx":[{name:"account_pubkey"}]},{"Chain.ContractCallTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.GAAttachTx":[]}]),FateTypeAENSPointee:a,FateTypeAENSv2Pointee:o,FateTypeAENSName:()=>{const e=[{"AENS.Name":[{name:"account_pubkey"},i(),n({name:"string"},a())]}];return r(e)},FateTypeAENSv2Name:()=>{const e=[{"AENSv2.Name":[{name:"account_pubkey"},i(),n({name:"string"},o())]}];return r(e)},FateTypeEvent:(e,t)=>({name:"event",variantType:e,topics:t}),FateTypeBls12381Fr:()=>({name:"bls12_381.fr"}),FateTypeBls12381Fp:()=>({name:"bls12_381.fp"}),FateTypeCalldata:(e,t)=>({name:"calldata",functionName:e,argumentTypes:t}),FateTypeVar:e=>({name:"tvar",id:e}),FateTypeAny:()=>({name:"any"})}},8836:function(e,t,n){const r=n(9101),{montBytes2Int:i}=n(2041),{byteArray2Hex:a}=n(1247);e.exports=class{constructor(){this._apiEncoder=new r}toCanonical(e){return e.accept(this)}visitData(e){return e.valueOf()}visitAddress(e){return this._apiEncoder.encode(e.name,e.value)}visitList(e){return e.items.map((e=>e.accept(this)))}visitSet(e){return new Set(e.items.map((e=>e.accept(this))))}visitMap(e){const t=new Map;for(const[n,r]of e.iterator)t.set(n.accept(this),r.accept(this));return t}visitTuple(e){return e.prepareItems((e=>e.accept(this)))}visitVariant(e){const t=e.value.map((e=>e.accept(this)));if("None"!==e.variantName)return"Some"===e.variantName?t[0]:{[e.variantName]:t}}visitBls12381Fr(e){return i(e.valueOf(),"r")}visitBls12381Fp(e){return i(e.valueOf(),"p")}visitCalldata(e){const{functionId:t,args:n}=e.valueOf();return{functionId:a(t),args:n.map((e=>e.accept(this)))}}}},991:function(e,t,n){const r=n(9101),{int2MontBytes:i}=n(2041),a=n(5345);e.exports=class{constructor(){this._apiEncoder=new r}toInternal(e,t){switch(e.name){case"account_pubkey":case"contract_pubkey":case"channel":case"oracle_pubkey":case"oracle_query_id":return this.toAddress(e,t);case"variant":return this.toVariant(e,t);case"map":return this.toMap(e,t);case"set":return this.toSet(e,t);case"record":return this.toRecord(e,t);case"bls12_381.fr":return this.toBls12381Fr(e,t);case"bls12_381.fp":return this.toBls12381Fp(e,t);default:return t}}toAddress({name:e,_:t},n){return this._apiEncoder.decodeWithType(n,e)}toVariant(e,t){if(!this.isOptionVariant(e))return t;if([void 0,null].includes(t))return{None:[]};const[n]=Object.keys(t);return["Some","None"].includes(n)?t:{Some:[t]}}isOptionVariant({_name:e,variants:t}){return t.some((({None:e})=>e&&0===e.length))&&t.some((({Some:e})=>e))}toMap(e,t){if("object"!=typeof t||null===t)throw new a("map",`Fate map must be one of: Map, Array, Object; got ${t} instead`);return Array.isArray(t)||t instanceof Map?t:Object.entries(t)}toSet(e,t){if(t instanceof Set)return t;if(Array.isArray(t))return new Set(t);throw new a("set",`Fate set must be a Set or Array, got "${t}" instead`)}toRecord(e,t){return e.keys.reduce(((e,n)=>({...e,[n]:t[n]})),{})}validateBls12381Field(e,t){if("bigint"!=typeof t&&!Number.isInteger(t))throw new a(e.name,`Should be one of: BigInt or Number; got ${t} instead`)}toBls12381Fr(e,t){return this.validateBls12381Field(e,t),i(t,"r")}toBls12381Fp(e,t){return this.validateBls12381Field(e,t),i(t,"p")}}},9945:function(e,t,n){const r=n(9291),i=n(8517),a=n(1666),o=n(5323),s=n(5499),c=n(1251),u=n(5980),l=n(7596),A=n(284),d=n(1849),p=n(8766),m=n(9737),h=n(5411),g=n(6291),f=n(1885),y=n(4157),C=n(5945),I=n(8566),w=n(2021),E=n(8950),B=n(6937),N=n(8003),b=n(4323),v=n(4275);e.exports=class extends a{constructor(){super(),this.typeFactory=new r,this._serializers={void:new m,bool:new c,int:new p,tuple:new w(this),record:new w(this),list:new h(this),set:new g(this),map:new f(this),byte_array:new u,string:new I,hash:new l,signature:new l,bits:new s,variant:new E(this),bytes:new l,account_pubkey:new o,contract_pubkey:new d,oracle_pubkey:new C,oracle_query_id:new y,channel:new A,"bls12_381.fr":new B,"bls12_381.fp":new B,calldata:new N(this),type:new b}}_getSerializer(e){if(!e.hasOwnProperty("name"))throw new v("Unsupported type: "+JSON.stringify(e));const t=e.name;if(!this._serializers.hasOwnProperty(t))throw new v("Unsupported type: "+JSON.stringify(t));return this._serializers[t]}serialize(e){if("object"!=typeof e)throw new v("Only object serialization is supported. Got: "+JSON.stringify(e));if(!(e instanceof i))throw new v("Only instances of FateData is supported.");return this._getSerializer(e).serialize(e)}deserializeWithType(e,t){if(!(e instanceof Uint8Array))throw new v("Only instances of Uint8Array is supported.");return this._getSerializer(t).deserialize(e,t)}deserialize(e){if(!(e instanceof Uint8Array))throw new v("Only instances of Uint8Array is supported.");const t=this.typeFactory.createType(e);return this.deserializeWithType(e,t)}deserializeStream(e,t){if(!(e instanceof Uint8Array))throw new v("Only instances of Uint8Array is supported.");let n=t;return void 0===t&&(n=this.typeFactory.createType(e)),this._getSerializer(n).deserializeStream(e,t)}}},5323:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),o=n(9640);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ADDRESS,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new o(n.data),new Uint8Array(n.remainder)]}}},1666:function(e,t,n){const r=n(4275);e.exports=class{constructor(e){this.globalSerializer=e}serialize(e){throw new r("Not implemented.")}deserialize(e,t){const[n,r]=this.deserializeStream(e,t);return n}deserializeStream(e,t){throw new r("Not implemented.")}}},5499:function(e,t,n){const r=n(8707),i=n(6128),a=n(2325),o=n(1666),s=n(1351);e.exports=class extends o{serialize(e){return[e.value>=0?r.POS_BITS:r.NEG_BITS,...i.encode(s(e.value))]}deserializeStream(e){const t=new Uint8Array(e),n=t[0]===r.POS_BITS?1n:-1n,[o,s]=i.decode(t.slice(1));return[new a(o*n),new Uint8Array(s)]}}},6937:function(e,t,n){const r=n(1666),i=n(7596),a=n(1047),o=n(4537),s=new i,c=(e,t)=>{switch(e.name){case"bls12_381.fr":return new a(t);case"bls12_381.fp":return new o(t);default:throw new Error(`Unsupported type "${e.name}"`)}};e.exports=class extends r{serialize(e){return s.serialize(e)}deserializeStream(e,t){const[n,r]=s.deserializeStream(e);return[c(t,n.valueOf()),r]}}},1251:function(e,t,n){const r=n(8707),i=n(6465),a=n(1666),o=n(3541);e.exports=class extends a{serialize(e){return!0===e.valueOf()?[r.TRUE]:[r.FALSE]}deserializeStream(e){const t=new Uint8Array(e),n=t[0],a=t.slice(1);if(n===r.TRUE)return[new i(!0),a];if(n===r.FALSE)return[new i(!1),a];throw new o(n)}}},5980:function(e,t,n){const r=n(8707),i=n(1666),a=n(30),o=new(n(8766));e.exports=class extends i{serialize(e){return 0===e.length?[r.EMPTY_STRING]:e.length<64?[e.length<<2|r.SHORT_STRING,...e.valueOf()]:[r.LONG_STRING,...o.serialize(e.length-64),...e.valueOf()]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(n===r.EMPTY_STRING)return[new a,t.slice(1)];if(n===r.LONG_STRING){const[e,n]=o.deserializeStream(t.slice(1)),r=Number(e.valueOf())+64;return[new a(n.slice(0,r)),n.slice(r)]}const i=1+(n>>2);return[new a(t.slice(1,i)),t.slice(i)]}}},2664:function(e,t,n){const r=n(858),i=n(1666),a=n(4323),{byteArray2Hex:o,byteArray2Int:s}=n(1247),c=n(7824),{FateTypeByteArray:u,FateTypeString:l,FateTypeMap:A}=n(3182),d={3:"immediate",2:"var",1:"arg",0:"stack"};e.exports=class extends i{constructor(e){super(e),this._typeSerializer=new a}deserialize(e){const t=r.decode(e,!0),n=r.decode(t.remainder,!0),i=r.decode(n.remainder),a=this.deserializeSymbols(n.data);return{functions:this.deserializeFunctions(t.data,a),symbols:a,annotations:this.deserializeAnnotations(i)}}deserializeFunctions(e,t){let n={},r=e;const i=[];for(;r.length;)[n,r]=this.deserializeFunction(r,t),i.push(n);return i}deserializeFunction(e,t){const n=e[0],r=o(e.slice(1,5));if(254!==n)throw new Error(`Wrong function prefix, expeted 0xfe got 0x${e[0].toString(16)}`);const i=t[r],[a,s]=this.deserializeAttributes(e.slice(5)),[c,u,l]=this.deserializeSignature(s),[A,d]=this.deserializeInstructions(l);return[{id:r,name:i,attributes:a,args:c,returnType:u,instructions:A},d]}deserializeInstructions(e){let t={},n=e;const r=[];let i=0,a=!1;for(;n.length&&254!==n[0];)void 0===r[i]&&(r[i]=[]),[t,n,a]=this.deserializeInstruction(n),r[i].push(t),a&&i++;return[r,n]}deserializeInstruction(e){const t=e[0],n=e.slice(1);if(!c.hasOwnProperty(t))throw new Error(`Unsupported opcode: 0x${t.toString(16)}`);const r=c[t],{mnemonic:i,end:a}=r;if(0===r.args)return[{mnemonic:i,args:[]},n,a];const[o,s]=this.deserializeArguments(n,r.args);return[{mnemonic:i,args:o},s,a]}deserializeArguments(e,t){const n=t<=4?1:2,r=e.subarray(0,n),i=e.slice(n),a=((e,t=1)=>{const n=[];let r=Number(s(e));for(let e=0;e<2*t;e+=2)n.push(3&r),r>>=2;if(0!==r)throw new Error(`Invalid argument modifier data. Unexpected padding: 0b${r.toString(2)}`);return n})(r,t),o=[];let c,u=i;return a.forEach((e=>{[c,u]=this.deserializeArgument(e,u),o.push(c)})),[o,u]}deserializeArgument(e,t){const n=d[e];if("stack"===n)return[{mod:n,arg:0},t];const[r,i]=this.globalSerializer.deserializeStream(t);return[{mod:n,arg:r.valueOf()},i]}deserializeSignature(e){const[t,n]=this._typeSerializer.deserializeStream(e),[r,i]=this._typeSerializer.deserializeStream(n);return[t,r,i]}deserializeAttributes(e){const[t,n]=this.globalSerializer.deserializeStream(e),r=Number(t.valueOf()),i=[];return 1&r&&i.push("private"),2&r&&i.push("payable"),[i,n]}deserializeSymbols(e){const t=A(u(),l()),n=this.globalSerializer.deserializeWithType(e,t).valueOf(),r={};return n.forEach(((e,t)=>{const n=o(t);r[n]=e})),r}deserializeAnnotations(e){return this.globalSerializer.deserialize(e).valueOf()}}},7596:function(e,t,n){const r=n(8707),i=n(5980),a=n(1794),o=n(1666),s=new i;e.exports=class extends o{serialize(e){return[r.OBJECT,r.OTYPE_BYTES,...s.serialize(e.value)]}deserializeStream(e){const t=new Uint8Array(e),[n,r]=s.deserializeStream(t.slice(2));return[new a(n.valueOf()),r]}}},8003:function(e,t,n){const r=n(4899),i=n(3585),a=n(30),o=n(1666),{FateTypeTuple:s,FateTypeByteArray:c}=n(3182);e.exports=class extends o{serialize(e){const t=new a(e.functionId),n=new r(e.argTypes,e.args),i=new r([t.type,n.type],[t,n]);return this.globalSerializer.serialize(i)}deserialize(e,t){const n=s([c(),s(t.argumentTypes)]),[r]=this.globalSerializer.deserializeStream(e,n),[a,o]=r.items;return new i(a.valueOf(),o.valueTypes,o.items)}}},284:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),o=n(9216);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_CHANNEL,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new o(n.data),new Uint8Array(n.remainder)]}}},1849:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),o=n(8767);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_CONTRACT,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new o(n.data),new Uint8Array(n.remainder)]}}},8766:function(e,t,n){const r=n(8707),i=n(6128),a=n(9512),o=n(1666),s=n(3541),c=n(1351);e.exports=class extends o{serialize(e){const t=e instanceof a?e.value:BigInt(e),n=c(t);if(n<64){const e=Number(n);return t>=0?[e<<1]:[254&(128|e<<1)]}return t<0?[r.NEG_BIG_INT,...i.encode(n-64n)]:[r.POS_BIG_INT,...i.encode(n-64n)]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(0==(1&n))return 0==(128&n)?[new a(n>>1),t.slice(1)]:[new a(-((126&n)>>1)),t.slice(1)];if(n===r.POS_BIG_INT||n===r.NEG_BIG_INT){const e=n===r.POS_BIG_INT?1n:-1n,[o,s]=i.decode(t.slice(1));return[new a((o+64n)*e),new Uint8Array(s)]}throw new s(n)}}},5411:function(e,t,n){const r=n(6128),i=n(8707),a=n(889),o=n(1666);e.exports=class extends o{serialize(e){const t=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0),n=e.items.length;return n<16?[n<<4|i.SHORT_LIST,...t]:[i.LONG_LIST,...r.encode(n-16),...t]}deserializeStream(e,t){const n=new Uint8Array(e),o=n[0];let s,c,u=0n,l=n.slice(1);o===i.LONG_LIST&&([u,l]=r.decode(n.slice(1)),u+=16n),(15&o)===i.SHORT_LIST&&(u=BigInt((240&o)>>4)),void 0!==t&&(s=t.valuesType);const A=[];for(let e=0n;e<u;e++)[c,l]=this.globalSerializer.deserializeStream(l,s),A.push(c);return 0n===u?[new a,l]:(void 0===t&&(s=A[0].type),[new a(s,A),l])}}},1885:function(e,t,n){const r=n(8707),i=n(6128),a=n(1666),o=n(5167),s=n(5603),c=n(3541);e.exports=class extends a{serialize(e){const t=e.length,n=o(e.keyType),a=[...e.items];a.sort(((e,t)=>n(e.key,t.key)));const s=a.map((e=>[this.globalSerializer.serialize(e.key),this.globalSerializer.serialize(e.value)]));return[r.MAP,...i.encode(t),...s.flat(1/0)]}deserializeStream(e,t){const n=new Uint8Array(e),a=n[0];if(a!==r.MAP)throw new c(a);const[o,u]=i.decode(n.slice(1));let l,A,d=u;if(0n===o)return[new s,d];void 0!==t&&({keyType:l,valueType:A}=t);const p=[];for(let e=0n;e<o;e++){const[e,t]=this.globalSerializer.deserializeStream(d,l),[n,r]=this.globalSerializer.deserializeStream(t,A);p.push([e,n]),d=r}const m=p[0];return void 0===t&&(l=m[0].type,A=m[1].type),[new s(l,A,p),d]}}},4157:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),o=n(3131);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ORACLE_QUERY,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new o(n.data),new Uint8Array(n.remainder)]}}},5945:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),o=n(9511);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ORACLE,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new o(n.data),new Uint8Array(n.remainder)]}}},6291:function(e,t,n){const r=n(1666),{FateTypeTuple:i,FateTypeMap:a}=n(3182),o=n(5603),s=n(4899),c=n(5981);e.exports=class extends r{serialize(e){return this.globalSerializer.serialize(new o(e.itemsType,i(),e.items.map((e=>[e,new s]))))}deserializeStream(e,t){const n=a(t.valuesType,i()),[r,o]=this.globalSerializer.deserializeStream(e,n);return[new c(t.valuesType,r.keys),o]}}},8566:function(e,t,n){const r=n(8707),i=n(1666),a=n(5980),o=n(2280),s=n(3541),c=new a;e.exports=class extends i{serialize(e){const t=(new TextEncoder).encode(e);return c.serialize(t)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if((3&n)!==r.SHORT_STRING&&![r.EMPTY_STRING,r.LONG_STRING].includes(n))throw new s(n);const i=new TextDecoder,[a,u]=c.deserializeStream(t);return[new o(i.decode(a.valueOf())),u]}}},2021:function(e,t,n){const r=n(8707),i=n(4899),a=n(1666),o=n(6128);e.exports=class extends a{serialize(e){const t=e.size;if(0===t)return[r.EMPTY_TUPLE];const n=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0);return t<16?[t<<4|r.SHORT_TUPLE,...n]:[r.LONG_TUPLE,...o.encode(t-16),...n]}deserializeStream(e,t){const n=new Uint8Array(e),a=n[0];let s=0n,c=n.slice(1);if(a===r.EMPTY_TUPLE)return[new i,c];(15&a)===r.SHORT_TUPLE&&(s=(240&a)>>4),a===r.LONG_TUPLE&&([s,c]=o.decode(n.slice(1)),s+=16n);let u=[];void 0!==t&&(u=t.valueTypes);const l=[];let A=null;for(let e=0n;e<s;e++)[A,c]=this.globalSerializer.deserializeStream(c,u[e]),l.push(A);let d=t;return void 0===t&&(d=l.map((e=>e.type))),[new i(d,l),c]}}},4323:function(e,t,n){const r=n(8707),i=n(1666),a=n(8766),o=n(3541),{FateTypeInt:s,FateTypeBool:c,FateTypeString:u,FateTypeBits:l,FateTypeBytes:A,FateTypeAccountAddress:d,FateTypeContractAddress:p,FateTypeOracleAddress:m,FateTypeOracleQueryAddress:h,FateTypeChannelAddress:g,FateTypeList:f,FateTypeMap:y,FateTypeTuple:C,FateTypeVariant:I,FateTypeVar:w,FateTypeAny:E}=n(3182),B={[r.TYPE_INTEGER]:s(),[r.TYPE_BOOLEAN]:c(),[r.TYPE_BITS]:l(),[r.TYPE_STRING]:u(),[r.TYPE_ANY]:E()},N={[r.OTYPE_ADDRESS]:d(),[r.OTYPE_CONTRACT]:p(),[r.OTYPE_ORACLE]:m(),[r.OTYPE_ORACLE_QUERY]:h(),[r.OTYPE_CHANNEL]:g()};e.exports=class extends i{constructor(e){super(e),this._intSerializer=new a}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(B.hasOwnProperty(n))return[B[n],t.slice(1)];if(n===r.TYPE_OBJECT){const e=t[1];if(!N.hasOwnProperty(e))throw new o(e,"Unsupported object type");return[N[e],t.slice(2)]}if(n===r.TYPE_VAR)return[w(t[1]),t.slice(2)];if(n===r.TYPE_BYTES){const[e,n]=this._intSerializer.deserializeStream(t.slice(1));return[A(e.valueOf()),n]}if(n===r.TYPE_LIST){const[e,n]=this.deserializeStream(t.slice(1));return[f(e),n]}if(n===r.TYPE_MAP){const[e,n]=this.deserializeStream(t.slice(1)),[r,i]=this.deserializeStream(n);return[y(e,r),i]}if(n===r.TYPE_TUPLE){const e=t[1],n=[];let r,i=t.slice(2);for(let t=0;t<e;t++)[r,i]=this.deserializeStream(i),n.push(r);return[C(n),i]}if(n===r.TYPE_VARIANT){const e=t[1],n=[];let r,i=t.slice(2);for(let t=0;t<e;t++)[r,i]=this.deserializeStream(i),n.push(r);return[I(n),i]}throw new o(n)}}},8950:function(e,t,n){const r=n(858),i=n(8707),a=n(4899),o=n(9560),{FateTypeTuple:s}=n(3182),c=n(1666);e.exports=class extends c{serialize(e){const t=new a(e.valueTypes,e.value);return[i.VARIANT,...r.encode(new Uint8Array(e.arities)),e.tag,...this.globalSerializer.serialize(t)]}deserializeStream(e,t){const n=new Uint8Array(e),i=r.decode(n.slice(1),!0),a=[...i.data],c=i.remainder[0],u=i.remainder.slice(1);let l,A=[];void 0!==t&&void 0!==t.variants&&(A=t.variants,l=s(Object.values(A[c])[0]));const[d,p]=this.globalSerializer.deserializeStream(u,l);return[new o(a,c,d.items,d.valueTypes,A),p]}}},9737:function(e,t,n){const r=n(4779),i=n(1666);e.exports=class extends i{serialize(){return""}deserialize(){return new r}deserializeStream(e){return[new r,e]}}},9291:function(e,t,n){const r=n(6949),i=n(8707),a=n(3541),{FateTypeInt:o,FateTypeBool:s,FateTypeString:c,FateTypeBits:u,FateTypeBytes:l,FateTypeAccountAddress:A,FateTypeContractAddress:d,FateTypeOracleAddress:p,FateTypeOracleQueryAddress:m,FateTypeChannelAddress:h,FateTypeList:g,FateTypeMap:f,FateTypeTuple:y,FateTypeVariant:C,FateTypeType:I}=n(3182),w={[i.OTYPE_ADDRESS]:A(),[i.OTYPE_BYTES]:l(),[i.OTYPE_CONTRACT]:d(),[i.OTYPE_ORACLE]:p(),[i.OTYPE_ORACLE_QUERY]:m(),[i.OTYPE_CHANNEL]:h()};e.exports=class{createType(e){const t=e[0];if(t===i.TRUE||t===i.FALSE)return s();if((1&t)===i.SMALL_INT||t===i.POS_BIG_INT||t===i.NEG_BIG_INT)return o();if((3&t)===i.SHORT_STRING||t===i.LONG_STRING||t===i.EMPTY_STRING)return c();if((15&t)===i.SHORT_LIST||t===i.LONG_LIST)return g();if((15&t)===i.SHORT_TUPLE||t===i.LONG_TUPLE||t===i.EMPTY_TUPLE)return y();if(t===i.MAP||t===i.EMPTY_MAP)return f();if(t===i.POS_BITS||t===i.NEG_BITS)return u();if(t===i.VARIANT)return C();if(t===i.OBJECT){const t=e[1];return r(w.hasOwnProperty(t),`Unsupported object type "${t}"`),w[t]}if(t===i.TYPE_INTEGER||t===i.TYPE_BOOLEAN||t===i.TYPE_LIST||t===i.TYPE_TUPLE||t===i.TYPE_OBJECT||t===i.TYPE_BITS||t===i.TYPE_MAP||t===i.TYPE_STRING||t===i.TYPE_VARIANT||t===i.TYPE_BYTES||t===i.TYPE_CONTRACT_BYTEARRAY||t===i.TYPE_VAR||t===i.TYPE_ANY)return I();throw new a(t)}}},7815:function(e,t,n){const r=n(4495),{FateTypeVoid:i,FateTypeInt:a,FateTypeBool:o,FateTypeString:s,FateTypeBits:c,FateTypeBytes:u,FateTypeHash:l,FateTypeSignature:A,FateTypeAccountAddress:d,FateTypeContractAddress:p,FateTypeOracleAddress:m,FateTypeOracleQueryAddress:h,FateTypeList:g,FateTypeMap:f,FateTypeTuple:y,FateTypeRecord:C,FateTypeSet:I,FateTypeVariant:w,FateTypeOption:E,FateTypeChainTTL:B,FateTypeChainGAMetaTx:N,FateTypeChainPayingForTx:b,FateTypeChainBaseTx:v,FateTypeAENSPointee:S,FateTypeAENSv2Pointee:T,FateTypeAENSName:x,FateTypeAENSv2Name:_,FateTypeBls12381Fr:Q,FateTypeBls12381Fp:P}=n(3182);e.exports=class{isCustomType(){return!1}resolveTypeDef(e,t){return[e,t]}resolveValueTypes(e,t){return Array.isArray(e)?e.map((e=>{const n=e.hasOwnProperty("type")?e.type:e,r=t.hasOwnProperty(n)?t[n]:n;return this.resolveType(r,t)})):[]}resolveType(e,t={}){let n=e,w=[],z=[];var R;if((R=e)&&"object"==typeof R&&R.constructor===Object&&([[n,w]]=Object.entries(e)),this.isCustomType(n)){const[e,t]=this.resolveTypeDef(n,w);return this.resolveType(e,t)}if("variant"!==n&&(z=this.resolveValueTypes(w,t)),"void"===n)return i();if("unit"===n)return y([]);if("int"===n)return a();if("bool"===n)return o();if("string"===n)return s();if("bits"===n)return c();if("hash"===n)return l();if("signature"===n)return A();if("address"===n)return d();if("contract_pubkey"===n)return p();if("Chain.ttl"===n)return B();if("Chain.ga_meta_tx"===n)return N();if("Chain.paying_for_tx"===n)return b();if("Chain.base_tx"===n)return v();if("AENS.pointee"===n)return S();if("AENSv2.pointee"===n)return T();if("AENS.name"===n)return x();if("AENSv2.name"===n)return _();if("Set.set"===n)return I(...z);if("MCL_BLS12_381.fr"===n)return Q();if("MCL_BLS12_381.fp"===n)return P();if("bytes"===n)return u("any"===w?void 0:w);if("list"===n)return g(...z);if("map"===n)return f(...z);if(("tuple"===n||"record"===n)&&1===z.length)return z[0];if("tuple"===n)return y(z);if("record"===n){const e=w.map((e=>e.name));return C(e,z)}if("variant"===n)return this.resolveVariant(w,t);if("option"===n)return E(z);if("oracle"===n)return m(...z);if("oracle_query"===n)return h(...z);throw new r("Cannot resolve type: "+JSON.stringify(e))}resolveVariant(e,t){const n=e.map((e=>{const[[n,r]]=Object.entries(e);return{[n]:r.map((e=>{const n=t.hasOwnProperty(e)?t[e]:e;return this.resolveType(n,t)}))}}));return w(n)}}},5711:function(e,t,n){const r=n(9226);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encodeCall(e,t,n){return this._internalEncoder.encodeCall(e,t,n)}decodeCall(e,t,n){return this._internalEncoder.decodeCall(e,t,n)}decodeResult(e,t,n,r="ok"){return this._internalEncoder.decodeResult(e,t,n,r)}decodeEvent(e,t,n){return this._internalEncoder.decodeEvent(e,t,n)}}},1877:function(e,t,n){const r=n(146);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encodeCall(e,t){return this._internalEncoder.encodeCall(e,t)}decodeCall(e){return this._internalEncoder.decodeCall(e)}decodeResult(e,t="ok"){return this._internalEncoder.decodeResult(e,t)}}},4747:function(e,t,n){const r=n(9986);e.exports=class{constructor(){this._internalEncoder=new r}encodeWithType(e,t){return this._internalEncoder.encode(t,e)}decode(e){return this._internalEncoder.decode(e)}decodeWithType(e,t){return this._internalEncoder.decodeWithType(e,t)}}},9316:function(e,t,n){const r=n(9479);e.exports=class{constructor(){this._internalEncoder=new r}decode(e){return this._internalEncoder.decode(e)}}},3442:function(e,t,n){const r=n(4841);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encode(e,t,n){return this._internalEncoder.encode(e,t,n)}decode(e,t,n){return this._internalEncoder.decode(e,t,n)}decodeContractByteArray(e){return this._internalEncoder.decodeContractByteArray(e)}decodeString(e){return this._internalEncoder.decodeString(e)}decodeFateString(e){return this._internalEncoder.decodeFateString(e)}decodeEvent(e,t,n){return this._internalEncoder.decodeEvent(e,t,n)}}},6278:function(e,t,n){const r=n(9101);e.exports=class{constructor(){this._internalEncoder=new r}encode(e,t){return this._internalEncoder.encode(e,t)}decode(e){return this._internalEncoder.decode(e)}}},9102:function(e,t,n){const r=n(7815);e.exports=class{constructor(){this._internalResolver=new r}resolveType(e,t={}){return this._internalResolver.resolveType(e,t)}}},6176:function(e,t,n){const r=n(3442),i=n(5711),a=n(1877),o=n(4747),s=n(6278),c=n(9316),u=n(9102);e.exports={Encoder:r,AciContractCallEncoder:i,BytecodeContractCallEncoder:a,ContractByteArrayEncoder:o,FateApiEncoder:s,ContractEncoder:c,TypeResolver:u}},9640:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"account_pubkey","ak")}}},3533:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e,t,n){super(e,32,t),this._prefix=n}get prefix(){return this._prefix}accept(e){return e.visitAddress(this)}}},2325:function(e,t,n){const r=n(8517);e.exports=class extends r{constructor(e){super("bits"),this._value=BigInt(e)}get value(){return this._value}valueOf(){return this._value}}},6859:function(e,t,n){const r=n(8517),i=n(5345);e.exports=class extends r{constructor(e,t,n){if(super(n),!Array.isArray(e)&&!ArrayBuffer.isView(e))throw new i(n,`Should be one of: Array or ArrayBuffer; got ${e} instead`);const r=new Uint8Array(e);if(r.byteLength!==t)throw new i(n,`Invalid length: got ${r.byteLength} bytes instead of ${t} bytes`);this._value=r,this._size=t}get value(){return this._value}get size(){return this._size}valueOf(){return this._value}}},4537:function(e,t,n){const r=n(6859),{FateTypeBls12381Fp:i}=n(3182);e.exports=class extends r{constructor(e){super(e,48,"bls12_381.fp")}get type(){return i()}accept(e){return e.visitBls12381Fp(this)}}},1047:function(e,t,n){const r=n(6859),{FateTypeBls12381Fr:i}=n(3182);e.exports=class extends r{constructor(e){super(e,32,"bls12_381.fr")}get type(){return i()}accept(e){return e.visitBls12381Fr(this)}}},6465:function(e,t,n){const r=n(8517),{FateTypeBool:i}=n(3182);e.exports=class extends r{constructor(e){super("bool"),this._value=!!e}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},30:function(e,t,n){const r=n(8517),{FateTypeByteArray:i}=n(3182);e.exports=class extends r{constructor(e=[]){super("byte_array"),this._value=new Uint8Array(e)}get length(){return this._value.length}get type(){return i()}valueOf(){return this._value}}},1794:function(e,t,n){const r=n(8517),{int2ByteArray:i}=n(1247),a=n(6423),o=n(5345);e.exports=class extends r{constructor(e,t,n="bytes"){if(super(n),this._value=((e,t=0)=>{if(Array.isArray(e)||ArrayBuffer.isView(e))return new Uint8Array(e);if("string"==typeof e)return a(e);if("bigint"!=typeof e&&!Number.isInteger(e))throw new o("byte_array",`Should be one of: Array, ArrayBuffer, hex string, Number, BigInt; got ${e} instead`);const n=i(e);if(n.length>=t)return n;const r=new Uint8Array(t);return r.set(n,t-n.length),r})(e,t),t&&this._value.byteLength!==t)throw new o(n,`Invalid length: got ${this._value.byteLength} bytes instead of ${t} bytes`);this._size=t}get value(){return this._value}get size(){return this._size}valueOf(){return this._value}}},3585:function(e,t,n){const r=n(8517);e.exports=class extends r{constructor(e,t,n){super("calldata"),this._functionId=new Uint8Array(e),this._argTypes=t,this._args=n}get functionId(){return this._functionId}get argTypes(){return this._argTypes}get args(){return this._args}valueOf(){return{functionId:this._functionId,args:this._args}}accept(e){return e.visitCalldata(this)}}},9216:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"channel","ch")}}},8767:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"contract_pubkey","ct")}}},8517:function(e,t,n){const r=n(9520);e.exports=class{constructor(e){this.name=e}valueOf(){throw new r("Not implemented.")}accept(e){return e.visitData(this)}}},1649:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e){super(e,32,"hash")}}},9512:function(e,t,n){const r=n(8517),{FateTypeInt:i}=n(3182);e.exports=class extends r{constructor(e){super("int"),this._value=BigInt(e)}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},889:function(e,t,n){const r=n(8517),{FateTypeList:i}=n(3182);e.exports=class extends r{constructor(e,t=[]){super("list"),this._itemsType=e,this.items=Array.from(t)}get itemsType(){return this._itemsType}get type(){return i(this.itemsType)}get length(){return this.items.length}valueOf(){return this.items.map((e=>e.valueOf()))}accept(e){return e.visitList(this)}}},5603:function(e,t,n){const r=n(8517),{FateTypeMap:i}=n(3182),a=e=>{const[t,n]=e;return{key:t,value:n}};e.exports=class extends r{constructor(e,t,n=[]){super("map"),this._keyType=e,this._valueType=t,this._type=i(e,t),this._value=new Map(n)}get items(){return[...this._value.entries()].map(a)}get keyType(){return this._keyType}get valueType(){return this._valueType}get type(){return this._type}get length(){return this._value.size}get iterator(){return this._value[Symbol.iterator]()}get keys(){return this._value.keys()}valueOf(){const e=new Map;for(const[t,n]of this.iterator)e.set(t.valueOf(),n.valueOf());return e}accept(e){return e.visitMap(this)}}},9511:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"oracle_pubkey","ok")}}},3131:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"oracle_query_id","oq")}}},5981:function(e,t,n){const r=n(8517),{FateTypeSet:i}=n(3182);e.exports=class extends r{constructor(e,t=[]){super("set"),this._itemsType=e,this._items=new Set(t)}get items(){return Array.from(this._items.values())}get itemsType(){return this._itemsType}get type(){return i(this.itemsType)}get length(){return this._items.size}valueOf(){return new Set(this.items.map((e=>e.valueOf())))}accept(e){return e.visitSet(this)}}},1143:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e){super(e,64,"signature")}}},2280:function(e,t,n){const r=n(8517),{FateTypeString:i}=n(3182);e.exports=class extends r{constructor(e){var t;super("string"),this._value=(t=e)instanceof Uint8Array?(new TextDecoder).decode(t):t.toString()}get type(){return i()}toString(){return this._value}valueOf(){return this._value}}},4899:function(e,t,n){const r=n(8517),{FateTypeTuple:i}=n(3182);e.exports=class extends r{constructor(e=[],t=[]){super("tuple"),this._valueTypes=e.hasOwnProperty("valueTypes")?e.valueTypes:e,this._type=Array.isArray(e)?i(e):e,this._items=Array.from(t)}get valueTypes(){return this._valueTypes}get type(){return this._type}get size(){return this._items.length}get items(){return this._items}valueOf(){return this.prepareItems((e=>e.valueOf()))}prepareItems(e){const t=this._items.map(e);return"record"===this._type.name?(n=this._type.keys,r=t,n.reduce(((e,t,n)=>(e[t]=r[n],e)),{})):t;var n,r}accept(e){return e.visitTuple(this)}}},9560:function(e,t,n){const r=n(8517),{FateTypeVariant:i,FateTypeTuple:a,FateTypeInt:o}=n(3182);e.exports=class extends r{constructor(e,t,n=[],r=[],a=[]){super("variant"),this.arities=Array.from(e),this._tag=t,this._value=n,this._valueTypes=r,this._type=i(a)}get valueTypes(){return this._valueTypes}get type(){return this._type}get tag(){return this._tag}get value(){return this._value}get aritiesType(){return o()}get variantType(){return a(this._valueTypes)}get variants(){return this._type.variants}get variantName(){if(0===this.variants.length)return this.tag;const e=this.variants[this.tag];return Object.keys(e)[0]}valueOf(){if(0===this.variants.length)return this;const e=this._value.map((e=>e.valueOf()));return{[this.variantName]:e}}accept(e){return e.visitVariant(this)}}},4779:function(e,t,n){const r=n(8517),{FateTypeVoid:i}=n(3182);e.exports=class extends r{constructor(){super("void"),this._value=void 0}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},6128:function(e,t,n){const r=n(858),{int2ByteArray:i,byteArray2Int:a}=n(1247);e.exports={encode(e){return new Uint8Array(r.encode(i(e)))},decode(e){const t=r.decode(e,!0);return[a(t.data),t.remainder]}}},1351:function(e){e.exports=e=>e>0?e:-1n*e},6949:function(e,t,n){const r=n(9520);e.exports=(e,t)=>{if(!e)throw new r(t)}},6911:function(e,t,n){const r=n(6763),{addChecksum:i,getPayload:a}=n(2122);e.exports={encode:e=>r.encode(i(e)),decode:e=>a(r.decode(e))}},2122:function(e,t,n){const r=n(4107),{Buffer:i}=n(2861),a=n(5450),o=e=>(new r).update(e).digest(),s=e=>o(o(e)).slice(0,4),c=e=>{const t=i.from(e),n=s(e);return i.concat([t,n],t.length+4)},u=e=>{const t=i.from(e),n=t.slice(0,-4),r=t.slice(-4),o=s(n);if(!r.equals(o))throw new a("Invalid checksum");return new Uint8Array(n)};e.exports={addChecksum:c,getPayload:u,encode:e=>c(e).toString("base64"),decode:e=>{const t=i.from(e,"base64");return u(t)}}},2041:function(e,t,n){const{int2ByteArray:r,byteArray2IntBE:i}=n(1247),a={r:{R:1n<<256n,N:0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001n},p:{R:1n<<384n,N:0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn}},o=(e,t)=>{if(0n===t)return[1n,0n,e];const[n,r,i]=o(t,e%t);return[r,n-r*(e/t),i]};e.exports={int2MontBytes:(e,t)=>{const n=a[t],i=BigInt(e)*n.R%n.N;return r(i)},montBytes2Int:(e,t)=>{const n=a[t],r=i(e),s=((e,t)=>{const[n,r,i]=o(e,t);return(n+t)%t})(n.R,n.N);return r*s%n.N}}},7439:function(e,t,n){const r=n(4156),i=e=>Array.from(r.blake2b(e,null,32));e.exports={hash:i,symbolIdentifier:e=>i(e).slice(0,4)}},6423:function(e,t,n){const r=n(5450);e.exports=e=>{const t=e.match(/^(0x)?([a-f0-9]*)$/i);if(!t)throw new r(`Invalid hex string: ${e}`);return new Uint8Array(t[2].split(/(.{1,2})/).filter((e=>e)).map((e=>parseInt(e,16))))}},1247:function(e){const t=e=>{const n=BigInt(e);return n<256n?new Uint8Array([Number(n)]):new Uint8Array([...t(n>>8n),Number(0xffn&n)])},n=e=>[...e].map((e=>e.toString(16).padStart(2,"0")));e.exports={int2ByteArray:t,byteArray2Int:e=>{const t=n(e);return BigInt("0x"+t.join(""))},byteArray2IntBE:e=>{const t=n(e).reverse();return BigInt("0x"+t.join(""))},byteArray2Hex:e=>n(e).join("")}},7412:function(e){e.exports=(e,...t)=>e.map(((e,n)=>t.reduce(((e,t)=>[...e,t[n]]),[e])))},9424:function(e,t,n){var r=n(8287).Buffer;e.exports=(()=>{var e={721:function(e,t){e.exports="AGFzbQEAAAABkwESYAF/AX9gA39/fwF/YAJ/fwBgAn9/AX9gAX8AYAR/f39/AX9gA39/fwBgBH9/f38AYAJ/fgBgAn5/AX5gAn5+AX5gBX9/f39/AGAAAGAGf3x/f39/AX9gCH9/f39/f39/AX9gEX9/f39/f39/f39/f39/f39/AX9gBn9/f39/fwF/YA1/f39/f39/f39/f39/AX8CDQIBYQFhAAABYQFiAAEDPTwJCgECAQIEAAABAAsGAAEHAQIAAwICAwIIAAIDAAcMAwYABQAEBgAABQUAAQECBAEBCAABDg8EEAAFEQMEBQFwAQMDBQcBAYAC//8BBgkBfwFBoKLAAgsHMQwBYwIAAWQAIAFlADwBZgAJAWcACAFoADsBaQA6AWoAOQFrAQABbAA3AW0ANgFuADQJCAEAQQELAgs1CoeyATwIACAAIAGtigseACAAIAF8IABCAYZC/v///x+DIAFC/////w+DfnwLgQQBA38gAkGABE8EQCAAIAEgAhABGiAADwsgACACaiEDAkAgACABc0EDcUUEQAJAIABBA3FFBEAgACECDAELIAJFBEAgACECDAELIAAhAgNAIAIgAS0AADoAACABQQFqIQEgAkEBaiICQQNxRQ0BIAIgA0kNAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgACADQQRrIgRLBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsZAAJAIABFDQBB8BwoAgBF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dGogB0EKdGohByABIAhBCnRqIQkCQCADKAIEQRBGBEAgASACQQp0aiAHIAlBABARDAELIAEgAkEKdGohASAEKAIARQRAIAEgByAJQQAQEQwBCyABIAcgCUEBEBELIApBAWoiCiADKAIQTw0BIAhBAWohCCACQQFqIQEgAygCFCECDAALAAsgBkGAGGokACADKAIYIgUhAiAMQQFqIgwgBUkNAAsLIAIhASALQQFqIgtBBEcNAAsgDUEBaiINIAMoAghJDQALCyAEQSBqJABBACEBCyABIgINACMAQYAQayIBJAAgAEUgA0VyRQRAIAFBgAhqIAMoAgAgAygCFEEKdGpBgAhrEBcgAygCGEECTwRAQQEhAgNAIAFBgAhqIAMoAgAgAygCFCIEIAIgBGxqQQp0akGACGsQFiACQQFqIgIgAygCGEkNAAsLIAFBgAhqIQRBACECA0AgASACQQN0IgVqIAQgBWopAwAQMyACQQFqIgJBgAFHDQALIAAoAgAgACgCBCABQYAIEB8gBEGACBAFIAFBgAgQBSADKAIAIgIgAygCDEEKdCIEEAUCQCAAKAJAIgAEQCACIAQgABECAAwBCyACEAgLCyABQYAQaiQAQQAhAgsgA0EwaiQAIAILJwEBfwJAAkACQAJAIAAOAwABAgMLQdATDwtBixEPC0GeEyEBCyABC48DAQF/IwBBgANrIgQkACAEQQA2AowBIARBjAFqIAEQBwJAIAFBwABNBEAgBEGQAWogARAYQQBIDQEgBEGQAWogBEGMAWpBBBAGQQBIDQEgBEGQAWogAiADEAZBAEgNASAEQZABaiAAIAEQEhoMAQsgBEGQAWpBwAAQGEEASA0AIARBkAFqIARBjAFqQQQQBkEASA0AIARBkAFqIAIgAxAGQQBIDQAgBEGQAWogBEFAa0HAABASQQBIDQAgACAEKQNANwAAIAAgBCkDSDcACCAAIAQpA1g3ABggACAEKQNQNwAQIABBIGohACABQSBrIgJBwQBPBEADQCAEIARBQGtBwAAQBCIBQUBrQcAAIAEQMkEASA0CIAAgASkDQDcAACAAIAEpA0g3AAggACAEKQNYNwAYIAAgBCkDUDcAECAAQSBqIQAgAkEgayICQcAASw0ACwsgBCAEQUBrQcAAEAQiAUFAayACIAEQMkEASA0AIAAgAUFAayACEAQaCyAEQZABakHwARAFIARBgANqJAALEwBBjB5BnB02AgBBxB1BKjYCAAuXAgAgAEUEQEEADwsCfwJAIAAEfyABQf8ATQ0BAkBBjB4oAgAoAgBFBEAgAUGAf3FBgL8DRg0DDAELIAFB/w9NBEAgACABQT9xQYABcjoAASAAIAFBBnZBwAFyOgAAQQIMBAsgAUGAQHFBgMADRyABQYCwA09xRQRAIAAgAUE/cUGAAXI6AAIgACABQQx2QeABcjoAACAAIAFBBnZBP3FBgAFyOgABQQMMBAsgAUGAgARrQf//P00EQCAAIAFBP3FBgAFyOgADIAAgAUESdkHwAXI6AAAgACABQQZ2QT9xQYABcjoAAiAAIAFBDHZBP3FBgAFyOgABQQQMBAsLQfgcQRk2AgBBfwVBAQsMAQsgACABOgAAQQELC7wCAAJAAkACQAJAAkACQAJAAkACQAJAAkAgAUEJaw4SAAgJCggJAQIDBAoJCgoICQUGBwsgAiACKAIAIgFBBGo2AgAgACABKAIANgIADwsgAiACKAIAIgFBBGo2AgAgACABMgEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMwEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMAAANwMADwsgAiACKAIAIgFBBGo2AgAgACABMQAANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKwMAOQMADwsgACACQQARAgALDwsgAiACKAIAIgFBBGo2AgAgACABNAIANwMADwsgAiACKAIAIgFBBGo2AgAgACABNQIANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKQMANwMAC2sBBH8gACgCACwAABAPRQRAQQAPCwNAIAAoAgAhA0F/IQEgAkHMmbPmAE0EQEF/IAMsAABBMGsiBCACQQpsIgFqIARB/////wcgAWtKGyEBCyAAIANBAWo2AgAgASECIAMsAAEQDw0ACyABC40VAhJ/An4jAEHQAGsiBSQAIAVByg42AkwgBUE3aiEUIAVBOGohEAJAAkACQAJAA0AgBEH/////ByAMa0oNASAEIAxqIQwgBSgCTCIJIQQCQAJAAkAgCS0AACIIBEADQAJAAkAgCEH/AXEiBkUEQCAEIQgMAQsgBkElRw0BIAQhCANAIAQtAAFBJUcNASAFIARBAmoiBjYC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b24yaQBUaGUgcGFzc3dvcmQgZG9lcyBub3QgbWF0Y2ggdGhlIHN1cHBsaWVkIGhhc2gAT3V0cHV0IHBvaW50ZXIgbWlzbWF0Y2gAT3V0cHV0IGlzIHRvbyBsb25nAFNhbHQgaXMgdG9vIGxvbmcAU2VjcmV0IGlzIHRvbyBsb25nAFBhc3N3b3JkIGlzIHRvbyBsb25nAEFzc29jaWF0ZWQgZGF0YSBpcyB0b28gbG9uZwBUaHJlYWRpbmcgZmFpbHVyZQBNZW1vcnkgY29zdCBpcyB0b28gbGFyZ2UAVGltZSBjb3N0IGlzIHRvbyBsYXJnZQBVbmtub3duIGVycm9yIGNvZGUAYXJnb24yaWQAQXJnb24yaWQARW5jb2RpbmcgZmFpbGVkAERlY29kaW5nIGZhaWxlZABhcmdvbjJkAEFyZ29uMmQAQXJnb24yX0NvbnRleHQgY29udGV4dCBpcyBOVUxMAE91dHB1dCBwb2ludGVyIGlzIE5VTEwAVGhlIGFsbG9jYXRlIG1lbW9yeSBjYWxsYmFjayBpcyBOVUxMAFRoZSBmcmVlIG1lbW9yeSBjYWxsYmFjayBpcyBOVUxMAE9LACR2PQAsdD0ALHA9ACRtPQBUaGVyZSBpcyBubyBzdWNoIHZlcnNpb24gb2YgQXJnb24yAFNhbHQgcG9pbnRlciBpcyBOVUxMLCBidXQgc2FsdCBsZW5ndGggaXMgbm90IDAAU2VjcmV0IHBvaW50ZXIgaXMgTlVMTCwgYnV0IHNlY3JldCBsZW5ndGggaXMgbm90IDAAUGFzc3dvcmQgcG9pbnRlciBpcyBOVUxMLCBidXQgcGFzc3dvcmQgbGVuZ3RoIGlzIG5vdCAwAEFzc29jaWF0ZWQgZGF0YSBwb2ludGVyIGlzIE5VTEwsIGJ1dCBhZCBsZW5ndGggaXMgbm90IDAAKG51bGwpAAAAmwgAALsHAABJCQAAwAkAALAJAADwBwAAHwgAADAIAADJCAAAbwoAAOAJAAAWCgAAOwoAAEMIAAArCwAAwQoAAJIKAAD0CgAAAggAABEIAABbCQAAWwgAAHQJAAB0CAAABQkAAHQHAAAtCQAAngcAAPQIAABiBwAAGAkAAIgHAADhCAAATgcAAP8JAABcCgAAAQAAABkACgAZGRkAAAAABQAAAAAAAAkAAAAACwAAAAAAAAAAGQARChkZGQMKBwABAAkLGAAACQYLAAALAAYZAAAAGRkZAEHRGAshDgAAAAAAAAAAGQAKDRkZGQANAAACAAkOAAAACQAOAAAOAEGLGQsBDABBlxkLFRMAAAAAEwAAAAAJDAAAAAAADAAADABBxRkLARAAQdEZCxUPAAAABA8AAAAACRAAAAAAABAAABAAQf8ZCwESAEGLGgseEQAAAAARAAAAAAkSAAAAAAASAAASAAAaAAAAGhoaAEHCGgsOGgAAABoaGgAAAAAAAAkAQfMaCwEUAEH/GgsVFwAAAAAXAAAAAAkUAAAAAAAUAAAUAEGtGwsBFgBBuRsLJxUAAAAAFQAAAAAJFgAAAAAAFgAAFgAAMDEyMzQ1Njc4OUFCQ0RFRgBBhBwLAQIAQawcCwj//////////wBB8BwLBwEAAAAgEVA="},477:(e,t,n)=>{e.exports=function(e){e=void 0!==(e=e||{})?e:{};var t,n,r=Object.assign,i=r({},e),a=[],o="object"==typeof window,s="function"==typeof importScripts,c="";(o||s)&&(s?c=self.location.href:"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s&&(n=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),t=(e,t,n)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)}),e.print||console.log.bind(console);var u,l,A=e.printErr||console.warn.bind(console);r(e,i),i=null,e.arguments&&(a=e.arguments),e.thisProgram&&e.thisProgram,e.quit&&e.quit,e.wasmBinary&&(u=e.wasmBinary),e.noExitRuntime,"object"!=typeof WebAssembly&&v("no native wasm support detected");var d,p,m=!1,h="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function g(t){d=t,e.HEAP8=new Int8Array(t),e.HEAP16=new Int16Array(t),e.HEAP32=new Int32Array(t),e.HEAPU8=p=new Uint8Array(t),e.HEAPU16=new Uint16Array(t),e.HEAPU32=new Uint32Array(t),e.HEAPF32=new Float32Array(t),e.HEAPF64=new Float64Array(t)}e.INITIAL_MEMORY;var f,y,C,I=[],w=[],E=[],B=0,N=null,b=null;function v(t){throw e.onAbort&&e.onAbort(t),A(t="Aborted("+t+")"),m=!0,t+=". Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(t)}function S(e){return e.startsWith("data:application/octet-stream;base64,")}function T(e){return e.startsWith("file://")}function x(e){try{if(e==y&&u)return new Uint8Array(u);if(n)return n(e);throw"both async and sync fetching of the wasm failed"}catch(e){v(e)}}function _(t){for(;t.length>0;){var n=t.shift();if("function"!=typeof n){var r=n.func;"number"==typeof r?void 0===n.arg?Q(r)():Q(r)(n.arg):r(void 0===n.arg?null:n.arg)}else n(e)}}function Q(e){return f.get(e)}function P(e){try{return l.grow(e-d.byteLength+65535>>>16),g(l.buffer),1}catch(e){}}e.preloadedImages={},e.preloadedAudios={},S(y="argon2.wasm")||(C=y,y=e.locateFile?e.locateFile(C,c):c+C);var z,R={b:function(e,t,n){p.copyWithin(e,t,t+n)},a:function(e){var t,n=p.length,r=2147418112;if((e>>>=0)>r)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,e+100663296),P(Math.min(r,((t=Math.max(e,a))%65536>0&&(t+=65536-t%65536),t))))return!0}return!1}},k=(function(){var n={a:R};function r(t,n){var r,i=t.exports;e.asm=i,g((l=e.asm.c).buffer),f=e.asm.k,r=e.asm.d,w.unshift(r),function(t){if(B--,e.monitorRunDependencies&&e.monitorRunDependencies(B),0==B&&(null!==N&&(clearInterval(N),N=null),b)){var n=b;b=null,n()}}()}function i(e){r(e.instance)}function a(e){return function(){if(!u&&(o||s)){if("function"==typeof fetch&&!T(y))return fetch(y,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+y+"'";return e.arrayBuffer()})).catch((function(){return x(y)}));if(t)return new Promise((function(e,n){t(y,(function(t){e(new Uint8Array(t))}),n)}))}return Promise.resolve().then((function(){return x(y)}))}().then((function(e){return WebAssembly.instantiate(e,n)})).then((function(e){return e})).then(e,(function(e){A("failed to asynchronously prepare wasm: "+e),v(e)}))}if(B++,e.monitorRunDependencies&&e.monitorRunDependencies(B),e.instantiateWasm)try{return e.instantiateWasm(n,r)}catch(e){return A("Module.instantiateWasm callback failed with error: "+e),!1}u||"function"!=typeof WebAssembly.instantiateStreaming||S(y)||T(y)||"function"!=typeof fetch?a(i):fetch(y,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,n).then(i,(function(e){return A("wasm streaming compile failed: "+e),A("falling back to ArrayBuffer instantiation"),a(i)}))}))}(),e.___wasm_call_ctors=function(){return(e.___wasm_call_ctors=e.asm.d).apply(null,arguments)},e._argon2_hash=function(){return(e._argon2_hash=e.asm.e).apply(null,arguments)},e._malloc=function(){return(k=e._malloc=e.asm.f).apply(null,arguments)}),O=(e._free=function(){return(e._free=e.asm.g).apply(null,arguments)},e._argon2_verify=function(){return(e._argon2_verify=e.asm.h).apply(null,arguments)},e._argon2_error_message=function(){return(e._argon2_error_message=e.asm.i).apply(null,arguments)},e._argon2_encodedlen=function(){return(e._argon2_encodedlen=e.asm.j).apply(null,arguments)},e._argon2_hash_ext=function(){return(e._argon2_hash_ext=e.asm.l).apply(null,arguments)},e._argon2_verify_ext=function(){return(e._argon2_verify_ext=e.asm.m).apply(null,arguments)},e.stackAlloc=function(){return(O=e.stackAlloc=e.asm.n).apply(null,arguments)});function M(t){function n(){z||(z=!0,e.calledRun=!0,m||(_(w),e.onRuntimeInitialized&&e.onRuntimeInitialized(),function(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)t=e.postRun.shift(),E.unshift(t);var t;_(E)}()))}t=t||a,B>0||(function(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)t=e.preRun.shift(),I.unshift(t);var t;_(I)}(),B>0||(e.setStatus?(e.setStatus("Running..."),setTimeout((function(){setTimeout((function(){e.setStatus("")}),1),n()}),1)):n()))}if(e.allocate=function(e,t){var n;return n=1==t?O(e.length):k(e.length),e.subarray||e.slice?p.set(e,n):p.set(new Uint8Array(e),n),n},e.UTF8ToString=function(e,t){return e?function(e,t,n){for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.subarray&&h)return h.decode(e.subarray(t,i));for(var a="";t<i;){var o=e[t++];if(128&o){var s=63&e[t++];if(192!=(224&o)){var c=63&e[t++];if((o=224==(240&o)?(15&o)<<12|s<<6|c:(7&o)<<18|s<<12|c<<6|63&e[t++])<65536)a+=String.fromCharCode(o);else{var u=o-65536;a+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else a+=String.fromCharCode((31&o)<<6|s)}else a+=String.fromCharCode(o)}return a}(p,e,t):""},e.ALLOC_NORMAL=0,b=function e(){z||M(),z||(b=e)},e.run=M,e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();return M(),e.unloadRuntime=function(){"undefined"!=typeof self&&delete self.Module,e=jsModule=l=f=d=p=void 0},e}},145:()=>{},967:()=>{}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.r(i),n.d(i,{ArgonType:()=>s,hash:()=>d,verify:()=>p,unloadRuntime:()=>m,default:()=>h});var e=n(477),t=n.n(e),a=n(721),o=n.n(a);const s={Argon2d:0,Argon2i:1,Argon2id:2};function c(e){if(c._promise)return c._promise;if(c._module)return Promise.resolve(c._module);let n;return n=function(){if("function"==typeof loadArgon2WasmBinary)return loadArgon2WasmBinary();const e=o();if(e)return Promise.resolve(function(e){if("function"==typeof r)return new Uint8Array(r.from(e,"base64"));const t=atob(e),n=new Uint8Array(new ArrayBuffer(t.length));for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}(e));const t="string"==typeof argon2WasmPath?argon2WasmPath:"node_modules/argon2-browser/dist/argon2.wasm";return fetch(t).then((e=>e.arrayBuffer())).then((e=>new Uint8Array(e)))}().then((n=>function(e){const n=t()(e);return new Promise((e=>{n.postRun=()=>e(n)}))}({wasmBinary:n,wasmMemory:e?function(e){const t=Math.min(Math.max(Math.ceil(1024*e/65536),256)+256,32767);return new WebAssembly.Memory({initial:t,maximum:32767})}(e):void 0}))),c._promise=n,n.then((e=>(c._module=e,delete c._promise,e)))}function u(e,t){return e.allocate(t,"i8",e.ALLOC_NORMAL)}function l(e,t){return u(e,new Uint8Array([...t,0]))}function A(e){if("string"!=typeof e)return e;if("function"==typeof TextEncoder)return(new TextEncoder).encode(e);if("function"==typeof r)return r.from(e);throw new Error("Don't know how to encode UTF8")}function d(e){const t=e.mem||1024;return c(t).then((n=>{const r=e.time||1,i=e.parallelism||1,a=A(e.pass),o=l(n,a),c=a.length,d=A(e.salt),p=l(n,d),m=d.length,h=e.type||s.Argon2d,g=n.allocate(new Array(e.hashLen||24),"i8",n.ALLOC_NORMAL),f=e.secret?u(n,e.secret):0,y=e.secret?e.secret.byteLength:0,C=e.ad?u(n,e.ad):0,I=e.ad?e.ad.byteLength:0,w=e.hashLen||24,E=n._argon2_encodedlen(r,t,i,m,w,h),B=n.allocate(new Array(E+1),"i8",n.ALLOC_NORMAL);let N,b,v;try{b=n._argon2_hash_ext(r,t,i,o,c,p,m,g,w,B,E,h,f,y,C,I,19)}catch(e){N=e}if(0!==b||N){try{N||(N=n.UTF8ToString(n._argon2_error_message(b)))}catch(e){}v={message:N,code:b}}else{let e="";const t=new Uint8Array(w);for(let r=0;r<w;r++){const i=n.HEAP8[g+r];t[r]=i,e+=("0"+(255&i).toString(16)).slice(-2)}v={hash:t,hashHex:e,encoded:n.UTF8ToString(B)}}try{n._free(o),n._free(p),n._free(g),n._free(B),C&&n._free(C),f&&n._free(f)}catch(e){}if(N)throw v;return v}))}function p(e){return c().then((t=>{const n=A(e.pass),r=l(t,n),i=n.length,a=e.secret?u(t,e.secret):0,o=e.secret?e.secret.byteLength:0,c=e.ad?u(t,e.ad):0,d=e.ad?e.ad.byteLength:0,p=l(t,A(e.encoded));let m,h,g,f=e.type;if(void 0===f){let t=e.encoded.split("$")[1];t&&(t=t.replace("a","A"),f=s[t]||s.Argon2d)}try{h=t._argon2_verify_ext(p,r,i,a,o,c,d,f)}catch(e){m=e}if(h||m){try{m||(m=t.UTF8ToString(t._argon2_error_message(h)))}catch(e){}g={message:m,code:h}}try{t._free(r),t._free(p)}catch(e){}if(m)throw g;return g}))}function m(){c._module&&(c._module.unloadRuntime(),delete c._promise,delete c._module)}const h={ArgonType:s,hash:d,verify:p,unloadRuntime:m}})(),i})()},8802:function(e,t,n){const{hash:r}=n(9424);t.xi=2,t.tW=function(e,t){return r({pass:e,hashLen:t.hashLength,salt:t.salt,time:t.timeCost,mem:t.memoryCost,type:t.type,...t}).then((({hash:e})=>e))}},3836:function(e){!function(t){"use strict";function n(e){return parseInt(e)===e}function r(e){if(!n(e.length))return!1;for(var t=0;t<e.length;t++)if(!n(e[t])||e[t]<0||e[t]>255)return!1;return!0}function i(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!r(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(n(e.length)&&r(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function a(e){return new Uint8Array(e)}function o(e,t,n,r,i){null==r&&null==i||(e=e.slice?e.slice(r,i):Array.prototype.slice.call(e,r,i)),t.set(e,n)}var s,c={toBytes:function(e){var t=[],n=0;for(e=encodeURI(e);n<e.length;){var r=e.charCodeAt(n++);37===r?(t.push(parseInt(e.substr(n,2),16)),n+=2):t.push(r)}return i(t)},fromBytes:function(e){for(var t=[],n=0;n<e.length;){var r=e[n];r<128?(t.push(String.fromCharCode(r)),n++):r>191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[n+1])),n+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return t.join("")}},u=(s="0123456789abcdef",{toBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},fromBytes:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(s[(240&r)>>4]+s[15&r])}return t.join("")}}),l={16:10,24:12,32:14},A=[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],d=[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],p=[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],m=[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],h=[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],g=[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],f=[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],y=[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],C=[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],I=[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],w=[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],E=[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],B=[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],N=[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],b=[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 v(e){for(var t=[],n=0;n<e.length;n+=4)t.push(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]);return t}var S=function(e){if(!(this instanceof S))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:i(e,!0)}),this._prepare()};S.prototype._prepare=function(){var e=l[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var n,r=4*(e+1),i=this.key.length/4,a=v(this.key);for(t=0;t<i;t++)n=t>>2,this._Ke[n][t%4]=a[t],this._Kd[e-n][t%4]=a[t];for(var o,s=0,c=i;c<r;){if(o=a[i-1],a[0]^=d[o>>16&255]<<24^d[o>>8&255]<<16^d[255&o]<<8^d[o>>24&255]^A[s]<<24,s+=1,8!=i)for(t=1;t<i;t++)a[t]^=a[t-1];else{for(t=1;t<i/2;t++)a[t]^=a[t-1];for(o=a[i/2-1],a[i/2]^=d[255&o]^d[o>>8&255]<<8^d[o>>16&255]<<16^d[o>>24&255]<<24,t=i/2+1;t<i;t++)a[t]^=a[t-1]}for(t=0;t<i&&c<r;)u=c>>2,p=c%4,this._Ke[u][p]=a[t],this._Kd[e-u][p]=a[t++],c++}for(var u=1;u<e;u++)for(var p=0;p<4;p++)o=this._Kd[u][p],this._Kd[u][p]=E[o>>24&255]^B[o>>16&255]^N[o>>8&255]^b[255&o]},S.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,n=[0,0,0,0],r=v(e),i=0;i<4;i++)r[i]^=this._Ke[0][i];for(var o=1;o<t;o++){for(i=0;i<4;i++)n[i]=m[r[i]>>24&255]^h[r[(i+1)%4]>>16&255]^g[r[(i+2)%4]>>8&255]^f[255&r[(i+3)%4]]^this._Ke[o][i];r=n.slice()}var s,c=a(16);for(i=0;i<4;i++)s=this._Ke[t][i],c[4*i]=255&(d[r[i]>>24&255]^s>>24),c[4*i+1]=255&(d[r[(i+1)%4]>>16&255]^s>>16),c[4*i+2]=255&(d[r[(i+2)%4]>>8&255]^s>>8),c[4*i+3]=255&(d[255&r[(i+3)%4]]^s);return c},S.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,n=[0,0,0,0],r=v(e),i=0;i<4;i++)r[i]^=this._Kd[0][i];for(var o=1;o<t;o++){for(i=0;i<4;i++)n[i]=y[r[i]>>24&255]^C[r[(i+3)%4]>>16&255]^I[r[(i+2)%4]>>8&255]^w[255&r[(i+1)%4]]^this._Kd[o][i];r=n.slice()}var s,c=a(16);for(i=0;i<4;i++)s=this._Kd[t][i],c[4*i]=255&(p[r[i]>>24&255]^s>>24),c[4*i+1]=255&(p[r[(i+3)%4]>>16&255]^s>>16),c[4*i+2]=255&(p[r[(i+2)%4]>>8&255]^s>>8),c[4*i+3]=255&(p[255&r[(i+1)%4]]^s);return c};var T=function(e){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new S(e)};T.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=a(e.length),n=a(16),r=0;r<e.length;r+=16)o(e,n,0,r,r+16),o(n=this._aes.encrypt(n),t,r);return t},T.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=a(e.length),n=a(16),r=0;r<e.length;r+=16)o(e,n,0,r,r+16),o(n=this._aes.decrypt(n),t,r);return t};var x=function(e,t){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=a(16);this._lastCipherblock=i(t,!0),this._aes=new S(e)};x.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=a(e.length),n=a(16),r=0;r<e.length;r+=16){o(e,n,0,r,r+16);for(var s=0;s<16;s++)n[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(n),o(this._lastCipherblock,t,r)}return t},x.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=a(e.length),n=a(16),r=0;r<e.length;r+=16){o(e,n,0,r,r+16),n=this._aes.decrypt(n);for(var s=0;s<16;s++)t[r+s]=n[s]^this._lastCipherblock[s];o(e,this._lastCipherblock,0,r,r+16)}return t};var _=function(e,t,n){if(!(this instanceof _))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 size)")}else t=a(16);n||(n=1),this.segmentSize=n,this._shiftRegister=i(t,!0),this._aes=new S(e)};_.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,n=i(e,!0),r=0;r<n.length;r+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)n[r+a]^=t[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(n,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return n},_.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,n=i(e,!0),r=0;r<n.length;r+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)n[r+a]^=t[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(e,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return n};var Q=function(e,t){if(!(this instanceof Q))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=a(16);this._lastPrecipher=i(t,!0),this._lastPrecipherIndex=16,this._aes=new S(e)};Q.prototype.encrypt=function(e){for(var t=i(e,!0),n=0;n<t.length;n++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[n]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},Q.prototype.decrypt=Q.prototype.encrypt;var P=function(e){if(!(this instanceof P))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=a(16),this.setValue(e)):this.setBytes(e)};P.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");if(e>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},P.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},P.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var z=function(e,t){if(!(this instanceof z))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof P||(t=new P(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new S(e)};z.prototype.encrypt=function(e){for(var t=i(e,!0),n=0;n<t.length;n++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[n]^=this._remainingCounter[this._remainingCounterIndex++];return t},z.prototype.decrypt=z.prototype.encrypt;var R={AES:S,Counter:P,ModeOfOperation:{ecb:T,cbc:x,cfb:_,ofb:Q,ctr:z},utils:{hex:u,utf8:c},padding:{pkcs7:{pad:function(e){var t=16-(e=i(e,!0)).length%16,n=a(e.length+t);o(e,n);for(var r=e.length;r<n.length;r++)n[r]=t;return n},strip:function(e){if((e=i(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var n=e.length-t,r=0;r<t;r++)if(e[n+r]!==t)throw new Error("PKCS#7 invalid padding byte");var s=a(n);return o(e,s,0,0,n),s}}},_arrayTest:{coerceArray:i,createArray:a,copyArray:o}};e.exports=R}()},5364:function(e){"use strict";e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var r=0;r<e.length;r++){var i=e.charAt(r),a=i.charCodeAt(0);if(255!==t[a])throw new TypeError(i+" is ambiguous");t[a]=r}var o=e.length,s=e.charAt(0),c=Math.log(o)/Math.log(256),u=Math.log(256)/Math.log(o);function l(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;for(var n=0,r=0,i=0;e[n]===s;)r++,n++;for(var a=(e.length-n)*c+1>>>0,u=new Uint8Array(a);e[n];){var l=t[e.charCodeAt(n)];if(255===l)return;for(var A=0,d=a-1;(0!==l||A<i)&&-1!==d;d--,A++)l+=o*u[d]>>>0,u[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=A,n++}for(var p=a-i;p!==a&&0===u[p];)p++;for(var m=new Uint8Array(r+(a-p)),h=r;p!==a;)m[h++]=u[p++];return m}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var c=(a-i)*u+1>>>0,l=new Uint8Array(c);i!==a;){for(var A=t[i],d=0,p=c-1;(0!==A||d<r)&&-1!==p;p--,d++)A+=256*l[p]>>>0,l[p]=A%o>>>0,A=A/o>>>0;if(0!==A)throw new Error("Non-zero carry");r=d,i++}for(var m=c-r;m!==c&&0===l[m];)m++;for(var h=s.repeat(n);m<c;++m)h+=e.charAt(l[m]);return h},decodeUnsafe:l,decode:function(e){var t=l(e);if(t)return t;throw new Error("Non-base"+o+" character")}}}},7526:function(e,t){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=s(e),o=a[0],c=a[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,c)),l=0,A=c>0?o-4:o;for(n=0;n<A;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,u=r-i;s<u;s+=o)a.push(c(e,s,s+o>u?u:s+o));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},1594:function(e,t,n){var r;!function(i){"use strict";var a,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,c=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",A=1e14,d=14,p=9007199254740991,m=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,g=1e9;function f(e){var t=0|e;return e>0||e===t?t:t-1}function y(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(t=e[r++]+"",n=d-t.length;n--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function C(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,u=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==u,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>u^n?1:-1;for(s=(c=i.length)<(u=a.length)?c:u,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==u?0:c>u^n?1:-1}function I(e,t,n,r){if(e<t||e>n||e!==c(e))throw Error(u+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return f(e.e/d)==t&&e.c[t]%2!=0}function E(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function B(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}a=function e(t){var n,r,i,a,N,b,v,S,T,x,_=H.prototype={constructor:H,toString:null,valueOf:null},Q=new H(1),P=20,z=4,R=-7,k=21,O=-1e7,M=1e7,D=!1,q=1,F=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},G="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function H(e,t){var n,a,s,u,A,m,h,g,f=this;if(!(f instanceof H))return new H(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>M?f.c=f.e=null:e.e<O?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((m="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,A=e;A>=10;A/=10,u++);return void(u>M?f.c=f.e=null:(f.e=u,f.c=[e]))}g=String(e)}else{if(!o.test(g=String(e)))return i(f,g,m);f.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(u=g.indexOf("."))>-1&&(g=g.replace(".","")),(A=g.search(/e/i))>0?(u<0&&(u=A),u+=+g.slice(A+1),g=g.substring(0,A)):u<0&&(u=g.length)}else{if(I(t,2,G.length,"Base"),10==t&&L)return Y(f=new H(e),P+f.e+1,z);if(g=String(e),m="number"==typeof e){if(0*e!=0)return i(f,g,m,t);if(f.s=1/e<0?(g=g.slice(1),-1):1,H.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else f.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(n=G.slice(0,t),u=A=0,h=g.length;A<h;A++)if(n.indexOf(a=g.charAt(A))<0){if("."==a){if(A>u){u=h;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,A=-1,u=0;continue}return i(f,String(e),m,t)}m=!1,(u=(g=r(g,t,10,f.s)).indexOf("."))>-1?g=g.replace(".",""):u=g.length}for(A=0;48===g.charCodeAt(A);A++);for(h=g.length;48===g.charCodeAt(--h););if(g=g.slice(A,++h)){if(h-=A,m&&H.DEBUG&&h>15&&(e>p||e!==c(e)))throw Error(l+f.s*e);if((u=u-A-1)>M)f.c=f.e=null;else if(u<O)f.c=[f.e=0];else{if(f.e=u,f.c=[],A=(u+1)%d,u<0&&(A+=d),A<h){for(A&&f.c.push(+g.slice(0,A)),h-=d;A<h;)f.c.push(+g.slice(A,A+=d));A=d-(g=g.slice(A)).length}else A-=h;for(;A--;g+="0");f.c.push(+g)}}else f.c=[f.e=0]}function j(e,t,n,r){var i,a,o,s,c;if(null==n?n=z:I(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)c=y(e.c),c=1==r||2==r&&(o<=R||o>=k)?E(c,o):B(c,o,"0");else if(a=(e=Y(new H(e),t,n)).e,s=(c=y(e.c)).length,1==r||2==r&&(t<=a||a<=R)){for(;s<t;c+="0",s++);c=E(c,a)}else if(t-=o,c=B(c,a,"0"),a+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-s)>0)for(a+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function V(e,t){for(var n,r,i=1,a=new H(e[0]);i<e.length;i++)(!(r=new H(e[i])).s||(n=C(a,r))===t||0===n&&a.s===t)&&(a=r);return a}function $(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*d-1)>M?e.c=e.e=null:n<O?e.c=[e.e=0]:(e.e=n,e.c=t),e}function Y(e,t,n,r){var i,a,o,u,l,p,h,g=e.c,f=m;if(g){e:{for(i=1,u=g[0];u>=10;u/=10,i++);if((a=t-i)<0)a+=d,o=t,l=g[p=0],h=c(l/f[i-o-1]%10);else if((p=s((a+1)/d))>=g.length){if(!r)break e;for(;g.length<=p;g.push(0));l=h=0,i=1,o=(a%=d)-d+1}else{for(l=u=g[p],i=1;u>=10;u/=10,i++);h=(o=(a%=d)-d+i)<0?0:c(l/f[i-o-1]%10)}if(r=r||t<0||null!=g[p+1]||(o<0?l:l%f[i-o-1]),r=n<4?(h||r)&&(0==n||n==(e.s<0?3:2)):h>5||5==h&&(4==n||r||6==n&&(a>0?o>0?l/f[i-o]:0:g[p-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,r?(t-=e.e+1,g[0]=f[(d-t%d)%d],e.e=-t||0):g[0]=e.e=0,e;if(0==a?(g.length=p,u=1,p--):(g.length=p+1,u=f[d-a],g[p]=o>0?c(l/f[i-o]%f[o])*u:0),r)for(;;){if(0==p){for(a=1,o=g[0];o>=10;o/=10,a++);for(o=g[0]+=u,u=1;o>=10;o/=10,u++);a!=u&&(e.e++,g[0]==A&&(g[0]=1));break}if(g[p]+=u,g[p]!=A)break;g[p--]=0,u=1}for(a=g.length;0===g[--a];g.pop());}e.e>M?e.c=e.e=null:e.e<O&&(e.c=[e.e=0])}return e}function J(e){var t,n=e.e;return null===n?e.toString():(t=y(e.c),t=n<=R||n>=k?E(t,n):B(t,n,"0"),e.s<0?"-"+t:t)}return H.clone=e,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(I(n=e[t],0,g,t),P=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(I(n=e[t],0,8,t),z=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(I(n[0],-g,0,t),I(n[1],0,g,t),R=n[0],k=n[1]):(I(n,-g,g,t),R=-(k=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)I(n[0],-g,-1,t),I(n[1],1,g,t),O=n[0],M=n[1];else{if(I(n,-g,g,t),!n)throw Error(u+t+" cannot be zero: "+n);O=-(M=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(u+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw D=!n,Error(u+"crypto unavailable");D=n}else D=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(I(n=e[t],0,9,t),q=n),e.hasOwnProperty(t="POW_PRECISION")&&(I(n=e[t],0,g,t),F=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(u+t+" not an object: "+n);U=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(u+t+" invalid: "+n);L="0123456789"==n.slice(0,10),G=n}}return{DECIMAL_PLACES:P,ROUNDING_MODE:z,EXPONENTIAL_AT:[R,k],RANGE:[O,M],CRYPTO:D,MODULO_MODE:q,POW_PRECISION:F,FORMAT:U,ALPHABET:G}},H.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!H.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-g&&i<=g&&i===c(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%d)<1&&(t+=d),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=A||n!==c(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(u+"Invalid BigNumber: "+e)},H.maximum=H.max=function(){return V(arguments,-1)},H.minimum=H.min=function(){return V(arguments,1)},H.random=(a=9007199254740992,N=Math.random()*a&2097151?function(){return c(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,a,o=0,l=[],A=new H(Q);if(null==e?e=P:I(e,0,g),i=s(e/d),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));o<i;)(a=131072*t[o]+(t[o+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[o]=n[0],t[o+1]=n[1]):(l.push(a%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw D=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(i*=7);o<i;)(a=281474976710656*(31&t[o])+1099511627776*t[o+1]+4294967296*t[o+2]+16777216*t[o+3]+(t[o+4]<<16)+(t[o+5]<<8)+t[o+6])>=9e15?crypto.randomBytes(7).copy(t,o):(l.push(a%1e14),o+=7);o=i/7}if(!D)for(;o<i;)(a=N())<9e15&&(l[o++]=a%1e14);for(i=l[--o],e%=d,i&&e&&(a=m[d-e],l[o]=c(i/a)*a);0===l[o];l.pop(),o--);if(o<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=d);for(o=1,a=l[0];a>=10;a/=10,o++);o<d&&(r-=d-o)}return A.e=r,A.c=l,A}),H.sum=function(){for(var e=1,t=arguments,n=new H(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,a,o=[0],s=0,c=e.length;s<c;){for(a=o.length;a--;o[a]*=t);for(o[0]+=r.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>n-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}return function(r,i,a,o,s){var c,u,l,A,d,p,m,h,g=r.indexOf("."),f=P,C=z;for(g>=0&&(A=F,F=0,r=r.replace(".",""),p=(h=new H(i)).pow(r.length-g),F=A,h.c=t(B(y(p.c),p.e,"0"),10,a,e),h.e=h.c.length),l=A=(m=t(r,i,a,s?(c=G,e):(c=e,G))).length;0==m[--A];m.pop());if(!m[0])return c.charAt(0);if(g<0?--l:(p.c=m,p.e=l,p.s=o,m=(p=n(p,h,f,C,a)).c,d=p.r,l=p.e),g=m[u=l+f+1],A=a/2,d=d||u<0||null!=m[u+1],d=C<4?(null!=g||d)&&(0==C||C==(p.s<0?3:2)):g>A||g==A&&(4==C||d||6==C&&1&m[u-1]||C==(p.s<0?8:7)),u<1||!m[0])r=d?B(c.charAt(1),-f,c.charAt(0)):c.charAt(0);else{if(m.length=u,d)for(--a;++m[--u]>a;)m[u]=0,u||(++l,m=[1].concat(m));for(A=m.length;!m[--A];);for(g=0,r="";g<=A;r+=c.charAt(m[g++]));r=B(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,u=t%h,l=t/h|0;for(e=e.slice();c--;)s=((i=u*(a=e[c]%h)+(r=l*a+(o=e[c]/h|0)*u)%h*h+s)/n|0)+(r/h|0)+l*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var u,l,p,m,h,g,y,C,I,w,E,B,N,b,v,S,T,x=r.s==i.s?1:-1,_=r.c,Q=i.c;if(!(_&&_[0]&&Q&&Q[0]))return new H(r.s&&i.s&&(_?!Q||_[0]!=Q[0]:Q)?_&&0==_[0]||!Q?0*x:x/0:NaN);for(I=(C=new H(x)).c=[],x=a+(l=r.e-i.e)+1,s||(s=A,l=f(r.e/d)-f(i.e/d),x=x/d|0),p=0;Q[p]==(_[p]||0);p++);if(Q[p]>(_[p]||0)&&l--,x<0)I.push(1),m=!0;else{for(b=_.length,S=Q.length,p=0,x+=2,(h=c(s/(Q[0]+1)))>1&&(Q=e(Q,h,s),_=e(_,h,s),S=Q.length,b=_.length),N=S,E=(w=_.slice(0,S)).length;E<S;w[E++]=0);T=Q.slice(),T=[0].concat(T),v=Q[0],Q[1]>=s/2&&v++;do{if(h=0,(u=t(Q,w,S,E))<0){if(B=w[0],S!=E&&(B=B*s+(w[1]||0)),(h=c(B/v))>1)for(h>=s&&(h=s-1),y=(g=e(Q,h,s)).length,E=w.length;1==t(g,w,y,E);)h--,n(g,S<y?T:Q,y,s),y=g.length,u=1;else 0==h&&(u=h=1),y=(g=Q.slice()).length;if(y<E&&(g=[0].concat(g)),n(w,g,E,s),E=w.length,-1==u)for(;t(Q,w,S,E)<1;)h++,n(w,S<E?T:Q,E,s),E=w.length}else 0===u&&(h++,w=[0]);I[p++]=h,w[0]?w[E++]=_[N]||0:(w=[_[N]],E=1)}while((N++<b||null!=w[0])&&x--);m=null!=w[0],I[0]||I.splice(0,1)}if(s==A){for(p=1,x=I[0];x>=10;x/=10,p++);Y(C,a+(C.e=p+l*d-1)+1,o,m)}else C.e=l,C.r=+m;return C}}(),b=/^(-?)0([xbo])(?=\w[\w.]*$)/i,v=/^([^.]+)\.$/,S=/^\.([^.]+)$/,T=/^-?(Infinity|NaN)$/,x=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,a=n?t:t.replace(x,"");if(T.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(b,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,a=a.replace(v,"$1").replace(S,"0.$1")),t!=a))return new H(a,i);if(H.DEBUG)throw Error(u+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},_.absoluteValue=_.abs=function(){var e=new H(this);return e.s<0&&(e.s=1),e},_.comparedTo=function(e,t){return C(this,new H(e,t))},_.decimalPlaces=_.dp=function(e,t){var n,r,i,a=this;if(null!=e)return I(e,0,g),null==t?t=z:I(t,0,8),Y(new H(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-f(this.e/d))*d,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},_.dividedBy=_.div=function(e,t){return n(this,new H(e,t),P,z)},_.dividedToIntegerBy=_.idiv=function(e,t){return n(this,new H(e,t),0,1)},_.exponentiatedBy=_.pow=function(e,t){var n,r,i,a,o,l,A,p,m=this;if((e=new H(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+J(e));if(null!=t&&(t=new H(t)),o=e.e>14,!m.c||!m.c[0]||1==m.c[0]&&!m.e&&1==m.c.length||!e.c||!e.c[0])return p=new H(Math.pow(+J(m),o?e.s*(2-w(e)):+J(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new H(NaN);(r=!l&&m.isInteger()&&t.isInteger())&&(m=m.mod(t))}else{if(e.e>9&&(m.e>0||m.e<-1||(0==m.e?m.c[0]>1||o&&m.c[1]>=24e7:m.c[0]<8e13||o&&m.c[0]<=9999975e7)))return a=m.s<0&&w(e)?-0:0,m.e>-1&&(a=1/a),new H(l?1/a:a);F&&(a=s(F/d+2))}for(o?(n=new H(.5),l&&(e.s=1),A=w(e)):A=(i=Math.abs(+J(e)))%2,p=new H(Q);;){if(A){if(!(p=p.times(m)).c)break;a?p.c.length>a&&(p.c.length=a):r&&(p=p.mod(t))}if(i){if(0===(i=c(i/2)))break;A=i%2}else if(Y(e=e.times(n),e.e+1,1),e.e>14)A=w(e);else{if(0==(i=+J(e)))break;A=i%2}m=m.times(m),a?m.c&&m.c.length>a&&(m.c.length=a):r&&(m=m.mod(t))}return r?p:(l&&(p=Q.div(p)),t?p.mod(t):a?Y(p,F,z,void 0):p)},_.integerValue=function(e){var t=new H(this);return null==e?e=z:I(e,0,8),Y(t,t.e+1,e)},_.isEqualTo=_.eq=function(e,t){return 0===C(this,new H(e,t))},_.isFinite=function(){return!!this.c},_.isGreaterThan=_.gt=function(e,t){return C(this,new H(e,t))>0},_.isGreaterThanOrEqualTo=_.gte=function(e,t){return 1===(t=C(this,new H(e,t)))||0===t},_.isInteger=function(){return!!this.c&&f(this.e/d)>this.c.length-2},_.isLessThan=_.lt=function(e,t){return C(this,new H(e,t))<0},_.isLessThanOrEqualTo=_.lte=function(e,t){return-1===(t=C(this,new H(e,t)))||0===t},_.isNaN=function(){return!this.s},_.isNegative=function(){return this.s<0},_.isPositive=function(){return this.s>0},_.isZero=function(){return!!this.c&&0==this.c[0]},_.minus=function(e,t){var n,r,i,a,o=this,s=o.s;if(t=(e=new H(e,t)).s,!s||!t)return new H(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/d,u=e.e/d,l=o.c,p=e.c;if(!c||!u){if(!l||!p)return l?(e.s=-t,e):new H(p?o:NaN);if(!l[0]||!p[0])return p[0]?(e.s=-t,e):new H(l[0]?o:3==z?-0:0)}if(c=f(c),u=f(u),l=l.slice(),s=c-u){for((a=s<0)?(s=-s,i=l):(u=c,i=p),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(a=(s=l.length)<(t=p.length))?s:t,s=t=0;t<r;t++)if(l[t]!=p[t]){a=l[t]<p[t];break}if(a&&(i=l,l=p,p=i,e.s=-e.s),(t=(r=p.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=A-1;r>s;){if(l[--r]<p[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=A}l[r]-=p[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?$(e,l,u):(e.s=3==z?-1:1,e.c=[e.e=0],e)},_.modulo=_.mod=function(e,t){var r,i,a=this;return e=new H(e,t),!a.c||!e.s||e.c&&!e.c[0]?new H(NaN):!e.c||a.c&&!a.c[0]?new H(a):(9==q?(i=e.s,e.s=1,r=n(a,e,0,3),e.s=i,r.s*=i):r=n(a,e,0,q),(e=a.minus(r.times(e))).c[0]||1!=q||(e.s=a.s),e)},_.multipliedBy=_.times=function(e,t){var n,r,i,a,o,s,c,u,l,p,m,g,y,C,I,w=this,E=w.c,B=(e=new H(e,t)).c;if(!(E&&B&&E[0]&&B[0]))return!w.s||!e.s||E&&!E[0]&&!B||B&&!B[0]&&!E?e.c=e.e=e.s=null:(e.s*=w.s,E&&B?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=f(w.e/d)+f(e.e/d),e.s*=w.s,(c=E.length)<(p=B.length)&&(y=E,E=B,B=y,i=c,c=p,p=i),i=c+p,y=[];i--;y.push(0));for(C=A,I=h,i=p;--i>=0;){for(n=0,m=B[i]%I,g=B[i]/I|0,a=i+(o=c);a>i;)n=((u=m*(u=E[--o]%I)+(s=g*u+(l=E[o]/I|0)*m)%I*I+y[a]+n)/C|0)+(s/I|0)+g*l,y[a--]=u%C;y[a]=n}return n?++r:y.splice(0,1),$(e,y,r)},_.negated=function(){var e=new H(this);return e.s=-e.s||null,e},_.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new H(e,t)).s,!i||!t)return new H(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/d,o=e.e/d,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new H(i/0);if(!s[0]||!c[0])return c[0]?e:new H(s[0]?r:0*i)}if(a=f(a),o=f(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for((i=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/A|0,s[t]=A===s[t]?0:s[t]%A;return i&&(s=[i].concat(s),++o),$(e,s,o)},_.precision=_.sd=function(e,t){var n,r,i,a=this;if(null!=e&&e!==!!e)return I(e,1,g),null==t?t=z:I(t,0,8),Y(new H(a),e,t);if(!(n=a.c))return null;if(r=(i=n.length-1)*d+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},_.shiftedBy=function(e){return I(e,-9007199254740991,p),this.times("1e"+e)},_.squareRoot=_.sqrt=function(){var e,t,r,i,a,o=this,s=o.c,c=o.s,u=o.e,l=P+4,A=new H("0.5");if(1!==c||!s||!s[0])return new H(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(c=Math.sqrt(+J(o)))||c==1/0?(((t=y(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=f((u+1)/2)-(u<0||u%2),r=new H(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new H(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(a=r,r=A.times(a.plus(n(o,a,l,1))),y(a.c).slice(0,c)===(t=y(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Y(r,r.e+P+2,1),e=!r.times(r).eq(o));break}if(!i&&(Y(a,a.e+P+2,0),a.times(a).eq(o))){r=a;break}l+=4,c+=4,i=1}return Y(r,r.e+P+1,z,e)},_.toExponential=function(e,t){return null!=e&&(I(e,0,g),e++),j(this,e,t,1)},_.toFixed=function(e,t){return null!=e&&(I(e,0,g),e=e+this.e+1),j(this,e,t)},_.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=U;else if("object"!=typeof n)throw Error(u+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split("."),s=+n.groupSize,c=+n.secondaryGroupSize,l=n.groupSeparator||"",A=o[0],d=o[1],p=i.s<0,m=p?A.slice(1):A,h=m.length;if(c&&(a=s,s=c,c=a,h-=a),s>0&&h>0){for(a=h%s||s,A=m.substr(0,a);a<h;a+=s)A+=l+m.substr(a,s);c>0&&(A+=l+m.slice(a)),p&&(A="-"+A)}r=d?A+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):A}return(n.prefix||"")+r+(n.suffix||"")},_.toFraction=function(e){var t,r,i,a,o,s,c,l,A,p,h,g,f=this,C=f.c;if(null!=e&&(!(c=new H(e)).isInteger()&&(c.c||1!==c.s)||c.lt(Q)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+J(c));if(!C)return new H(f);for(t=new H(Q),A=r=new H(Q),i=l=new H(Q),g=y(C),o=t.e=g.length-f.e-1,t.c[0]=m[(s=o%d)<0?d+s:s],e=!e||c.comparedTo(t)>0?o>0?t:A:c,s=M,M=1/0,c=new H(g),l.c[0]=0;p=n(c,t,0,1),1!=(a=r.plus(p.times(i))).comparedTo(e);)r=i,i=a,A=l.plus(p.times(a=A)),l=a,t=c.minus(p.times(a=t)),c=a;return a=n(e.minus(r),i,0,1),l=l.plus(a.times(A)),r=r.plus(a.times(i)),l.s=A.s=f.s,h=n(A,i,o*=2,z).minus(f).abs().comparedTo(n(l,r,o,z).minus(f).abs())<1?[A,i]:[l,r],M=s,h},_.toNumber=function(){return+J(this)},_.toPrecision=function(e,t){return null!=e&&I(e,1,g),j(this,e,t,2)},_.toString=function(e){var t,n=this,i=n.s,a=n.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=R||a>=k?E(y(n.c),a):B(y(n.c),a,"0"):10===e&&L?t=B(y((n=Y(new H(n),P+a+1,z)).c),n.e,"0"):(I(e,2,G.length,"Base"),t=r(B(y(n.c),a,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},_.valueOf=_.toJSON=function(){return J(this)},_._isBigNumber=!0,null!=t&&H.set(t),H}(),a.default=a.BigNumber=a,void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},9235:function(e){const t=2147483648;var n=function(e){if(!Array.isArray(e))throw new Error("Input must be an Array");if(0===e.length)throw new Error("Path must contain at least one level");for(var t=0;t<e.length;t++)if("number"!=typeof e[t])throw new Error("Path element is not a number");this.path=e};n.validatePathArray=function(e){try{return n.fromPathArray(e),!0}catch(e){return!1}},n.validateString=function(e,t){try{return n.fromString(e,t),!0}catch(e){return!1}},n.fromPathArray=function(e){return new n(e)},n.fromString=function(e,r){if(/^m\//i.test(e))e=e.slice(2);else if(r)throw new Error("Root element is required");for(var i=e.split("/"),a=new Array(i.length),o=0;o<i.length;o++){var s=/(\d+)([hH\']?)/.exec(i[o]);if(null===s)throw new Error("Invalid input");if(a[o]=parseInt(s[1],10),a[o]>=t)throw new Error("Invalid child index");if("h"===s[2]||"H"===s[2]||"'"===s[2])a[o]+=t;else if(0!=s[2].length)throw new Error("Invalid modifier")}return new n(a)},n.prototype.toPathArray=function(){return this.path},n.prototype.toString=function(e,n){for(var r=new Array(this.path.length),i=0;i<this.path.length;i++){var a=this.path[i];r[i]=a&t?(a&~t)+(n?"h":"'"):a}return(e?"":"m/")+r.join("/")},n.prototype.inspect=function(){return"BIPPath <"+this.toString()+">"},e.exports=n},4156:function(e,t,n){const r=n(829);function i(e,t,n){const r=e[t]+e[n];let i=e[t+1]+e[n+1];r>=4294967296&&i++,e[t]=r,e[t+1]=i}function a(e,t,n,r){let i=e[t]+n;n<0&&(i+=4294967296);let a=e[t+1]+r;i>=4294967296&&a++,e[t]=i,e[t+1]=a}function o(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function s(e,t,n,r,o,s){const c=A[o],u=A[o+1],d=A[s],p=A[s+1];i(l,e,t),a(l,e,c,u);let m=l[r]^l[e],h=l[r+1]^l[e+1];l[r]=h,l[r+1]=m,i(l,n,r),m=l[t]^l[n],h=l[t+1]^l[n+1],l[t]=m>>>24^h<<8,l[t+1]=h>>>24^m<<8,i(l,e,t),a(l,e,d,p),m=l[r]^l[e],h=l[r+1]^l[e+1],l[r]=m>>>16^h<<16,l[r+1]=h>>>16^m<<16,i(l,n,r),m=l[t]^l[n],h=l[t+1]^l[n+1],l[t]=h>>>31^m<<1,l[t+1]=m>>>31^h<<1}const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),u=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}))),l=new Uint32Array(32),A=new Uint32Array(32);function d(e,t){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=c[n];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)A[n]=o(e.b,4*n);for(n=0;n<12;n++)s(0,8,16,24,u[16*n+0],u[16*n+1]),s(2,10,18,26,u[16*n+2],u[16*n+3]),s(4,12,20,28,u[16*n+4],u[16*n+5]),s(6,14,22,30,u[16*n+6],u[16*n+7]),s(0,10,20,30,u[16*n+8],u[16*n+9]),s(2,12,22,24,u[16*n+10],u[16*n+11]),s(4,14,16,26,u[16*n+12],u[16*n+13]),s(6,8,18,28,u[16*n+14],u[16*n+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}const p=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 m(e,t,n,r){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&16!==n.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(r&&16!==r.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};p.fill(0),p[0]=e,t&&(p[1]=t.length),p[2]=1,p[3]=1,n&&p.set(n,32),r&&p.set(r,48);for(let e=0;e<16;e++)i.h[e]=c[e]^o(p,4*e);return t&&(h(i,t),i.c=128),i}function h(e,t){for(let n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,d(e,!1),e.c=0),e.b[e.c++]=t[n]}function g(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;d(e,!0);const t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n);return t}function f(e,t,n,i,a){n=n||64,e=r.normalizeInput(e),i&&(i=r.normalizeInput(i)),a&&(a=r.normalizeInput(a));const o=m(n,t,i,a);return h(o,e),g(o)}e.exports={blake2b:f,blake2bHex:function(e,t,n,i,a){const o=f(e,t,n,i,a);return r.toHex(o)},blake2bInit:m,blake2bUpdate:h,blake2bFinal:g}},829:function(e){function t(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){let t;if(e instanceof Uint8Array)t=e;else{if("string"!=typeof e)throw new Error("Input must be an string, Buffer or Uint8Array");t=(new TextEncoder).encode(e)}return t},toHex:function(e){return Array.prototype.map.call(e,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")},debugPrint:function(e,n,r){let i="\n"+e+" = ";for(let a=0;a<n.length;a+=2){if(32===r)i+=t(n[a]).toUpperCase(),i+=" ",i+=t(n[a+1]).toUpperCase();else{if(64!==r)throw new Error("Invalid size "+r);i+=t(n[a+1]).toUpperCase(),i+=t(n[a]).toUpperCase()}a%6==4?i+="\n"+new Array(e.length+4).join(" "):a<n.length-2&&(i+=" ")}console.log(i)},testSpeed:function(e,t,n){let r=(new Date).getTime();const i=new Uint8Array(t);for(let e=0;e<t;e++)i[e]=e%256;const a=(new Date).getTime();console.log("Generated random input in "+(a-r)+"ms"),r=a;for(let a=0;a<n;a++){const n=e(i),a=(new Date).getTime(),o=a-r;r=a,console.log("Hashed in "+o+"ms: "+n.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(o/1e3)*100)/100+" MB PER SECOND")}}}},6763:function(e,t,n){const r=n(5364);e.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},8287:function(e,t,n){"use strict";const r=n(7526),i=n(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return A(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|h(e,t);let r=s(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(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(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const i=function(e){if(c.isBuffer(e)){const t=0|m(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(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 A(e){return l(e),s(e<0?0:0|m(e))}function d(e){const t=e.length<0?0:0|m(e.length),n=s(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function m(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(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 n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,n);case"utf8":case"utf-8":return v(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return x(this,t,n);case"base64":return b(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function f(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:C(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):C(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function C(e,t,n,r,i){let a,o=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let r=-1;for(a=n;a<s;a++)if(u(e,a)===u(t,-1===r?0:a-r)){if(-1===r&&(r=a),a-r+1===c)return r*o}else-1!==r&&(a-=a-r),r=-1}else for(n+c>s&&(n=s-c),a=n;a>=0;a--){let n=!0;for(let r=0;r<c;r++)if(u(e,a+r)!==u(t,r)){n=!1;break}if(n)return a}return-1}function I(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const a=t.length;let o;for(r>a/2&&(r=a/2),o=0;o<r;++o){const r=parseInt(t.substr(2*o,2),16);if(K(r))return o;e[n+o]=r}return o}function w(e,t,n,r){return Y(V(t,e.length-n),e,n,r)}function E(e,t,n,r){return Y(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function B(e,t,n,r){return Y($(t),e,n,r)}function N(e,t,n,r){return Y(function(e,t){let n,r,i;const a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function b(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function v(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=o}return function(e){const t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=S));return n}(r)}t.kMaxLength=o,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},c.allocUnsafe=function(e){return A(e)},c.allocUnsafeSlow=function(e){return A(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(J(t,Uint8Array))i+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},c.byteLength=h,c.prototype._isBuffer=!0,c.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 t=0;t<e;t+=2)f(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?v(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,i){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0);const s=Math.min(a,o),u=this.slice(r,i),l=e.slice(t,n);for(let e=0;e<s;++e)if(u[e]!==l[e]){a=u[e],o=l[e];break}return a<o?-1:o<a?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let a=!1;for(;;)switch(r){case"hex":return I(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return B(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function T(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function x(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function _(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=W[e[r]];return i}function Q(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function P(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function z(e,t,n,r,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,i){G(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function k(e,t,n,r,i){G(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function O(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,r,a){return t=+t,n>>>=0,a||O(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function D(e,t,n,r,a){return t=+t,n>>>=0,a||O(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||z(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||z(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);z(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);z(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const a=c.isBuffer(e)?e:c.from(e,r),o=a.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};const q={};function F(e,t,n){q[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function U(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function G(e,t,n,r,i,a){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=a>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(a+1)}${r}`:`>= -(2${r} ** ${8*(a+1)-1}${r}) and < 2 ** ${8*(a+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new q.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,i,a)}function L(e,t){if("number"!=typeof e)throw new q.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new q.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new q.ERR_BUFFER_OUT_OF_BOUNDS;throw new q.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=U(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const j=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let i=null;const a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function $(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const W=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},2341:function(e){"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,n,r)=>`${t}${0===r?"":","}${e(void 0===n||"symbol"==typeof n?null:n)}`),"")}]`:`{${Object.keys(t).sort().reduce(((n,r)=>void 0===t[r]||"symbol"==typeof t[r]?n:`${n}${0===n.length?"":","}${e(r)}:${e(t[r])}`),"")}}`}},4903:function(e){var t=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},7007:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}h(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,a,o,u;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){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 A(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(a){r.once&&e.removeEventListener(t,i),n(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=m(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,A(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,A(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},251:function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,c=(1<<s)-1,u=c>>1,l=-7,A=n?i-1:0,d=n?-1:1,p=e[t+A];for(A+=d,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+A],A+=d,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+e[t+A],A+=d,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),a-=u}return(p?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,c,u=8*a-i-1,l=(1<<u)-1,A=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,m=r?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+A>=1?d/c:d*Math.pow(2,1-A))*c>=2&&(o++,c/=2),o+A>=l?(s=0,o=l):o+A>=1?(s=(t*c-1)*Math.pow(2,i),o+=A):(s=t*Math.pow(2,A-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&s,p+=m,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+p]=255&o,p+=m,o/=256,u-=8);e[n+p-m]|=128*h}},6698:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},1013:function(e,t,n){var r=n(7372).stringify,i=n(8146);e.exports=function(e){return{parse:i(e),stringify:r}},e.exports.parse=i(),e.exports.stringify=r},8146:function(e,t,n){var r=null;const i=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,a=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var o,s,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},A=function(e){throw{name:"SyntaxError",message:e,at:o,text:c}},d=function(e){return e&&e!==s&&A("Expected '"+e+"' instead of '"+s+"'"),s=c.charAt(o),o+=1,s},p=function(){var e,i="";for("-"===s&&(i="-",d("-"));s>="0"&&s<="9";)i+=s,d();if("."===s)for(i+=".";d()&&s>="0"&&s<="9";)i+=s;if("e"===s||"E"===s)for(i+=s,d(),"-"!==s&&"+"!==s||(i+=s,d());s>="0"&&s<="9";)i+=s,d();if(e=+i,isFinite(e))return null==r&&(r=n(1594)),i.length>15?t.storeAsString?i:t.useNativeBigInt?BigInt(i):new r(i):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;A("Bad number")},m=function(){var e,t,n,r="";if('"'===s)for(var i=o;d();){if('"'===s)return o-1>i&&(r+=c.substring(i,o-1)),d(),r;if("\\"===s){if(o-1>i&&(r+=c.substring(i,o-1)),d(),"u"===s){for(n=0,t=0;t<4&&(e=parseInt(d(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof l[s])break;r+=l[s]}i=o}}A("Bad string")},h=function(){for(;s&&s<=" ";)d()};return u=function(){switch(h(),s){case"{":return function(){var e,n=Object.create(null);if("{"===s){if(d("{"),h(),"}"===s)return d("}"),n;for(;s;){if(e=m(),h(),d(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&A('Duplicate key "'+e+'"'),!0===i.test(e)?"error"===t.protoAction?A("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===a.test(e)?"error"===t.constructorAction?A("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),h(),"}"===s)return d("}"),n;d(","),h()}}A("Bad object")}();case"[":return function(){var e=[];if("["===s){if(d("["),h(),"]"===s)return d("]"),e;for(;s;){if(e.push(u()),h(),"]"===s)return d("]"),e;d(","),h()}}A("Bad array")}();case'"':return m();case"-":return p();default:return s>="0"&&s<="9"?p():function(){switch(s){case"t":return d("t"),d("r"),d("u"),d("e"),!0;case"f":return d("f"),d("a"),d("l"),d("s"),d("e"),!1;case"n":return d("n"),d("u"),d("l"),d("l"),null}A("Unexpected '"+s+"'")}()}},function(e,t){var n;return c=e+"",o=0,s=" ",n=u(),h(),s&&A("Syntax error"),"function"==typeof t?function e(n,r){var i,a=n[r];return a&&"object"==typeof a&&Object.keys(a).forEach((function(t){void 0!==(i=e(a,t))?a[t]=i:delete a[t]})),t.call(n,r,a)}({"":n},""):n}}},7372:function(e,t,n){var r=n(1594),i=e.exports;!function(){"use strict";var e,t,n,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,(function(e){var t=o[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(i,a){var o,u,l,A,d,p=e,m=a[i],h=null!=m&&(m instanceof r||r.isBigNumber(m));switch(m&&"object"==typeof m&&"function"==typeof m.toJSON&&(m=m.toJSON(i)),"function"==typeof n&&(m=n.call(a,i,m)),typeof m){case"string":return h?m:s(m);case"number":return isFinite(m)?String(m):"null";case"boolean":case"null":case"bigint":return String(m);case"object":if(!m)return"null";if(e+=t,d=[],"[object Array]"===Object.prototype.toString.apply(m)){for(A=m.length,o=0;o<A;o+=1)d[o]=c(o,m)||"null";return l=0===d.length?"[]":e?"[\n"+e+d.join(",\n"+e)+"\n"+p+"]":"["+d.join(",")+"]",e=p,l}if(n&&"object"==typeof n)for(A=n.length,o=0;o<A;o+=1)"string"==typeof n[o]&&(l=c(u=n[o],m))&&d.push(s(u)+(e?": ":":")+l);else Object.keys(m).forEach((function(t){var n=c(t,m);n&&d.push(s(t)+(e?": ":":")+n)}));return l=0===d.length?"{}":e?"{\n"+e+d.join(",\n"+e)+"\n"+p+"}":"{"+d.join(",")+"}",e=p,l}}"function"!=typeof i.stringify&&(i.stringify=function(r,i,a){var o;if(e="",t="","number"==typeof a)for(o=0;o<a;o+=1)t+=" ";else"string"==typeof a&&(t=a);if(n=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return c("",{"":r})})}()},5606:function(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var s,c=[],u=!1,l=-1;function A(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=o(A);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||u||o(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},858:function(e,t){"use strict";function n(e){if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++)t.push(n(e[r]));const r=d(...t);return d(a(r.length,192),r)}const t=g(e);return 1===t.length&&t[0]<128?t:d(a(t.length,128),t)}function r(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function i(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function a(e,t){if(e<56)return Uint8Array.from([e+t]);const n=m(e),r=m(t+55+n.length/2);return Uint8Array.from(A(r+n))}function o(e,t=!1){if(!e||0===e.length)return Uint8Array.from([]);const n=s(g(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function s(e){let t,n,a,o,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,a=128===l?Uint8Array.from([]):r(e,1,t),2===t&&a[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:a,remainder:e.slice(t)}}if(l<=191){if(n=l-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=i(r(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return a=r(e,n,t+n),{data:a,remainder:e.slice(t+n)}}if(l<=247){for(t=l-191,o=r(e,1,t);o.length;)c=s(o),u.push(c.data),o=c.remainder;return{data:u,remainder:e.slice(t)}}{if(n=l-246,t=i(r(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const a=n+t;if(a>e.length)throw new Error("invalid RLP: total length is larger than the data");for(o=r(e,n,a);o.length;)c=s(o),u.push(c.data),o=c.remainder;return{data:u,remainder:e.slice(a)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.decode=t.encode=void 0,t.encode=n,t.decode=o;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let n=0;n<e.length;n++)t+=c[e[n]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function A(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=2*n;t[n]=l(e.slice(r,r+2))}return t}function d(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n}function p(e){return(new TextEncoder).encode(e)}function m(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function h(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function g(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return h(e)?A((t="string"!=typeof(n=e)?n:h(n)?n.slice(2):n).length%2?`0${t}`:t):p(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?A(m(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:d,hexToBytes:A,utf8ToBytes:p};const f={encode:n,decode:o};t.default=f},2861:function(e,t,n){var r=n(8287),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},392:function(e,t,n){var r=n(2861).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,a=e.length,o=this._len,s=0;s<a;){for(var c=o%i,u=Math.min(a-s,i-c),l=0;l<u;l++)n[c+l]=e[s+l];s+=u,(o+=u)%i==0&&this._update(n)}return this._len+=a,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},4107:function(e,t,n){var r=n(6698),i=n(392),a=n(2861).Buffer,o=[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],s=new Array(64);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,n){return n^e&(t^n)}function l(e,t,n){return e&t|n&(e|t)}function A(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,i),c.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},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,c=0|this._e,m=0|this._f,h=0|this._g,g=0|this._h,f=0;f<16;++f)n[f]=e.readInt32BE(4*f);for(;f<64;++f)n[f]=0|(((t=n[f-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[f-7]+p(n[f-15])+n[f-16];for(var y=0;y<64;++y){var C=g+d(c)+u(c,m,h)+o[y]+n[y]|0,I=A(r)+l(r,i,a)|0;g=h,h=m,m=c,c=s+C|0,s=a,a=i,i=r,r=C+I|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0,this._f=m+this._f|0,this._g=h+this._g|0,this._h=g+this._h|0},c.prototype._hash=function(){var e=a.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=c},9234:function(e,t,n){!function(t,r){"use strict";e.exports?e.exports=r(n(8947)):t.nacl.auth=r(t.nacl)}(this,(function(e){"use strict";if(!e)throw new Error("tweetnacl not loaded");var t=128,n=64;function r(r,i){var a,o,s=new Uint8Array(t+Math.max(n,r.length));for(i.length>t&&(i=e.hash(i)),a=0;a<t;a++)s[a]=54;for(a=0;a<i.length;a++)s[a]^=i[a];for(s.set(r,t),o=e.hash(s.subarray(0,t+r.length)),a=0;a<t;a++)s[a]=92;for(a=0;a<i.length;a++)s[a]^=i[a];return s.set(o,t),e.hash(s.subarray(0,t+o.length))}function i(e,t){var n=new Uint8Array(32);return n.set(r(e,t).subarray(0,32)),n}return i.full=function(e,t){return r(e,t)},i.authLength=32,i.authFullLength=64,i.keyLength=32,i}))},8947:function(e,t,n){!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},r=function(){throw new Error("no PRNG")},i=new Uint8Array(16),a=new Uint8Array(32);a[0]=9;var o=t(),s=t([1]),c=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),A=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function m(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function h(e,t,n,r,i){var a,o=0;for(a=0;a<i;a++)o|=e[t+a]^n[r+a];return(1&o-1>>>8)-1}function g(e,t,n,r){return h(e,t,n,r,16)}function f(e,t,n,r){return h(e,t,n,r,32)}function y(e,t,n,r){!function(e,t,n,r){for(var i,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,A=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,m=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,h=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,f=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,C=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,I=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=a,E=o,B=s,N=c,b=u,v=l,S=A,T=d,x=p,_=m,Q=h,P=g,z=f,R=y,k=C,O=I,M=0;M<20;M+=2)w^=(i=(z^=(i=(x^=(i=(b^=(i=w+z|0)<<7|i>>>25)+w|0)<<9|i>>>23)+b|0)<<13|i>>>19)+x|0)<<18|i>>>14,v^=(i=(E^=(i=(R^=(i=(_^=(i=v+E|0)<<7|i>>>25)+v|0)<<9|i>>>23)+_|0)<<13|i>>>19)+R|0)<<18|i>>>14,Q^=(i=(S^=(i=(B^=(i=(k^=(i=Q+S|0)<<7|i>>>25)+Q|0)<<9|i>>>23)+k|0)<<13|i>>>19)+B|0)<<18|i>>>14,O^=(i=(P^=(i=(T^=(i=(N^=(i=O+P|0)<<7|i>>>25)+O|0)<<9|i>>>23)+N|0)<<13|i>>>19)+T|0)<<18|i>>>14,w^=(i=(N^=(i=(B^=(i=(E^=(i=w+N|0)<<7|i>>>25)+w|0)<<9|i>>>23)+E|0)<<13|i>>>19)+B|0)<<18|i>>>14,v^=(i=(b^=(i=(T^=(i=(S^=(i=v+b|0)<<7|i>>>25)+v|0)<<9|i>>>23)+S|0)<<13|i>>>19)+T|0)<<18|i>>>14,Q^=(i=(_^=(i=(x^=(i=(P^=(i=Q+_|0)<<7|i>>>25)+Q|0)<<9|i>>>23)+P|0)<<13|i>>>19)+x|0)<<18|i>>>14,O^=(i=(k^=(i=(R^=(i=(z^=(i=O+k|0)<<7|i>>>25)+O|0)<<9|i>>>23)+z|0)<<13|i>>>19)+R|0)<<18|i>>>14;w=w+a|0,E=E+o|0,B=B+s|0,N=N+c|0,b=b+u|0,v=v+l|0,S=S+A|0,T=T+d|0,x=x+p|0,_=_+m|0,Q=Q+h|0,P=P+g|0,z=z+f|0,R=R+y|0,k=k+C|0,O=O+I|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=E>>>0&255,e[5]=E>>>8&255,e[6]=E>>>16&255,e[7]=E>>>24&255,e[8]=B>>>0&255,e[9]=B>>>8&255,e[10]=B>>>16&255,e[11]=B>>>24&255,e[12]=N>>>0&255,e[13]=N>>>8&255,e[14]=N>>>16&255,e[15]=N>>>24&255,e[16]=b>>>0&255,e[17]=b>>>8&255,e[18]=b>>>16&255,e[19]=b>>>24&255,e[20]=v>>>0&255,e[21]=v>>>8&255,e[22]=v>>>16&255,e[23]=v>>>24&255,e[24]=S>>>0&255,e[25]=S>>>8&255,e[26]=S>>>16&255,e[27]=S>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255,e[32]=x>>>0&255,e[33]=x>>>8&255,e[34]=x>>>16&255,e[35]=x>>>24&255,e[36]=_>>>0&255,e[37]=_>>>8&255,e[38]=_>>>16&255,e[39]=_>>>24&255,e[40]=Q>>>0&255,e[41]=Q>>>8&255,e[42]=Q>>>16&255,e[43]=Q>>>24&255,e[44]=P>>>0&255,e[45]=P>>>8&255,e[46]=P>>>16&255,e[47]=P>>>24&255,e[48]=z>>>0&255,e[49]=z>>>8&255,e[50]=z>>>16&255,e[51]=z>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=k>>>0&255,e[57]=k>>>8&255,e[58]=k>>>16&255,e[59]=k>>>24&255,e[60]=O>>>0&255,e[61]=O>>>8&255,e[62]=O>>>16&255,e[63]=O>>>24&255}(e,t,n,r)}function C(e,t,n,r){!function(e,t,n,r){for(var i,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,A=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,m=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,h=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,f=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,C=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,I=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=0;w<20;w+=2)a^=(i=(f^=(i=(p^=(i=(u^=(i=a+f|0)<<7|i>>>25)+a|0)<<9|i>>>23)+u|0)<<13|i>>>19)+p|0)<<18|i>>>14,l^=(i=(o^=(i=(y^=(i=(m^=(i=l+o|0)<<7|i>>>25)+l|0)<<9|i>>>23)+m|0)<<13|i>>>19)+y|0)<<18|i>>>14,h^=(i=(A^=(i=(s^=(i=(C^=(i=h+A|0)<<7|i>>>25)+h|0)<<9|i>>>23)+C|0)<<13|i>>>19)+s|0)<<18|i>>>14,I^=(i=(g^=(i=(d^=(i=(c^=(i=I+g|0)<<7|i>>>25)+I|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,a^=(i=(c^=(i=(s^=(i=(o^=(i=a+c|0)<<7|i>>>25)+a|0)<<9|i>>>23)+o|0)<<13|i>>>19)+s|0)<<18|i>>>14,l^=(i=(u^=(i=(d^=(i=(A^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+A|0)<<13|i>>>19)+d|0)<<18|i>>>14,h^=(i=(m^=(i=(p^=(i=(g^=(i=h+m|0)<<7|i>>>25)+h|0)<<9|i>>>23)+g|0)<<13|i>>>19)+p|0)<<18|i>>>14,I^=(i=(C^=(i=(y^=(i=(f^=(i=I+C|0)<<7|i>>>25)+I|0)<<9|i>>>23)+f|0)<<13|i>>>19)+y|0)<<18|i>>>14;e[0]=a>>>0&255,e[1]=a>>>8&255,e[2]=a>>>16&255,e[3]=a>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=h>>>0&255,e[9]=h>>>8&255,e[10]=h>>>16&255,e[11]=h>>>24&255,e[12]=I>>>0&255,e[13]=I>>>8&255,e[14]=I>>>16&255,e[15]=I>>>24&255,e[16]=A>>>0&255,e[17]=A>>>8&255,e[18]=A>>>16&255,e[19]=A>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=m>>>0&255,e[29]=m>>>8&255,e[30]=m>>>16&255,e[31]=m>>>24&255}(e,t,n,r)}var I=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(e,t,n,r,i,a,o){var s,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=a[c];for(;i>=64;){for(y(l,u,o,I),c=0;c<64;c++)e[t+c]=n[r+c]^l[c];for(s=1,c=8;c<16;c++)s=s+(255&u[c])|0,u[c]=255&s,s>>>=8;i-=64,t+=64,r+=64}if(i>0)for(y(l,u,o,I),c=0;c<i;c++)e[t+c]=n[r+c]^l[c];return 0}function E(e,t,n,r,i){var a,o,s=new Uint8Array(16),c=new Uint8Array(64);for(o=0;o<16;o++)s[o]=0;for(o=0;o<8;o++)s[o]=r[o];for(;n>=64;){for(y(c,s,i,I),o=0;o<64;o++)e[t+o]=c[o];for(a=1,o=8;o<16;o++)a=a+(255&s[o])|0,s[o]=255&a,a>>>=8;n-=64,t+=64}if(n>0)for(y(c,s,i,I),o=0;o<n;o++)e[t+o]=c[o];return 0}function B(e,t,n,r,i){var a=new Uint8Array(32);C(a,r,i,I);for(var o=new Uint8Array(8),s=0;s<8;s++)o[s]=r[s+16];return E(e,t,n,o,a)}function N(e,t,n,r,i,a,o){var s=new Uint8Array(32);C(s,a,o,I);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=a[u+16];return w(e,t,n,r,i,c,s)}var b=function(e){var t,n,r,i,a,o,s,c;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|i<<9),a=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|a<<12),this.r[5]=a>>>1&8190,o=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(a>>>14|o<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(o>>>11|s<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|c<<8),this.r[9]=c>>>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 v(e,t,n,r,i,a){var o=new b(a);return o.update(n,r,i),o.finish(e,t),0}function S(e,t,n,r,i,a){var o=new Uint8Array(16);return v(o,0,n,r,i,a),g(e,t,o,0)}function T(e,t,n,r,i){var a;if(n<32)return-1;for(N(e,0,t,0,n,r,i),v(e,16,e,32,n-32,e),a=0;a<16;a++)e[a]=0;return 0}function x(e,t,n,r,i){var a,o=new Uint8Array(32);if(n<32)return-1;if(B(o,0,32,r,i),0!==S(t,16,t,32,n-32,o))return-1;for(N(e,0,t,0,n,r,i),a=0;a<32;a++)e[a]=0;return 0}function _(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function Q(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function P(e,t,n){for(var r,i=~(n-1),a=0;a<16;a++)r=i&(e[a]^t[a]),e[a]^=r,t[a]^=r}function z(e,n){var r,i,a,o=t(),s=t();for(r=0;r<16;r++)s[r]=n[r];for(Q(s),Q(s),Q(s),i=0;i<2;i++){for(o[0]=s[0]-65517,r=1;r<15;r++)o[r]=s[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),a=o[15]>>16&1,o[14]&=65535,P(s,o,1-a)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function R(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return z(n,e),z(r,t),f(n,0,r,0)}function k(e){var t=new Uint8Array(32);return z(t,e),1&t[0]}function O(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function M(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function D(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function q(e,t,n){var r,i,a=0,o=0,s=0,c=0,u=0,l=0,A=0,d=0,p=0,m=0,h=0,g=0,f=0,y=0,C=0,I=0,w=0,E=0,B=0,N=0,b=0,v=0,S=0,T=0,x=0,_=0,Q=0,P=0,z=0,R=0,k=0,O=n[0],M=n[1],D=n[2],q=n[3],F=n[4],U=n[5],G=n[6],L=n[7],H=n[8],j=n[9],V=n[10],$=n[11],Y=n[12],J=n[13],K=n[14],W=n[15];a+=(r=t[0])*O,o+=r*M,s+=r*D,c+=r*q,u+=r*F,l+=r*U,A+=r*G,d+=r*L,p+=r*H,m+=r*j,h+=r*V,g+=r*$,f+=r*Y,y+=r*J,C+=r*K,I+=r*W,o+=(r=t[1])*O,s+=r*M,c+=r*D,u+=r*q,l+=r*F,A+=r*U,d+=r*G,p+=r*L,m+=r*H,h+=r*j,g+=r*V,f+=r*$,y+=r*Y,C+=r*J,I+=r*K,w+=r*W,s+=(r=t[2])*O,c+=r*M,u+=r*D,l+=r*q,A+=r*F,d+=r*U,p+=r*G,m+=r*L,h+=r*H,g+=r*j,f+=r*V,y+=r*$,C+=r*Y,I+=r*J,w+=r*K,E+=r*W,c+=(r=t[3])*O,u+=r*M,l+=r*D,A+=r*q,d+=r*F,p+=r*U,m+=r*G,h+=r*L,g+=r*H,f+=r*j,y+=r*V,C+=r*$,I+=r*Y,w+=r*J,E+=r*K,B+=r*W,u+=(r=t[4])*O,l+=r*M,A+=r*D,d+=r*q,p+=r*F,m+=r*U,h+=r*G,g+=r*L,f+=r*H,y+=r*j,C+=r*V,I+=r*$,w+=r*Y,E+=r*J,B+=r*K,N+=r*W,l+=(r=t[5])*O,A+=r*M,d+=r*D,p+=r*q,m+=r*F,h+=r*U,g+=r*G,f+=r*L,y+=r*H,C+=r*j,I+=r*V,w+=r*$,E+=r*Y,B+=r*J,N+=r*K,b+=r*W,A+=(r=t[6])*O,d+=r*M,p+=r*D,m+=r*q,h+=r*F,g+=r*U,f+=r*G,y+=r*L,C+=r*H,I+=r*j,w+=r*V,E+=r*$,B+=r*Y,N+=r*J,b+=r*K,v+=r*W,d+=(r=t[7])*O,p+=r*M,m+=r*D,h+=r*q,g+=r*F,f+=r*U,y+=r*G,C+=r*L,I+=r*H,w+=r*j,E+=r*V,B+=r*$,N+=r*Y,b+=r*J,v+=r*K,S+=r*W,p+=(r=t[8])*O,m+=r*M,h+=r*D,g+=r*q,f+=r*F,y+=r*U,C+=r*G,I+=r*L,w+=r*H,E+=r*j,B+=r*V,N+=r*$,b+=r*Y,v+=r*J,S+=r*K,T+=r*W,m+=(r=t[9])*O,h+=r*M,g+=r*D,f+=r*q,y+=r*F,C+=r*U,I+=r*G,w+=r*L,E+=r*H,B+=r*j,N+=r*V,b+=r*$,v+=r*Y,S+=r*J,T+=r*K,x+=r*W,h+=(r=t[10])*O,g+=r*M,f+=r*D,y+=r*q,C+=r*F,I+=r*U,w+=r*G,E+=r*L,B+=r*H,N+=r*j,b+=r*V,v+=r*$,S+=r*Y,T+=r*J,x+=r*K,_+=r*W,g+=(r=t[11])*O,f+=r*M,y+=r*D,C+=r*q,I+=r*F,w+=r*U,E+=r*G,B+=r*L,N+=r*H,b+=r*j,v+=r*V,S+=r*$,T+=r*Y,x+=r*J,_+=r*K,Q+=r*W,f+=(r=t[12])*O,y+=r*M,C+=r*D,I+=r*q,w+=r*F,E+=r*U,B+=r*G,N+=r*L,b+=r*H,v+=r*j,S+=r*V,T+=r*$,x+=r*Y,_+=r*J,Q+=r*K,P+=r*W,y+=(r=t[13])*O,C+=r*M,I+=r*D,w+=r*q,E+=r*F,B+=r*U,N+=r*G,b+=r*L,v+=r*H,S+=r*j,T+=r*V,x+=r*$,_+=r*Y,Q+=r*J,P+=r*K,z+=r*W,C+=(r=t[14])*O,I+=r*M,w+=r*D,E+=r*q,B+=r*F,N+=r*U,b+=r*G,v+=r*L,S+=r*H,T+=r*j,x+=r*V,_+=r*$,Q+=r*Y,P+=r*J,z+=r*K,R+=r*W,I+=(r=t[15])*O,o+=38*(E+=r*D),s+=38*(B+=r*q),c+=38*(N+=r*F),u+=38*(b+=r*U),l+=38*(v+=r*G),A+=38*(S+=r*L),d+=38*(T+=r*H),p+=38*(x+=r*j),m+=38*(_+=r*V),h+=38*(Q+=r*$),g+=38*(P+=r*Y),f+=38*(z+=r*J),y+=38*(R+=r*K),C+=38*(k+=r*W),a=(r=(a+=38*(w+=r*M))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),A=(r=A+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),C=(r=C+i+65535)-65536*(i=Math.floor(r/65536)),I=(r=I+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),A=(r=A+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),C=(r=C+i+65535)-65536*(i=Math.floor(r/65536)),I=(r=I+i+65535)-65536*(i=Math.floor(r/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=A,e[7]=d,e[8]=p,e[9]=m,e[10]=h,e[11]=g,e[12]=f,e[13]=y,e[14]=C,e[15]=I}function F(e,t){q(e,t,t)}function U(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)F(i,i),2!==r&&4!==r&&q(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function G(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=250;r>=0;r--)F(i,i),1!==r&&q(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function L(e,n,r){var i,a,o=new Uint8Array(32),s=new Float64Array(80),u=t(),l=t(),A=t(),d=t(),p=t(),m=t();for(a=0;a<31;a++)o[a]=n[a];for(o[31]=127&n[31]|64,o[0]&=248,O(s,r),a=0;a<16;a++)l[a]=s[a],d[a]=u[a]=A[a]=0;for(u[0]=d[0]=1,a=254;a>=0;--a)P(u,l,i=o[a>>>3]>>>(7&a)&1),P(A,d,i),M(p,u,A),D(u,u,A),M(A,l,d),D(l,l,d),F(d,p),F(m,u),q(u,A,u),q(A,l,p),M(p,u,A),D(u,u,A),F(l,u),D(A,d,m),q(u,A,c),M(u,u,d),q(A,A,u),q(u,d,m),q(d,l,s),F(l,p),P(u,l,i),P(A,d,i);for(a=0;a<16;a++)s[a+16]=u[a],s[a+32]=A[a],s[a+48]=l[a],s[a+64]=d[a];var h=s.subarray(32),g=s.subarray(16);return U(h,h),q(g,g,h),z(e,g),0}function H(e,t){return L(e,t,a)}function j(e,t){return r(t,32),H(e,t)}function V(e,t,n){var r=new Uint8Array(32);return L(r,n,t),C(e,i,r,I)}b.prototype.blocks=function(e,t,n){for(var r,i,a,o,s,c,u,l,A,d,p,m,h,g,f,y,C,I,w,E=this.fin?0:2048,B=this.h[0],N=this.h[1],b=this.h[2],v=this.h[3],S=this.h[4],T=this.h[5],x=this.h[6],_=this.h[7],Q=this.h[8],P=this.h[9],z=this.r[0],R=this.r[1],k=this.r[2],O=this.r[3],M=this.r[4],D=this.r[5],q=this.r[6],F=this.r[7],U=this.r[8],G=this.r[9];n>=16;)d=A=0,d+=(B+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*z,d+=(N+=8191&(r>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*G),d+=(b+=8191&(i>>>10|(a=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*U),d+=(v+=8191&(a>>>7|(o=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),A=(d+=(S+=8191&(o>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*q))>>>13,d&=8191,d+=(T+=s>>>1&8191)*(5*D),d+=(x+=8191&(s>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*M),d+=(_+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*O),d+=(Q+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*k),p=A+=(d+=(P+=l>>>5|E)*(5*R))>>>13,p+=B*R,p+=N*z,p+=b*(5*G),p+=v*(5*U),A=(p+=S*(5*F))>>>13,p&=8191,p+=T*(5*q),p+=x*(5*D),p+=_*(5*M),p+=Q*(5*O),A+=(p+=P*(5*k))>>>13,p&=8191,m=A,m+=B*k,m+=N*R,m+=b*z,m+=v*(5*G),A=(m+=S*(5*U))>>>13,m&=8191,m+=T*(5*F),m+=x*(5*q),m+=_*(5*D),m+=Q*(5*M),h=A+=(m+=P*(5*O))>>>13,h+=B*O,h+=N*k,h+=b*R,h+=v*z,A=(h+=S*(5*G))>>>13,h&=8191,h+=T*(5*U),h+=x*(5*F),h+=_*(5*q),h+=Q*(5*D),g=A+=(h+=P*(5*M))>>>13,g+=B*M,g+=N*O,g+=b*k,g+=v*R,A=(g+=S*z)>>>13,g&=8191,g+=T*(5*G),g+=x*(5*U),g+=_*(5*F),g+=Q*(5*q),f=A+=(g+=P*(5*D))>>>13,f+=B*D,f+=N*M,f+=b*O,f+=v*k,A=(f+=S*R)>>>13,f&=8191,f+=T*z,f+=x*(5*G),f+=_*(5*U),f+=Q*(5*F),y=A+=(f+=P*(5*q))>>>13,y+=B*q,y+=N*D,y+=b*M,y+=v*O,A=(y+=S*k)>>>13,y&=8191,y+=T*R,y+=x*z,y+=_*(5*G),y+=Q*(5*U),C=A+=(y+=P*(5*F))>>>13,C+=B*F,C+=N*q,C+=b*D,C+=v*M,A=(C+=S*O)>>>13,C&=8191,C+=T*k,C+=x*R,C+=_*z,C+=Q*(5*G),I=A+=(C+=P*(5*U))>>>13,I+=B*U,I+=N*F,I+=b*q,I+=v*D,A=(I+=S*M)>>>13,I&=8191,I+=T*O,I+=x*k,I+=_*R,I+=Q*z,w=A+=(I+=P*(5*G))>>>13,w+=B*G,w+=N*U,w+=b*F,w+=v*q,A=(w+=S*D)>>>13,w&=8191,w+=T*M,w+=x*O,w+=_*k,w+=Q*R,B=d=8191&(A=(A=((A+=(w+=P*z)>>>13)<<2)+A|0)+(d&=8191)|0),N=p+=A>>>=13,b=m&=8191,v=h&=8191,S=g&=8191,T=f&=8191,x=y&=8191,_=C&=8191,Q=I&=8191,P=w&=8191,t+=16,n-=16;this.h[0]=B,this.h[1]=N,this.h[2]=b,this.h[3]=v,this.h[4]=S,this.h[5]=T,this.h[6]=x,this.h[7]=_,this.h[8]=Q,this.h[9]=P},b.prototype.finish=function(e,t){var n,r,i,a,o=new Uint16Array(10);if(this.leftover){for(a=this.leftover,this.buffer[a++]=1;a<16;a++)this.buffer[a]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,a=2;a<10;a++)this.h[a]+=n,n=this.h[a]>>>13,this.h[a]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,o[0]=this.h[0]+5,n=o[0]>>>13,o[0]&=8191,a=1;a<10;a++)o[a]=this.h[a]+n,n=o[a]>>>13,o[a]&=8191;for(o[9]-=8192,r=(1^n)-1,a=0;a<10;a++)o[a]&=r;for(r=~r,a=0;a<10;a++)this.h[a]=this.h[a]&r|o[a];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,a=1;a<8;a++)i=(this.h[a]+this.pad[a]|0)+(i>>>16)|0,this.h[a]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},b.prototype.update=function(e,t,n){var r,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),r=0;r<i;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(i=n-n%16,this.blocks(e,t,i),t+=i,n-=i),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var $=T,Y=x,J=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function K(e,t,n,r){for(var i,a,o,s,c,u,l,A,d,p,m,h,g,f,y,C,I,w,E,B,N,b,v,S,T,x,_=new Int32Array(16),Q=new Int32Array(16),P=e[0],z=e[1],R=e[2],k=e[3],O=e[4],M=e[5],D=e[6],q=e[7],F=t[0],U=t[1],G=t[2],L=t[3],H=t[4],j=t[5],V=t[6],$=t[7],Y=0;r>=128;){for(E=0;E<16;E++)B=8*E+Y,_[E]=n[B+0]<<24|n[B+1]<<16|n[B+2]<<8|n[B+3],Q[E]=n[B+4]<<24|n[B+5]<<16|n[B+6]<<8|n[B+7];for(E=0;E<80;E++)if(i=P,a=z,o=R,s=k,c=O,u=M,l=D,d=F,p=U,m=G,h=L,g=H,f=j,y=V,v=65535&(b=$),S=b>>>16,T=65535&(N=q),x=N>>>16,v+=65535&(b=(H>>>14|O<<18)^(H>>>18|O<<14)^(O>>>9|H<<23)),S+=b>>>16,T+=65535&(N=(O>>>14|H<<18)^(O>>>18|H<<14)^(H>>>9|O<<23)),x+=N>>>16,v+=65535&(b=H&j^~H&V),S+=b>>>16,T+=65535&(N=O&M^~O&D),x+=N>>>16,N=J[2*E],v+=65535&(b=J[2*E+1]),S+=b>>>16,T+=65535&N,x+=N>>>16,N=_[E%16],S+=(b=Q[E%16])>>>16,T+=65535&N,x+=N>>>16,T+=(S+=(v+=65535&b)>>>16)>>>16,v=65535&(b=w=65535&v|S<<16),S=b>>>16,T=65535&(N=I=65535&T|(x+=T>>>16)<<16),x=N>>>16,v+=65535&(b=(F>>>28|P<<4)^(P>>>2|F<<30)^(P>>>7|F<<25)),S+=b>>>16,T+=65535&(N=(P>>>28|F<<4)^(F>>>2|P<<30)^(F>>>7|P<<25)),x+=N>>>16,S+=(b=F&U^F&G^U&G)>>>16,T+=65535&(N=P&z^P&R^z&R),x+=N>>>16,A=65535&(T+=(S+=(v+=65535&b)>>>16)>>>16)|(x+=T>>>16)<<16,C=65535&v|S<<16,v=65535&(b=h),S=b>>>16,T=65535&(N=s),x=N>>>16,S+=(b=w)>>>16,T+=65535&(N=I),x+=N>>>16,z=i,R=a,k=o,O=s=65535&(T+=(S+=(v+=65535&b)>>>16)>>>16)|(x+=T>>>16)<<16,M=c,D=u,q=l,P=A,U=d,G=p,L=m,H=h=65535&v|S<<16,j=g,V=f,$=y,F=C,E%16==15)for(B=0;B<16;B++)N=_[B],v=65535&(b=Q[B]),S=b>>>16,T=65535&N,x=N>>>16,N=_[(B+9)%16],v+=65535&(b=Q[(B+9)%16]),S+=b>>>16,T+=65535&N,x+=N>>>16,I=_[(B+1)%16],v+=65535&(b=((w=Q[(B+1)%16])>>>1|I<<31)^(w>>>8|I<<24)^(w>>>7|I<<25)),S+=b>>>16,T+=65535&(N=(I>>>1|w<<31)^(I>>>8|w<<24)^I>>>7),x+=N>>>16,I=_[(B+14)%16],S+=(b=((w=Q[(B+14)%16])>>>19|I<<13)^(I>>>29|w<<3)^(w>>>6|I<<26))>>>16,T+=65535&(N=(I>>>19|w<<13)^(w>>>29|I<<3)^I>>>6),x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,_[B]=65535&T|x<<16,Q[B]=65535&v|S<<16;v=65535&(b=F),S=b>>>16,T=65535&(N=P),x=N>>>16,N=e[0],S+=(b=t[0])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[0]=P=65535&T|x<<16,t[0]=F=65535&v|S<<16,v=65535&(b=U),S=b>>>16,T=65535&(N=z),x=N>>>16,N=e[1],S+=(b=t[1])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[1]=z=65535&T|x<<16,t[1]=U=65535&v|S<<16,v=65535&(b=G),S=b>>>16,T=65535&(N=R),x=N>>>16,N=e[2],S+=(b=t[2])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[2]=R=65535&T|x<<16,t[2]=G=65535&v|S<<16,v=65535&(b=L),S=b>>>16,T=65535&(N=k),x=N>>>16,N=e[3],S+=(b=t[3])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[3]=k=65535&T|x<<16,t[3]=L=65535&v|S<<16,v=65535&(b=H),S=b>>>16,T=65535&(N=O),x=N>>>16,N=e[4],S+=(b=t[4])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[4]=O=65535&T|x<<16,t[4]=H=65535&v|S<<16,v=65535&(b=j),S=b>>>16,T=65535&(N=M),x=N>>>16,N=e[5],S+=(b=t[5])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[5]=M=65535&T|x<<16,t[5]=j=65535&v|S<<16,v=65535&(b=V),S=b>>>16,T=65535&(N=D),x=N>>>16,N=e[6],S+=(b=t[6])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[6]=D=65535&T|x<<16,t[6]=V=65535&v|S<<16,v=65535&(b=$),S=b>>>16,T=65535&(N=q),x=N>>>16,N=e[7],S+=(b=t[7])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[7]=q=65535&T|x<<16,t[7]=$=65535&v|S<<16,Y+=128,r-=128}return r}function W(e,t,n){var r,i=new Int32Array(8),a=new Int32Array(8),o=new Uint8Array(256),s=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,a[0]=4089235720,a[1]=2227873595,a[2]=4271175723,a[3]=1595750129,a[4]=2917565137,a[5]=725511199,a[6]=4215389547,a[7]=327033209,K(i,a,t,n),n%=128,r=0;r<n;r++)o[r]=t[s-n+r];for(o[n]=128,o[(n=256-128*(n<112?1:0))-9]=0,m(o,n-8,s/536870912|0,s<<3),K(i,a,o,n),r=0;r<8;r++)m(e,8*r,i[r],a[r]);return 0}function X(e,n){var r=t(),i=t(),a=t(),o=t(),s=t(),c=t(),u=t(),A=t(),d=t();D(r,e[1],e[0]),D(d,n[1],n[0]),q(r,r,d),M(i,e[0],e[1]),M(d,n[0],n[1]),q(i,i,d),q(a,e[3],n[3]),q(a,a,l),q(o,e[2],n[2]),M(o,o,o),D(s,i,r),D(c,o,a),M(u,o,a),M(A,i,r),q(e[0],s,c),q(e[1],A,u),q(e[2],u,c),q(e[3],s,A)}function Z(e,t,n){var r;for(r=0;r<4;r++)P(e[r],t[r],n)}function ee(e,n){var r=t(),i=t(),a=t();U(a,n[2]),q(r,n[0],a),q(i,n[1],a),z(e,i),e[31]^=k(r)<<7}function te(e,t,n){var r,i;for(_(e[0],o),_(e[1],s),_(e[2],s),_(e[3],o),i=255;i>=0;--i)Z(e,t,r=n[i/8|0]>>(7&i)&1),X(t,e),X(e,e),Z(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];_(r[0],A),_(r[1],d),_(r[2],s),q(r[3],A,d),te(e,r,n)}function re(e,n,i){var a,o=new Uint8Array(64),s=[t(),t(),t(),t()];for(i||r(n,32),W(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,ne(s,o),ee(e,s),a=0;a<32;a++)n[a+32]=e[a];return 0}var ie=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 ae(e,t){var n,r,i,a;for(r=63;r>=32;--r){for(n=0,i=r-32,a=r-12;i<a;++i)t[i]+=n-16*t[r]*ie[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*ie[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*ie[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function oe(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;ae(e,n)}function se(e,n,r,i){var a,o,s=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),A=[t(),t(),t(),t()];W(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64;var d=r+64;for(a=0;a<r;a++)e[64+a]=n[a];for(a=0;a<32;a++)e[32+a]=s[32+a];for(W(u,e.subarray(32),r+32),oe(u),ne(A,u),ee(e,A),a=32;a<64;a++)e[a]=i[a];for(W(c,e,r+64),oe(c),a=0;a<64;a++)l[a]=0;for(a=0;a<32;a++)l[a]=u[a];for(a=0;a<32;a++)for(o=0;o<32;o++)l[a+o]+=c[a]*s[o];return ae(e.subarray(32),l),d}function ce(e,n,r,i){var a,c=new Uint8Array(32),l=new Uint8Array(64),A=[t(),t(),t(),t()],d=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),i=t(),a=t(),c=t(),l=t(),A=t(),d=t();return _(e[2],s),O(e[1],n),F(a,e[1]),q(c,a,u),D(a,a,e[2]),M(c,e[2],c),F(l,c),F(A,l),q(d,A,l),q(r,d,a),q(r,r,c),G(r,r),q(r,r,a),q(r,r,c),q(r,r,c),q(e[0],r,c),F(i,e[0]),q(i,i,c),R(i,a)&&q(e[0],e[0],p),F(i,e[0]),q(i,i,c),R(i,a)?-1:(k(e[0])===n[31]>>7&&D(e[0],o,e[0]),q(e[3],e[0],e[1]),0)}(d,i))return-1;for(a=0;a<r;a++)e[a]=n[a];for(a=0;a<32;a++)e[a+32]=i[a];if(W(l,e,r),oe(l),te(A,d,l),ne(d,n.subarray(32)),X(A,d),ee(c,A),r-=64,f(n,0,c,0)){for(a=0;a<r;a++)e[a]=0;return-1}for(a=0;a<r;a++)e[a]=n[a+64];return r}var ue=64,le=32,Ae=64;function de(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function pe(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function me(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:C,crypto_stream_xor:N,crypto_stream:B,crypto_stream_salsa20_xor:w,crypto_stream_salsa20:E,crypto_onetimeauth:v,crypto_onetimeauth_verify:S,crypto_verify_16:g,crypto_verify_32:f,crypto_secretbox:T,crypto_secretbox_open:x,crypto_scalarmult:L,crypto_scalarmult_base:H,crypto_box_beforenm:V,crypto_box_afternm:$,crypto_box:function(e,t,n,r,i,a){var o=new Uint8Array(32);return V(o,i,a),$(e,t,n,r,o)},crypto_box_open:function(e,t,n,r,i,a){var o=new Uint8Array(32);return V(o,i,a),Y(e,t,n,r,o)},crypto_box_keypair:j,crypto_hash:W,crypto_sign:se,crypto_sign_keypair:re,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:Ae,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ie,pack25519:z,unpack25519:O,M:q,A:M,S:F,Z:D,pow2523:G,add:X,set25519:_,modL:ae,scalarmult:te,scalarbase:ne},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){pe(e,t,n),de(n,t);for(var r=new Uint8Array(32+e.length),i=new Uint8Array(r.length),a=0;a<e.length;a++)r[a+32]=e[a];return T(i,r,r.length,t,n),i.subarray(16)},e.secretbox.open=function(e,t,n){pe(e,t,n),de(n,t);for(var r=new Uint8Array(16+e.length),i=new Uint8Array(r.length),a=0;a<e.length;a++)r[a+16]=e[a];return r.length<32||0!==x(i,r,r.length,t,n)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(pe(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return L(n,e,t),n},e.scalarMult.base=function(e){if(pe(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return H(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,i){var a=e.box.before(r,i);return e.secretbox(t,n,a)},e.box.before=function(e,t){pe(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var n=new Uint8Array(32);return V(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,i){var a=e.box.before(r,i);return e.secretbox.open(t,n,a)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return j(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(pe(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return H(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(pe(e,t),t.length!==Ae)throw new Error("bad secret key size");var n=new Uint8Array(ue+e.length);return se(n,e,e.length,t),n},e.sign.open=function(e,t){if(pe(e,t),t.length!==le)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=ce(n,e,e.length,t);if(r<0)return null;for(var i=new Uint8Array(r),a=0;a<i.length;a++)i[a]=n[a];return i},e.sign.detached=function(t,n){for(var r=e.sign(t,n),i=new Uint8Array(ue),a=0;a<i.length;a++)i[a]=r[a];return i},e.sign.detached.verify=function(e,t,n){if(pe(e,t,n),t.length!==ue)throw new Error("bad signature size");if(n.length!==le)throw new Error("bad public key size");var r,i=new Uint8Array(ue+e.length),a=new Uint8Array(ue+e.length);for(r=0;r<ue;r++)i[r]=t[r];for(r=0;r<e.length;r++)i[r+ue]=e[r];return ce(a,i,i.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(Ae);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(pe(e),e.length!==Ae)throw new Error("bad secret key size");for(var t=new Uint8Array(le),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(pe(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),n=new Uint8Array(Ae),r=0;r<32;r++)n[r]=e[r];return re(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=Ae,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){pe(e);var t=new Uint8Array(64);return W(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return pe(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===h(e,0,t,0,e.length)},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,n){var r,i=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(i.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=i[r];me(i)})):(t=n(1281))&&t.randomBytes&&e.setPRNG((function(e,n){var r,i=t.randomBytes(n);for(r=0;r<n;r++)e[r]=i[r];me(i)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},8469:function(e,t,n){"use strict";var r=n(2861).Buffer,i=9007199254740991;function a(e){if(e<0||e>i||e%1!=0)throw new RangeError("value out of range")}function o(e){return a(e),e<253?1:e<=65535?3:e<=4294967295?5:9}e.exports={encode:function e(t,n,i){if(a(t),n||(n=r.allocUnsafe(o(t))),!r.isBuffer(n))throw new TypeError("buffer must be a Buffer instance");return i||(i=0),t<253?(n.writeUInt8(t,i),e.bytes=1):t<=65535?(n.writeUInt8(253,i),n.writeUInt16LE(t,i+1),e.bytes=3):t<=4294967295?(n.writeUInt8(254,i),n.writeUInt32LE(t,i+1),e.bytes=5):(n.writeUInt8(255,i),n.writeUInt32LE(t>>>0,i+1),n.writeUInt32LE(t/4294967296|0,i+5),e.bytes=9),n},decode:function e(t,n){if(!r.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");n||(n=0);var i=t.readUInt8(n);if(i<253)return e.bytes=1,i;if(253===i)return e.bytes=3,t.readUInt16LE(n+1);if(254===i)return e.bytes=5,t.readUInt32LE(n+1);e.bytes=9;var o=t.readUInt32LE(n+1),s=4294967296*t.readUInt32LE(n+5)+o;return a(s),s},encodingLength:o}},952:function(e,t,n){var r;if("object"==typeof globalThis)r=globalThis;else try{r=n(4903)}catch(e){}finally{if(r||"undefined"==typeof window||(r=window),!r)throw new Error("Could not determine global this")}var i=r.WebSocket||r.MozWebSocket,a=n(9840);function o(e,t){return t?new i(e,t):new i(e)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(o,e,{get:function(){return i[e]}})})),e.exports={w3cwebsocket:i?o:null,version:a}},9840:function(e,t,n){e.exports=n(9003).version},9180:function(){},1281:function(){},6040:function(e,t,n){"use strict";var r=n(8251);e.exports=r},7264:function(e,t,n){"use strict";var r=n(4139);n(768),n(8549),n(7152),n(1372),e.exports=r},9692:function(e,t,n){"use strict";var r=n(7045);e.exports=r},5663:function(e,t,n){"use strict";var r=n(70);e.exports=r},1926:function(e,t,n){"use strict";n(6750);var r=n(2046).Object,i=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(i.sham=!0)},3842:function(e,t,n){"use strict";n(8545),n(3643),n(4452),n(3997),n(5084),n(2596),n(5721),n(4954),n(4123),n(3377),n(2230),n(5344),n(1660),n(4610),n(3669),n(4810),n(3325),n(7024),n(8172),n(5205);var r=n(2046);e.exports=r.Symbol},1730:function(e,t,n){"use strict";n(9363),n(3643),n(7057),n(4954);var r=n(560);e.exports=r.f("iterator")},1661:function(e,t,n){"use strict";n(8537),n(3669);var r=n(560);e.exports=r.f("toPrimitive")},4997:function(e,t,n){"use strict";var r=n(6040);e.exports=r},2321:function(e,t,n){"use strict";var r=n(7264);n(3939),n(1785),n(8703),n(4664),n(3422),n(36),n(6878),n(9671),n(359),e.exports=r},2231:function(e,t,n){"use strict";var r=n(9692);e.exports=r},9280:function(e,t,n){"use strict";var r=n(5663);e.exports=r},2159:function(e,t,n){"use strict";var r=n(2250),i=n(4640),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not a function")}},43:function(e,t,n){"use strict";var r=n(4018),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a("Can't set "+i(e)+" as a prototype")}},2156:function(e){"use strict";e.exports=function(){}},6624:function(e,t,n){"use strict";var r=n(6285),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not an object")}},4436:function(e,t,n){"use strict";var r=n(7374),i=n(4849),a=n(575),o=function(e){return function(t,n,o){var s,c=r(t),u=a(c),l=i(o,u);if(e&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},726:function(e,t,n){"use strict";var r=n(8311),i=n(1907),a=n(6946),o=n(9298),s=n(575),c=n(6968),u=i([].push),l=function(e){var t=1===e,n=2===e,i=3===e,l=4===e,A=6===e,d=7===e,p=5===e||A;return function(m,h,g,f){for(var y,C,I=o(m),w=a(I),E=s(w),B=r(h,g),N=0,b=f||c,v=t?b(m,E):n||d?b(m,0):void 0;E>N;N++)if((p||N in w)&&(C=B(y=w[N],N,I),e))if(t)v[N]=C;else if(C)switch(e){case 3:return!0;case 5:return y;case 6:return N;case 2:u(v,y)}else switch(e){case 4:return!1;case 7:u(v,y)}return A?-1:i||l?l:v}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},7171:function(e,t,n){"use strict";var r=n(8828),i=n(6264),a=n(5683),o=i("species");e.exports=function(e){return a>=51||!r((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},3427:function(e,t,n){"use strict";var r=n(1907);e.exports=r([].slice)},4010:function(e,t,n){"use strict";var r=n(1793),i=n(5468),a=n(6285),o=n(6264)("species"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===s||r(t.prototype))||a(t)&&null===(t=t[o]))&&(t=void 0)),void 0===t?s:t}},6968:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},5807:function(e,t,n){"use strict";var r=n(1907),i=r({}.toString),a=r("".slice);e.exports=function(e){return a(i(e),8,-1)}},3948:function(e,t,n){"use strict";var r=n(2623),i=n(2250),a=n(5807),o=n(6264)("toStringTag"),s=Object,c="Arguments"===a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=s(e),o))?n:c?a(t):"Object"===(r=a(t))&&i(t.callee)?"Arguments":r}},7382:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},9550:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},1626:function(e,t,n){"use strict";var r=n(9447),i=n(4284),a=n(5817);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},5817:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},5543:function(e,t,n){"use strict";var r=n(470),i=n(4284),a=n(5817);e.exports=function(e,t,n){var o=r(t);o in e?i.f(e,o,a(0,n)):e[o]=n}},9251:function(e,t,n){"use strict";var r=n(4284);e.exports=function(e,t,n){return r.f(e,t,n)}},8055:function(e,t,n){"use strict";var r=n(1626);e.exports=function(e,t,n,i){return i&&i.enumerable?e[t]=n:r(e,t,n),e}},2532:function(e,t,n){"use strict";var r=n(1010),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},9447:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:function(e,t,n){"use strict";var r=n(1010),i=n(6285),a=r.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},8024:function(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},9287:function(e){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},4723:function(e){"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},5683:function(e,t,n){"use strict";var r,i,a=n(1010),o=n(4723),s=a.process,c=a.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},376:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1091:function(e,t,n){"use strict";var r=n(1010),i=n(6024),a=n(2361),o=n(2250),s=n(3846).f,c=n(7463),u=n(2046),l=n(8311),A=n(1626),d=n(9724),p=function(e){var t=function(n,r,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,a)}return i(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,i,m,h,g,f,y,C,I,w=e.target,E=e.global,B=e.stat,N=e.proto,b=E?r:B?r[w]:r[w]&&r[w].prototype,v=E?u:u[w]||A(u,w,{})[w],S=v.prototype;for(h in t)i=!(n=c(E?h:w+(B?".":"#")+h,e.forced))&&b&&d(b,h),f=v[h],i&&(y=e.dontCallGetSet?(I=s(b,h))&&I.value:b[h]),g=i&&y?y:t[h],(n||N||typeof f!=typeof g)&&(C=e.bind&&i?l(g,r):e.wrap&&i?p(g):N&&o(g)?a(g):g,(e.sham||g&&g.sham||f&&f.sham)&&A(C,"sham",!0),A(v,h,C),N&&(d(u,m=w+"Prototype")||A(u,m,{}),A(u[m],h,g),e.real&&S&&(n||!S[h])&&A(S,h,g)))}},8828:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},6024:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype,a=i.apply,o=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(a):function(){return o.apply(a,arguments)})},8311:function(e,t,n){"use strict";var r=n(2361),i=n(2159),a=n(1505),o=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:a?o(e,t):function(){return e.apply(t,arguments)}}},1505:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},3930:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},6833:function(e,t,n){"use strict";var r=n(9447),i=n(9724),a=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,s=i(a,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&o(a,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},1871:function(e,t,n){"use strict";var r=n(1907),i=n(2159);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},2361:function(e,t,n){"use strict";var r=n(5807),i=n(1907);e.exports=function(e){if("Function"===r(e))return i(e)}},1907:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype,a=i.call,o=r&&i.bind.bind(a,a);e.exports=r?o:function(e){return function(){return a.apply(e,arguments)}}},5582:function(e,t,n){"use strict";var r=n(2046),i=n(1010),a=n(2250),o=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},6656:function(e,t,n){"use strict";var r=n(1907),i=n(1793),a=n(2250),o=n(5807),s=n(160),c=r([].push);e.exports=function(e){if(a(e))return e;if(i(e)){for(var t=e.length,n=[],r=0;r<t;r++){var u=e[r];"string"==typeof u?c(n,u):"number"!=typeof u&&"Number"!==o(u)&&"String"!==o(u)||c(n,s(u))}var l=n.length,A=!0;return function(e,t){if(A)return A=!1,t;if(i(this))return t;for(var r=0;r<l;r++)if(n[r]===e)return t}}}},9367:function(e,t,n){"use strict";var r=n(2159),i=n(7136);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},1010:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:function(e,t,n){"use strict";var r=n(1907),i=n(9298),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},8530:function(e){"use strict";e.exports={}},2416:function(e,t,n){"use strict";var r=n(5582);e.exports=r("document","documentElement")},3648:function(e,t,n){"use strict";var r=n(9447),i=n(8828),a=n(9552);e.exports=!r&&!i((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},6946:function(e,t,n){"use strict";var r=n(1907),i=n(8828),a=n(5807),o=Object,s=r("".split);e.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"===a(e)?s(e,""):o(e)}:o},2647:function(e,t,n){"use strict";var r=n(1907),i=n(2250),a=n(3747),o=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(e){return o(e)}),e.exports=a.inspectSource},4932:function(e,t,n){"use strict";var r,i,a,o=n(551),s=n(1010),c=n(6285),u=n(1626),l=n(9724),A=n(3747),d=n(2522),p=n(8530),m="Object already initialized",h=s.TypeError,g=s.WeakMap;if(o||A.state){var f=A.state||(A.state=new g);f.get=f.get,f.has=f.has,f.set=f.set,r=function(e,t){if(f.has(e))throw new h(m);return t.facade=e,f.set(e,t),t},i=function(e){return f.get(e)||{}},a=function(e){return f.has(e)}}else{var y=d("state");p[y]=!0,r=function(e,t){if(l(e,y))throw new h(m);return t.facade=e,u(e,y,t),t},i=function(e){return l(e,y)?e[y]:{}},a=function(e){return l(e,y)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw new h("Incompatible receiver, "+e+" required");return n}}}},1793:function(e,t,n){"use strict";var r=n(5807);e.exports=Array.isArray||function(e){return"Array"===r(e)}},2250:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},5468:function(e,t,n){"use strict";var r=n(1907),i=n(8828),a=n(2250),o=n(3948),s=n(5582),c=n(2647),u=function(){},l=s("Reflect","construct"),A=/^\s*(?:class|function)\b/,d=r(A.exec),p=!A.test(u),m=function(e){if(!a(e))return!1;try{return l(u,[],e),!0}catch(e){return!1}},h=function(e){if(!a(e))return!1;switch(o(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(A,c(e))}catch(e){return!0}};h.sham=!0,e.exports=!l||i((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?h:m},7463:function(e,t,n){"use strict";var r=n(8828),i=n(2250),a=/#|\.prototype\./,o=function(e,t){var n=c[s(e)];return n===l||n!==u&&(i(t)?r(t):!!t)},s=o.normalize=function(e){return String(e).replace(a,".").toLowerCase()},c=o.data={},u=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},7136:function(e){"use strict";e.exports=function(e){return null==e}},6285:function(e,t,n){"use strict";var r=n(2250);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},4018:function(e,t,n){"use strict";var r=n(6285);e.exports=function(e){return r(e)||null===e}},7376:function(e){"use strict";e.exports=!0},5594:function(e,t,n){"use strict";var r=n(5582),i=n(2250),a=n(8280),o=n(1175),s=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&a(t.prototype,s(e))}},7181:function(e,t,n){"use strict";var r=n(5116).IteratorPrototype,i=n(8075),a=n(5817),o=n(4840),s=n(3742),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=i(r,{next:a(+!u,n)}),o(e,l,!1,!0),s[l]=c,e}},183:function(e,t,n){"use strict";var r=n(1091),i=n(3930),a=n(7376),o=n(6833),s=n(2250),c=n(7181),u=n(5972),l=n(9192),A=n(4840),d=n(1626),p=n(8055),m=n(6264),h=n(3742),g=n(5116),f=o.PROPER,y=o.CONFIGURABLE,C=g.IteratorPrototype,I=g.BUGGY_SAFARI_ITERATORS,w=m("iterator"),E="keys",B="values",N="entries",b=function(){return this};e.exports=function(e,t,n,o,m,g,v){c(n,t,o);var S,T,x,_=function(e){if(e===m&&k)return k;if(!I&&e&&e in z)return z[e];switch(e){case E:case B:case N:return function(){return new n(this,e)}}return function(){return new n(this)}},Q=t+" Iterator",P=!1,z=e.prototype,R=z[w]||z["@@iterator"]||m&&z[m],k=!I&&R||_(m),O="Array"===t&&z.entries||R;if(O&&(S=u(O.call(new e)))!==Object.prototype&&S.next&&(a||u(S)===C||(l?l(S,C):s(S[w])||p(S,w,b)),A(S,Q,!0,!0),a&&(h[Q]=b)),f&&m===B&&R&&R.name!==B&&(!a&&y?d(z,"name",B):(P=!0,k=function(){return i(R,this)})),m)if(T={values:_(B),keys:g?k:_(E),entries:_(N)},v)for(x in T)(I||P||!(x in z))&&p(z,x,T[x]);else r({target:t,proto:!0,forced:I||P},T);return a&&!v||z[w]===k||p(z,w,k,{name:m}),h[t]=k,T}},5116:function(e,t,n){"use strict";var r,i,a,o=n(8828),s=n(2250),c=n(6285),u=n(8075),l=n(5972),A=n(8055),d=n(6264),p=n(7376),m=d("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(i=l(l(a)))!==Object.prototype&&(r=i):h=!0),!c(r)||o((function(){var e={};return r[m].call(e)!==e}))?r={}:p&&(r=u(r)),s(r[m])||A(r,m,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},3742:function(e){"use strict";e.exports={}},575:function(e,t,n){"use strict";var r=n(3121);e.exports=function(e){return r(e.length)}},1176:function(e){"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},8075:function(e,t,n){"use strict";var r,i=n(6624),a=n(2220),o=n(376),s=n(8530),c=n(2416),u=n(9552),l=n(2522),A="prototype",d="script",p=l("IE_PROTO"),m=function(){},h=function(e){return"<"+d+">"+e+"</"+d+">"},g=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},f=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;f="undefined"!=typeof document?document.domain&&r?g(r):(t=u("iframe"),n="java"+d+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):g(r);for(var i=o.length;i--;)delete f[A][o[i]];return f()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m[A]=i(e),n=new m,m[A]=null,n[p]=e):n=f(),void 0===t?n:a.f(n,t)}},2220:function(e,t,n){"use strict";var r=n(9447),i=n(8661),a=n(4284),o=n(6624),s=n(7374),c=n(2875);t.f=r&&!i?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),i=c(t),u=i.length,l=0;u>l;)a.f(e,n=i[l++],r[n]);return e}},4284:function(e,t,n){"use strict";var r=n(9447),i=n(3648),a=n(8661),o=n(6624),s=n(470),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,A="enumerable",d="configurable",p="writable";t.f=r?a?function(e,t,n){if(o(e),t=s(t),o(n),"function"==typeof e&&"prototype"===t&&"value"in n&&p in n&&!n[p]){var r=l(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:A in n?n[A]:r[A],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(o(e),t=s(t),o(n),i)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},3846:function(e,t,n){"use strict";var r=n(9447),i=n(3930),a=n(2574),o=n(5817),s=n(7374),c=n(470),u=n(9724),l=n(3648),A=Object.getOwnPropertyDescriptor;t.f=r?A:function(e,t){if(e=s(e),t=c(t),l)try{return A(e,t)}catch(e){}if(u(e,t))return o(!i(a.f,e,t),e[t])}},5407:function(e,t,n){"use strict";var r=n(5807),i=n(7374),a=n(4443).f,o=n(3427),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"===r(e)?function(e){try{return a(e)}catch(e){return o(s)}}(e):a(i(e))}},4443:function(e,t,n){"use strict";var r=n(3045),i=n(376).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},7170:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},5972:function(e,t,n){"use strict";var r=n(9724),i=n(2250),a=n(9298),o=n(2522),s=n(7382),c=o("IE_PROTO"),u=Object,l=u.prototype;e.exports=s?u.getPrototypeOf:function(e){var t=a(e);if(r(t,c))return t[c];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof u?l:null}},8280:function(e,t,n){"use strict";var r=n(1907);e.exports=r({}.isPrototypeOf)},3045:function(e,t,n){"use strict";var r=n(1907),i=n(9724),a=n(7374),o=n(4436).indexOf,s=n(8530),c=r([].push);e.exports=function(e,t){var n,r=a(e),u=0,l=[];for(n in r)!i(s,n)&&i(r,n)&&c(l,n);for(;t.length>u;)i(r,n=t[u++])&&(~o(l,n)||c(l,n));return l}},2875:function(e,t,n){"use strict";var r=n(3045),i=n(376);e.exports=Object.keys||function(e){return r(e,i)}},2574:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},9192:function(e,t,n){"use strict";var r=n(1871),i=n(6624),a=n(43);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),a(r),t?e(n,r):n.__proto__=r,n}}():void 0)},4878:function(e,t,n){"use strict";var r=n(2623),i=n(3948);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},581:function(e,t,n){"use strict";var r=n(3930),i=n(2250),a=n(6285),o=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&i(n=e.toString)&&!a(s=r(n,e)))return s;if(i(n=e.valueOf)&&!a(s=r(n,e)))return s;if("string"!==t&&i(n=e.toString)&&!a(s=r(n,e)))return s;throw new o("Can't convert object to primitive value")}},2046:function(e){"use strict";e.exports={}},4239:function(e,t,n){"use strict";var r=n(7136),i=TypeError;e.exports=function(e){if(r(e))throw new i("Can't call method on "+e);return e}},4840:function(e,t,n){"use strict";var r=n(2623),i=n(4284).f,a=n(1626),o=n(9724),s=n(4878),c=n(6264)("toStringTag");e.exports=function(e,t,n,u){var l=n?e:e&&e.prototype;l&&(o(l,c)||i(l,c,{configurable:!0,value:t}),u&&!r&&a(l,"toString",s))}},2522:function(e,t,n){"use strict";var r=n(5816),i=n(6499),a=r("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},3747:function(e,t,n){"use strict";var r=n(1010),i=n(2532),a="__core-js_shared__",o=r[a]||i(a,{});e.exports=o},5816:function(e,t,n){"use strict";var r=n(7376),i=n(3747);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.35.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE",source:"https://github.com/zloirock/core-js"})},1470:function(e,t,n){"use strict";var r=n(1907),i=n(5482),a=n(160),o=n(4239),s=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,A=a(o(t)),d=i(n),p=A.length;return d<0||d>=p?e?"":void 0:(r=c(A,d))<55296||r>56319||d+1===p||(l=c(A,d+1))<56320||l>57343?e?s(A,d):r:e?u(A,d,d+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},9846:function(e,t,n){"use strict";var r=n(5683),i=n(8828),a=n(1010).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3467:function(e,t,n){"use strict";var r=n(3930),i=n(5582),a=n(6264),o=n(8055);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,s=a("toPrimitive");t&&!t[s]&&o(t,s,(function(e){return r(n,this)}),{arity:1})}},2595:function(e,t,n){"use strict";var r=n(5582),i=n(1907),a=r("Symbol"),o=a.keyFor,s=i(a.prototype.valueOf);e.exports=a.isRegisteredSymbol||function(e){try{return void 0!==o(s(e))}catch(e){return!1}}},9197:function(e,t,n){"use strict";for(var r=n(5816),i=n(5582),a=n(1907),o=n(5594),s=n(6264),c=i("Symbol"),u=c.isWellKnownSymbol,l=i("Object","getOwnPropertyNames"),A=a(c.prototype.valueOf),d=r("wks"),p=0,m=l(c),h=m.length;p<h;p++)try{var g=m[p];o(c[g])&&s(g)}catch(e){}e.exports=function(e){if(u&&u(e))return!0;try{for(var t=A(e),n=0,r=l(d),i=r.length;n<i;n++)if(d[r[n]]==t)return!0}catch(e){}return!1}},4411:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},4849:function(e,t,n){"use strict";var r=n(5482),i=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},7374:function(e,t,n){"use strict";var r=n(6946),i=n(4239);e.exports=function(e){return r(i(e))}},5482:function(e,t,n){"use strict";var r=n(1176);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},3121:function(e,t,n){"use strict";var r=n(5482),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},9298:function(e,t,n){"use strict";var r=n(4239),i=Object;e.exports=function(e){return i(r(e))}},6028:function(e,t,n){"use strict";var r=n(3930),i=n(6285),a=n(5594),o=n(9367),s=n(581),c=n(6264),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!i(e)||a(e))return e;var n,c=o(e,l);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!i(n)||a(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},470:function(e,t,n){"use strict";var r=n(6028),i=n(5594);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},2623:function(e,t,n){"use strict";var r={};r[n(6264)("toStringTag")]="z",e.exports="[object z]"===String(r)},160:function(e,t,n){"use strict";var r=n(3948),i=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},4640:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6499:function(e,t,n){"use strict";var r=n(1907),i=0,a=Math.random(),o=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++i+a,36)}},1175:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:function(e,t,n){"use strict";var r=n(9447),i=n(8828);e.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},551:function(e,t,n){"use strict";var r=n(1010),i=n(2250),a=r.WeakMap;e.exports=i(a)&&/native code/.test(String(a))},366:function(e,t,n){"use strict";var r=n(2046),i=n(9724),a=n(560),o=n(4284).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||o(t,e,{value:a.f(e)})}},560:function(e,t,n){"use strict";var r=n(6264);t.f=r},6264:function(e,t,n){"use strict";var r=n(1010),i=n(5816),a=n(9724),o=n(6499),s=n(9846),c=n(1175),u=r.Symbol,l=i("wks"),A=c?u.for||u:u&&u.withoutSetter||o;e.exports=function(e){return a(l,e)||(l[e]=s&&a(u,e)?u[e]:A("Symbol."+e)),l[e]}},8545:function(e,t,n){"use strict";var r=n(1091),i=n(8828),a=n(1793),o=n(6285),s=n(9298),c=n(575),u=n(8024),l=n(5543),A=n(6968),d=n(7171),p=n(6264),m=n(5683),h=p("isConcatSpreadable"),g=m>=51||!i((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),f=function(e){if(!o(e))return!1;var t=e[h];return void 0!==t?!!t:a(e)};r({target:"Array",proto:!0,arity:1,forced:!g||!d("concat")},{concat:function(e){var t,n,r,i,a,o=s(this),d=A(o,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(f(a=-1===t?o:arguments[t]))for(i=c(a),u(p+i),n=0;n<i;n++,p++)n in a&&l(d,p,a[n]);else u(p+1),l(d,p++,a);return d.length=p,d}})},9363:function(e,t,n){"use strict";var r=n(7374),i=n(2156),a=n(3742),o=n(4932),s=n(4284).f,c=n(183),u=n(9550),l=n(7376),A=n(9447),d="Array Iterator",p=o.set,m=o.getterFor(d);e.exports=c(Array,"Array",(function(e,t){p(this,{type:d,target:r(e),index:0,kind:t})}),(function(){var e=m(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,u(void 0,!0);switch(e.kind){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)}),"values");var h=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!l&&A&&"values"!==h.name)try{s(h,"name",{value:"values"})}catch(e){}},8537:function(){},9721:function(e,t,n){"use strict";var r=n(1091),i=n(5582),a=n(6024),o=n(3930),s=n(1907),c=n(8828),u=n(2250),l=n(5594),A=n(3427),d=n(6656),p=n(9846),m=String,h=i("JSON","stringify"),g=s(/./.exec),f=s("".charAt),y=s("".charCodeAt),C=s("".replace),I=s(1..toString),w=/[\uD800-\uDFFF]/g,E=/^[\uD800-\uDBFF]$/,B=/^[\uDC00-\uDFFF]$/,N=!p||c((function(){var e=i("Symbol")("stringify detection");return"[null]"!==h([e])||"{}"!==h({a:e})||"{}"!==h(Object(e))})),b=c((function(){return'"\\udf06\\ud834"'!==h("\udf06\ud834")||'"\\udead"'!==h("\udead")})),v=function(e,t){var n=A(arguments),r=d(t);if(u(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(u(r)&&(t=o(r,this,m(e),t)),!l(t))return t},a(h,null,n)},S=function(e,t,n){var r=f(n,t-1),i=f(n,t+1);return g(E,e)&&!g(B,i)||g(B,e)&&!g(E,r)?"\\u"+I(y(e,0),16):e};h&&r({target:"JSON",stat:!0,arity:3,forced:N||b},{stringify:function(e,t,n){var r=A(arguments),i=a(N?v:h,null,r);return b&&"string"==typeof i?C(i,w,S):i}})},7024:function(e,t,n){"use strict";var r=n(1010);n(4840)(r.JSON,"JSON",!0)},8172:function(){},6750:function(e,t,n){"use strict";var r=n(1091),i=n(9447),a=n(4284).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!i},{defineProperty:a})},5264:function(e,t,n){"use strict";var r=n(1091),i=n(9846),a=n(8828),o=n(7170),s=n(9298);r({target:"Object",stat:!0,forced:!i||a((function(){o.f(1)}))},{getOwnPropertySymbols:function(e){var t=o.f;return t?t(s(e)):[]}})},3643:function(){},5205:function(){},7057:function(e,t,n){"use strict";var r=n(1470).charAt,i=n(160),a=n(4932),o=n(183),s=n(9550),c="String Iterator",u=a.set,l=a.getterFor(c);o(String,"String",(function(e){u(this,{type:c,string:i(e),index:0})}),(function(){var e,t=l(this),n=t.string,i=t.index;return i>=n.length?s(void 0,!0):(e=r(n,i),t.index+=e.length,s(e,!1))}))},3997:function(e,t,n){"use strict";n(366)("asyncIterator")},3674:function(e,t,n){"use strict";var r=n(1091),i=n(1010),a=n(3930),o=n(1907),s=n(7376),c=n(9447),u=n(9846),l=n(8828),A=n(9724),d=n(8280),p=n(6624),m=n(7374),h=n(470),g=n(160),f=n(5817),y=n(8075),C=n(2875),I=n(4443),w=n(5407),E=n(7170),B=n(3846),N=n(4284),b=n(2220),v=n(2574),S=n(8055),T=n(9251),x=n(5816),_=n(2522),Q=n(8530),P=n(6499),z=n(6264),R=n(560),k=n(366),O=n(3467),M=n(4840),D=n(4932),q=n(726).forEach,F=_("hidden"),U="Symbol",G="prototype",L=D.set,H=D.getterFor(U),j=Object[G],V=i.Symbol,$=V&&V[G],Y=i.RangeError,J=i.TypeError,K=i.QObject,W=B.f,X=N.f,Z=w.f,ee=v.f,te=o([].push),ne=x("symbols"),re=x("op-symbols"),ie=x("wks"),ae=!K||!K[G]||!K[G].findChild,oe=function(e,t,n){var r=W(j,t);r&&delete j[t],X(e,t,n),r&&e!==j&&X(j,t,r)},se=c&&l((function(){return 7!==y(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?oe:X,ce=function(e,t){var n=ne[e]=y($);return L(n,{type:U,tag:e,description:t}),c||(n.description=t),n},ue=function(e,t,n){e===j&&ue(re,t,n),p(e);var r=h(t);return p(n),A(ne,r)?(n.enumerable?(A(e,F)&&e[F][r]&&(e[F][r]=!1),n=y(n,{enumerable:f(0,!1)})):(A(e,F)||X(e,F,f(1,y(null))),e[F][r]=!0),se(e,r,n)):X(e,r,n)},le=function(e,t){p(e);var n=m(t),r=C(n).concat(me(n));return q(r,(function(t){c&&!a(Ae,n,t)||ue(e,t,n[t])})),e},Ae=function(e){var t=h(e),n=a(ee,this,t);return!(this===j&&A(ne,t)&&!A(re,t))&&(!(n||!A(this,t)||!A(ne,t)||A(this,F)&&this[F][t])||n)},de=function(e,t){var n=m(e),r=h(t);if(n!==j||!A(ne,r)||A(re,r)){var i=W(n,r);return!i||!A(ne,r)||A(n,F)&&n[F][r]||(i.enumerable=!0),i}},pe=function(e){var t=Z(m(e)),n=[];return q(t,(function(e){A(ne,e)||A(Q,e)||te(n,e)})),n},me=function(e){var t=e===j,n=Z(t?re:m(e)),r=[];return q(n,(function(e){!A(ne,e)||t&&!A(j,e)||te(r,ne[e])})),r};u||(V=function(){if(d($,this))throw new J("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,t=P(e),n=function(e){var r=void 0===this?i:this;r===j&&a(n,re,e),A(r,F)&&A(r[F],t)&&(r[F][t]=!1);var o=f(1,e);try{se(r,t,o)}catch(e){if(!(e instanceof Y))throw e;oe(r,t,o)}};return c&&ae&&se(j,t,{configurable:!0,set:n}),ce(t,e)},S($=V[G],"toString",(function(){return H(this).tag})),S(V,"withoutSetter",(function(e){return ce(P(e),e)})),v.f=Ae,N.f=ue,b.f=le,B.f=de,I.f=w.f=pe,E.f=me,R.f=function(e){return ce(z(e),e)},c&&(T($,"description",{configurable:!0,get:function(){return H(this).description}}),s||S(j,"propertyIsEnumerable",Ae,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:V}),q(C(ie),(function(e){k(e)})),r({target:U,stat:!0,forced:!u},{useSetter:function(){ae=!0},useSimple:function(){ae=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?y(e):le(y(e),t)},defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:de}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:pe}),O(),M(V,U),Q[F]=!0},5084:function(){},3313:function(e,t,n){"use strict";var r=n(1091),i=n(5582),a=n(9724),o=n(160),s=n(5816),c=n(4411),u=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=o(e);if(a(u,t))return u[t];var n=i("Symbol")(t);return u[t]=n,l[n]=t,n}})},2596:function(e,t,n){"use strict";n(366)("hasInstance")},5721:function(e,t,n){"use strict";n(366)("isConcatSpreadable")},4954:function(e,t,n){"use strict";n(366)("iterator")},4452:function(e,t,n){"use strict";n(3674),n(3313),n(751),n(9721),n(5264)},751:function(e,t,n){"use strict";var r=n(1091),i=n(9724),a=n(5594),o=n(4640),s=n(5816),c=n(4411),u=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!a(e))throw new TypeError(o(e)+" is not a symbol");if(i(u,e))return u[e]}})},3377:function(e,t,n){"use strict";n(366)("matchAll")},4123:function(e,t,n){"use strict";n(366)("match")},2230:function(e,t,n){"use strict";n(366)("replace")},5344:function(e,t,n){"use strict";n(366)("search")},1660:function(e,t,n){"use strict";n(366)("species")},4610:function(e,t,n){"use strict";n(366)("split")},3669:function(e,t,n){"use strict";var r=n(366),i=n(3467);r("toPrimitive"),i()},4810:function(e,t,n){"use strict";var r=n(5582),i=n(366),a=n(4840);i("toStringTag"),a(r("Symbol"),"Symbol")},3325:function(e,t,n){"use strict";n(366)("unscopables")},768:function(e,t,n){"use strict";var r=n(6264),i=n(4284).f,a=r("metadata"),o=Function.prototype;void 0===o[a]&&i(o,a,{value:null})},8549:function(e,t,n){"use strict";n(366)("asyncDispose")},7152:function(e,t,n){"use strict";n(366)("dispose")},3939:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(2595)})},3422:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(2595)})},1785:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(9197)})},36:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(9197)})},8703:function(e,t,n){"use strict";n(366)("matcher")},6878:function(e,t,n){"use strict";n(366)("metadataKey")},1372:function(e,t,n){"use strict";n(366)("metadata")},4664:function(e,t,n){"use strict";n(366)("observable")},9671:function(e,t,n){"use strict";n(366)("patternMatch")},359:function(e,t,n){"use strict";n(366)("replaceAll")},2560:function(e,t,n){"use strict";n(9363);var r=n(9287),i=n(1010),a=n(4840),o=n(3742);for(var s in r)a(i[s],s),o[s]=o.Array},8251:function(e,t,n){"use strict";var r=n(1926);e.exports=r},4139:function(e,t,n){"use strict";var r=n(3842);n(2560),e.exports=r},7045:function(e,t,n){"use strict";var r=n(1730);n(2560),e.exports=r},70:function(e,t,n){"use strict";var r=n(1661);e.exports=r},9003:function(e){"use strict";e.exports={version:"1.0.34"}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{AE_AMOUNT_FORMATS:function(){return Ze},AbiVersion:function(){return bn},AccountBase:function(){return xl},AccountError:function(){return z},AccountGeneralized:function(){return xp},AccountLedger:function(){return Pp},AccountLedgerFactory:function(){return Rp},AeSdk:function(){return Ud},AeSdkAepp:function(){return wp},AeSdkBase:function(){return Fd},AeSdkMethods:function(){return Dd},AeSdkWallet:function(){return Sp},AensError:function(){return R},AensPointerContextError:function(){return oe},AeppError:function(){return k},AlreadyConnectedError:function(){return Ke},AmbiguousEventDefinitionError:function(){return Pe},ArgumentCountMismatchError:function(){return j},ArgumentError:function(){return L},BaseError:function(){return P},BrowserRuntimeConnection:function(){return BC},BrowserWindowMessageConnection:function(){return IC},BytecodeMismatchError:function(){return we},CLIENT_TTL:function(){return QC},CallReturnType:function(){return Mi},Channel:function(){return Ah},ChannelCallError:function(){return me},ChannelConnectionError:function(){return he},ChannelError:function(){return O},ChannelIncomingMessageError:function(){return ye},ChannelPingTimedOutError:function(){return ge},CompilerBase:function(){return kp},CompilerError:function(){return M},CompilerHttp:function(){return xm},ConsensusProtocolVersion:function(){return Bn},Contract:function(){return pd},ContractError:function(){return D},CryptographyError:function(){return q},DRY_RUN_ACCOUNT:function(){return hn},DecodeError:function(){return Ue},DelegationTag:function(){return Ol},DerivationError:function(){return kA},DryRunError:function(){return Le},DuplicateContractError:function(){return Ee},DuplicateNodeError:function(){return qe},Encoded:function(){return e},Encoding:function(){return Rt},IllegalArgumentError:function(){return H},IllegalBidFeeError:function(){return He},InactiveContractError:function(){return Be},InsufficientBalanceError:function(){return V},InsufficientNameFeeError:function(){return se},InternalError:function(){return re},InvalidAensNameError:function(){return ce},InvalidAuthDataError:function(){return Ie},InvalidChecksumError:function(){return ze},InvalidMethodInvocationError:function(){return Ne},InvalidPasswordError:function(){return Re},InvalidRpcMessageError:function(){return ue},InvalidSignatureError:function(){return je},InvalidTxError:function(){return Zl},LogicError:function(){return ne},MAX_AUTH_FUN_GAS:function(){return gn},MESSAGE_DIRECTION:function(){return Gd},METHODS:function(){return jd},MIN_GAS_PRICE:function(){return fn},MemoryAccount:function(){return jl},MerkleTreeHashMismatchError:function(){return ke},MissingCallbackError:function(){return le},MissingContractAddressError:function(){return be},MissingContractDefError:function(){return ve},MissingEventDefinitionError:function(){return Qe},MissingFunctionNameError:function(){return Se},MissingNodeInTreeError:function(){return Oe},MissingParamError:function(){return $},NAME_BID_MAX_LENGTH:function(){return bC},NAME_BID_RANGES:function(){return En},NAME_BID_TIMEOUT_BLOCKS:function(){return In},NAME_FEE_BID_INCREMENT:function(){return Cn},NAME_FEE_MULTIPLIER:function(){return yn},NAME_MAX_CLIENT_TTL:function(){return _C},NAME_MAX_LENGTH_FEE:function(){return wn},NAME_MAX_TTL:function(){return xC},NAME_TTL:function(){return TC},NoSerializerFoundError:function(){return Y},NoSuchContractFunctionError:function(){return xe},NoWalletConnectedError:function(){return We},Node:function(){return Sl},NodeError:function(){return F},NodeInvocationError:function(){return Te},NodeNotFoundError:function(){return Fe},NotImplementedError:function(){return ee},NotPayableFunctionError:function(){return _e},ORACLE_TTL:function(){return PC},ORACLE_TTL_TYPES:function(){return Oi},PayloadLengthError:function(){return Ge},PrefixNotFoundError:function(){return Ve},QUERY_TTL:function(){return zC},RESPONSE_TTL:function(){return RC},RPC_STATUS:function(){return Vd},RequestTimedOutError:function(){return J},RpcBroadcastError:function(){return NC},RpcConnectionDenyError:function(){return Xd},RpcConnectionError:function(){return Xe},RpcError:function(){return Yd},RpcInternalError:function(){return tp},RpcInvalidTransactionError:function(){return Jd},RpcMethodNotFoundError:function(){return np},RpcNotAuthorizeError:function(){return Zd},RpcPermissionDenyError:function(){return ep},RpcRejectedByUserError:function(){return Kd},RpcUnsupportedProtocolError:function(){return Wd},SUBSCRIPTION_TYPES:function(){return Hd},SchemaNotFoundError:function(){return $e},Tag:function(){return vn},TagNotFoundError:function(){return Ye},TransactionError:function(){return U},TxNotInChainError:function(){return Je},TxTimedOutError:function(){return K},TypeError:function(){return W},UnAuthorizedAccountError:function(){return Ae},UnavailableAccountError:function(){return ae},UnexpectedChannelMessageError:function(){return fe},UnexpectedTsError:function(){return ie},UnknownChannelStateError:function(){return Ce},UnknownNodeLengthError:function(){return Me},UnknownPathNibbleError:function(){return De},UnknownRpcClientError:function(){return de},UnsubscribedAccountError:function(){return pe},UnsupportedPlatformError:function(){return X},UnsupportedProtocolError:function(){return Z},UnsupportedVersionError:function(){return te},VmVersion:function(){return Nn},WALLET_TYPE:function(){return Ld},WalletError:function(){return G},_Middleware:function(){return pC},_MiddlewareSubscriber:function(){return Qh},_MiddlewareSubscriberDisconnected:function(){return Ih},_MiddlewareSubscriberError:function(){return Ch},_getPollInterval:function(){return Ln},aensBid:function(){return ZA},aensClaim:function(){return WA},aensPreclaim:function(){return XA},aensQuery:function(){return KA},aensRevoke:function(){return $A},aensTransfer:function(){return JA},aensUpdate:function(){return YA},awaitHeight:function(){return $n},buildAuthTxHash:function(){return Sd},buildAuthTxHashByGaMetaTx:function(){return Td},buildContractId:function(){return Tn},buildContractIdByContractTx:function(){return aa},buildTx:function(){return ta},buildTxAsync:function(){return na},buildTxHash:function(){return ia},commitmentHash:function(){return zn},computeAuctionEndBlock:function(){return Un},computeBidFee:function(){return Fn},connectionProxy:function(){return mC},createGeneralizedAccount:function(){return vd},decode:function(){return $t},decodeFateValue:function(){return SC},deriveChild:function(){return DA},derivePathFromKey:function(){return qA},derivePathFromSeed:function(){return UA},dump:function(){return vA},encode:function(){return Yt},encodeContractAddress:function(){return tn},encodeFateValue:function(){return vC},encodeUnsigned:function(){return Zt},ensureJwt:function(){return uA},ensureName:function(){return kn},extendOracleTtl:function(){return yd},formatAmount:function(){return tt},genSalt:function(){return Xt},generateKeyPair:function(){return rn},generateKeyPairFromSecret:function(){return nn},generateSaveHDWalletFromSeed:function(){return HA},getAccount:function(){return Jn},getAddressFromPriv:function(){return Kt},getBalance:function(){return Kn},getContract:function(){return or},getContractByteCode:function(){return ar},getCurrentGeneration:function(){return Wn},getDefaultPointerKey:function(){return Dn},getExecutionCost:function(){return Vl},getExecutionCostBySignedTx:function(){return $l},getExecutionCostUsingNode:function(){return Yl},getGeneration:function(){return Xn},getHdWalletAccountFromSeed:function(){return VA},getHeight:function(){return jn},getKeyBlock:function(){return er},getKeyPair:function(){return LA},getMasterKeyFromSeed:function(){return FA},getMicroBlockHeader:function(){return tr},getMicroBlockTransactions:function(){return Zn},getMinimumNameFee:function(){return qn},getName:function(){return sr},getOracleObject:function(){return Id},getQueryObject:function(){return gd},getSaveHDWalletAccounts:function(){return jA},getTransactionSignerAddress:function(){return Tl},hash:function(){return en},hashDomain:function(){return Rl},hashJson:function(){return zl},hashTypedData:function(){return kl},isAddressValid:function(){return Wt},isAuctionName:function(){return Gn},isJwt:function(){return cA},isNameValid:function(){return On},isValidKeypair:function(){return dn},messageToHash:function(){return un},oracleQueryId:function(){return xn},packDelegation:function(){return Fl},payForTransaction:function(){return Nd},poll:function(){return Vn},pollForQueries:function(){return md},pollForQueryResponse:function(){return hd},postQueryToOracle:function(){return fd},prefixedAmount:function(){return st},produceNameId:function(){return Pn},readInt:function(){return Rn},recover:function(){return bA},registerOracle:function(){return wd},resolveName:function(){return cr},respondToQuery:function(){return Cd},sendTransaction:function(){return eA},sign:function(){return an},signJwt:function(){return oA},signMessage:function(){return ln},spend:function(){return Ed},toAe:function(){return nt},toAettos:function(){return rt},toBytes:function(){return mn},transferFunds:function(){return Bd},txDryRun:function(){return ir},unpackDelegation:function(){return Ul},unpackJwt:function(){return sA},unpackTx:function(){return ra},verify:function(){return on},verifyJwt:function(){return lA},verifyMessage:function(){return An},verifyTransaction:function(){return Xl},waitForTxConfirm:function(){return Yn},walletDetector:function(){return wC}});var e={};n.r(e),n.d(e,{Encoding:function(){return Rt}});var t={};n.r(t),n.d(t,{_getPollInterval:function(){return Ln},awaitHeight:function(){return $n},getAccount:function(){return Jn},getBalance:function(){return Kn},getContract:function(){return or},getContractByteCode:function(){return ar},getCurrentGeneration:function(){return Wn},getGeneration:function(){return Xn},getHeight:function(){return jn},getKeyBlock:function(){return er},getMicroBlockHeader:function(){return tr},getMicroBlockTransactions:function(){return Zn},getName:function(){return sr},poll:function(){return Vn},resolveName:function(){return cr},txDryRun:function(){return ir},waitForTxConfirm:function(){return Yn}});var i={};n.r(i),n.d(i,{Account:function(){return Ws},AuctionEntry:function(){return yc},ByteCode:function(){return pc},Channel:function(){return Ic},ChannelCloseMutualTx:function(){return jc},ChannelCloseSoloTx:function(){return Vc},ChannelCreateTx:function(){return Uc},ChannelDepositTx:function(){return Gc},ChannelForceProgressTx:function(){return Hc},ChannelSetDelegatesTx:function(){return Kc},ChannelSettleTx:function(){return Yc},ChannelSlashTx:function(){return $c},ChannelSnapshotSoloTx:function(){return Jc},ChannelWithdrawTx:function(){return Lc},CheckTxInPoolResponse:function(){return lu},CommitmentId:function(){return qc},ContractCallObject:function(){return oc},ContractCallTx:function(){return iu},ContractCreateTx:function(){return ru},ContractObject:function(){return dc},CountResponse:function(){return Js},CreateContractUnsignedTx:function(){return gu},Currency:function(){return vc},Delegates:function(){return Hs},DryRunAccount:function(){return ec},DryRunCallContext:function(){return rc},DryRunCallReq:function(){return nc},DryRunInput:function(){return Zs},DryRunInputItem:function(){return tc},DryRunResult:function(){return ac},DryRunResults:function(){return ic},EncodedTx:function(){return lc},ErrorModel:function(){return Os},Event:function(){return sc},GAAttachTx:function(){return su},GAMetaTx:function(){return cu},GAObject:function(){return uc},GasPricesItem:function(){return Tc},Generation:function(){return Ks},HashResponse:function(){return Ds},Header:function(){return ks},HeightResponse:function(){return qs},Image:function(){return Sc},KeyBlock:function(){return Ms},MicroBlockHeader:function(){return Fs},NameClaimTx:function(){return kc},NameEntry:function(){return Cc},NameHash:function(){return Fc},NamePointer:function(){return Ys},NamePreclaimTx:function(){return Rc},NameRevokeTx:function(){return Dc},NameTransferTx:function(){return Mc},NameUpdateTx:function(){return Oc},NextNonceResponse:function(){return Xs},OffChainCallContract:function(){return hu},OffChainDeposit:function(){return pu},OffChainNewContract:function(){return mu},OffChainTransfer:function(){return Au},OffChainUpdate:function(){return js},OffChainWithdrawal:function(){return du},OracleExtendTx:function(){return Qc},OracleQueries:function(){return gc},OracleQuery:function(){return fc},OracleQueryTx:function(){return Pc},OracleRegisterTx:function(){return _c},OracleRespondTx:function(){return zc},PayingForTx:function(){return uu},PeerConnections:function(){return bc},PeerCount:function(){return eu},PeerCountAvailable:function(){return nu},PeerCountConnected:function(){return tu},PeerDetails:function(){return Xc},PeerPubKey:function(){return wc},Peers:function(){return Zc},PoI:function(){return mc},PostTxResponse:function(){return Ac},Protocol:function(){return Nc},PubKey:function(){return Wc},RegisteredOracle:function(){return hc},RelativeTTL:function(){return Vs},SignedTx:function(){return Gs},SignedTxs:function(){return Us},SpendTx:function(){return xc},Status:function(){return Bc},SyncStatus:function(){return Ec},TokenSupply:function(){return ou},Ttl:function(){return $s},Tx:function(){return Ls},TxInfoObject:function(){return cc},UnsignedTx:function(){return au},discriminators:function(){return fu}});var a={};n.r(a),n.d(a,{aensBid:function(){return ZA},aensClaim:function(){return WA},aensPreclaim:function(){return XA},aensQuery:function(){return KA},aensRevoke:function(){return $A},aensTransfer:function(){return JA},aensUpdate:function(){return YA}});var o={};n.r(o),n.d(o,{extendOracleTtl:function(){return yd},getOracleObject:function(){return Id},getQueryObject:function(){return gd},pollForQueries:function(){return md},pollForQueryResponse:function(){return hd},postQueryToOracle:function(){return fd},registerOracle:function(){return wd},respondToQuery:function(){return Cd}});var s={};n.r(s),n.d(s,{payForTransaction:function(){return Nd},spend:function(){return Ed},transferFunds:function(){return Bd}});var c={};n.r(c),n.d(c,{buildAuthTxHash:function(){return Sd},buildAuthTxHashByGaMetaTx:function(){return Td},createGeneralizedAccount:function(){return vd}});var u={};n.r(u),n.d(u,{ApiVersion:function(){return em},ByteCodeInput:function(){return Kp},BytecodeCallResultInput:function(){return Gp},Calldata:function(){return jp},CompileOpts:function(){return Mp},CompileResult:function(){return Fp},CompilerError:function(){return Dp},CompilerVersion:function(){return Zp},Contract:function(){return Op},DecodeCalldataBytecode:function(){return Vp},DecodeCalldataSource:function(){return Jp},DecodedCalldata:function(){return $p},DecodedCallresult:function(){return Lp},ErrorModel:function(){return Yp},ErrorPos:function(){return qp},FateAssembler:function(){return Wp},FunctionCallInput:function(){return Hp},SophiaBinaryData:function(){return tm},SophiaCallResultInput:function(){return Up},SophiaJsonData:function(){return nm},ValidateByteCodeInput:function(){return Xp}});var l={};n.r(l),n.d(l,{Activity:function(){return eg},Aex141OwnedTokenResponse:function(){return og},Aex141Response:function(){return ig},Aex141TemplateTokensResponse:function(){return Ag},Aex141TemplatesResponse:function(){return ug},Aex141TransferEvent:function(){return yf},Aex9BalanceResponse:function(){return hg},Aex9ContractBalanceResponse:function(){return wg},Aex9Response:function(){return pg},Aex9TransferEvent:function(){return Cf},Aex9TransferResponse:function(){return fg},Auction:function(){return $g},AuctionInfo:function(){return Yg},AuctionInfoLastBid:function(){return Jg},Block:function(){return bg},Channel:function(){return Tg},Contract:function(){return zg},ContractCall:function(){return _g},ContractLog:function(){return Pg},DeltaStat:function(){return kg},ErrorResponse:function(){return ng},Get200ApplicationJsonAllOfPropertiesItemsItem:function(){return Zf},InternalContractCallEvent:function(){return If},InternalTransferEvent:function(){return wf},KeyBlock:function(){return Mg},MicroBlock:function(){return qg},Name:function(){return Lg},NameClaim:function(){return Xg},NameClaimEvent:function(){return Ef},NameInfo:function(){return Hg},NameInfoOwnership:function(){return jg},NameInfoPointers:function(){return Vg},NameTransfer:function(){return ef},NameUpdate:function(){return tf},NotFoundResponse:function(){return vg},Oracle:function(){return rf},OracleExtendsItem:function(){return af},OracleQuery:function(){return sf},OracleResponse:function(){return cf},PaginatedResponse:function(){return tg},Paths10TrrshV2KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Og},Paths11X7LpcV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Bg},Paths12TleqhV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Cg},Paths15Ih6XV2BlocksGetResponses200ContentApplicationJsonSchema:function(){return kf},Paths15PsutbV2TotalstatsGetResponses200ContentApplicationJsonSchema:function(){return Yf},Paths16Srg6EV2NamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Gg},Paths16Tt677V2TxsCountIdGetResponses200ContentApplicationJsonSchema:function(){return ff},Paths17Cjtx5V2TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return mf},Paths17FlgdkV2Aex141GetResponses200ContentApplicationJsonSchemaAllof0:function(){return rg},Paths17O9Fn6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema:function(){return Sf},Paths187U0XzV2ContractsCallsGetResponses200ContentApplicationJsonSchema:function(){return Mf},Paths19B9O7TV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return lg},Paths1BsirxgV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchema:function(){return _f},Paths1C2B0UpV2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ig},Paths1Csrt0IV2ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return xg},Paths1DkkopqV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchema:function(){return zf},Paths1Fe570RV2Aex9GetResponses200ContentApplicationJsonSchemaAllof0:function(){return dg},Paths1I5J7OcV2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Zh},Paths1I6PwfdV2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Kg},Paths1Ilysy5V2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchema:function(){return vf},Paths1Ky8Ew4V2OraclesIdResponsesGetResponses200ContentApplicationJsonSchema:function(){return $f},Paths1LaqrzqV2OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return of},Paths1R02SlwV2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema:function(){return Wf},Paths1R74KpvV2TxsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gf},Paths1RxrrvbV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Fg},Paths1T9RwnyV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema:function(){return Xf},Paths1Txl2A9V2ChannelsGetResponses200ContentApplicationJsonSchema:function(){return Of},Paths1Ulxr59V2KeyBlocksGetResponses200ContentApplicationJsonSchema:function(){return Ff},Paths1V0FiznV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchema:function(){return Qf},Paths1Wbogg8V2Aex9GetResponses200ContentApplicationJsonSchema:function(){return xf},Paths1X48QgjV2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchema:function(){return Pf},Paths3Msq0DV2NamesSearchGetResponses200ContentApplicationJsonSchema:function(){return Hf},Paths3PnwziV2OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return uf},Paths4Bbr8KV2OraclesIdQueriesGetResponses200ContentApplicationJsonSchema:function(){return Vf},Paths5LeqfqV2BlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ng},Paths5U7W2V2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchemaAllof0:function(){return yg},Paths7Hfka2V2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Dg},Paths7P6Qc1V2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0PropertiesDataItemsAllof1:function(){return Wg},Paths7Pbec0V2DeltastatsGetResponses200ContentApplicationJsonSchema:function(){return qf},Paths9Ya94MV2ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Qg},PathsAxw0PwV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ag},PathsB0YvynV2OraclesGetResponses200ContentApplicationJsonSchema:function(){return jf},PathsB246H1V2ContractsLogsGetResponses200ContentApplicationJsonSchema:function(){return Df},PathsBelvp6V2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Eg},PathsC25EgV2ChannelsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Sg},PathsDjelzuV2NamesIdPointeesGetResponses200ContentApplicationJsonSchema:function(){return Zg},PathsDpxn99V2TotalstatsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return df},PathsFclv4TV2TxsGetResponses200ContentApplicationJsonSchema:function(){return Kf},PathsFlc7UjV2Aex141GetResponses200ContentApplicationJsonSchema:function(){return Nf},PathsGuqvhdV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchema:function(){return Gf},PathsIgs9Z1V2TransfersGetResponses200ContentApplicationJsonSchema:function(){return Jf},PathsK9TkttV2NamesGetResponses200ContentApplicationJsonSchema:function(){return Lf},PathsKlr2M2V2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchema:function(){return Bf},PathsMherz6V2OraclesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return nf},PathsN3Ru7DV2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return sg},PathsNi359V2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema:function(){return Rf},PathsNuoourV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema:function(){return Tf},PathsO99PhzV2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema:function(){return Uf},PathsO9MbpkV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchemaAllof1:function(){return mg},PathsRa6Pv6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return cg},PathsRzn6HzV2DeltastatsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Rg},PathsSs61ZgV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchema:function(){return bf},PathsY2JwfkV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gg},Status:function(){return lf},StatusMdwAsyncTasks:function(){return Af},TotalStat:function(){return pf},Transfer:function(){return hf},Tx:function(){return Ug}});var A=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,d=Math.ceil,p=Math.floor,m="[BigNumber Error] ",h=m+"Number primitive has more than 15 significant digits: ",g=1e14,f=14,y=9007199254740991,C=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],I=1e7,w=1e9;function E(e){var t=0|e;return e>0||e===t?t:t-1}function B(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(t=e[r++]+"",n=f-t.length;n--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function N(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,u=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==u,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>u^n?1:-1;for(s=(c=i.length)<(u=a.length)?c:u,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==u?0:c>u^n?1:-1}function b(e,t,n,r){if(e<t||e>n||e!==p(e))throw Error(m+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return E(e.e/f)==t&&e.c[t]%2!=0}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function T(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var x=function e(t){var n,r,i,a,o,s,c,u,l,x,_=H.prototype={constructor:H,toString:null,valueOf:null},Q=new H(1),P=20,z=4,R=-7,k=21,O=-1e7,M=1e7,D=!1,q=1,F=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},G="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function H(e,t){var n,a,o,s,c,u,l,d,m=this;if(!(m instanceof H))return new H(e,t);if(null==t){if(e&&!0===e._isBigNumber)return m.s=e.s,void(!e.c||e.e>M?m.c=m.e=null:e.e<O?m.c=[m.e=0]:(m.e=e.e,m.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(m.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>M?m.c=m.e=null:(m.e=s,m.c=[e]))}d=String(e)}else{if(!A.test(d=String(e)))return i(m,d,u);m.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(s=d.indexOf("."))>-1&&(d=d.replace(".","")),(c=d.search(/e/i))>0?(s<0&&(s=c),s+=+d.slice(c+1),d=d.substring(0,c)):s<0&&(s=d.length)}else{if(b(t,2,G.length,"Base"),10==t&&L)return Y(m=new H(e),P+m.e+1,z);if(d=String(e),u="number"==typeof e){if(0*e!=0)return i(m,d,u,t);if(m.s=1/e<0?(d=d.slice(1),-1):1,H.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(h+e)}else m.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(n=G.slice(0,t),s=c=0,l=d.length;c<l;c++)if(n.indexOf(a=d.charAt(c))<0){if("."==a){if(c>s){s=l;continue}}else if(!o&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){o=!0,c=-1,s=0;continue}return i(m,String(e),u,t)}u=!1,(s=(d=r(d,t,10,m.s)).indexOf("."))>-1?d=d.replace(".",""):s=d.length}for(c=0;48===d.charCodeAt(c);c++);for(l=d.length;48===d.charCodeAt(--l););if(d=d.slice(c,++l)){if(l-=c,u&&H.DEBUG&&l>15&&(e>y||e!==p(e)))throw Error(h+m.s*e);if((s=s-c-1)>M)m.c=m.e=null;else if(s<O)m.c=[m.e=0];else{if(m.e=s,m.c=[],c=(s+1)%f,s<0&&(c+=f),c<l){for(c&&m.c.push(+d.slice(0,c)),l-=f;c<l;)m.c.push(+d.slice(c,c+=f));c=f-(d=d.slice(c)).length}else c-=l;for(;c--;d+="0");m.c.push(+d)}}else m.c=[m.e=0]}function j(e,t,n,r){var i,a,o,s,c;if(null==n?n=z:b(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)c=B(e.c),c=1==r||2==r&&(o<=R||o>=k)?S(c,o):T(c,o,"0");else if(a=(e=Y(new H(e),t,n)).e,s=(c=B(e.c)).length,1==r||2==r&&(t<=a||a<=R)){for(;s<t;c+="0",s++);c=S(c,a)}else if(t-=o,c=T(c,a,"0"),a+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-s)>0)for(a+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function V(e,t){for(var n,r,i=1,a=new H(e[0]);i<e.length;i++)(!(r=new H(e[i])).s||(n=N(a,r))===t||0===n&&a.s===t)&&(a=r);return a}function $(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*f-1)>M?e.c=e.e=null:n<O?e.c=[e.e=0]:(e.e=n,e.c=t),e}function Y(e,t,n,r){var i,a,o,s,c,u,l,A=e.c,m=C;if(A){e:{for(i=1,s=A[0];s>=10;s/=10,i++);if((a=t-i)<0)a+=f,o=t,c=A[u=0],l=p(c/m[i-o-1]%10);else if((u=d((a+1)/f))>=A.length){if(!r)break e;for(;A.length<=u;A.push(0));c=l=0,i=1,o=(a%=f)-f+1}else{for(c=s=A[u],i=1;s>=10;s/=10,i++);l=(o=(a%=f)-f+i)<0?0:p(c/m[i-o-1]%10)}if(r=r||t<0||null!=A[u+1]||(o<0?c:c%m[i-o-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(a>0?o>0?c/m[i-o]:0:A[u-1])%10&1||n==(e.s<0?8:7)),t<1||!A[0])return A.length=0,r?(t-=e.e+1,A[0]=m[(f-t%f)%f],e.e=-t||0):A[0]=e.e=0,e;if(0==a?(A.length=u,s=1,u--):(A.length=u+1,s=m[f-a],A[u]=o>0?p(c/m[i-o]%m[o])*s:0),r)for(;;){if(0==u){for(a=1,o=A[0];o>=10;o/=10,a++);for(o=A[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,A[0]==g&&(A[0]=1));break}if(A[u]+=s,A[u]!=g)break;A[u--]=0,s=1}for(a=A.length;0===A[--a];A.pop());}e.e>M?e.c=e.e=null:e.e<O&&(e.c=[e.e=0])}return e}function J(e){var t,n=e.e;return null===n?e.toString():(t=B(e.c),t=n<=R||n>=k?S(t,n):T(t,n,"0"),e.s<0?"-"+t:t)}return H.clone=e,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(m+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(n=e[t],0,w,t),P=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(n=e[t],0,8,t),z=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(b(n[0],-w,0,t),b(n[1],0,w,t),R=n[0],k=n[1]):(b(n,-w,w,t),R=-(k=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)b(n[0],-w,-1,t),b(n[1],1,w,t),O=n[0],M=n[1];else{if(b(n,-w,w,t),!n)throw Error(m+t+" cannot be zero: "+n);O=-(M=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(m+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw D=!n,Error(m+"crypto unavailable");D=n}else D=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(n=e[t],0,9,t),q=n),e.hasOwnProperty(t="POW_PRECISION")&&(b(n=e[t],0,w,t),F=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(m+t+" not an object: "+n);U=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(m+t+" invalid: "+n);L="0123456789"==n.slice(0,10),G=n}}return{DECIMAL_PLACES:P,ROUNDING_MODE:z,EXPONENTIAL_AT:[R,k],RANGE:[O,M],CRYPTO:D,MODULO_MODE:q,POW_PRECISION:F,FORMAT:U,ALPHABET:G}},H.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!H.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-w&&i<=w&&i===p(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%f)<1&&(t+=f),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=g||n!==p(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(m+"Invalid BigNumber: "+e)},H.maximum=H.max=function(){return V(arguments,-1)},H.minimum=H.min=function(){return V(arguments,1)},H.random=(a=9007199254740992,o=Math.random()*a&2097151?function(){return p(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,a,s=0,c=[],u=new H(Q);if(null==e?e=P:b(e,0,w),i=d(e/f),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[s]=n[0],t[s+1]=n[1]):(c.push(a%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw D=!1,Error(m+"crypto unavailable");for(t=crypto.randomBytes(i*=7);s<i;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=i/7}if(!D)for(;s<i;)(a=o())<9e15&&(c[s++]=a%1e14);for(i=c[--s],e%=f,i&&e&&(a=C[f-e],c[s]=p(i/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=f);for(s=1,a=c[0];a>=10;a/=10,s++);s<f&&(r-=f-s)}return u.e=r,u.c=c,u}),H.sum=function(){for(var e=1,t=arguments,n=new H(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,a,o=[0],s=0,c=e.length;s<c;){for(a=o.length;a--;o[a]*=t);for(o[0]+=r.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>n-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}return function(r,i,a,o,s){var c,u,l,A,d,p,m,h,g=r.indexOf("."),f=P,y=z;for(g>=0&&(A=F,F=0,r=r.replace(".",""),p=(h=new H(i)).pow(r.length-g),F=A,h.c=t(T(B(p.c),p.e,"0"),10,a,e),h.e=h.c.length),l=A=(m=t(r,i,a,s?(c=G,e):(c=e,G))).length;0==m[--A];m.pop());if(!m[0])return c.charAt(0);if(g<0?--l:(p.c=m,p.e=l,p.s=o,m=(p=n(p,h,f,y,a)).c,d=p.r,l=p.e),g=m[u=l+f+1],A=a/2,d=d||u<0||null!=m[u+1],d=y<4?(null!=g||d)&&(0==y||y==(p.s<0?3:2)):g>A||g==A&&(4==y||d||6==y&&1&m[u-1]||y==(p.s<0?8:7)),u<1||!m[0])r=d?T(c.charAt(1),-f,c.charAt(0)):c.charAt(0);else{if(m.length=u,d)for(--a;++m[--u]>a;)m[u]=0,u||(++l,m=[1].concat(m));for(A=m.length;!m[--A];);for(g=0,r="";g<=A;r+=c.charAt(m[g++]));r=T(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,u=t%I,l=t/I|0;for(e=e.slice();c--;)s=((i=u*(a=e[c]%I)+(r=l*a+(o=e[c]/I|0)*u)%I*I+s)/n|0)+(r/I|0)+l*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var c,u,l,A,d,m,h,y,C,I,w,B,N,b,v,S,T,x=r.s==i.s?1:-1,_=r.c,Q=i.c;if(!(_&&_[0]&&Q&&Q[0]))return new H(r.s&&i.s&&(_?!Q||_[0]!=Q[0]:Q)?_&&0==_[0]||!Q?0*x:x/0:NaN);for(C=(y=new H(x)).c=[],x=a+(u=r.e-i.e)+1,s||(s=g,u=E(r.e/f)-E(i.e/f),x=x/f|0),l=0;Q[l]==(_[l]||0);l++);if(Q[l]>(_[l]||0)&&u--,x<0)C.push(1),A=!0;else{for(b=_.length,S=Q.length,l=0,x+=2,(d=p(s/(Q[0]+1)))>1&&(Q=e(Q,d,s),_=e(_,d,s),S=Q.length,b=_.length),N=S,w=(I=_.slice(0,S)).length;w<S;I[w++]=0);T=Q.slice(),T=[0].concat(T),v=Q[0],Q[1]>=s/2&&v++;do{if(d=0,(c=t(Q,I,S,w))<0){if(B=I[0],S!=w&&(B=B*s+(I[1]||0)),(d=p(B/v))>1)for(d>=s&&(d=s-1),h=(m=e(Q,d,s)).length,w=I.length;1==t(m,I,h,w);)d--,n(m,S<h?T:Q,h,s),h=m.length,c=1;else 0==d&&(c=d=1),h=(m=Q.slice()).length;if(h<w&&(m=[0].concat(m)),n(I,m,w,s),w=I.length,-1==c)for(;t(Q,I,S,w)<1;)d++,n(I,S<w?T:Q,w,s),w=I.length}else 0===c&&(d++,I=[0]);C[l++]=d,I[0]?I[w++]=_[N]||0:(I=[_[N]],w=1)}while((N++<b||null!=I[0])&&x--);A=null!=I[0],C[0]||C.splice(0,1)}if(s==g){for(l=1,x=C[0];x>=10;x/=10,l++);Y(y,a+(y.e=l+u*f-1)+1,o,A)}else y.e=u,y.r=+A;return y}}(),s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,x=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,a=n?t:t.replace(x,"");if(l.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(s,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,a=a.replace(c,"$1").replace(u,"0.$1")),t!=a))return new H(a,i);if(H.DEBUG)throw Error(m+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},_.absoluteValue=_.abs=function(){var e=new H(this);return e.s<0&&(e.s=1),e},_.comparedTo=function(e,t){return N(this,new H(e,t))},_.decimalPlaces=_.dp=function(e,t){var n,r,i,a=this;if(null!=e)return b(e,0,w),null==t?t=z:b(t,0,8),Y(new H(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-E(this.e/f))*f,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},_.dividedBy=_.div=function(e,t){return n(this,new H(e,t),P,z)},_.dividedToIntegerBy=_.idiv=function(e,t){return n(this,new H(e,t),0,1)},_.exponentiatedBy=_.pow=function(e,t){var n,r,i,a,o,s,c,u,l=this;if((e=new H(e)).c&&!e.isInteger())throw Error(m+"Exponent not an integer: "+J(e));if(null!=t&&(t=new H(t)),o=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new H(Math.pow(+J(l),o?e.s*(2-v(e)):+J(e))),t?u.mod(t):u;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new H(NaN);(r=!s&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||o&&l.c[1]>=24e7:l.c[0]<8e13||o&&l.c[0]<=9999975e7)))return a=l.s<0&&v(e)?-0:0,l.e>-1&&(a=1/a),new H(s?1/a:a);F&&(a=d(F/f+2))}for(o?(n=new H(.5),s&&(e.s=1),c=v(e)):c=(i=Math.abs(+J(e)))%2,u=new H(Q);;){if(c){if(!(u=u.times(l)).c)break;a?u.c.length>a&&(u.c.length=a):r&&(u=u.mod(t))}if(i){if(0===(i=p(i/2)))break;c=i%2}else if(Y(e=e.times(n),e.e+1,1),e.e>14)c=v(e);else{if(0==(i=+J(e)))break;c=i%2}l=l.times(l),a?l.c&&l.c.length>a&&(l.c.length=a):r&&(l=l.mod(t))}return r?u:(s&&(u=Q.div(u)),t?u.mod(t):a?Y(u,F,z,void 0):u)},_.integerValue=function(e){var t=new H(this);return null==e?e=z:b(e,0,8),Y(t,t.e+1,e)},_.isEqualTo=_.eq=function(e,t){return 0===N(this,new H(e,t))},_.isFinite=function(){return!!this.c},_.isGreaterThan=_.gt=function(e,t){return N(this,new H(e,t))>0},_.isGreaterThanOrEqualTo=_.gte=function(e,t){return 1===(t=N(this,new H(e,t)))||0===t},_.isInteger=function(){return!!this.c&&E(this.e/f)>this.c.length-2},_.isLessThan=_.lt=function(e,t){return N(this,new H(e,t))<0},_.isLessThanOrEqualTo=_.lte=function(e,t){return-1===(t=N(this,new H(e,t)))||0===t},_.isNaN=function(){return!this.s},_.isNegative=function(){return this.s<0},_.isPositive=function(){return this.s>0},_.isZero=function(){return!!this.c&&0==this.c[0]},_.minus=function(e,t){var n,r,i,a,o=this,s=o.s;if(t=(e=new H(e,t)).s,!s||!t)return new H(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/f,u=e.e/f,l=o.c,A=e.c;if(!c||!u){if(!l||!A)return l?(e.s=-t,e):new H(A?o:NaN);if(!l[0]||!A[0])return A[0]?(e.s=-t,e):new H(l[0]?o:3==z?-0:0)}if(c=E(c),u=E(u),l=l.slice(),s=c-u){for((a=s<0)?(s=-s,i=l):(u=c,i=A),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(a=(s=l.length)<(t=A.length))?s:t,s=t=0;t<r;t++)if(l[t]!=A[t]){a=l[t]<A[t];break}if(a&&(i=l,l=A,A=i,e.s=-e.s),(t=(r=A.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=g-1;r>s;){if(l[--r]<A[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=g}l[r]-=A[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?$(e,l,u):(e.s=3==z?-1:1,e.c=[e.e=0],e)},_.modulo=_.mod=function(e,t){var r,i,a=this;return e=new H(e,t),!a.c||!e.s||e.c&&!e.c[0]?new H(NaN):!e.c||a.c&&!a.c[0]?new H(a):(9==q?(i=e.s,e.s=1,r=n(a,e,0,3),e.s=i,r.s*=i):r=n(a,e,0,q),(e=a.minus(r.times(e))).c[0]||1!=q||(e.s=a.s),e)},_.multipliedBy=_.times=function(e,t){var n,r,i,a,o,s,c,u,l,A,d,p,m,h,y,C=this,w=C.c,B=(e=new H(e,t)).c;if(!(w&&B&&w[0]&&B[0]))return!C.s||!e.s||w&&!w[0]&&!B||B&&!B[0]&&!w?e.c=e.e=e.s=null:(e.s*=C.s,w&&B?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=E(C.e/f)+E(e.e/f),e.s*=C.s,(c=w.length)<(A=B.length)&&(m=w,w=B,B=m,i=c,c=A,A=i),i=c+A,m=[];i--;m.push(0));for(h=g,y=I,i=A;--i>=0;){for(n=0,d=B[i]%y,p=B[i]/y|0,a=i+(o=c);a>i;)n=((u=d*(u=w[--o]%y)+(s=p*u+(l=w[o]/y|0)*d)%y*y+m[a]+n)/h|0)+(s/y|0)+p*l,m[a--]=u%h;m[a]=n}return n?++r:m.splice(0,1),$(e,m,r)},_.negated=function(){var e=new H(this);return e.s=-e.s||null,e},_.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new H(e,t)).s,!i||!t)return new H(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/f,o=e.e/f,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new H(i/0);if(!s[0]||!c[0])return c[0]?e:new H(s[0]?r:0*i)}if(a=E(a),o=E(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for((i=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/g|0,s[t]=g===s[t]?0:s[t]%g;return i&&(s=[i].concat(s),++o),$(e,s,o)},_.precision=_.sd=function(e,t){var n,r,i,a=this;if(null!=e&&e!==!!e)return b(e,1,w),null==t?t=z:b(t,0,8),Y(new H(a),e,t);if(!(n=a.c))return null;if(r=(i=n.length-1)*f+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},_.shiftedBy=function(e){return b(e,-9007199254740991,y),this.times("1e"+e)},_.squareRoot=_.sqrt=function(){var e,t,r,i,a,o=this,s=o.c,c=o.s,u=o.e,l=P+4,A=new H("0.5");if(1!==c||!s||!s[0])return new H(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(c=Math.sqrt(+J(o)))||c==1/0?(((t=B(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=E((u+1)/2)-(u<0||u%2),r=new H(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new H(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(a=r,r=A.times(a.plus(n(o,a,l,1))),B(a.c).slice(0,c)===(t=B(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Y(r,r.e+P+2,1),e=!r.times(r).eq(o));break}if(!i&&(Y(a,a.e+P+2,0),a.times(a).eq(o))){r=a;break}l+=4,c+=4,i=1}return Y(r,r.e+P+1,z,e)},_.toExponential=function(e,t){return null!=e&&(b(e,0,w),e++),j(this,e,t,1)},_.toFixed=function(e,t){return null!=e&&(b(e,0,w),e=e+this.e+1),j(this,e,t)},_.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=U;else if("object"!=typeof n)throw Error(m+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split("."),s=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=o[0],A=o[1],d=i.s<0,p=d?l.slice(1):l,h=p.length;if(c&&(a=s,s=c,c=a,h-=a),s>0&&h>0){for(a=h%s||s,l=p.substr(0,a);a<h;a+=s)l+=u+p.substr(a,s);c>0&&(l+=u+p.slice(a)),d&&(l="-"+l)}r=A?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?A.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):A):l}return(n.prefix||"")+r+(n.suffix||"")},_.toFraction=function(e){var t,r,i,a,o,s,c,u,l,A,d,p,h=this,g=h.c;if(null!=e&&(!(c=new H(e)).isInteger()&&(c.c||1!==c.s)||c.lt(Q)))throw Error(m+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+J(c));if(!g)return new H(h);for(t=new H(Q),l=r=new H(Q),i=u=new H(Q),p=B(g),o=t.e=p.length-h.e-1,t.c[0]=C[(s=o%f)<0?f+s:s],e=!e||c.comparedTo(t)>0?o>0?t:l:c,s=M,M=1/0,c=new H(p),u.c[0]=0;A=n(c,t,0,1),1!=(a=r.plus(A.times(i))).comparedTo(e);)r=i,i=a,l=u.plus(A.times(a=l)),u=a,t=c.minus(A.times(a=t)),c=a;return a=n(e.minus(r),i,0,1),u=u.plus(a.times(l)),r=r.plus(a.times(i)),u.s=l.s=h.s,d=n(l,i,o*=2,z).minus(h).abs().comparedTo(n(u,r,o,z).minus(h).abs())<1?[l,i]:[u,r],M=s,d},_.toNumber=function(){return+J(this)},_.toPrecision=function(e,t){return null!=e&&b(e,1,w),j(this,e,t,2)},_.toString=function(e){var t,n=this,i=n.s,a=n.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=R||a>=k?S(B(n.c),a):T(B(n.c),a,"0"):10===e&&L?t=T(B((n=Y(new H(n),P+a+1,z)).c),n.e,"0"):(b(e,2,G.length,"Base"),t=r(T(B(n.c),a,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},_.valueOf=_.toJSON=function(){return J(this)},_._isBigNumber=!0,_[Symbol.toStringTag]="BigNumber",_[Symbol.for("nodejs.util.inspect.custom")]=_.valueOf,null!=t&&H.set(t),H}(),_=x;const Q=e=>e.integerValue(_.ROUND_CEIL);class P extends Error{constructor(e){super(e),this.name="BaseError"}}class z extends P{constructor(e){super(e),this.name="AccountError"}}class R extends P{constructor(e){super(e),this.name="AensError"}}class k extends P{constructor(e){super(e),this.name="AeppError"}}class O extends P{constructor(e){super(e),this.name="ChannelError"}}class M extends P{constructor(e){super(e),this.name="CompilerError"}}class D extends P{constructor(e){super(e),this.name="ContractError"}}class q extends P{constructor(e){super(e),this.name="CryptographyError"}}class F extends P{constructor(e){super(e),this.name="NodeError"}}class U extends P{constructor(e){super(e),this.name="TransactionError"}}class G extends P{constructor(e){super(e),this.name="WalletError"}}class L extends P{constructor(e,t,n){super(`${e} should be ${t}, got ${n} instead`),this.name="ArgumentError"}}class H extends q{constructor(e){super(e),this.name="IllegalArgumentError"}}class j extends P{constructor(e,t,n){super(`${e} expects ${t} arguments, got ${n} instead`),this.name="ArgumentCountMismatchError"}}class V extends P{constructor(e){super(e),this.name="InsufficientBalanceError"}}class $ extends P{constructor(e){super(e),this.name="MissingParamError"}}class Y extends P{constructor(){super("Byte serialization not supported"),this.name="NoSerializerFoundError"}}class J extends P{constructor(e){super(`Giving up at height ${e}`),this.name="RequestTimedOutError"}}class K extends P{constructor(e,t){super([`Giving up after ${e} blocks mined`,`transaction hash: ${t}`].join(", ")),this.name="TxTimedOutError"}}class W extends P{constructor(e){super(e),this.name="TypeError"}}class X extends P{constructor(e){super(e),this.name="UnsupportedPlatformError"}}class Z extends P{constructor(e){super(e),this.name="UnsupportedProtocolError"}}class ee extends P{constructor(e){super(e),this.name="NotImplementedError"}}class te extends P{constructor(e,t,n,r){super(`Unsupported ${e} version ${t}. Supported: >= ${n} < ${r}`),this.name="UnsupportedVersionError"}}class ne extends P{constructor(e){super(e),this.name="LogicError"}}class re extends P{constructor(e){super(e),this.name="InternalError"}}class ie extends re{constructor(e="Expected to not happen, required for TS"){super(e),this.name="UnexpectedTsError"}}class ae extends z{constructor(e){super(`Account for ${e} not available`),this.name="UnavailableAccountError"}}class oe extends R{constructor(e,t){super(`Name ${e} don't have pointers for ${t}`),this.name="AensPointerContextError"}}class se extends R{constructor(e,t){super(`the provided fee ${e.toString()} is not enough to execute the claim, required: ${t.toString()}`),this.name="InsufficientNameFeeError"}}class ce extends R{constructor(e){super(e),this.name="InvalidAensNameError"}}class ue extends k{constructor(e){super(`Received invalid message: ${e}`),this.name="InvalidRpcMessageError"}}class le extends k{constructor(e){super(`Can't find callback for this messageId ${e}`),this.name="MissingCallbackError"}}class Ae extends k{constructor(e){super(`You do not have access to account ${e}`),this.name="UnAuthorizedAccountError"}}class de extends k{constructor(e){super(`RpcClient with id ${e} do not exist`),this.name="UnknownRpcClientError"}}class pe extends k{constructor(){super("You are not subscribed for an account."),this.name="UnsubscribedAccountError"}}class me extends O{constructor(e){super(e),this.name="ChannelCallError"}}class he extends O{constructor(e){super(e),this.name="ChannelConnectionError"}}class ge extends O{constructor(){super("Server pong timed out"),this.name="ChannelPingTimedOutError"}}class fe extends O{constructor(e){super(e),this.name="UnexpectedChannelMessageError"}}class ye extends O{constructor(e,t){super(e.message),this.handlerError=e,this.incomingMessage=t,this.name="ChannelIncomingMessageError"}}class Ce extends O{constructor(){super("State Channels FSM entered unknown state"),this.name="UnknownChannelStateError"}}class Ie extends M{constructor(e){super(e),this.name="InvalidAuthDataError"}}class we extends D{constructor(e){super(`Contract ${e} do not correspond to the bytecode deployed on the chain`),this.name="BytecodeMismatchError"}}class Ee extends D{constructor(){super("Contract already deployed"),this.name="DuplicateContractError"}}class Be extends D{constructor(e){super(`Contract with address ${e} not active`),this.name="InactiveContractError"}}class Ne extends D{constructor(e){super(e),this.name="InvalidMethodInvocationError"}}class be extends D{constructor(e){super(e),this.name="MissingContractAddressError"}}class ve extends D{constructor(){super("Either ACI or sourceCode or sourceCodePath is required"),this.name="MissingContractDefError"}}class Se extends D{constructor(){super("Function name is required"),this.name="MissingFunctionNameError"}}class Te extends D{constructor(e,t){super("Invocation failed"+(null==e?"":`: "${e}"`)),this.name="NodeInvocationError",this.transaction=t}}class xe extends D{constructor(e){super(`Function ${e} doesn't exist in contract`),this.name="NoSuchContractFunctionError"}}class _e extends D{constructor(e,t){super(`You try to pay "${e}" to function "${t}" which is not payable. Only payable function can accept coins`),this.name="NotPayableFunctionError"}}class Qe extends D{constructor(e,t){super(`Can't find definition of ${e} event emitted by ${t} (use omitUnknown option to ignore events like this)`),this.name="MissingEventDefinitionError"}}class Pe extends D{constructor(e,t){super(`Found multiple definitions of "${t[0][1]}" event with different types emitted by ${e} in ${t.map((([e])=>`"${e}"`)).join(", ")} contracts (use contractAddressToName option to specify contract name corresponding to address)`),this.name="AmbiguousEventDefinitionError"}}class ze extends q{constructor(){super("Invalid checksum"),this.name="InvalidChecksumError"}}class Re extends q{constructor(){super("Invalid password or nonce"),this.name="InvalidPasswordError"}}class ke extends q{constructor(){super("Node hash is not equal to provided one"),this.name="MerkleTreeHashMismatchError"}}class Oe extends q{constructor(e){super(e),this.name="MissingNodeInTreeError"}}class Me extends q{constructor(e){super(`Unknown node length: ${e}`),this.name="UnknownNodeLengthError"}}class De extends q{constructor(e){super(`Unknown path nibble: ${e}`),this.name="UnknownPathNibbleError"}}class qe extends F{constructor(e){super(`Node with name ${e} already exist`),this.name="DuplicateNodeError"}}class Fe extends F{constructor(e){super(e),this.name="NodeNotFoundError"}}class Ue extends U{constructor(e){super(e),this.name="DecodeError"}}class Ge extends U{constructor(e){super(e),this.name="PayloadLengthError"}}class Le extends U{constructor(e){super(e),this.name="DryRunError"}}class He extends U{constructor(e){super(e),this.name="IllegalBidFeeError"}}class je extends U{constructor(e){super(e),this.name="InvalidSignatureError"}}class Ve extends U{constructor(e){super(`Prefix for id-tag ${e} not found.`),this.name="PrefixNotFoundError"}}class $e extends U{constructor(e,t){super(`Transaction schema not implemented for tag ${e} version ${t}`),this.name="SchemaNotFoundError"}}class Ye extends U{constructor(e){super(`Id tag for prefix ${e} not found.`),this.name="DecodeError"}}class Je extends U{constructor(e){super(`Transaction ${e} is removed from chain`),this.name="TxNotInChainError"}}class Ke extends G{constructor(e){super(e),this.name="AlreadyConnectedError"}}class We extends G{constructor(e){super(e),this.name="NoWalletConnectedError"}}class Xe extends G{constructor(e){super(e),this.name="RpcConnectionError"}}let Ze=function(e){return e.AE="ae",e.MILI_AE="miliAE",e.MICRO_AE="microAE",e.NANO_AE="nanoAE",e.PICO_AE="picoAE",e.FEMTO_AE="femtoAE",e.AETTOS="aettos",e}({});const et={[Ze.AE]:0,[Ze.MILI_AE]:-3,[Ze.MICRO_AE]:-6,[Ze.NANO_AE]:-9,[Ze.PICO_AE]:-12,[Ze.FEMTO_AE]:-15,[Ze.AETTOS]:-18},tt=(e,{denomination:t=Ze.AETTOS,targetDenomination:n=Ze.AETTOS})=>{if("bigint"!=typeof(r=e)&&(!["number","object","string"].includes(typeof r)||isNaN(r)&&!Number.isInteger(r)&&!_.isBigNumber(r)))throw new L("value","a number",e);var r;return new _("bigint"==typeof e?e.toString():e).shiftedBy(et[t]-et[n]).toFixed()},nt=(e,{denomination:t=Ze.AETTOS}={})=>tt(e,{denomination:t,targetDenomination:Ze.AE}),rt=(e,{denomination:t=Ze.AE}={})=>tt(e,{denomination:t}),it=[{name:"exa",magnitude:18},{name:"giga",magnitude:9},{name:"",magnitude:0},{name:"pico",magnitude:-12}],at=e=>it.reduce(((t,n)=>Math.abs(n.magnitude-e)<Math.abs(t.magnitude-e)?n:t)),ot=e=>{var t;return null!==(t=it.find((t=>t.magnitude<=e)))&&void 0!==t?t:it[it.length-1]},st=e=>{var t;const n=new _(e),r=null!==(t=n.e)&&void 0!==t?t:0,{name:i,magnitude:a}=(r<0?at:ot)(r);return`${n.shiftedBy(-a).precision(9+Math.min(r-a,0)).toFixed()}${""!==i?" ":""}${i}`};function ct(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function ut(e){if(ct(e)){const t="string"==typeof e.name,n="string"==typeof e.message;return t&&n}return!1}function lt(e){if(ut(e))return e.message;{let t;try{t="object"==typeof e&&e?JSON.stringify(e):String(e)}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}const At={},dt="REDACTED",pt=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],mt=["api-version"];class ht{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=pt.concat(e),t=mt.concat(t),this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,n)=>{if(n instanceof Error)return Object.assign(Object.assign({},n),{name:n.name,message:n.message});if("headers"===e)return this.sanitizeHeaders(n);if("url"===e)return this.sanitizeUrl(n);if("query"===e)return this.sanitizeQuery(n);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(n)||ct(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}}),2)}sanitizeHeaders(e){const t={};for(const n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=dt;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;const t={};for(const n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?t[n]=e[n]:t[n]=dt;return t}sanitizeUrl(e){if("string"!=typeof e||null===e)return e;const t=new URL(e);if(!t.search)return e;for(const[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,dt);return t.toString()}}const gt=new ht;class ft extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,this.request=t.request,this.response=t.response,Object.setPrototypeOf(this,ft.prototype)}[At](){return`RestError: ${this.message} \n ${gt.sanitize(this)}`}}ft.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",ft.PARSE_ERROR="PARSE_ERROR";var yt=n(8287).Buffer;const Ct=async e=>new Promise((t=>{setTimeout(t,e)})),It=(e,t)=>Object.fromEntries(Object.entries(e).map(t)),wt=(()=>{try{return yt.concat([Uint8Array.from([])]),!1}catch(e){return!0}})()?(e,t)=>yt.concat(e.map((e=>yt.from(e))),t):yt.concat;function Et(e,t){return e in t}function Bt(e,t){return t.includes(e)}function Nt(e){return e instanceof ft&&404===e.statusCode&&e.message.includes("Account not found")}function bt(e){if(!(e instanceof Error))throw e}function vt(e){return new Proxy({},Object.fromEntries(["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf","get","has"].map((t=>[t,(n,...r)=>{const i=e();if(null==i)throw new L("wrapped value","defined",i);if("get"===t&&"_wrappedValue"===r[0])return i;const a=Reflect[t](i,...r);return"function"==typeof a&&"get"===t?a.bind(i):a}]))))}var St=n(8947),Tt=n.n(St),xt=n(4156),_t=n(8469),Qt=n(6763),Pt=n(4107),zt=n.n(Pt);let Rt=function(e){return e.KeyBlockHash="kh",e.MicroBlockHash="mh",e.BlockPofHash="bf",e.BlockTxHash="bx",e.BlockStateHash="bs",e.Channel="ch",e.ContractAddress="ct",e.ContractBytearray="cb",e.ContractStoreKey="ck",e.ContractStoreValue="cv",e.Transaction="tx",e.TxHash="th",e.OracleAddress="ok",e.OracleQuery="ov",e.OracleQueryId="oq",e.OracleResponse="or",e.AccountAddress="ak",e.Signature="sg",e.Commitment="cm",e.PeerPubkey="pp",e.Name="nm",e.State="st",e.Poi="pi",e.StateTrees="ss",e.CallStateTree="cs",e.Bytearray="ba",e}({});var kt=n(8287).Buffer;function Ot(e){return(new(zt())).update(e).digest()}const Mt=[Rt.ContractBytearray,Rt.ContractStoreKey,Rt.ContractStoreValue,Rt.Transaction,Rt.OracleQuery,Rt.OracleResponse,Rt.State,Rt.Poi,Rt.StateTrees,Rt.CallStateTree,Rt.Bytearray],Dt=[Rt.KeyBlockHash,Rt.MicroBlockHash,Rt.BlockPofHash,Rt.BlockTxHash,Rt.BlockStateHash,Rt.Channel,Rt.ContractAddress,Rt.TxHash,Rt.OracleAddress,Rt.OracleQueryId,Rt.AccountAddress,Rt.Signature,Rt.Commitment,Rt.PeerPubkey,Rt.Name],qt={[Rt.KeyBlockHash]:32,[Rt.MicroBlockHash]:32,[Rt.BlockPofHash]:32,[Rt.BlockTxHash]:32,[Rt.BlockStateHash]:32,[Rt.Channel]:32,[Rt.ContractAddress]:32,[Rt.TxHash]:32,[Rt.OracleAddress]:32,[Rt.OracleQueryId]:32,[Rt.AccountAddress]:32,[Rt.Signature]:64,[Rt.Commitment]:32,[Rt.PeerPubkey]:32,[Rt.State]:32};function Ft(e,t){if(!Et(t,qt))return;const n=qt[t];if(null!=n&&e.length!==n)throw new Ge(`Payload should be ${n} bytes, got ${e.length} instead`)}const Ut=e=>Ot(Ot(e)).slice(0,4),Gt=e=>wt([e,Ut(e)]);function Lt(e){const t=e.slice(0,-4);if(!Ut(t).equals(e.slice(-4)))throw new ze;return t}const Ht={encode:e=>Gt(e).toString("base64"),decode:e=>Lt(kt.from(e,"base64"))},jt={encode:e=>(0,Qt.encode)(Gt(e)),decode:e=>Lt(kt.from((0,Qt.decode)(e)))},Vt=e=>{const t=Mt.find((t=>t===e));if(null!=t)return[t,Ht];const n=Dt.find((t=>t===e));if(null!=n)return[n,jt];throw new L("prefix",`one of ${[...Dt,...Mt].join(", ")}`,e)};function $t(e){const[t,n,r]=e.split("_");if(null==n)throw new Ue(`Encoded string missing payload: ${e}`);if(null!=r)throw new Ue(`Encoded string have extra parts: ${e}`);const[i,a]=Vt(t),o=a.decode(n);return Ft(o,i),o}function Yt(e,t){const[,n]=Vt(t);return Ft(e,t),`${t}_${n.encode(e)}`}var Jt=n(8287).Buffer;function Kt(e){const t="string"==typeof e?Jt.from(e,"hex"):e;return Yt(Tt().sign.keyPair.fromSecretKey(t).publicKey,Rt.AccountAddress)}function Wt(e,...t){0===t.length&&(t=[Rt.AccountAddress]);try{$t(e);const n=e.split("_")[0];if(!Bt(n,t))throw new L("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n);return!0}catch(e){return!1}}function Xt(){const[e]=new BigUint64Array(Tt().randomBytes(8).buffer);return Number(e%BigInt(Number.MAX_SAFE_INTEGER))}function Zt(e){const t=Jt.allocUnsafe(4);return t.writeUInt32BE(e),t.slice(t.findIndex((e=>0!==e)))}function en(e){return Jt.from((0,xt.blake2b)(e,void 0,32))}function tn(e,t){const n=$t(e);return Yt(en(wt([n,Zt(t)])),Rt.ContractAddress)}function nn(e){return Tt().sign.keyPair.fromSecretKey(e)}function rn(e=!1){const t=Tt().sign.keyPair(),n=Jt.from(t.publicKey),r=Jt.from(t.secretKey);return e?{publicKey:n,secretKey:r}:{publicKey:Yt(n,Rt.AccountAddress),secretKey:r.toString("hex")}}function an(e,t){return Tt().sign.detached(Jt.from(e),Jt.from(t))}function on(e,t,n){return Tt().sign.detached.verify(e,t,$t(n))}const sn=Jt.from("aeternity Signed Message:\n","utf8"),cn=(0,_t.encode)(sn.length);function un(e){const t=Jt.from(e,"utf8");return en(wt([cn,sn,(0,_t.encode)(t.length),t]))}function ln(e,t){return an(un(e),t)}function An(e,t,n){return on(un(e),t,n)}function dn(e,t){const n=Jt.from("TheMessage");return on(n,an(n,e),Yt("string"==typeof t?Jt.from(t,"hex"):t,Rt.AccountAddress))}var pn=n(8287).Buffer;function mn(e,t=!1){if(null==e)return pn.from([]);if(Number.isInteger(e)||_.isBigNumber(e)||t){if(_.isBigNumber(e)||(e=new _(e)),!e.isInteger())throw new W(`Unexpected not integer value: ${e.toFixed()}`);let t=e.toString(16);return t.length%2==1&&(t=`0${t}`),pn.from(t,"hex")}if("string"==typeof e)return pn.from(e);throw new Y}const hn={pub:"ak_11111111111111111111111111111111273Yts",amount:100000000000000000000000000000000000n},gn=5e4,fn=1e9,yn=1e14,Cn=.05,In=480,wn=31,En=It({31:3,30:5,29:8,28:13,27:21,26:34,25:55,24:89,23:144,22:233,21:377,20:610,19:987,18:1597,17:2584,16:4181,15:6765,14:10946,13:17711,12:28657,11:46368,10:75025,9:121393,8:196418,7:317811,6:514229,5:832040,4:1346269,3:2178309,2:3524578,1:5702887},(([e,t])=>[e,new _(t).times(yn)]));let Bn=function(e){return e[e.Iris=5]="Iris",e[e.Ceres=6]="Ceres",e}({}),Nn=function(e){return e[e.NoVm=0]="NoVm",e[e.Sophia=1]="Sophia",e[e.SophiaImprovementsMinerva=3]="SophiaImprovementsMinerva",e[e.SophiaImprovementsFortuna=4]="SophiaImprovementsFortuna",e[e.Fate=5]="Fate",e[e.SophiaImprovementsLima=6]="SophiaImprovementsLima",e[e.Fate2=7]="Fate2",e[e.Fate3=8]="Fate3",e}({}),bn=function(e){return e[e.NoAbi=0]="NoAbi",e[e.Sophia=1]="Sophia",e[e.Fate=3]="Fate",e}({}),vn=function(e){return e[e.Account=10]="Account",e[e.SignedTx=11]="SignedTx",e[e.SpendTx=12]="SpendTx",e[e.Oracle=20]="Oracle",e[e.OracleRegisterTx=22]="OracleRegisterTx",e[e.OracleQueryTx=23]="OracleQueryTx",e[e.OracleResponseTx=24]="OracleResponseTx",e[e.OracleExtendTx=25]="OracleExtendTx",e[e.Name=30]="Name",e[e.NameClaimTx=32]="NameClaimTx",e[e.NamePreclaimTx=33]="NamePreclaimTx",e[e.NameUpdateTx=34]="NameUpdateTx",e[e.NameRevokeTx=35]="NameRevokeTx",e[e.NameTransferTx=36]="NameTransferTx",e[e.Contract=40]="Contract",e[e.ContractCall=41]="ContractCall",e[e.ContractCreateTx=42]="ContractCreateTx",e[e.ContractCallTx=43]="ContractCallTx",e[e.ChannelCreateTx=50]="ChannelCreateTx",e[e.ChannelDepositTx=51]="ChannelDepositTx",e[e.ChannelWithdrawTx=52]="ChannelWithdrawTx",e[e.ChannelForceProgressTx=521]="ChannelForceProgressTx",e[e.ChannelCloseMutualTx=53]="ChannelCloseMutualTx",e[e.ChannelCloseSoloTx=54]="ChannelCloseSoloTx",e[e.ChannelSlashTx=55]="ChannelSlashTx",e[e.ChannelSettleTx=56]="ChannelSettleTx",e[e.ChannelOffChainTx=57]="ChannelOffChainTx",e[e.ChannelOffChainUpdateTransfer=570]="ChannelOffChainUpdateTransfer",e[e.ChannelOffChainUpdateDeposit=571]="ChannelOffChainUpdateDeposit",e[e.ChannelOffChainUpdateWithdraw=572]="ChannelOffChainUpdateWithdraw",e[e.ChannelOffChainUpdateCreateContract=573]="ChannelOffChainUpdateCreateContract",e[e.ChannelOffChainUpdateCallContract=574]="ChannelOffChainUpdateCallContract",e[e.ChannelClientReconnectTx=575]="ChannelClientReconnectTx",e[e.Channel=58]="Channel",e[e.ChannelSnapshotSoloTx=59]="ChannelSnapshotSoloTx",e[e.TreesPoi=60]="TreesPoi",e[e.StateTrees=62]="StateTrees",e[e.Mtree=63]="Mtree",e[e.MtreeValue=64]="MtreeValue",e[e.ContractsMtree=621]="ContractsMtree",e[e.CallsMtree=622]="CallsMtree",e[e.ChannelsMtree=623]="ChannelsMtree",e[e.NameserviceMtree=624]="NameserviceMtree",e[e.OraclesMtree=625]="OraclesMtree",e[e.AccountsMtree=626]="AccountsMtree",e[e.GaAttachTx=80]="GaAttachTx",e[e.GaMetaTx=81]="GaMetaTx",e[e.PayingForTx=82]="PayingForTx",e[e.GaMetaTxAuthData=810]="GaMetaTxAuthData",e}({});var Sn=n(8287).Buffer;function Tn(e,t){return Yt(en(Sn.from([...$t(e),...mn(t)])),Rt.ContractAddress)}function xn(e,t,n){return Yt(en(Sn.from([...$t(e),...function(e){const t=mn(e,!0);return wt([Sn.alloc(32-t.length),t])}(t),...$t(n)])),Rt.OracleQueryId)}const _n=".chain";function Qn(e){const[t,n,...r]=e.split(".");if(0!==r.length)throw new L("aens name","including only one dot",e);if(n!==_n.slice(1))throw new L("aens name",`suffixed with ${_n}`,e);if(/\p{Emoji_Presentation}/u.test(t))throw new L("aens name","not containing emoji",e);let i;try{const r=new URL(`http://${t}.${n}`);if(r.username+r.password+r.port+r.search+r.hash!==""||"/"!==r.pathname)throw new L("aens name","valid",e);i=r.host}catch(t){if(t instanceof TypeError&&t.message.includes("Invalid URL"))throw new L("aens name","valid",e);throw t}if(!/^[a-z0-9.-]+$/i.test(i))throw new L("aens name","without illegal chars",e);if(i.length>63+_n.length)throw new L("aens name","not too long",e);return i}function Pn(e){return Yt(en(Qn(e)),Rt.Name)}function zn(e,t=Xt()){return Yt(en(wt([Sn.from(Qn(e)),Sn.from(t.toString(16).padStart(64,"0"),"hex")])),Rt.Commitment)}function Rn(e=Sn.from([])){return new _(Sn.from(e).toString("hex"),16).toString(10)}function kn(e){Qn(e)}function On(e){try{return kn(e),!0}catch(e){return!1}}const Mn=[[Rt.AccountAddress,"account_pubkey"],[Rt.OracleAddress,"oracle_pubkey"],[Rt.ContractAddress,"contract_pubkey"],[Rt.Channel,"channel"]];function Dn(e){$t(e);const t=e.substring(0,2),n=Mn.find((([e])=>e===t))?.[1];if(null!=n)return n;throw new L("identifier",`prefixed with one of ${Mn.map((([e])=>`${e}_`)).join(", ")}`,e)}function qn(e){const t=Qn(e).length-_n.length;return En[Math.min(t,wn)]}function Fn(e,{startFee:t,increment:n=Cn}={}){if(Number(n)!==n||n%1==0)throw new He(`Increment must be float. Current increment ${n}`);if(n<Cn)throw new He(`minimum increment percentage is ${Cn}`);return Q(new _(null!=t?t:qn(e)).times(new _(Cn).plus(1)))}function Un(e,t){var n,r,i;const a=Qn(e).length-_n.length;return(null!==(n=null!==(r=null!==(i=a<=4?62*In:null)&&void 0!==i?i:a<=8?31*In:null)&&void 0!==r?r:a<=12?In:null)&&void 0!==n?n:0)+t}function Gn(e){return Qn(e).length<13+_n.length}function Ln(e,{_expectedMineRate:t=18e4,_microBlockCycle:n=3e3}){const r={block:t,microblock:n}[e];return Math.floor(r/3)}const Hn=new WeakMap;async function jn({cached:e=!1,...t}){const n=null!==(i=(r=t.onNode)._wrappedValue)&&void 0!==i?i:r;var r,i;if(e){const e=Hn.get(n);if(null!=e&&e.time>Date.now()-Ln("block",t))return e.height}const{height:a}=await n.getCurrentKeyBlockHeight();return Hn.set(n,{height:a,time:Date.now()}),a}async function Vn(e,{blocks:t=5,interval:n,onNode:r,...i}){var a;let o;null!==(a=n)&&void 0!==a||(n=Ln("microblock",i));do{const a=await r.getTransactionByHash(e);if(-1!==a.blockHeight)return a;null==o&&(o=0!==a.tx.ttl?-1:await jn({...i,onNode:r,cached:!0})+t),await Ct(n)}while(-1===o||await jn({...i,onNode:r,cached:!0})<o);throw new K(t,e)}async function $n(e,{interval:t,onNode:n,...r}){var i;let a;null!==(i=t)&&void 0!==i||(t=Math.min(Ln("block",r),5e3));do{null!=a&&await Ct(t),a=await jn({onNode:n})}while(a<e);return a}async function Yn(e,{confirm:t=3,onNode:n,...r}){const{blockHeight:i}=await n.getTransactionByHash(e),a=await $n(i+t,{onNode:n,...r}),{blockHeight:o}=await n.getTransactionByHash(e);switch(o){case-1:throw new Je(e);case i:return a;default:return Yn(e,{onNode:n,confirm:t,...r})}}async function Jn(e,{height:t,hash:n,onNode:r}){return null!=t?r.getAccountByPubkeyAndHeight(e,t):null!=n?r.getAccountByPubkeyAndHash(e,n):r.getAccountByPubkey(e)}async function Kn(e,{format:t=Ze.AETTOS,...n}){const r=e.startsWith("ok_")?Yt($t(e),Rt.AccountAddress):e,{balance:i}=await Jn(r,n).catch((e=>{if(!Nt(e))throw e;return{balance:0n}}));return tt(i,{targetDenomination:t})}async function Wn({onNode:e}){return e.getCurrentGeneration()}async function Xn(e,{onNode:t}){return"number"==typeof e?t.getGenerationByHeight(e):t.getGenerationByHash(e)}async function Zn(e,{onNode:t}){return(await t.getMicroBlockTransactionsByHash(e)).transactions}async function er(e,{onNode:t}){return"number"==typeof e?t.getKeyBlockByHeight(e):t.getKeyBlockByHash(e)}async function tr(e,{onNode:t}){return t.getMicroBlockHeaderByHash(e)}const nr=new Map;async function rr(e,t){const n=nr.get(e);if(nr.delete(e),null==n)throw new re("Can't get dry-run request");let r;try{const e="number"==typeof n[0].top?(await er(n[0].top,{onNode:t})).hash:n[0].top;r=await t.protectedDryRunTxs({top:e,txEvents:n[0].txEvents,txs:n.map((e=>({tx:e.tx}))),accounts:Array.from(new Set(n.map((e=>e.accountAddress)))).map((e=>({pubKey:e,amount:hn.amount})))})}catch(e){return void n.forEach((({reject:t})=>t(e)))}const{results:i,txEvents:a}=r;i.forEach((({result:e,reason:t,...r},i)=>{const{resolve:o,reject:s,tx:c,accountAddress:u}=n[i];"ok"===e?o({...r,txEvents:a}):s(Object.assign(new Le(t),{tx:c,accountAddress:u}))}))}async function ir(e,t,{top:n,txEvents:r,combine:i,onNode:a}){var o;const s=!0===i?[n,r].join():"immediate",c=null!==(o=nr.get(s))&&void 0!==o?o:[];return nr.set(s,c),new Promise(((o,u)=>{var l;c.push({tx:e,accountAddress:t,top:n,txEvents:r,resolve:o,reject:u}),!0===i?null!==(l=c.timeout)&&void 0!==l||(c.timeout=setTimeout((()=>{rr(s,a)}))):rr(s,a)}))}async function ar(e,{onNode:t}){return t.getContractCode(e)}async function or(e,{onNode:t}){return t.getContract(e)}async function sr(e,{onNode:t}){return t.getNameEntryByName(e)}async function cr(e,t,{verify:n=!0,resolveByNode:r=!1,onNode:i}){if(On(e)){if(n||r){const n=(await i.getNameEntryByName(e)).pointers.find((e=>e.key===t));if(null==n)throw new oe(e,t);if(r)return n.id}return Pn(e)}try{return $t(e),e}catch(t){throw new ce(`Invalid name or address: ${e}`)}}var ur=n(8287).Buffer;const lr={[Bn.Iris]:{"contract-create":{vmVersion:[Nn.Fate2],abiVersion:[bn.Fate]},"contract-call":{vmVersion:[],abiVersion:[bn.Fate,bn.Sophia]},"oracle-call":{vmVersion:[],abiVersion:[bn.NoAbi,bn.Fate]}},[Bn.Ceres]:{"contract-create":{vmVersion:[Nn.Fate3],abiVersion:[bn.Fate]},"contract-call":{vmVersion:[],abiVersion:[bn.Fate]},"oracle-call":{vmVersion:[],abiVersion:[bn.NoAbi,bn.Fate]}}};function Ar(e,t){var n;const r=lr[e][t];return{vmVersion:null!==(n=r.vmVersion[0])&&void 0!==n?n:Nn.Fate2,abiVersion:r.abiVersion[0]}}var dr={serialize(e,t,{consensusProtocolVersion:n=Bn.Iris}){var r;return null!==(r=e)&&void 0!==r||(e=Ar(n,"contract-create")),ur.from([e.vmVersion,0,e.abiVersion])},async prepare(e,t,n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Bn).length&&null!=n.onNode?Ar((await n.onNode.getNodeInfo()).consensusProtocolVersion,"contract-create"):void 0},deserialize(e){const[t,,n]=e;return{vmVersion:+t,abiVersion:+n}}},pr=n(8287).Buffer;function mr(e){return{serialize(t,{buildTx:n}){return ArrayBuffer.isView(t)?pr.from(t):"string"==typeof t&&t.startsWith("tx_")?$t(t):$t(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackTx:n}){return n(Yt(t,Rt.Transaction),e)}}}function hr(e){return{serialize(t,n){return t.map((t=>e.serialize(t,n)))},deserialize(t,n){return t.map((t=>e.deserialize(t,n)))}}}function gr(e,t){return{serialize(e,{buildTx:n}){return $t(n({tag:vn.Mtree,values:Object.entries(e).map((([e,r])=>({tag:vn.MtreeValue,key:$t(e),value:$t(n({...r,tag:t}))})))}))},deserialize(n,{unpackTx:r}){const{values:i}=r(Yt(n,Rt.Transaction),vn.Mtree);return Object.fromEntries(i.filter((({key:t})=>e!==Rt.ContractAddress||32===t.length)).map((({key:n,value:i})=>[Yt(n,e),r(Yt(i,Rt.Transaction),t)])))},recursiveType:!0}}function fr(e,t){return{...t,serialize(n,r){return t.serialize(null!=n?n:e,r)}}}var yr={serialize(e){if(Number(e)<0)throw new L("value","greater or equal to 0",e);return mn(e,!0)},deserialize(e){return Rn(e)}},Cr={serialize(e){return yr.serialize(e)},deserialize(e){return+yr.deserialize(e)}};function Ir(e,t){return{...t,serialize(n,r,i){return t.serialize(e(n),r,i)}}}function wr(e,t){return{serialize(n){if((!0!==t||null!=n)&&n!==e)throw new L("ShortUIntConst",e,n);return Cr.serialize(e)},deserialize(t){const n=Cr.deserialize(t);if(n!==e)throw new L("ShortUIntConst",e,n);return e},constValue:e,constValueOptional:!0===t}}var Er=n(8287).Buffer;const Br=[Rt.AccountAddress,Rt.Name,Rt.Commitment,Rt.OracleAddress,Rt.ContractAddress,Rt.Channel];function Nr(...e){return{serialize(t){const n=t.slice(0,2);if(!Bt(n,Br))throw new Ye(n);if(!Bt(n,e))throw new L("Address encoding",e.join(", "),n);const r=Br.indexOf(n)+1;return Er.from([...mn(r),...$t(t)])},deserialize(t){const n=Er.from(t).readUIntBE(0,1),r=Br[n-1];if(null==r)throw new Ve(n);if(!Bt(r,e))throw new L("Address encoding",e.join(", "),r);return Yt(t.subarray(1),r)}}}var br=n(8287).Buffer;function vr(e,t){return{serialize(e){if(null==e){if(!0===t)return br.from([]);throw new L("Encoded data","provided",e)}return $t(e)},deserialize(t){return Yt(t,e)}}}var Sr=n(8287).Buffer,Tr={serialize(e){return Sr.from(e)},deserialize(e){return e}},xr={...yr,serializeAettos(e,t,n){return null!=e?e:"0"},serialize(e,t,{denomination:n=Ze.AETTOS,...r}){return yr.serialize(this.serializeAettos(null!=e?tt(e,{denomination:n}):e,t,r))}};function _r(e,t,n){const r=e=>e.split(/[-+]/)[0].split(".").map((e=>+e)),i=r(e),a=r(t),o=r(n),s=Math.max(...i,...a,...o)+1,c=e=>e.reverse().reduce(((e,t,n)=>e+t*s**n),0),u=c(i),l=c(a),A=c(o);return u>=l&&u<A}const Qr=new WeakMap;async function Pr(e){const t=Qr.get(e);if(null!=t&&t.time>Date.now()-2e4)return t.gasPrice;const{nodeVersion:n}=await e._getCachedStatus();if(!n.startsWith("6.12.0+")&&!_r(n,"6.13.0","7.0.0"))return 0n;const{minGasPrice:r,utilization:i}=(await e.getRecentGasPrices())[0];let a=i<70?0n:BigInt(new _(r.toString()).times(1.01).integerValue().toFixed());const o=100000n*BigInt(fn);return a>o&&(console.warn([`Estimated gas price ${a} exceeds the maximum safe value for unknown reason.`,`It will be limited to ${o}.`,"To overcome this restriction provide `gasPrice`/`fee` in options."].join(" ")),a=o),Qr.set(e,{gasPrice:a,time:Date.now()}),a}var zr={...xr,async prepare(e,t,{onNode:n,denomination:r}){if(null!=e)return e;if(null==n)throw new L("onNode","provided (or provide `gasPrice` instead)",n);const i=await Pr(n);return 0n!==i?tt(i,{targetDenomination:r}):void 0},serializeAettos(e=fn.toString()){if(+e<fn)throw new H(`Gas price ${e.toString()} must be bigger than ${fn}`);return e}};function Rr(e){const t={[vn.OracleRegisterTx]:"oracleTtlValue",[vn.OracleExtendTx]:"oracleTtlValue",[vn.OracleQueryTx]:"queryTtlValue",[vn.OracleResponseTx]:"responseTtlValue"},{tag:n}=e;return Et(n,t)?e[t[n]]:1}function kr(e,t,n){const{length:r}=$t(e),i=t(e);let a=0;return i.tag!==vn.GaMetaTx&&i.tag!==vn.PayingForTx||(a=$t(n(i.tx.encodedTx)).length),o=i.tag,15e3*(null!==(s={[vn.ChannelForceProgressTx]:30,[vn.ChannelOffChainTx]:0,[vn.ContractCreateTx]:5,[vn.ContractCallTx]:12,[vn.GaAttachTx]:5,[vn.GaMetaTx]:5,[vn.PayingForTx]:.2}[o])&&void 0!==s?s:1)+((e,t,{relativeTtl:n,innerTxSize:r})=>{switch(e){case vn.OracleRegisterTx:case vn.OracleExtendTx:case vn.OracleQueryTx:case vn.OracleResponseTx:return 20*t+Math.ceil(32e3*n/Math.floor(175200));case vn.GaMetaTx:case vn.PayingForTx:return 20*(t-r);default:return 20*t}})(i.tag,r,{relativeTtl:Rr(i),innerTxSize:a});var o,s}const Or="_gas-price:";var Mr={...xr,async prepare(e,t,{onNode:n}){if(null!=e)return e;if(null==n)throw new L("onNode","provided (or provide `fee` instead)",n);const r=await Pr(n);return 0n!==r?Or+r:void 0},serializeAettos(e,{rebuildTx:t,unpackTx:n,buildTx:r,_computingMinFee:i},{_canIncreaseFee:a}){if(null!=i)return i.toFixed();const o=function(e,t,n){let r,i=new _(0);do{r=i,i=new _(fn).times(kr(e(i),t,n))}while(!i.eq(r));return i}((e=>t({_computingMinFee:e})),n,r),s=!0===e?.startsWith(Or)?o.dividedBy(fn).times(e.replace(Or,"")):new _(null!=e?e:o);if(o.gt(s)){if(!0===a)return o.toFixed();throw new H(`Fee ${s.toString()} must be bigger than ${o}`)}return s.toFixed()},serialize(e,t,n){return"string"==typeof e&&e.startsWith(Or)?yr.serialize(this.serializeAettos(e,t,n)):xr.serialize.call(this,e,t,n)}},Dr={...Cr,serialize(e){return Cr.serialize(null!=e?e:0)},async prepare(e,t,{onNode:n,absoluteTtl:r,_isInternalBuild:i,...a}){if(!0!==r&&0!==e&&(null!=e||!0===i)){var o;if(null==n)throw new L("onNode","provided",n);e=(null!==(o=e)&&void 0!==o?o:3)+await jn({...a,onNode:n,cached:!0})}return e}};function qr(e){return{...Cr,async prepare(t,n,r){if(null!=t)return t;const{onNode:i,strategy:a}=r,o=r[e],s="provided (or provide `nonce` instead)";if(null==i)throw new L("onNode",s,i);if(null==o)throw new L("senderId",s,o);return(await i.getAccountNextNonce(o.replace(/^ok_/,"ak_"),{strategy:a}).catch((e=>{if(!Nt(e))throw e;return{nextNonce:1}}))).nextNonce},senderKey:e}}const Fr=Nr(...Br);var Ur={serialize(e){if(e.length>32)throw new H(`Expected 32 pointers or less, got ${e.length} instead`);return e.map((e=>[mn(e.key),Fr.serialize(e.id)]))},deserialize(e){return e.map((([e,t])=>({key:e.toString(),id:Fr.deserialize(t)})))}},Gr=n(8287).Buffer,Lr={serialize(e){return Gr.from(e)},deserialize(e){return e.toString()}},Hr={serialize(e){return Lr.serialize(e)},deserialize(e){return Lr.deserialize(e)}},jr={...xr,serializeAettos(e,t){const n=qn(t.name),r=new _(null!=e?e:n);if(n.gt(r))throw new se(r,n);return r.toFixed()},serialize(e,t,n){return xr.serialize.call(this,e,t,n)}};const Vr=Nr(Rt.Name);var $r={...Vr,serialize(e){return Vr.serialize(On(e)?Pn(e):e)}},Yr=n(8287).Buffer;const Jr=Yr.from([1]),Kr=Yr.from([2]),Wr=Nr(...Br);var Xr={serialize(e){if(e.length>32)throw new H(`Expected 32 pointers or less, got ${e.length} instead`);return e.map((({key:e,id:t})=>{let n;if(Wt(t,...Br)&&(n=[Jr,Wr.serialize(t)]),Wt(t,Rt.Bytearray)){const e=$t(t);if(e.length>1024)throw new L("Raw pointer","shorter than 1025 bytes",`${e.length} bytes`);n=[Kr,e]}if(null==n)throw new Ue(`Unknown AENS pointer value: ${t}`);return[mn(e),Yr.concat(n)]}))},deserialize(e){return e.map((([e,t])=>{const n=t.subarray(0,1),r=t.subarray(1);let i;if(n.equals(Jr)&&(i=Wr.deserialize(r)),n.equals(Kr)&&(i=Yt(r,Rt.Bytearray)),null==i)throw new Ue(`Unknown AENS pointer tag: ${n}`);return{key:e.toString(),id:i}}))}},Zr=n(8287).Buffer,ei={serialize(e){return Zr.from([e?1:0])},deserialize(e){return 1===e[0]}},ti={...Cr,serialize(e,{tag:t,rebuildTx:n,unpackTx:r,buildTx:i,_computingGasLimit:a},{gasMax:o=6e6}){if(null!=a)return Cr.serialize(a);const s=t===vn.GaMetaTx?gn:function(e,t,n,r){return e-+kr(t(e),n,r)}(o,(e=>n({_computingGasLimit:e,_canIncreaseFee:!0})),r,i),c=null!=e?e:s;if(c>s)throw new H(`Gas limit ${c} must be less or equal to ${s}`);return Cr.serialize(c)}},ni=n(8287).Buffer,ri={_getProtocolDetails(e,t){return Ar(e,vn.ContractCallTx===t||vn.GaMetaTx===t?"contract-call":"oracle-call").abiVersion},serialize(e,{tag:t},{consensusProtocolVersion:n=Bn.Iris}){const r=null!=e?e:this._getProtocolDetails(n,t);return ni.from([r])},async prepare(e,{tag:t},n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Bn).length&&null!=n.onNode?this._getProtocolDetails((await n.onNode.getNodeInfo()).consensusProtocolVersion,t):void 0},deserialize(e){return e[0]}},ii=n(8287).Buffer;function ai(e){const t=Object.values(e).filter((e=>"number"==typeof e));return{serialize(e){if("number"!=typeof e)throw new L("value","to be a number",e);if(e>255)throw new L("value","to be less than 256",e);if(!Bt(e,t))throw new L("value","to be a value of Enum",e);return ii.from([e])},deserialize(e){if(1!==e.length)throw new L("buffer","to have single element",e.length);const n=e[0];if(!Bt(n,t))throw new L("value","to be a value of Enum",n);return n}}}var oi={serialize(e){return mn(e)},deserialize(e){return e.toString()}},si={...xr,async prepare(e,t,n){if(null!=e)return e;const{onNode:r,oracleId:i}=n,a="provided (or provide `queryFee` instead)";if(null==r)throw new L("onNode",a,r);if(null==i)throw new L("oracleId",a,i);return(await r.getOracleByPubkey(i)).queryFee.toString()}};function ci(e,t){return e.get(function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(e,t))}function ui(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,ci(t,e),n),n}function li(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,ci(t,e))}var Ai,di=n(858),pi=n(8287).Buffer;function mi(e,t){gi(e,t),t.add(e)}function hi(e,t,n){gi(e,t),t.set(e,n)}function gi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fi(e,t,n){return Ci(t,e),n}function yi(e,t,n){return Ci(t,e),n}function Ci(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ii=function(e){return e[e.Branch=0]="Branch",e[e.Extension=1]="Extension",e[e.Leaf=2]="Leaf",e}(Ii||{}),wi=new WeakMap,Ei=new WeakMap,Bi=new WeakMap,Ni=new WeakMap,bi=new WeakMap,vi=new WeakMap,Si=new WeakSet,Ti=new WeakSet;class xi{get isComplete(){return li(this,Ei)}constructor(e,t,n,r){if(mi(this,Ti),mi(this,Si),hi(this,wi,{writable:!0,value:void 0}),hi(this,Ei,{writable:!0,value:!0}),hi(this,Bi,{writable:!0,value:void 0}),hi(this,Ni,{writable:!0,value:void 0}),hi(this,bi,{writable:!0,value:void 0}),hi(this,vi,{writable:!0,value:void 0}),ui(this,Ni,t),ui(this,bi,n),ui(this,vi,r),ui(this,wi,e[0].toString("hex")),ui(this,Bi,Object.fromEntries(e[1].map((e=>[e[0].toString("hex"),e[1]])))),null!=li(this,Bi)[li(this,wi)])Object.entries(li(this,Bi)).forEach((([e,t])=>{if(yi(xi,xi,_i).call(xi,t)!==e)throw new ke;const{type:n}=yi(xi,xi,Qi).call(xi,t);switch(n){case Ii.Branch:t.slice(0,16).filter((e=>e.length)).forEach((e=>{null==li(this,Bi)[e.toString("hex")]&&ui(this,Ei,!1)}));break;case Ii.Extension:if(null==li(this,Bi)[t[1].toString("hex")])throw new Oe("Can't find a node by hash in extension node");break;case Ii.Leaf:break;default:throw new re(`Unknown MPTree node type: ${n}`)}}));else{if(0!==Object.keys(li(this,Bi)).length)throw new Oe("Can't find a node by root hash");ui(this,Ei,!1)}}isEqual(e){return li(this,wi)===li(e,wi)}serialize(){return[pi.from(li(this,wi),"hex"),Object.entries(li(this,Bi)).map((([e,t])=>[pi.from(e,"hex"),t]))]}get(e){const t=fi(this,Si,Pi).call(this,$t(e).toString("hex"));return null==t?t:li(this,vi).call(this,Yt(t,Rt.Transaction),li(this,bi))}toObject(){return Object.fromEntries(fi(this,Ti,zi).call(this).filter((([e])=>li(this,Ni)!==Rt.ContractAddress||66!==e.length)).map((([e,t])=>[Yt(pi.from(e,"hex"),li(this,Ni)),li(this,vi).call(this,Yt(t,Rt.Transaction),li(this,bi))])))}}function _i(e){return pi.from(en((0,di.encode)(e))).toString("hex")}function Qi(e){switch(e.length){case 17:return{type:Ii.Branch,...0!==e[16].length&&{value:e[16]}};case 2:{const t=e[0][0]>>4;if(t>3)throw new De(t);const n=t<=1?Ii.Extension:Ii.Leaf,r=[0,2].includes(t)?2:1;return{type:n,...n===Ii.Leaf&&{value:e[1]},path:e[0].toString("hex").slice(r)}}default:throw new Me(e.length)}}function Pi(e){let t=li(this,wi),n=e;for(;;){const e=li(this,Bi)[t];if(null==e){if(!this.isComplete)return;throw new re("Can't find node in complete tree")}const{type:r,value:i,path:a}=yi(Ai,Ai,Qi).call(Ai,e);switch(r){case Ii.Branch:if(0===n.length)return i;t=e[+`0x${n[0]}`].toString("hex"),n=n.substring(1);break;case Ii.Extension:if(n.substring(0,a?.length)!==a)return;t=e[1].toString("hex"),n=n.substring(a.length);break;case Ii.Leaf:if(a!==n)return;return i;default:throw new re(`Unknown MPTree node type: ${r}`)}}}function zi(){const e=[],t=(n,r)=>{const i=li(this,Bi)[n];if(null==i){if(!this.isComplete)return;throw new re("Can't find node in complete tree")}const{type:a,value:o,path:s}=yi(Ai,Ai,Qi).call(Ai,i);switch(a){case Ii.Branch:i.slice(0,16).map(((e,t)=>[e,t])).filter((([e])=>e.length)).forEach((([e,n])=>t(e.toString("hex"),r+n.toString(16)))),null!=o&&e.push([r,o]);break;case Ii.Extension:t(i[1].toString("hex"),r+s);break;case Ii.Leaf:if(null==o)throw new ie;e.push([r+s,o]);break;default:throw new re(`Unknown MPTree node type: ${a}`)}};return t(li(this,wi),""),e}function Ri(e,t){return{serialize(e){return e.serialize()},deserialize(n,{unpackTx:r}){return new xi(n,e,t,r)}}}function ki(e){return{serialize(t,{buildTx:n}){return $t(n({tag:e,payload:t}))},deserialize(t,{unpackTx:n}){return n(Yt(t,Rt.Transaction),e).payload},recursiveType:!0}}Ai=xi;let Oi=function(e){return e[e.delta=0]="delta",e[e.block=1]="block",e}({}),Mi=function(e){return e[e.Ok=0]="Ok",e[e.Error=1]="Error",e[e.Revert=2]="Revert",e}({});const Di=mr(),qi=mr(vn.SignedTx),Fi=hr(mr(vn.MtreeValue)),Ui=mr(vn.TreesPoi),Gi=gr(Rt.ContractAddress,vn.Contract),Li=gr(Rt.AccountAddress,vn.Account),Hi=gr(Rt.Bytearray,vn.ContractCall),ji=gr(Rt.Channel,vn.Channel),Vi=gr(Rt.Name,vn.Name),$i=gr(Rt.OracleAddress,vn.Oracle),Yi=fr(3600,Cr),Ji=Ir((e=>{var t;const n=18e4;if(null!==(t=e)&&void 0!==t||(e=n),e>=1&&e<=n)return e;throw new L("nameTtl","a number between 1 and 180000 blocks",e)}),Cr),Ki=[{tag:wr(vn.Account),version:wr(1),nonce:Cr,balance:yr},{tag:wr(vn.Account),version:wr(2,!0),flags:yr,nonce:Cr,balance:yr,gaContract:Nr(Rt.ContractAddress,Rt.Name),gaAuthFun:vr(Rt.ContractBytearray)},{tag:wr(vn.SignedTx),version:wr(1,!0),signatures:hr(Tr),encodedTx:Di},{tag:wr(vn.SpendTx),version:wr(1,!0),senderId:Nr(Rt.AccountAddress),recipientId:Nr(Rt.AccountAddress,Rt.ContractAddress,Rt.Name),amount:xr,fee:Mr,ttl:Dr,nonce:qr("senderId"),payload:vr(Rt.Bytearray,!0)},{tag:wr(vn.Name),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nameTtl:Cr,status:Tr,clientTtl:Cr,pointers:Ur},{tag:wr(vn.NamePreclaimTx),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),commitmentId:Nr(Rt.Commitment),fee:Mr,ttl:Dr},{tag:wr(vn.NameClaimTx),version:wr(2,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),name:Hr,nameSalt:yr,nameFee:jr,fee:Mr,ttl:Dr},{tag:wr(vn.NameUpdateTx),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),nameId:$r,nameTtl:Ji,pointers:Ur,clientTtl:Yi,fee:Mr,ttl:Dr},{tag:wr(vn.NameUpdateTx),version:wr(2),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),nameId:$r,nameTtl:Ji,pointers:Xr,clientTtl:Yi,fee:Mr,ttl:Dr},{tag:wr(vn.NameTransferTx),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),nameId:$r,recipientId:Nr(Rt.AccountAddress,Rt.Name),fee:Mr,ttl:Dr},{tag:wr(vn.NameRevokeTx),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),nameId:$r,fee:Mr,ttl:Dr},{tag:wr(vn.Contract),version:wr(1,!0),owner:Nr(Rt.AccountAddress),ctVersion:dr,code:vr(Rt.ContractBytearray),log:vr(Rt.ContractBytearray),active:ei,referers:hr(Nr(Rt.AccountAddress)),deposit:xr},{tag:wr(vn.ContractCreateTx),version:wr(1,!0),ownerId:Nr(Rt.AccountAddress),nonce:qr("ownerId"),code:vr(Rt.ContractBytearray),ctVersion:dr,fee:Mr,ttl:Dr,deposit:Ir(((e=0)=>{if(0==+e)return e;throw new L("deposit","equal 0 (because is not refundable)",e)}),xr),amount:xr,gasLimit:ti,gasPrice:zr,callData:vr(Rt.ContractBytearray)},{tag:wr(vn.ContractCallTx),version:wr(1,!0),callerId:Nr(Rt.AccountAddress),nonce:qr("callerId"),contractId:Nr(Rt.ContractAddress,Rt.Name),abiVersion:ri,fee:Mr,ttl:Dr,amount:xr,gasLimit:ti,gasPrice:zr,callData:vr(Rt.ContractBytearray)},{tag:wr(vn.ContractCall),version:wr(2,!0),callerId:Nr(Rt.AccountAddress),callerNonce:Cr,height:Cr,contractId:Nr(Rt.ContractAddress),gasPrice:yr,gasUsed:Cr,returnValue:vr(Rt.ContractBytearray),returnType:ai(Mi),log:hr(Tr)},{tag:wr(vn.Oracle),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),queryFormat:oi,responseFormat:oi,queryFee:xr,oracleTtlValue:Cr,abiVersion:ri},{tag:wr(vn.OracleRegisterTx),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),queryFormat:oi,responseFormat:oi,queryFee:xr,oracleTtlType:fr(Oi.delta,ai(Oi)),oracleTtlValue:fr(500,Cr),fee:Mr,ttl:Dr,abiVersion:ri},{tag:wr(vn.OracleExtendTx),version:wr(1,!0),oracleId:Nr(Rt.OracleAddress,Rt.Name),nonce:qr("oracleId"),oracleTtlType:fr(Oi.delta,ai(Oi)),oracleTtlValue:fr(500,Cr),fee:Mr,ttl:Dr},{tag:wr(vn.OracleQueryTx),version:wr(1,!0),senderId:Nr(Rt.AccountAddress),nonce:qr("senderId"),oracleId:Nr(Rt.OracleAddress,Rt.Name),query:oi,queryFee:si,queryTtlType:fr(Oi.delta,ai(Oi)),queryTtlValue:fr(10,Cr),responseTtlType:fr(Oi.delta,ai(Oi)),responseTtlValue:fr(10,Cr),fee:Mr,ttl:Dr},{tag:wr(vn.OracleResponseTx),version:wr(1,!0),oracleId:Nr(Rt.OracleAddress),nonce:qr("oracleId"),queryId:vr(Rt.OracleQueryId),response:oi,responseTtlType:fr(Oi.delta,ai(Oi)),responseTtlValue:fr(10,Cr),fee:Mr,ttl:Dr},{tag:wr(vn.ChannelCreateTx),version:wr(2,!0),initiator:Nr(Rt.AccountAddress),initiatorAmount:yr,responder:Nr(Rt.AccountAddress),responderAmount:yr,channelReserve:yr,lockPeriod:yr,ttl:Dr,fee:Mr,initiatorDelegateIds:hr(Nr(...Br)),responderDelegateIds:hr(Nr(...Br)),stateHash:vr(Rt.State),nonce:qr("initiator")},{tag:wr(vn.ChannelCloseMutualTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),initiatorAmountFinal:yr,responderAmountFinal:yr,ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelCloseSoloTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),payload:vr(Rt.Transaction),poi:Ui,ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelSlashTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),payload:vr(Rt.Transaction),poi:Ui,ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelDepositTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),amount:yr,ttl:Dr,fee:Mr,stateHash:vr(Rt.State),round:Cr,nonce:qr("fromId")},{tag:wr(vn.ChannelWithdrawTx),version:wr(1,!0),channelId:Nr(Rt.Channel),toId:Nr(Rt.AccountAddress),amount:yr,ttl:Dr,fee:Mr,stateHash:vr(Rt.State),round:Cr,nonce:qr("fromId")},{tag:wr(vn.ChannelSettleTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),initiatorAmountFinal:yr,responderAmountFinal:yr,ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelForceProgressTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),payload:vr(Rt.Transaction),round:Cr,update:vr(Rt.ContractBytearray),stateHash:vr(Rt.State),offChainTrees:vr(Rt.StateTrees),ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelOffChainTx),version:wr(2,!0),channelId:Nr(Rt.Channel),round:Cr,stateHash:vr(Rt.State)},{tag:wr(vn.Channel),version:wr(3,!0),initiator:Nr(Rt.AccountAddress),responder:Nr(Rt.AccountAddress),channelAmount:yr,initiatorAmount:yr,responderAmount:yr,channelReserve:yr,initiatorDelegateIds:hr(Nr(...Br)),responderDelegateIds:hr(Nr(...Br)),stateHash:vr(Rt.State),round:Cr,soloRound:yr,lockPeriod:yr,lockedUntil:yr,initiatorAuth:vr(Rt.ContractBytearray),responderAuth:vr(Rt.ContractBytearray)},{tag:wr(vn.ChannelSnapshotSoloTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),payload:vr(Rt.Transaction),ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelOffChainUpdateTransfer),version:wr(1,!0),from:Nr(Rt.AccountAddress),to:Nr(Rt.AccountAddress),amount:yr},{tag:wr(vn.ChannelOffChainUpdateDeposit),version:wr(1,!0),from:Nr(Rt.AccountAddress),amount:yr},{tag:wr(vn.ChannelOffChainUpdateWithdraw),version:wr(1,!0),from:Nr(Rt.AccountAddress),amount:yr},{tag:wr(vn.ChannelOffChainUpdateCreateContract),version:wr(1,!0),owner:Nr(Rt.AccountAddress),ctVersion:dr,code:vr(Rt.ContractBytearray),deposit:yr,callData:vr(Rt.ContractBytearray)},{tag:wr(vn.ChannelOffChainUpdateCallContract),version:wr(1,!0),caller:Nr(Rt.AccountAddress),contract:Nr(Rt.ContractAddress),abiVersion:ri,amount:yr,callData:vr(Rt.ContractBytearray),callStack:Tr,gasPrice:zr,gasLimit:ti},{tag:wr(vn.ChannelClientReconnectTx),version:wr(1,!0),channelId:Nr(Rt.Channel),round:Cr,role:oi,pubkey:Nr(Rt.AccountAddress)},{tag:wr(vn.TreesPoi),version:wr(1,!0),accounts:hr(Ri(Rt.AccountAddress,vn.Account)),calls:hr(Ri(Rt.Bytearray,vn.ContractCall)),channels:hr(Ri(Rt.Channel,vn.Channel)),contracts:hr(Ri(Rt.ContractAddress,vn.Contract)),ns:hr(Ri(Rt.Name,vn.Name)),oracles:hr(Ri(Rt.OracleAddress,vn.Oracle))},{tag:wr(vn.StateTrees),version:wr(0,!0),contracts:ki(vn.ContractsMtree),calls:ki(vn.CallsMtree),channels:ki(vn.ChannelsMtree),ns:ki(vn.NameserviceMtree),oracles:ki(vn.OraclesMtree),accounts:ki(vn.AccountsMtree)},{tag:wr(vn.Mtree),version:wr(1,!0),values:Fi},{tag:wr(vn.MtreeValue),version:wr(1,!0),key:Tr,value:Tr},{tag:wr(vn.ContractsMtree),version:wr(1,!0),payload:Gi},{tag:wr(vn.CallsMtree),version:wr(1,!0),payload:Hi},{tag:wr(vn.ChannelsMtree),version:wr(1,!0),payload:ji},{tag:wr(vn.NameserviceMtree),version:wr(1,!0),payload:Vi},{tag:wr(vn.OraclesMtree),version:wr(1,!0),payload:$i},{tag:wr(vn.AccountsMtree),version:wr(1,!0),payload:Li},{tag:wr(vn.GaAttachTx),version:wr(1,!0),ownerId:Nr(Rt.AccountAddress),nonce:qr("ownerId"),code:vr(Rt.ContractBytearray),authFun:Tr,ctVersion:dr,fee:Mr,ttl:Dr,gasLimit:ti,gasPrice:zr,callData:vr(Rt.ContractBytearray)},{tag:wr(vn.GaMetaTx),version:wr(2,!0),gaId:Nr(Rt.AccountAddress),authData:vr(Rt.ContractBytearray),abiVersion:ri,fee:Mr,gasLimit:ti,gasPrice:zr,tx:qi},{tag:wr(vn.PayingForTx),version:wr(1,!0),payerId:Nr(Rt.AccountAddress),nonce:qr("payerId"),fee:Mr,tx:qi},{tag:wr(vn.GaMetaTxAuthData),version:wr(1,!0),fee:xr,gasPrice:zr,txHash:vr(Rt.TxHash)}];function Wi(e,t,n,r){const i=e.filter((e=>e.tag.constValue===n));if(0===i.length)throw new $e(`${t[n]} (${n})`,0);if(null==r){const e=i.find((e=>e.version.constValueOptional));if(null==e)throw new re(`Can't find default schema of ${t[n]} (${n})`);r=e.version.constValue}const a=i.find((e=>e.version.constValue===r));if(null==a)throw new $e(`${t[n]} (${n})`,r);return Object.entries(a)}function Xi(e,t,n,r,i){const a=Wi(e,t,n.tag,n.version).map((([e,t])=>t.serialize(n[e],{...n,...r},n)));return Yt((0,di.encode)(a),i)}function Zi(e,t,n,r,i){const a=(0,di.decode)($t(n)),o=+Rn(a[0]),s=Wi(e,t,o,+Rn(a[1]));if(null!=r&&r!==o)throw new Ue(`Expected ${t[r]} tag, got ${t[o]} instead`);if(a.length!==s.length)throw new L("RLP length",s.length,a.length);return Object.fromEntries(s.map((([e,t],n)=>[e,t.deserialize(a[n],i)])))}function ea(e,t){return Wi(Ki,vn,e,t)}function ta(e,{prefix:t}={}){return Xi(Ki,vn,e,{unpackTx:ra,buildTx:ta,rebuildTx:t=>ta({...e,...t})},null!=t?t:Rt.Transaction)}async function na(e){return await Promise.all(ea(e.tag,e.version).map((async([t,n])=>{null!=n.prepare&&(e[t]=await n.prepare(e[t],e,e))}))),ta(e)}function ra(e,t){return Zi(Ki,vn,e,t,{unpackTx:ra})}function ia(e){return Yt(en("string"==typeof e&&e.startsWith("tx_")?$t(e):e),Rt.TxHash)}function aa(e){let t=ra(e);if(vn.SignedTx===t.tag&&(t=t.encodedTx),vn.ContractCreateTx!==t.tag&&vn.GaAttachTx!==t.tag)throw new L("contractTx","a contractCreateTx or gaAttach",t.tag);return Tn(t.ownerId,t.nonce)}const oa="1.14.0",sa=3;function ca(e){const t=new Map;t.set("core-rest-pipeline",oa),function(e){var t,n,r;const i=globalThis.navigator;e.set("OS",(null!==(r=null!==(n=null===(t=null==i?void 0:i.userAgentData)||void 0===t?void 0:t.platform)&&void 0!==n?n:null==i?void 0:i.platform)&&void 0!==r?r:"unknown").replace(" ",""))}(t);const n=function(e){const t=[];for(const[n,r]of e){const e=r?`${n}/${r}`:n;t.push(e)}return t.join(" ")}(t);return e?`${e} ${n}`:n}const ua="x-ms-useragent",la="userAgentPolicy",Aa="setClientRequestIdPolicy",da=()=>{const e=new Map;return{policy:{name:"request-queues",async sendRequest(t,n){var r;const i=t.headers.get("__queue");t.headers.delete("__queue");const a=async()=>n(t);if(null==i)return a();const o=(null!==(r=e.get(i))&&void 0!==r?r:Promise.resolve()).then(a);return e.set(i,o.catch((()=>{}))),o}},position:"perCall"}},pa=()=>{const e=new Map;return{policy:{name:"combine-get-requests",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const i=JSON.stringify([t.url,t.body]),a=null!==(r=e.get(i))&&void 0!==r?r:n(t);e.set(i,a);try{return await a}finally{e.delete(i)}}},position:"perCall"}},ma=()=>{const e=new Map;return{policy:{name:"aggressive-cache-get-responses",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const i=JSON.stringify([t.url,t.body]),a=null!==(r=e.get(i))&&void 0!==r?r:n(t);return e.set(i,a),a}},position:"perCall"}},ha=e=>({policy:{name:"error-formatter",async sendRequest(t,n){try{return await n(t)}catch(t){if(!(t instanceof ft)||null==t.request)throw t;const n=`${new URL(t.request.url).pathname.slice(1)} error`;if(null==t.response?.bodyAsText)throw""===t.message&&(t.message=`${n}: ${t.code}`),t;const r=t.response.parsedBody;t.message=n;const i=null==r?` ${t.response.status} status code`:e(r);throw""!==i&&(t.message+=`:${i}`),t}}},position:"perCall"}),ga=(e,t,n,r)=>({policy:{name:"version-check",async sendRequest(i,a){if(i.headers.has("__version-check"))return i.headers.delete("__version-check"),a(i);const o=[await t({requestOptions:{customHeaders:{"__version-check":"true"}}}),n,r];if(!_r(...o))throw new te(e,...o);return a(i)}},position:"perCall"}),fa=(e,t)=>({policy:{name:"retry-on-failure",async sendRequest(n,r){var i;const a=null!==(i=n.headers.get("__retry-code"))&&void 0!==i?i:NaN;n.headers.delete("__retry-code");const o=[200,400,403,410,500].filter((e=>e!==+a)),s=new Array(e).fill(0).map(((t,n)=>((n+1)/e)**2)),c=s.reduce(((e,t)=>e+t),0),u=s.map((e=>Math.floor(e/c*t)));let l=new ft("Not expected to be thrown");for(let t=0;t<=e;t+=1){if(0!==t){await Ct(u[t-1]);const e=new URL(n.url);e.searchParams.set("__sdk-retry",t.toString()),n.url=e.toString()}try{return await r(n)}catch(e){var A;if(!(e instanceof ft))throw e;if(o.includes(null!==(A=e.response?.status)&&void 0!==A?A:0))throw e;l=e}}throw l}},position:"perCall"});function ya(e){return e.toLowerCase()}class Ca{constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(ya(e),{name:e,value:String(t).trim()})}get(e){var t;return null===(t=this._headersMap.get(ya(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(ya(e))}delete(e){this._headersMap.delete(ya(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const e of this._headersMap.values())t[e.name]=e.value;else for(const[e,n]of this._headersMap)t[e]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*(e){for(const t of e.values())yield[t.name,t.value]}(this._headersMap)}}function Ia(e){return new Ca(e)}var wa;const Ea="function"==typeof(null===(wa=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===wa?void 0:wa.randomUUID)?globalThis.crypto.randomUUID.bind(globalThis.crypto):function(){let e="";for(let t=0;t<32;t++){const n=Math.floor(16*Math.random());e+=12===t?"4":16===t?3&n|8:n.toString(16),7!==t&&11!==t&&15!==t&&19!==t||(e+="-")}return e};function Ba(){return Ea()}class Na{constructor(e){var t,n,r,i,a,o,s;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:Ia(),this.method=null!==(n=e.method)&&void 0!==n?n:"GET",this.timeout=null!==(r=e.timeout)&&void 0!==r?r:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=null!==(i=e.disableKeepAlive)&&void 0!==i&&i,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(a=e.withCredentials)&&void 0!==a&&a,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||Ba(),this.allowInsecureConnection=null!==(o=e.allowInsecureConnection)&&void 0!==o&&o,this.enableBrowserStreams=null!==(s=e.enableBrowserStreams)&&void 0!==s&&s}}const ba="$",va="_";function Sa(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Ta(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}const xa=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,_a=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function Qa(e,t){var n,r;const i=e.parsedHeaders;if("HEAD"===e.request.method)return Object.assign(Object.assign({},i),{body:e.parsedBody});const a=t&&t.bodyMapper,o=Boolean(null==a?void 0:a.nullable),s=null==a?void 0:a.type.name;if("Stream"===s)return Object.assign(Object.assign({},i),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const c="Composite"===s&&a.type.modelProperties||{},u=Object.keys(c).some((e=>""===c[e].serializedName));if("Sequence"===s||u){const t=null!==(n=e.parsedBody)&&void 0!==n?n:[];for(const n of Object.keys(c))c[n].serializedName&&(t[n]=null===(r=e.parsedBody)||void 0===r?void 0:r[n]);if(i)for(const e of Object.keys(i))t[e]=i[e];return!o||e.parsedBody||i||0!==Object.getOwnPropertyNames(c).length?t:null}return function(e){const t=Object.assign(Object.assign({},e.headers),e.body);return e.hasNullableType&&0===Object.getOwnPropertyNames(t).length?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?Object.assign(Object.assign({},e.headers),{body:e.body}):t}({body:e.parsedBody,headers:i,hasNullableType:o,shouldWrapBody:(l=e.parsedBody,A=s,"Composite"!==A&&"Dictionary"!==A&&("string"==typeof l||"number"==typeof l||"boolean"==typeof l||null!==(null==A?void 0:A.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==l))});var l,A}class Pa{constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,n){const r=(e,r)=>{throw new Error(`"${n}" with value "${t}" should satisfy the constraint "${e}": ${r}.`)};if(e.constraints&&null!=t){const{ExclusiveMaximum:n,ExclusiveMinimum:i,InclusiveMaximum:a,InclusiveMinimum:o,MaxItems:s,MaxLength:c,MinItems:u,MinLength:l,MultipleOf:A,Pattern:d,UniqueItems:p}=e.constraints;if(void 0!==n&&t>=n&&r("ExclusiveMaximum",n),void 0!==i&&t<=i&&r("ExclusiveMinimum",i),void 0!==a&&t>a&&r("InclusiveMaximum",a),void 0!==o&&t<o&&r("InclusiveMinimum",o),void 0!==s&&t.length>s&&r("MaxItems",s),void 0!==c&&t.length>c&&r("MaxLength",c),void 0!==u&&t.length<u&&r("MinItems",u),void 0!==l&&t.length<l&&r("MinLength",l),void 0!==A&&t%A!=0&&r("MultipleOf",A),d){const e="string"==typeof d?new RegExp(d):d;"string"==typeof t&&null!==t.match(e)||r("Pattern",d)}p&&t.some(((e,t,n)=>n.indexOf(e)!==t))&&r("UniqueItems",p)}}serialize(e,t,n,r={xml:{}}){var i,a,o;const s={xml:{rootName:null!==(i=r.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(a=r.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(o=r.xml.xmlCharKey)&&void 0!==o?o:va}};let c={};const u=e.type.name;n||(n=e.serializedName),null!==u.match(/^Sequence$/i)&&(c=[]),e.isConstant&&(t=e.defaultValue);const{required:l,nullable:A}=e;if(l&&A&&void 0===t)throw new Error(`${n} cannot be undefined.`);if(l&&!A&&null==t)throw new Error(`${n} cannot be null or undefined.`);if(!l&&!1===A&&null===t)throw new Error(`${n} cannot be null.`);return null==t||null!==u.match(/^any$/i)?c=t:null!==u.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)?c=function(e,t,n){if(null!=n)if(null!==e.match(/^Number$/i)){if("number"!=typeof n)throw new Error(`${t} with value ${n} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof n.valueOf())throw new Error(`${t} with value "${n}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof n.valueOf()||(r=n,!_a.test(r)))throw new Error(`${t} with value "${n}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof n)throw new Error(`${t} with value ${n} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof n;if(!("string"===e||"function"==typeof n.pipe||"function"==typeof n.tee||n instanceof ArrayBuffer||ArrayBuffer.isView(n)||("function"==typeof Blob||"object"==typeof Blob)&&n instanceof Blob||"function"===e))throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}var r;return n}(u,n,t):null!==u.match(/^Enum$/i)?c=function(e,t,n){if(!t)throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some((e=>"string"==typeof e.valueOf()?e.toLowerCase()===n.toLowerCase():e===n)))throw new Error(`${n} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return n}(n,e.type.allowedValues,t):null!==u.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?c=function(e,t,n){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/i)&&!function(e){return xa.test(e)}(t))throw new Error(`${n} must be a string in ISO 8601 format. Instead was "${t}".`);return t}(u,t,n):null!==u.match(/^ByteArray$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=Sa(t)}return t}(n,t):null!==u.match(/^Base64Url$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=function(e){if(e){if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e,t){let n=e.length;for(;n-1>=0&&"="===e[n-1];)--n;return e.substr(0,n)}(Sa(e)).replace(/\+/g,"-").replace(/\//g,"_")}}(t)}return t}(n,t):null!==u.match(/^Sequence$/i)?c=function(e,t,n,r,i,a){var o;if(!Array.isArray(n))throw new Error(`${r} must be of type Array.`);let s=t.type.element;if(!s||"object"!=typeof s)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}.`);"Composite"===s.type.name&&s.type.className&&(s=null!==(o=e.modelMappers[s.type.className])&&void 0!==o?o:s);const c=[];for(let t=0;t<n.length;t++){const o=e.serialize(s,n[t],r,a);if(i&&s.xmlNamespace){const e=s.xmlNamespacePrefix?`xmlns:${s.xmlNamespacePrefix}`:"xmlns";"Composite"===s.type.name?(c[t]=Object.assign({},o),c[t][ba]={[e]:s.xmlNamespace}):(c[t]={},c[t][a.xml.xmlCharKey]=o,c[t][ba]={[e]:s.xmlNamespace})}else c[t]=o}return c}(this,e,t,n,Boolean(this.isXML),s):null!==u.match(/^Dictionary$/i)?c=function(e,t,n,r,i,a){if("object"!=typeof n)throw new Error(`${r} must be of type object.`);const o=t.type.value;if(!o||"object"!=typeof o)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}.`);const s={};for(const t of Object.keys(n)){const c=e.serialize(o,n[t],r,a);s[t]=Ma(o,c,i,a)}if(i&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns",n=s;return n[ba]={[e]:t.xmlNamespace},n}return s}(this,e,t,n,Boolean(this.isXML),s):null!==u.match(/^Composite$/i)&&(c=function(e,t,n,r,i,a){if(Fa(e,t)&&(t=qa(e,t,n,"clientName")),null!=n){const o={},s=Oa(e,t,r);for(const c of Object.keys(s)){const u=s[c];if(u.readOnly)continue;let l,A=o;if(e.isXML)l=u.xmlIsWrapped?u.xmlName:u.xmlElementName||u.xmlName;else{const e=Ra(u.serializedName);l=e.pop();for(const t of e){null==A[t]&&(void 0!==n[c]&&null!==n[c]||void 0!==u.defaultValue)&&(A[t]={}),A=A[t]}}if(null!=A){if(i&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";A[ba]=Object.assign(Object.assign({},A[ba]),{[e]:t.xmlNamespace})}const o=""!==u.serializedName?r+"."+u.serializedName:r;let s=n[c];const d=Fa(e,t);d&&d.clientName===c&&null==s&&(s=t.serializedName);const p=e.serialize(u,s,o,a);if(void 0!==p&&null!=l){const e=Ma(u,p,i,a);i&&u.xmlIsAttribute?(A[ba]=A[ba]||{},A[ba][l]=p):i&&u.xmlIsWrapped?A[l]={[u.xmlElementName]:e}:A[l]=e}}}const c=function(e,t,n){const r=t.type.additionalProperties;if(!r&&t.type.className){const r=ka(e,t,n);return null==r?void 0:r.type.additionalProperties}return r}(e,t,r);if(c){const t=Object.keys(s);for(const i in n)t.every((e=>e!==i))&&(o[i]=e.serialize(c,n[i],r+'["'+i+'"]',a))}return o}return n}(this,e,t,n,Boolean(this.isXML),s)),c}deserialize(e,t,n,r={xml:{}}){var i,a,o,s;const c={xml:{rootName:null!==(i=r.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(a=r.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(o=r.xml.xmlCharKey)&&void 0!==o?o:va},ignoreUnknownProperties:null!==(s=r.ignoreUnknownProperties)&&void 0!==s&&s};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let u;const l=e.type.name;if(n||(n=e.serializedName),null!==l.match(/^Composite$/i))u=function(e,t,n,r,i){var a,o;const s=null!==(a=i.xml.xmlCharKey)&&void 0!==a?a:va;Fa(e,t)&&(t=qa(e,t,n,"serializedName"));const c=Oa(e,t,r);let u={};const l=[];for(const a of Object.keys(c)){const A=c[a],d=Ra(c[a].serializedName);l.push(d[0]);const{serializedName:p,xmlName:m,xmlElementName:h}=A;let g=r;""!==p&&void 0!==p&&(g=r+"."+p);const f=A.headerCollectionPrefix;if(f){const t={};for(const r of Object.keys(n))r.startsWith(f)&&(t[r.substring(f.length)]=e.deserialize(A.type.value,n[r],g,i)),l.push(r);u[a]=t}else if(e.isXML)if(A.xmlIsAttribute&&n[ba])u[a]=e.deserialize(A,n[ba][m],g,i);else if(A.xmlIsMsText)void 0!==n[s]?u[a]=n[s]:"string"==typeof n&&(u[a]=n);else{const t=h||m||p;if(A.xmlIsWrapped){const t=n[m],r=null!==(o=null==t?void 0:t[h])&&void 0!==o?o:[];u[a]=e.deserialize(A,r,g,i),l.push(m)}else{const r=n[t];u[a]=e.deserialize(A,r,g,i),l.push(t)}}else{let r,o=n,s=0;for(const e of d){if(!o)break;s++,o=o[e]}null===o&&s<d.length&&(o=void 0),r=o;const l=t.type.polymorphicDiscriminator;let p;if(l&&a===l.clientName&&null==r&&(r=t.serializedName),Array.isArray(n[a])&&""===c[a].serializedName){r=n[a];const t=e.deserialize(A,r,g,i);for(const[e,n]of Object.entries(u))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n);u=t}else void 0===r&&void 0===A.defaultValue||(p=e.deserialize(A,r,g,i),u[a]=p)}}const A=t.type.additionalProperties;if(A){const t=e=>{for(const t in c)if(Ra(c[t].serializedName)[0]===e)return!1;return!0};for(const a in n)t(a)&&(u[a]=e.deserialize(A,n[a],r+'["'+a+'"]',i))}else if(n&&!i.ignoreUnknownProperties)for(const e of Object.keys(n))void 0!==u[e]||l.includes(e)||Da(e,i)||(u[e]=n[e]);return u}(this,e,t,n,c);else{if(this.isXML){const e=c.xml.xmlCharKey;void 0!==t[ba]&&void 0!==t[e]&&(t=t[e])}null!==l.match(/^Number$/i)?(u=parseFloat(t),isNaN(u)&&(u=t)):null!==l.match(/^Boolean$/i)?u="true"===t||"false"!==t&&t:null!==l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?u=t:null!==l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?u=new Date(t):null!==l.match(/^UnixTime$/i)?u=function(e){if(e)return new Date(1e3*e)}(t):null!==l.match(/^ByteArray$/i)?u=Ta(t):null!==l.match(/^Base64Url$/i)?u=function(e){if(e){if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return Ta(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==l.match(/^Sequence$/i)?u=function(e,t,n,r,i){var a;let o=t.type.element;if(!o||"object"!=typeof o)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}`);if(n){Array.isArray(n)||(n=[n]),"Composite"===o.type.name&&o.type.className&&(o=null!==(a=e.modelMappers[o.type.className])&&void 0!==a?a:o);const t=[];for(let a=0;a<n.length;a++)t[a]=e.deserialize(o,n[a],`${r}[${a}]`,i);return t}return n}(this,e,t,n,c):null!==l.match(/^Dictionary$/i)&&(u=function(e,t,n,r,i){const a=t.type.value;if(!a||"object"!=typeof a)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}`);if(n){const t={};for(const o of Object.keys(n))t[o]=e.deserialize(a,n[o],r,i);return t}return n}(this,e,t,n,c))}return e.isConstant&&(u=e.defaultValue),u}}function za(e={},t=!1){return new Pa(e,t)}function Ra(e){const t=[];let n="";if(e){const r=e.split(".");for(const e of r)"\\"===e.charAt(e.length-1)?n+=e.substr(0,e.length-1)+".":(n+=e,t.push(n),n="")}return t}function ka(e,t,n){const r=t.type.className;if(!r)throw new Error(`Class name for model "${n}" is not provided in the mapper "${JSON.stringify(t,void 0,2)}".`);return e.modelMappers[r]}function Oa(e,t,n){let r=t.type.modelProperties;if(!r){const i=ka(e,t,n);if(!i)throw new Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(r=null==i?void 0:i.type.modelProperties,!r)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(i)}" of type "${t.type.className}" for object "${n}".`)}return r}function Ma(e,t,n,r){if(!n||!e.xmlNamespace)return t;const i={[e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns"]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[ba])return t;{const e=Object.assign({},t);return e[ba]=i,e}}const a={};return a[r.xml.xmlCharKey]=t,a[ba]=i,a}function Da(e,t){return[ba,t.xml.xmlCharKey].includes(e)}function qa(e,t,n,r){var i;const a=Fa(e,t);if(a){let o=a[r];if(o){"serializedName"===r&&(o=o.replace(/\\/gi,""));const a=n[o],s=null!==(i=t.type.uberParent)&&void 0!==i?i:t.type.className;if("string"==typeof a&&s){const n=function(e,t,n){const r=[n];for(;r.length;){const n=r.shift(),i=t===n?t:n+"."+t;if(Object.prototype.hasOwnProperty.call(e,i))return e[i];for(const[t,i]of Object.entries(e))t.startsWith(n+".")&&i.type.uberParent===n&&i.type.className&&r.push(i.type.className)}}(e.modelMappers.discriminators,a,s);n&&(t=n)}}}return t}function Fa(e,t){return t.type.polymorphicDiscriminator||Ua(e,t.type.uberParent)||Ua(e,t.type.className)}function Ua(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}const Ga={Base64Url:"Base64Url",Boolean:"Boolean",ByteArray:"ByteArray",Composite:"Composite",Date:"Date",DateTime:"DateTime",DateTimeRfc1123:"DateTimeRfc1123",Dictionary:"Dictionary",Enum:"Enum",Number:"Number",Object:"Object",Sequence:"Sequence",String:"String",Stream:"Stream",TimeSpan:"TimeSpan",UnixTime:"UnixTime"};function La(e,t,n){let r=t.parameterPath;const i=t.mapper;let a;if("string"==typeof r&&(r=[r]),Array.isArray(r)){if(r.length>0)if(i.isConstant)a=i.defaultValue;else{let t=Ha(e,r);!t.propertyFound&&n&&(t=Ha(n,r));let o=!1;t.propertyFound||(o=i.required||"options"===r[0]&&2===r.length),a=o?i.defaultValue:t.propertyValue}}else{i.required&&(a={});for(const t in r){const o=i.type.modelProperties[t],s=La(e,{parameterPath:r[t],mapper:o},n);void 0!==s&&(a||(a={}),a[t]=s)}}return a}function Ha(e,t){const n={propertyFound:!1};let r=0;for(;r<t.length;++r){const n=t[r];if(!e||!(n in e))break;e=e[n]}return r===t.length&&(n.propertyValue=e,n.propertyFound=!0),n}const ja=new WeakMap,Va=Symbol.for("@azure/core-client original request");function $a(e){if(function(e){return Va in e}(e))return $a(e[Va]);let t=ja.get(e);return t||(t={},ja.set(e,t)),t}const Ya=["application/json","text/json"],Ja=["application/xml","application/atom+xml"],Ka="deserializationPolicy";var Wa=n(9180);const Xa=void 0!==Wa&&Wa.env&&Wa.env.DEBUG||void 0;let Za,eo=[],to=[];const no=[];Xa&&io(Xa);const ro=Object.assign((e=>oo(e)),{enable:io,enabled:ao,disable:function(){const e=Za||"";return io(""),e},log:function(...e){if(e.length>0){const t=String(e[0]);t.includes(":error")?console.error(...e):t.includes(":warning")?console.warn(...e):t.includes(":info")?console.info(...e):(t.includes(":verbose"),console.debug(...e))}}});function io(e){Za=e,eo=[],to=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?to.push(new RegExp(`^${e.substr(1)}$`)):eo.push(new RegExp(`^${e}$`));for(const e of no)e.enabled=ao(e.namespace)}function ao(e){if(e.endsWith("*"))return!0;for(const t of to)if(t.test(e))return!1;for(const t of eo)if(t.test(e))return!0;return!1}function oo(e){const t=Object.assign((function(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}),{enabled:ao(e),destroy:so,log:ro.log,namespace:e,extend:co});return no.push(t),t}function so(){const e=no.indexOf(this);return e>=0&&(no.splice(e,1),!0)}function co(e){const t=oo(`${this.namespace}:${e}`);return t.log=this.log,t}var uo=ro,lo=n(9180);const Ao=new Set,po=void 0!==lo&&lo.env&&lo.env.AZURE_LOG_LEVEL||void 0;let mo;const ho=uo("azure");ho.log=(...e)=>{uo.log(...e)};const go=["verbose","info","warning","error"];po&&(Eo(po)?function(e){if(e&&!Eo(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${go.join(",")}`);mo=e;const t=[];for(const e of Ao)wo(e)&&t.push(e.namespace);uo.enable(t.join(","))}(po):console.error(`AZURE_LOG_LEVEL set to unknown log level '${po}'; logging is not enabled. Acceptable values: ${go.join(", ")}.`));const fo={verbose:400,info:300,warning:200,error:100};function yo(e){const t=ho.extend(e);return Co(ho,t),{error:Io(t,"error"),warning:Io(t,"warning"),info:Io(t,"info"),verbose:Io(t,"verbose")}}function Co(e,t){t.log=(...t)=>{e.log(...t)}}function Io(e,t){const n=Object.assign(e.extend(t),{level:t});if(Co(e,n),wo(n)){const e=uo.disable();uo.enable(e+","+n.namespace)}return Ao.add(n),n}function wo(e){return Boolean(mo&&fo[e.level]<=fo[mo])}function Eo(e){return go.includes(e)}const Bo=yo("core-rest-pipeline"),No="logPolicy",bo=new Set(["Deserialize","Serialize","Retry","Sign"]);class vo{constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!bo.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!bo.has(t.afterPhase))throw new Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((n=>!(e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase)||(t.push(n.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>n=>t.sendRequest(n,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new vo(this._policies)}static create(){return new vo}orderPolicies(){const e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const r=n("Serialize"),i=n("None"),a=n("Deserialize"),o=n("Retry"),s=n("Sign"),c=[r,i,a,o,s];function u(e){return"Retry"===e?o:"Serialize"===e?r:"Deserialize"===e?a:"Sign"===e?s:i}for(const e of this._policies){const n=e.policy,r=e.options,i=n.name;if(t.has(i))throw new Error("Duplicate policy names not allowed in pipeline");const a={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(a.afterPhase=u(r.afterPhase),a.afterPhase.hasAfterPolicies=!0),t.set(i,a),u(r.phase).policies.add(a)}for(const e of this._policies){const{policy:n,options:r}=e,i=n.name,a=t.get(i);if(!a)throw new Error(`Missing node for policy ${i}`);if(r.afterPolicies)for(const e of r.afterPolicies){const n=t.get(e);n&&(a.dependsOn.add(n),n.dependants.add(a))}if(r.beforePolicies)for(const e of r.beforePolicies){const n=t.get(e);n&&(n.dependsOn.add(a),a.dependants.add(n))}}function l(n){n.hasRun=!0;for(const r of n.policies)if((!r.afterPhase||r.afterPhase.hasRun&&!r.afterPhase.policies.size)&&0===r.dependsOn.size){e.push(r.policy);for(const e of r.dependants)e.dependsOn.delete(r);t.delete(r.policy.name),n.policies.delete(r)}}function A(){for(const e of c){if(l(e),e.policies.size>0&&e!==i)return void(i.hasRun||l(i));e.hasAfterPolicies&&l(i)}}let d=0;for(;t.size>0;){d++;const t=e.length;if(A(),e.length<=t&&d>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}const So="redirectPolicy",To=["GET","HEAD"];function xo(e={}){const{maxRetries:t=20}=e;return{name:So,async sendRequest(e,n){const r=await n(e);return _o(n,r,t)}}}async function _o(e,t,n,r=0){const{request:i,status:a,headers:o}=t,s=o.get("location");if(s&&(300===a||301===a&&To.includes(i.method)||302===a&&To.includes(i.method)||303===a&&"POST"===i.method||307===a)&&r<n){const t=new URL(s,i.url);i.url=t.toString(),303===a&&(i.method="GET",i.headers.delete("Content-Length"),delete i.body),i.headers.delete("Authorization");const o=await e(i);return _o(e,o,n,r+1)}return t}function Qo(e,t){switch(t){case"utf-8":return function(e){return(new TextEncoder).encode(e)}(e);case"base64":return Po(e);case"base64url":return function(e){return Po(e.replace(/-/g,"+").replace(/_/g,"/"))}(e);case"hex":return function(e){const t=new Uint8Array(e.length/2);for(let n=0;n<e.length/2;++n){const r=e[2*n],i=e[2*n+1];if(!zo.has(r)||!zo.has(i))return t.slice(0,n);t[n]=parseInt(`${r}${i}`,16)}return t}(e)}}function Po(e){return new Uint8Array([...atob(e)].map((e=>e.charCodeAt(0))))}const zo=new Set("0123456789abcdefABCDEF"),Ro=Symbol("rawContent");function ko(e){return"function"==typeof e[Ro]?e[Ro]():e.stream()}function Oo(e){return Boolean(e&&"function"==typeof e.pipe)}function Mo(e){return Boolean(e&&"function"==typeof e.getReader&&"function"==typeof e.tee)}async function Do(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(Mo(e))return new Response(e).blob();const t=ko(e);if(Oo(t))throw new Error("Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.");return Do(t)}function qo(e){let t="";for(const[n,r]of e)t+=`${n}: ${r}\r\n`;return t}function Fo(e){return e instanceof Uint8Array?e.byteLength:"function"==typeof e.stream?-1===e.size?void 0:e.size:void 0}const Uo="multipartPolicy",Go=70,Lo=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Ho(){return{name:Uo,async sendRequest(e,t){var n;if(!e.multipartBody)return t(e);if(e.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=e.multipartBody.boundary;const i=null!==(n=e.headers.get("Content-Type"))&&void 0!==n?n:"multipart/mixed",a=i.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!a)throw new Error(`Got multipart request body, but content-type header was not multipart: ${i}`);const[,o,s]=a;if(s&&r&&s!==r)throw new Error(`Multipart boundary was specified as ${s} in the header, but got ${r} in the request body`);return null!=r||(r=s),r?function(e){if(e.length>Go)throw new Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!Lo.has(e))))throw new Error(`Multipart boundary "${e}" contains invalid characters`)}(r):r=`----AzSDKFormBoundary${Ba()}`,e.headers.set("Content-Type",`${o}; boundary=${r}`),await async function(e,t,n){const r=[Qo(`--${n}`,"utf-8"),...t.flatMap((e=>[Qo("\r\n","utf-8"),Qo(qo(e.headers),"utf-8"),Qo("\r\n","utf-8"),e.body,Qo(`\r\n--${n}`,"utf-8")])),Qo("--\r\n\r\n","utf-8")],i=function(e){let t=0;for(const n of e){const e=Fo(n);if(void 0===e)return;t+=e}return t}(r);i&&e.headers.set("Content-Length",i),e.body=await async function(e){const t=[];for(const n of e)t.push(await Do("function"==typeof n?n():n));return new Blob(t)}(r)}(e,e.multipartBody.parts,r),e.multipartBody=void 0,t(e)}}}class jo extends Error{constructor(e){super(e),this.name="AbortError"}}const Vo="The operation was aborted.";function $o(e,t,n){return new Promise(((r,i)=>{let a,o;const s=()=>i(new jo((null==n?void 0:n.abortErrorMsg)?null==n?void 0:n.abortErrorMsg:Vo)),c=()=>{(null==n?void 0:n.abortSignal)&&o&&n.abortSignal.removeEventListener("abort",o)};if(o=()=>(a&&clearTimeout(a),c(),s()),(null==n?void 0:n.abortSignal)&&n.abortSignal.aborted)return s();a=setTimeout((()=>{c(),r(t)}),e),(null==n?void 0:n.abortSignal)&&n.abortSignal.addEventListener("abort",o)}))}function Yo(e,t){const n=e.headers.get(t);if(!n)return;const r=Number(n);return Number.isNaN(r)?void 0:r}const Jo="Retry-After",Ko=["retry-after-ms","x-ms-retry-after-ms",Jo];function Wo(e){if(e&&[429,503].includes(e.status))try{for(const t of Ko){const n=Yo(e,t);if(0===n||n)return n*(t===Jo?1e3:1)}const t=e.headers.get(Jo);if(!t)return;const n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch(e){return}}const Xo=1e3,Zo=64e3;function es(e={}){var t,n;const r=null!==(t=e.retryDelayInMs)&&void 0!==t?t:Xo,i=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:Zo;let a=r;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:n,responseError:r}){const o=!!(A=r)&&("ETIMEDOUT"===A.code||"ESOCKETTIMEDOUT"===A.code||"ECONNREFUSED"===A.code||"ECONNRESET"===A.code||"ENOENT"===A.code||"ENOTFOUND"===A.code),s=o&&e.ignoreSystemErrors,c=function(e){return Boolean(e&&void 0!==e.status&&(e.status>=500||408===e.status)&&501!==e.status&&505!==e.status)}(n),u=c&&e.ignoreHttpStatusCodes,l=n&&(function(e){return Number.isFinite(Wo(e))}(n)||!c);var A;if(l||u||s)return{skipStrategy:!0};if(r&&!o&&!c)return{errorToThrow:r};const d=a*Math.pow(2,t),p=Math.min(i,d);var m,h;return a=p/2+(m=0,h=p/2,m=Math.ceil(m),h=Math.floor(h),Math.floor(Math.random()*(h-m+1))+m),{retryAfterInMs:a}}}}const ts=yo("core-rest-pipeline retryPolicy"),ns="retryPolicy";function rs(e,t={maxRetries:sa}){const n=t.logger||ts;return{name:ns,async sendRequest(r,i){var a,o;let s,c,u=-1;e:for(;;){u+=1,s=void 0,c=void 0;try{n.info(`Retry ${u}: Attempting to send request`,r.requestId),s=await i(r),n.info(`Retry ${u}: Received a response from request`,r.requestId)}catch(e){if(n.error(`Retry ${u}: Received an error from request`,r.requestId),c=e,!e||"RestError"!==c.name)throw e;s=c.response}if(null===(a=r.abortSignal)||void 0===a?void 0:a.aborted)throw n.error(`Retry ${u}: Request aborted.`),new jo;if(u>=(null!==(o=t.maxRetries)&&void 0!==o?o:sa)){if(n.info(`Retry ${u}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),c)throw c;if(s)return s;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${u}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||ts;e.info(`Retry ${u}: Processing retry strategy ${t.name}.`);const n=t.retry({retryCount:u,response:s,responseError:c});if(n.skipStrategy){e.info(`Retry ${u}: Skipped.`);continue t}const{errorToThrow:i,retryAfterInMs:a,redirectTo:o}=n;if(i)throw e.error(`Retry ${u}: Retry strategy ${t.name} throws error:`,i),i;if(a||0===a){e.info(`Retry ${u}: Retry strategy ${t.name} retries after ${a}`),await $o(a,void 0,{abortSignal:r.abortSignal});continue e}if(o){e.info(`Retry ${u}: Retry strategy ${t.name} redirects to ${o}`),r.url=o;continue e}}if(c)throw n.info("None of the retry strategies could work with the received error. Throwing it."),c;if(s)return n.info("None of the retry strategies could work with the received response. Returning it."),s}}}}const is="defaultRetryPolicy",as="formDataPolicy";var os,ss,cs,us,ls=n(5606);"undefined"!=typeof window&&window.document,"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(os=self.constructor)||void 0===os?void 0:os.name)||"ServiceWorkerGlobalScope"===(null===(ss=self.constructor)||void 0===ss?void 0:ss.name)||null===(cs=self.constructor)||void 0===cs||cs.name);const As="undefined"!=typeof Deno&&void 0!==Deno.version&&void 0!==Deno.version.deno,ds=void 0!==ls&&Boolean(ls.version)&&Boolean(null===(us=ls.versions)||void 0===us?void 0:us.node)&&!As,ps=("undefined"!=typeof Bun&&Bun.version,"undefined"!=typeof navigator&&(null===navigator||void 0===navigator||navigator.product),"proxyPolicy is not supported in browser environment"),ms="tlsPolicy",hs={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function gs(e={}){let t=new fs(e.parentContext);return e.span&&(t=t.setValue(hs.span,e.span)),e.namespace&&(t=t.setValue(hs.namespace,e.namespace)),t}class fs{constructor(e){this._contextMap=e instanceof fs?new Map(e._contextMap):new Map}setValue(e,t){const n=new fs(this);return n._contextMap.set(e,t),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new fs(this);return t._contextMap.delete(e),t}}let ys;function Cs(){return ys||(ys={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{}},tracingContext:gs({parentContext:t.tracingContext})}),withContext(e,t,...n){return t(...n)}}),ys}const Is="tracingPolicy";function ws(e){var t;const n=vo.create();var r;return ds&&(e.tlsOptions&&n.addPolicy((r=e.tlsOptions,{name:ms,sendRequest:async(e,t)=>(e.tlsSettings||(e.tlsSettings=r),t(e))})),n.addPolicy(function(){throw new Error(ps)}(e.proxyOptions)),n.addPolicy(function(){throw new Error("decompressResponsePolicy is not supported in browser environment")}())),n.addPolicy({name:as,async sendRequest(e,t){if(e.formData){const t=e.formData,n=new FormData;for(const e of Object.keys(t)){const r=t[e];if(Array.isArray(r))for(const t of r)n.append(e,t);else n.append(e,r)}e.body=n,e.formData=void 0;const r=e.headers.get("Content-Type");r&&-1!==r.indexOf("application/x-www-form-urlencoded")?e.body=new URLSearchParams(n).toString():r&&-1!==r.indexOf("multipart/form-data")&&e.headers.delete("Content-Type")}return t(e)}},{beforePolicies:[Uo]}),n.addPolicy(function(e={}){const t=ca(e.userAgentPrefix);return{name:la,async sendRequest(e,n){return e.headers.has(ua)||e.headers.set(ua,t),n(e)}}}(e.userAgentOptions)),n.addPolicy(function(e="x-ms-client-request-id"){return{name:Aa,async sendRequest(t,n){return t.headers.has(e)||t.headers.set(e,t.requestId),n(t)}}}(null===(t=e.telemetryOptions)||void 0===t?void 0:t.clientRequestIdHeaderName)),n.addPolicy(Ho(),{afterPhase:"Deserialize"}),n.addPolicy(function(e={}){var t;return{name:is,sendRequest:rs([{name:"throttlingRetryStrategy",retry({response:e}){const t=Wo(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}},es(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:sa}).sendRequest}}(e.retryOptions),{phase:"Retry"}),n.addPolicy(function(e={}){const t=ca(e.userAgentPrefix),n=function(){try{return function(e){const{namespace:t,packageName:n,packageVersion:r}=e;function i(e,i,a){var o;const s=Cs().startSpan(e,Object.assign(Object.assign({},a),{packageName:n,packageVersion:r,tracingContext:null===(o=null==i?void 0:i.tracingOptions)||void 0===o?void 0:o.tracingContext}));let c=s.tracingContext;const u=s.span;return c.getValue(hs.namespace)||(c=c.setValue(hs.namespace,t)),u.setAttribute("az.namespace",c.getValue(hs.namespace)),{span:u,updatedOptions:Object.assign({},i,{tracingOptions:Object.assign(Object.assign({},null==i?void 0:i.tracingOptions),{tracingContext:c})})}}function a(e,t,...n){return Cs().withContext(e,t,...n)}return{startSpan:i,withSpan:async function(e,t,n,r){const{span:o,updatedOptions:s}=i(e,t,r);try{const e=await a(s.tracingOptions.tracingContext,(()=>Promise.resolve(n(s,o))));return o.setStatus({status:"success"}),e}catch(e){throw o.setStatus({status:"error",error:e}),e}finally{o.end()}},withContext:a,parseTraceparentHeader:function(e){return Cs().parseTraceparentHeader(e)},createRequestHeaders:function(e){return Cs().createRequestHeaders(e)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:oa})}catch(e){return void Bo.warning(`Error when creating the TracingClient: ${lt(e)}`)}}();return{name:Is,async sendRequest(e,r){var i,a;if(!n||!(null===(i=e.tracingOptions)||void 0===i?void 0:i.tracingContext))return r(e);const{span:o,tracingContext:s}=null!==(a=function(e,t,n){try{const{span:r,updatedOptions:i}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:{"http.method":t.method,"http.url":t.url,requestId:t.requestId}});if(!r.isRecording())return void r.end();n&&r.setAttribute("http.user_agent",n);const a=e.createRequestHeaders(i.tracingOptions.tracingContext);for(const[e,n]of Object.entries(a))t.headers.set(e,n);return{span:r,tracingContext:i.tracingOptions.tracingContext}}catch(e){return void Bo.warning(`Skipping creating a tracing span due to an error: ${lt(e)}`)}}(n,e,t))&&void 0!==a?a:{};if(!o||!s)return r(e);try{const t=await n.withContext(s,r,e);return function(e,t){try{e.setAttribute("http.status_code",t.status);const n=t.headers.get("x-ms-request-id");n&&e.setAttribute("serviceRequestId",n),e.setStatus({status:"success"}),e.end()}catch(e){Bo.warning(`Skipping tracing span processing due to an error: ${lt(e)}`)}}(o,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:ut(t)?t:void 0}),((n=t)instanceof ft||ut(n)&&"RestError"===n.name)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(n){Bo.warning(`Skipping tracing span processing due to an error: ${lt(n)}`)}var n}(o,e),e}}}}(e.userAgentOptions),{afterPhase:"Retry"}),ds&&n.addPolicy(xo(e.redirectOptions),{afterPhase:"Retry"}),n.addPolicy(function(e={}){var t;const n=null!==(t=e.logger)&&void 0!==t?t:Bo.info,r=new ht({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:No,async sendRequest(e,t){if(!n.enabled)return t(e);n(`Request: ${r.sanitize(e)}`);const i=await t(e);return n(`Response status code: ${i.status}`),n(`Headers: ${r.sanitize(i.headers)}`),i}}}(e.loggingOptions),{afterPhase:"Sign"}),n}const Es={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};async function Bs(e){const{scopes:t,getAccessToken:n,request:r}=e,i={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions},a=await n(t,i);a&&e.request.headers.set("Authorization",`Bearer ${a.token}`)}function Ns(e){const{parameterPath:t,mapper:n}=e;let r;return r="string"==typeof t?t:Array.isArray(t)?t.join("."):n.serializedName,r}const bs="serializationPolicy";function vs(e={}){const t=ws(null!=e?e:{});return e.credentialOptions&&t.addPolicy(function(e){var t;const{credential:n,scopes:r,challengeCallbacks:i}=e,a=e.logger||Bo,o=Object.assign({authorizeRequest:null!==(t=null==i?void 0:i.authorizeRequest)&&void 0!==t?t:Bs,authorizeRequestOnChallenge:null==i?void 0:i.authorizeRequestOnChallenge},i),s=n?function(e,t){let n,r=null,i=null;const a=Object.assign(Object.assign({},Es),t),o={get isRefreshing(){return null!==r},get shouldRefresh(){var e;return!o.isRefreshing&&(null!==(e=null==i?void 0:i.expiresOnTimestamp)&&void 0!==e?e:0)-a.refreshWindowInMs<Date.now()},get mustRefresh(){return null===i||i.expiresOnTimestamp-a.forcedRefreshWindowInMs<Date.now()}};function s(t,s){var c;return o.isRefreshing||(r=async function(e,t,n){async function r(){if(!(Date.now()<n)){const t=await e();if(null===t)throw new Error("Failed to refresh access token.");return t}try{return await e()}catch(e){return null}}let i=await r();for(;null===i;)await $o(t),i=await r();return i}((()=>e.getToken(t,s)),a.retryIntervalInMs,null!==(c=null==i?void 0:i.expiresOnTimestamp)&&void 0!==c?c:Date.now()).then((e=>(r=null,i=e,n=s.tenantId,i))).catch((e=>{throw r=null,i=null,n=void 0,e}))),r}return async(e,t)=>n!==t.tenantId||Boolean(t.claims)||o.mustRefresh?s(e,t):(o.shouldRefresh&&s(e,t),i)}(n):()=>Promise.resolve(null);return{name:"bearerTokenAuthenticationPolicy",async sendRequest(e,t){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let n,i;await o.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:e,getAccessToken:s,logger:a});try{n=await t(e)}catch(e){i=e,n=e.response}if(o.authorizeRequestOnChallenge&&401===(null==n?void 0:n.status)&&function(e){const t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t}(n)&&await o.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:e,response:n,getAccessToken:s,logger:a}))return t(e);if(i)throw i;return n}}}({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(function(e={}){const t=e.stringifyXML;return{name:bs,async sendRequest(e,n){const r=$a(e),i=null==r?void 0:r.operationSpec,a=null==r?void 0:r.operationArguments;return i&&a&&(function(e,t,n){var r,i;if(n.headerParameters)for(const r of n.headerParameters){let i=La(t,r);if(null!=i||r.mapper.required){i=n.serializer.serialize(r.mapper,i,Ns(r));const t=r.mapper.headerCollectionPrefix;if(t)for(const n of Object.keys(i))e.headers.set(t+n,i[n]);else e.headers.set(r.mapper.serializedName||Ns(r),i)}}const a=null===(i=null===(r=t.options)||void 0===r?void 0:r.requestOptions)||void 0===i?void 0:i.customHeaders;if(a)for(const t of Object.keys(a))e.headers.set(t,a[t])}(e,a,i),function(e,t,n,r=function(){throw new Error("XML serialization unsupported!")}){var i,a,o,s,c;const u=null===(i=t.options)||void 0===i?void 0:i.serializerOptions,l={xml:{rootName:null!==(a=null==u?void 0:u.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(o=null==u?void 0:u.xml.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=null==u?void 0:u.xml.xmlCharKey)&&void 0!==s?s:va}},A=l.xml.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=La(t,n.requestBody);const i=n.requestBody.mapper,{required:a,serializedName:o,xmlName:s,xmlElementName:u,xmlNamespace:d,xmlNamespacePrefix:p,nullable:m}=i,h=i.type.name;try{if(void 0!==e.body&&null!==e.body||m&&null===e.body||a){const t=Ns(n.requestBody);e.body=n.serializer.serialize(i,e.body,t,l);const a=h===Ga.Stream;if(n.isXML){const t=p?`xmlns:${p}`:"xmlns",n=function(e,t,n,r,i){if(e&&!["Composite","Sequence","Dictionary"].includes(n)){const n={};return n[i.xml.xmlCharKey]=r,n[ba]={[t]:e},n}return r}(d,t,h,e.body,l);h===Ga.Sequence?e.body=r(function(e,t,n,r){if(Array.isArray(e)||(e=[e]),!n||!r)return{[t]:e};const i={[t]:e};return i[ba]={[n]:r},i}(n,u||s||o,t,d),{rootName:s||o,xmlCharKey:A}):a||(e.body=r(n,{rootName:s||o,xmlCharKey:A}))}else{if(h===Ga.String&&((null===(c=n.contentType)||void 0===c?void 0:c.match("text/plain"))||"text"===n.mediaType))return;a||(e.body=JSON.stringify(e.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(o,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(const r of n.formDataParameters){const i=La(t,r);if(null!=i){const t=r.mapper.serializedName||Ns(r);e.formData[t]=n.serializer.serialize(r.mapper,i,Ns(r),l)}}}}(e,a,i,t)),n(e)}}}(e.serializationOptions),{phase:"Serialize"}),t.addPolicy(function(e={}){var t,n,r,i,a,o,s;const c=null!==(n=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==n?n:Ya,u=null!==(i=null===(r=e.expectedContentTypes)||void 0===r?void 0:r.xml)&&void 0!==i?i:Ja,l=e.parseXML,A=e.serializerOptions,d={xml:{rootName:null!==(a=null==A?void 0:A.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(o=null==A?void 0:A.xml.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=null==A?void 0:A.xml.xmlCharKey)&&void 0!==s?s:va}};return{name:Ka,async sendRequest(e,t){const n=await t(e);return async function(e,t,n,r,i){const a=await async function(e,t,n,r,i){var a;if(!(null===(a=n.request.streamResponseStatusCodes)||void 0===a?void 0:a.has(n.status))&&n.bodyAsText){const a=n.bodyAsText,o=n.headers.get("Content-Type")||"",s=o?o.split(";").map((e=>e.toLowerCase())):[];try{if(0===s.length||s.some((t=>-1!==e.indexOf(t))))return n.parsedBody=JSON.parse(a),n;if(s.some((e=>-1!==t.indexOf(e)))){if(!i)throw new Error("Parsing XML not supported.");const e=await i(a,r.xml);return n.parsedBody=e,n}}catch(e){const t=`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,r=e.code||ft.PARSE_ERROR;throw new ft(t,{code:r,statusCode:n.status,request:n.request,response:n})}}return n}(e,t,n,r,i);if(!function(e){const t=$a(e.request),n=null==t?void 0:t.shouldDeserialize;let r;return r=void 0===n||("boolean"==typeof n?n:n(e)),r}(a))return a;const o=$a(a.request),s=null==o?void 0:o.operationSpec;if(!s||!s.responses)return a;const c=function(e){let t;const n=$a(e.request),r=null==n?void 0:n.operationSpec;return r&&(t=(null==n?void 0:n.operationResponseGetter)?null==n?void 0:n.operationResponseGetter(r,e):r.responses[e.status]),t}(a),{error:u,shouldReturnResponse:l}=function(e,t,n,r){var i;const a=200<=e.status&&e.status<300,o=function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?a:!!n;if(o){if(!n)return{error:null,shouldReturnResponse:!1};if(!n.isError)return{error:null,shouldReturnResponse:!1}}const s=null!=n?n:t.responses.default,c=(null===(i=e.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(e.status))?`Unexpected status code: ${e.status}`:e.bodyAsText,u=new ft(c,{statusCode:e.status,request:e.request,response:e});if(!s)throw u;const l=s.bodyMapper,A=s.headersMapper;try{if(e.parsedBody){const n=e.parsedBody;let i;if(l){let e=n;if(t.isXML&&l.type.name===Ga.Sequence){e=[];const t=l.xmlElementName;"object"==typeof n&&t&&(e=n[t])}i=t.serializer.deserialize(l,e,"error.response.parsedBody",r)}const a=n.error||i||n;u.code=a.code,a.message&&(u.message=a.message),l&&(u.response.parsedBody=i)}e.headers&&A&&(u.response.parsedHeaders=t.serializer.deserialize(A,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(t){u.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:u,shouldReturnResponse:!1}}(a,s,c,r);if(u)throw u;if(l)return a;if(c){if(c.bodyMapper){let e=a.parsedBody;s.isXML&&c.bodyMapper.type.name===Ga.Sequence&&(e="object"==typeof e?e[c.bodyMapper.xmlElementName]:[]);try{a.parsedBody=s.serializer.deserialize(c.bodyMapper,e,"operationRes.parsedBody",r)}catch(e){throw new ft(`Error ${e} occurred in deserializing the responseBody - ${a.bodyAsText}`,{statusCode:a.status,request:a.request,response:a})}}else"HEAD"===s.httpMethod&&(a.parsedBody=n.status>=200&&n.status<300);c.headersMapper&&(a.parsedHeaders=s.serializer.deserialize(c.headersMapper,a.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return a}(c,u,n,d,l)}}}(e.deserializationOptions),{phase:"Deserialize"}),t}class Ss{async sendRequest(e){if("https:"!==new URL(e.url).protocol&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);if(e.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");try{return await async function(e){const{abortController:t,abortControllerCleanup:n}=function(e){const t=new AbortController;let n,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new jo("The operation was aborted.");r=e=>{"abort"===e.type&&t.abort()},e.abortSignal.addEventListener("abort",r),n=()=>{var t;r&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",r))}}return e.timeout>0&&setTimeout((()=>{t.abort()}),e.timeout),{abortController:t,abortControllerCleanup:n}}(e);try{const r=function(e){const t=new Headers;for(const[n,r]of e)t.append(n,r);return t}(e.headers),{streaming:i,body:a}=function(e){const t="function"==typeof e.body?e.body():e.body;if(Oo(t))throw new Error("Node streams are not supported in browser environment.");return Mo(t)?{streaming:!0,body:Ts(t,{onProgress:e.onUploadProgress})}:{streaming:!1,body:t}}(e),o=Object.assign(Object.assign({body:a,method:e.method,headers:r,signal:t.signal},"credentials"in Request.prototype?{credentials:e.withCredentials?"include":"same-origin"}:{}),"cache"in Request.prototype?{cache:"no-store"}:{});i&&(o.duplex="half");const s=await fetch(e.url,o);return function(e){return("function"==typeof Blob||"object"==typeof Blob)&&e instanceof Blob}(e.body)&&e.onUploadProgress&&e.onUploadProgress({loadedBytes:e.body.size}),async function(e,t,n){var r,i;const a=function(e){const t=Ia();for(const[n,r]of e.headers)t.set(n,r);return t}(e),o={request:t,headers:a,status:e.status},s=Mo(e.body)?Ts(e.body,{onProgress:t.onDownloadProgress,onEnd:n}):e.body;if((null===(r=t.streamResponseStatusCodes)||void 0===r?void 0:r.has(Number.POSITIVE_INFINITY))||(null===(i=t.streamResponseStatusCodes)||void 0===i?void 0:i.has(o.status)))if(t.enableBrowserStreams)o.browserStreamBody=null!=s?s:void 0;else{const e=new Response(s);o.blobBody=e.blob(),null==n||n()}else{const e=new Response(s);o.bodyAsText=await e.text(),null==n||n()}return o}(s,e,n)}catch(e){throw null==n||n(),e}}(e)}catch(t){throw function(e,t){var n;return e&&"AbortError"===(null==e?void 0:e.name)?e:new ft(`Error sending request: ${e.message}`,{code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:ft.REQUEST_SEND_ERROR,request:t})}(t,e)}}}function Ts(e,t={}){let n=0;const{onProgress:r,onEnd:i}=t;if(function(e){return void 0!==e.pipeThrough&&void 0!==self.TransformStream}(e))return e.pipeThrough(new TransformStream({transform(e,t){null!==e?(t.enqueue(e),n+=e.length,r&&r({loadedBytes:n})):t.terminate()},flush(){null==i||i()}}));{const t=e.getReader();return new ReadableStream({async pull(e){var a;const{done:o,value:s}=await t.read();if(o||!s)return null==i||i(),e.close(),void t.releaseLock();n+=null!==(a=null==s?void 0:s.length)&&void 0!==a?a:0,e.enqueue(s),r&&r({loadedBytes:n})},cancel(e){return null==i||i(),t.cancel(e)}})}}let xs;const _s={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"};function Qs(e,t,n,r){const i=function(e,t,n){var r;const i=new Map;if(null===(r=e.urlParameters)||void 0===r?void 0:r.length)for(const r of e.urlParameters){let a=La(t,r,n);const o=Ns(r);a=e.serializer.serialize(r.mapper,a,o),r.skipEncoding||(a=encodeURIComponent(a)),i.set(`{${r.mapper.serializedName||o}}`,a)}return i}(t,n,r);let a=!1,o=Ps(e,i);if(t.path){let e=Ps(t.path,i);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),e.includes("://")?(o=e,a=!0):o=function(e,t){if(!t)return e;const n=new URL(e);let r=n.pathname;r.endsWith("/")||(r=`${r}/`),t.startsWith("/")&&(t=t.substring(1));const i=t.indexOf("?");if(-1!==i){const e=t.substring(0,i),a=t.substring(i+1);r+=e,a&&(n.search=n.search?`${n.search}&${a}`:a)}else r+=t;return n.pathname=r,n.toString()}(o,e)}const{queryParams:s,sequenceParams:c}=function(e,t,n){var r;const i=new Map,a=new Set;if(null===(r=e.queryParameters)||void 0===r?void 0:r.length)for(const r of e.queryParameters){"Sequence"===r.mapper.type.name&&r.mapper.serializedName&&a.add(r.mapper.serializedName);let o=La(t,r,n);if(null!=o||r.mapper.required){o=e.serializer.serialize(r.mapper,o,Ns(r));const t=r.collectionFormat?_s[r.collectionFormat]:"";if(Array.isArray(o)&&(o=o.map((e=>null==e?"":e))),"Multi"===r.collectionFormat&&0===o.length)continue;!Array.isArray(o)||"SSV"!==r.collectionFormat&&"TSV"!==r.collectionFormat||(o=o.join(t)),r.skipEncoding||(o=Array.isArray(o)?o.map((e=>encodeURIComponent(e))):encodeURIComponent(o)),!Array.isArray(o)||"CSV"!==r.collectionFormat&&"Pipes"!==r.collectionFormat||(o=o.join(t)),i.set(r.mapper.serializedName||Ns(r),o)}}return{queryParams:i,sequenceParams:a}}(t,n,r);return o=function(e,t,n,r=!1){if(0===t.size)return e;const i=new URL(e),a=function(e){const t=new Map;if(!e||"?"!==e[0])return t;const n=(e=e.slice(1)).split("&");for(const e of n){const[n,r]=e.split("=",2),i=t.get(n);i?Array.isArray(i)?i.push(r):t.set(n,[i,r]):t.set(n,r)}return t}(i.search);for(const[e,i]of t){const t=a.get(e);if(Array.isArray(t))if(Array.isArray(i)){t.push(...i);const n=new Set(t);a.set(e,Array.from(n))}else t.push(i);else t?(Array.isArray(i)?i.unshift(t):n.has(e)&&a.set(e,[t,i]),r||a.set(e,i)):a.set(e,i)}const o=[];for(const[e,t]of a)if("string"==typeof t)o.push(`${e}=${t}`);else if(Array.isArray(t))for(const n of t)o.push(`${e}=${n}`);else o.push(`${e}=${t}`);return i.search=o.length?`?${o.join("&")}`:"",i.toString()}(o,s,c,a),o}function Ps(e,t){let n=e;for(const[e,r]of t)n=n.split(e).join(r);return n}const zs=yo("core-client");class Rs{constructor(e={}){var t,n;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&zs.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(xs||(xs=new Ss),xs),this.pipeline=e.pipeline||function(e){const t=function(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}(e),n=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return vs(Object.assign(Object.assign({},e),{credentialOptions:n}))}(e),null===(n=e.additionalPolicies)||void 0===n?void 0:n.length)for(const{policy:t,position:n}of e.additionalPolicies){const e="perRetry"===n?"Sign":void 0;this.pipeline.addPolicy(t,{afterPhase:e})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){const n=t.baseUrl||this._endpoint;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");const r=function(e){return new Na(e)}({url:Qs(n,t,e,this)});r.method=t.httpMethod;const i=$a(r);i.operationSpec=t,i.operationArguments=e;const a=t.contentType||this._requestContentType;a&&t.requestBody&&r.headers.set("Content-Type",a);const o=e.options;if(o){const e=o.requestOptions;e&&(e.timeout&&(r.timeout=e.timeout),e.onUploadProgress&&(r.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(r.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(i.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(r.allowInsecureConnection=!0)),o.abortSignal&&(r.abortSignal=o.abortSignal),o.tracingOptions&&(r.tracingOptions=o.tracingOptions)}this._allowInsecureConnection&&(r.allowInsecureConnection=!0),void 0===r.streamResponseStatusCodes&&(r.streamResponseStatusCodes=function(e){const t=new Set;for(const n in e.responses){const r=e.responses[n];r.bodyMapper&&r.bodyMapper.type.name===Ga.Stream&&t.add(Number(n))}return t}(t));try{const e=await this.sendRequest(r),n=Qa(e,t.responses[e.status]);return(null==o?void 0:o.onResponse)&&o.onResponse(e,n),n}catch(e){if("object"==typeof e&&(null==e?void 0:e.response)){const n=e.response,r=Qa(n,t.responses[e.statusCode]||t.responses.default);e.details=r,(null==o?void 0:o.onResponse)&&o.onResponse(n,r,e)}throw e}}}const ks={type:{name:"Composite",className:"Header",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",type:{name:"String"}},beneficiary:{serializedName:"beneficiary",type:{name:"String"}},target:{serializedName:"target",type:{name:"String"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{type:{name:"String"}}}},nonce:{serializedName:"nonce",type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"String"}},info:{serializedName:"info",type:{name:"String"}},pofHash:{serializedName:"pof_hash",type:{name:"String"}},txsHash:{serializedName:"txs_hash",type:{name:"String"}},signature:{serializedName:"signature",type:{name:"String"}}}}},Os={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}},errorCode:{serializedName:"error_code",type:{name:"String"}}}}},Ms={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",required:!0,type:{name:"String"}},beneficiary:{serializedName:"beneficiary",required:!0,type:{name:"String"}},target:{serializedName:"target",required:!0,type:{name:"String"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{type:{name:"String"}}}},nonce:{serializedName:"nonce",type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"String"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},Ds={type:{name:"Composite",className:"HashResponse",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}}}}},qs={type:{name:"Composite",className:"HeightResponse",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"String"}}}}},Fs={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"String"}},pofHash:{serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},txsHash:{serializedName:"txs_hash",required:!0,type:{name:"String"}},signature:{serializedName:"signature",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"String"}}}}},Us={type:{name:"Composite",className:"SignedTxs",modelProperties:{transactions:{serializedName:"transactions",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedTx"}}}}}}},Gs={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"String"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},hash:{serializedName:"hash",required:!0,type:{name:"String"}},encodedTx:{serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Ls={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{serializedName:"amount",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",type:{name:"String"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{serializedName:"responder_amount",type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",type:{name:"String"}},lockPeriod:{serializedName:"lock_period",type:{name:"String"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},channelId:{serializedName:"channel_id",type:{name:"String"}},fromId:{serializedName:"from_id",type:{name:"String"}},round:{serializedName:"round",type:{name:"String"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{serializedName:"initiator_amount_final",type:{name:"String"}},responderAmountFinal:{serializedName:"responder_amount_final",type:{name:"String"}},poi:{serializedName:"poi",type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},queryFormat:{serializedName:"query_format",type:{name:"String"}},responseFormat:{serializedName:"response_format",type:{name:"String"}},queryFee:{serializedName:"query_fee",type:{name:"String"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{serializedName:"abi_version",type:{name:"String"}},oracleId:{serializedName:"oracle_id",type:{name:"String"}},query:{serializedName:"query",type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},queryId:{serializedName:"query_id",type:{name:"String"}},response:{serializedName:"response",type:{name:"String"}},commitmentId:{serializedName:"commitment_id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},nameSalt:{serializedName:"name_salt",type:{name:"String"}},nameFee:{serializedName:"name_fee",type:{name:"String"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{serializedName:"name_ttl",type:{name:"String"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{serializedName:"client_ttl",type:{name:"String"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{serializedName:"vm_version",type:{name:"String"}},deposit:{serializedName:"deposit",type:{name:"String"}},gas:{serializedName:"gas",type:{name:"String"}},gasPrice:{serializedName:"gas_price",type:{name:"String"}},callData:{serializedName:"call_data",type:{name:"String"}},callerId:{serializedName:"caller_id",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",type:{name:"String"}},gaId:{serializedName:"ga_id",type:{name:"String"}},authData:{serializedName:"auth_data",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}},payerId:{serializedName:"payer_id",type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTx","ChannelCreateTx","ChannelDepositTx","ChannelWithdrawTx","ChannelForceProgressTx","ChannelCloseMutualTx","ChannelCloseSoloTx","ChannelSlashTx","ChannelSettleTx","ChannelSnapshotSoloTx","ChannelSetDelegatesTx","OracleRegisterTx","OracleExtendTx","OracleQueryTx","OracleRespondTx","NamePreclaimTx","NameClaimTx","NameUpdateTx","NameTransferTx","NameRevokeTx","ContractCreateTx","ContractCallTx","GAAttachTx","GAMetaTx","PayingForTx"]}}}}},Hs={type:{name:"Composite",className:"Delegates",modelProperties:{initiator:{serializedName:"initiator",type:{name:"Sequence",element:{type:{name:"String"}}}},responder:{serializedName:"responder",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},js={type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},Vs={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{serializedName:"value",required:!0,type:{name:"String"}}}}},$s={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{serializedName:"value",required:!0,type:{name:"String"}}}}},Ys={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},Js={type:{name:"Composite",className:"CountResponse",modelProperties:{count:{serializedName:"count",required:!0,type:{name:"String"}}}}},Ks={type:{name:"Composite",className:"Generation",modelProperties:{keyBlock:{serializedName:"key_block",type:{name:"Composite",className:"KeyBlock"}},microBlocks:{serializedName:"micro_blocks",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Ws={type:{name:"Composite",className:"Account",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},balance:{serializedName:"balance",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"String"}},payable:{serializedName:"payable",type:{name:"Boolean"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["basic","generalized"]}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{serializedName:"auth_fun",type:{name:"String"}}}}},Xs={type:{name:"Composite",className:"NextNonceResponse",modelProperties:{nextNonce:{serializedName:"next_nonce",required:!0,type:{name:"String"}}}}},Zs={type:{name:"Composite",className:"DryRunInput",modelProperties:{top:{serializedName:"top",type:{name:"String"}},accounts:{serializedName:"accounts",type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunAccount"}}}},txs:{serializedName:"txs",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunInputItem"}}}},txEvents:{defaultValue:!1,serializedName:"tx_events",type:{name:"Boolean"}}}}},ec={type:{name:"Composite",className:"DryRunAccount",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}}}}},tc={type:{name:"Composite",className:"DryRunInputItem",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},callReq:{serializedName:"call_req",type:{name:"Composite",className:"DryRunCallReq"}}}}},nc={type:{name:"Composite",className:"DryRunCallReq",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},amount:{serializedName:"amount",type:{name:"String"}},gas:{serializedName:"gas",type:{name:"String"}},caller:{serializedName:"caller",type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},abiVersion:{serializedName:"abi_version",type:{name:"String"}},context:{serializedName:"context",type:{name:"Composite",className:"DryRunCallContext"}}}}},rc={type:{name:"Composite",className:"DryRunCallContext",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},stateful:{serializedName:"stateful",type:{name:"Boolean"}}}}},ic={type:{name:"Composite",className:"DryRunResults",modelProperties:{results:{serializedName:"results",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunResult"}}}},txEvents:{serializedName:"tx_events",type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},ac={type:{name:"Composite",className:"DryRunResult",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"String"}},reason:{serializedName:"reason",type:{name:"String"}},callObj:{serializedName:"call_obj",type:{name:"Composite",className:"ContractCallObject"}}}}},oc={type:{name:"Composite",className:"ContractCallObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},callerNonce:{serializedName:"caller_nonce",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"String"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},gasUsed:{serializedName:"gas_used",required:!0,type:{name:"String"}},log:{serializedName:"log",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Event"}}}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error","revert"]}}}}},sc={type:{name:"Composite",className:"Event",modelProperties:{address:{serializedName:"address",required:!0,type:{name:"String"}},topics:{serializedName:"topics",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},cc={type:{name:"Composite",className:"TxInfoObject",modelProperties:{callInfo:{serializedName:"call_info",type:{name:"Composite",className:"ContractCallObject"}},gaInfo:{serializedName:"ga_info",type:{name:"Composite",className:"GAObject"}},txInfo:{serializedName:"tx_info",type:{name:"String"}}}}},uc={type:{name:"Composite",className:"GAObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},gasUsed:{serializedName:"gas_used",required:!0,type:{name:"String"}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error"]}},innerObject:{serializedName:"inner_object",type:{name:"Composite",className:"TxInfoObject"}}}}},lc={type:{name:"Composite",className:"EncodedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},Ac={type:{name:"Composite",className:"PostTxResponse",modelProperties:{txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},dc={type:{name:"Composite",className:"ContractObject",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},vmVersion:{serializedName:"vm_version",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},active:{serializedName:"active",required:!0,type:{name:"Boolean"}},referrerIds:{serializedName:"referrer_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},deposit:{serializedName:"deposit",required:!0,type:{name:"String"}}}}},pc={type:{name:"Composite",className:"ByteCode",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},mc={type:{name:"Composite",className:"PoI",modelProperties:{poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},hc={type:{name:"Composite",className:"RegisteredOracle",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}}}}},gc={type:{name:"Composite",className:"OracleQueries",modelProperties:{oracleQueries:{serializedName:"oracle_queries",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},fc={type:{name:"Composite",className:"OracleQuery",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},senderNonce:{serializedName:"sender_nonce",required:!0,type:{name:"String"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"Ttl"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}}}}},yc={type:{name:"Composite",className:"AuctionEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},startedAt:{serializedName:"started_at",type:{name:"String"}},endsAt:{serializedName:"ends_at",required:!0,type:{name:"String"}},highestBidder:{serializedName:"highest_bidder",required:!0,type:{name:"String"}},highestBid:{serializedName:"highest_bid",required:!0,type:{name:"String"}}}}},Cc={type:{name:"Composite",className:"NameEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},owner:{serializedName:"owner",type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"String"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}}}}},Ic={type:{name:"Composite",className:"Channel",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},channelAmount:{serializedName:"channel_amount",required:!0,type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",required:!0,type:{name:"String"}},responderAmount:{serializedName:"responder_amount",required:!0,type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{serializedName:"round",required:!0,type:{name:"String"}},soloRound:{serializedName:"solo_round",required:!0,type:{name:"String"}},lockPeriod:{serializedName:"lock_period",required:!0,type:{name:"String"}},lockedUntil:{serializedName:"locked_until",required:!0,type:{name:"String"}}}}},wc={type:{name:"Composite",className:"PeerPubKey",modelProperties:{pubkey:{serializedName:"pubkey",required:!0,type:{name:"String"}}}}},Ec={type:{name:"Composite",className:"SyncStatus",modelProperties:{progress:{serializedName:"progress",required:!0,type:{name:"Number"}},target:{serializedName:"target",required:!0,type:{name:"String"}},speed:{serializedName:"speed",required:!0,type:{name:"Number"}},estimate:{serializedName:"estimate",required:!0,type:{name:"String"}}}}},Bc={type:{name:"Composite",className:"Status",modelProperties:{genesisKeyBlockHash:{serializedName:"genesis_key_block_hash",required:!0,type:{name:"String"}},solutions:{serializedName:"solutions",required:!0,type:{name:"String"}},difficulty:{serializedName:"difficulty",required:!0,type:{name:"String"}},hashrate:{serializedName:"hashrate",required:!0,type:{name:"String"}},syncing:{serializedName:"syncing",required:!0,type:{name:"Boolean"}},syncProgress:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"sync_progress",type:{name:"Number"}},uptime:{serializedName:"uptime",required:!0,type:{name:"String"}},listening:{serializedName:"listening",required:!0,type:{name:"Boolean"}},protocols:{serializedName:"protocols",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Protocol"}}}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},peerCount:{serializedName:"peer_count",required:!0,type:{name:"String"}},peerConnections:{serializedName:"peer_connections",type:{name:"Composite",className:"PeerConnections"}},pendingTransactionsCount:{serializedName:"pending_transactions_count",required:!0,type:{name:"String"}},networkId:{serializedName:"network_id",required:!0,type:{name:"String"}},peerPubkey:{serializedName:"peer_pubkey",required:!0,type:{name:"String"}},topKeyBlockHash:{serializedName:"top_key_block_hash",required:!0,type:{name:"String"}},topBlockHeight:{serializedName:"top_block_height",required:!0,type:{name:"String"}}}}},Nc={type:{name:"Composite",className:"Protocol",modelProperties:{version:{serializedName:"version",required:!0,type:{name:"String"}},effectiveAtHeight:{serializedName:"effective_at_height",required:!0,type:{name:"String"}}}}},bc={type:{name:"Composite",className:"PeerConnections",modelProperties:{inbound:{serializedName:"inbound",required:!0,type:{name:"String"}},outbound:{serializedName:"outbound",required:!0,type:{name:"String"}}}}},vc={type:{name:"Composite",className:"Currency",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},subunit:{serializedName:"subunit",required:!0,type:{name:"String"}},subunitsPerUnit:{serializedName:"subunits_per_unit",required:!0,type:{name:"String"}},fiatConverstionUrl:{serializedName:"fiat_converstion_url",type:{name:"String"}},logo:{serializedName:"logo",type:{name:"Composite",className:"Image"}},primaryColour:{serializedName:"primary_colour",required:!0,type:{name:"String"}},secondaryColour:{serializedName:"secondary_colour",required:!0,type:{name:"String"}},networkName:{serializedName:"network_name",required:!0,type:{name:"String"}}}}},Sc={type:{name:"Composite",className:"Image",modelProperties:{type:{serializedName:"type",type:{name:"String"}},data:{serializedName:"data",type:{name:"String"}}}}},Tc={type:{name:"Composite",className:"GasPricesItem",modelProperties:{minGasPrice:{serializedName:"min_gas_price",required:!0,type:{name:"String"}},utilization:{serializedName:"utilization",required:!0,type:{name:"String"}},minutes:{serializedName:"minutes",required:!0,type:{name:"String"}}}}},xc={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},_c={type:{name:"Composite",className:"OracleRegisterTx",modelProperties:{queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"String"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},abiVersion:{serializedName:"abi_version",type:{name:"String"}}}}},Qc={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{serializedName:"fee",required:!0,type:{name:"String"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}}}}},Pc={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},zc={type:{name:"Composite",className:"OracleRespondTx",modelProperties:{queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Rc={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},kc={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{serializedName:"name_salt",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Oc={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{serializedName:"name_ttl",required:!0,type:{name:"String"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{serializedName:"client_ttl",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Mc={type:{name:"Composite",className:"NameTransferTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Dc={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},qc={type:{name:"Composite",className:"CommitmentId",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}}}}},Fc={type:{name:"Composite",className:"NameHash",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}}}}},Uc={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",required:!0,type:{name:"String"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{serializedName:"responder_amount",required:!0,type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",required:!0,type:{name:"String"}},lockPeriod:{serializedName:"lock_period",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},Gc={type:{name:"Composite",className:"ChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{serializedName:"round",required:!0,type:{name:"String"}}}}},Lc={type:{name:"Composite",className:"ChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},toId:{serializedName:"to_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{serializedName:"round",required:!0,type:{name:"String"}}}}},Hc={type:{name:"Composite",className:"ChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},round:{serializedName:"round",required:!0,type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},jc={type:{name:"Composite",className:"ChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{serializedName:"initiator_amount_final",required:!0,type:{name:"String"}},responderAmountFinal:{serializedName:"responder_amount_final",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"String"}}}}},Vc={type:{name:"Composite",className:"ChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},$c={type:{name:"Composite",className:"ChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},Yc={type:{name:"Composite",className:"ChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{serializedName:"initiator_amount_final",required:!0,type:{name:"String"}},responderAmountFinal:{serializedName:"responder_amount_final",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"String"}}}}},Jc={type:{name:"Composite",className:"ChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Kc={type:{name:"Composite",className:"ChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{serializedName:"round",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Wc={type:{name:"Composite",className:"PubKey",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}}}}},Xc={type:{name:"Composite",className:"PeerDetails",modelProperties:{host:{serializedName:"host",required:!0,type:{name:"String"}},port:{serializedName:"port",required:!0,type:{name:"String"}},firstSeen:{serializedName:"first_seen",required:!0,type:{name:"String"}},lastSeen:{serializedName:"last_seen",required:!0,type:{name:"String"}},genesisHash:{serializedName:"genesis_hash",required:!0,type:{name:"String"}},topHash:{serializedName:"top_hash",required:!0,type:{name:"String"}},topDifficulty:{serializedName:"top_difficulty",required:!0,type:{name:"String"}},networkId:{serializedName:"network_id",type:{name:"String"}},nodeVersion:{serializedName:"node_version",type:{name:"String"}},nodeRevision:{serializedName:"node_revision",type:{name:"String"}},nodeVendor:{serializedName:"node_vendor",type:{name:"String"}},nodeOs:{serializedName:"node_os",type:{name:"String"}}}}},Zc={type:{name:"Composite",className:"Peers",modelProperties:{peers:{serializedName:"peers",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blocked:{serializedName:"blocked",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},eu={type:{name:"Composite",className:"PeerCount",modelProperties:{connected:{serializedName:"connected",type:{name:"Composite",className:"PeerCountConnected"}},available:{serializedName:"available",type:{name:"Composite",className:"PeerCountAvailable"}},blocked:{serializedName:"blocked",required:!0,type:{name:"String"}}}}},tu={type:{name:"Composite",className:"PeerCountConnected",modelProperties:{inbound:{serializedName:"inbound",type:{name:"String"}},outbound:{serializedName:"outbound",type:{name:"String"}}}}},nu={type:{name:"Composite",className:"PeerCountAvailable",modelProperties:{verified:{serializedName:"verified",type:{name:"String"}},unverified:{serializedName:"unverified",type:{name:"String"}}}}},ru={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{serializedName:"vm_version",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},deposit:{serializedName:"deposit",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},gas:{serializedName:"gas",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},iu={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},gas:{serializedName:"gas",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},au={type:{name:"Composite",className:"UnsignedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},ou={type:{name:"Composite",className:"TokenSupply",modelProperties:{accounts:{serializedName:"accounts",type:{name:"String"}},contracts:{serializedName:"contracts",type:{name:"String"}},contractOracles:{serializedName:"contract_oracles",type:{name:"String"}},locked:{serializedName:"locked",type:{name:"String"}},oracles:{serializedName:"oracles",type:{name:"String"}},oracleQueries:{serializedName:"oracle_queries",type:{name:"String"}},pendingRewards:{serializedName:"pending_rewards",type:{name:"String"}},total:{serializedName:"total",type:{name:"String"}}}}},su={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{serializedName:"vm_version",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},gas:{serializedName:"gas",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",required:!0,type:{name:"String"}}}}},cu={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},gas:{serializedName:"gas",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},uu={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},lu={type:{name:"Composite",className:"CheckTxInPoolResponse",modelProperties:{status:{serializedName:"status",required:!0,type:{name:"String"}}}}},Au={serializedName:"OffChainTransfer",type:{name:"Composite",className:"OffChainTransfer",uberParent:"OffChainUpdate",polymorphicDiscriminator:js.type.polymorphicDiscriminator,modelProperties:{...js.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}}}}},du={serializedName:"OffChainWithdrawal",type:{name:"Composite",className:"OffChainWithdrawal",uberParent:"OffChainUpdate",polymorphicDiscriminator:js.type.polymorphicDiscriminator,modelProperties:{...js.type.modelProperties,to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}}}}},pu={serializedName:"OffChainDeposit",type:{name:"Composite",className:"OffChainDeposit",uberParent:"OffChainUpdate",polymorphicDiscriminator:js.type.polymorphicDiscriminator,modelProperties:{...js.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}}}}},mu={serializedName:"OffChainNewContract",type:{name:"Composite",className:"OffChainNewContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:js.type.polymorphicDiscriminator,modelProperties:{...js.type.modelProperties,owner:{serializedName:"owner",required:!0,type:{name:"String"}},vmVersion:{serializedName:"vm_version",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},code:{serializedName:"code",type:{name:"Composite",className:"ByteCode"}},deposit:{serializedName:"deposit",required:!0,type:{name:"String"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},hu={serializedName:"OffChainCallContract",type:{name:"Composite",className:"OffChainCallContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:js.type.polymorphicDiscriminator,modelProperties:{...js.type.modelProperties,caller:{serializedName:"caller",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},gas:{serializedName:"gas",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},gu={type:{name:"Composite",className:"CreateContractUnsignedTx",modelProperties:{...au.type.modelProperties,contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}}}}};let fu={OffChainUpdate:js,"OffChainUpdate.OffChainTransfer":Au,"OffChainUpdate.OffChainWithdrawal":du,"OffChainUpdate.OffChainDeposit":pu,"OffChainUpdate.OffChainNewContract":mu,"OffChainUpdate.OffChainCallContract":hu};const yu={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Cu={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},Iu={parameterPath:"intAsString",mapper:{defaultValue:!1,serializedName:"int-as-string",type:{name:"Boolean"}}},wu={parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}},Eu={parameterPath:"height",mapper:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}},Bu={parameterPath:"pubkey",mapper:{serializedName:"pubkey",required:!0,type:{name:"String"}}},Nu={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},bu={parameterPath:"body",mapper:Zs},vu={parameterPath:"body",mapper:lc},Su={parameterPath:"name",mapper:{serializedName:"name",required:!0,type:{name:"String"}}};class Tu extends Rs{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-node/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getTopHeader(e){return this.sendOperationRequest({options:e},_u)}getCurrentKeyBlock(e){return this.sendOperationRequest({options:e},Qu)}getCurrentKeyBlockHash(e){return this.sendOperationRequest({options:e},Pu)}getCurrentKeyBlockHeight(e){return this.sendOperationRequest({options:e},zu)}getPendingKeyBlock(e){return this.sendOperationRequest({options:e},Ru)}getKeyBlockByHash(e,t){return this.sendOperationRequest({hash:e,options:t},ku)}getKeyBlockByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Ou)}getMicroBlockHeaderByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Mu)}getMicroBlockTransactionsByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Du)}getMicroBlockTransactionByHashAndIndex(e,t,n){return this.sendOperationRequest({hash:e,index:t,options:n},qu)}getMicroBlockTransactionsCountByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Fu)}getCurrentGeneration(e){return this.sendOperationRequest({options:e},Uu)}getGenerationByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Gu)}getGenerationByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Lu)}getAccountByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Hu)}getAccountByPubkeyAndHeight(e,t,n){return this.sendOperationRequest({pubkey:e,height:t,options:n},ju)}getAccountByPubkeyAndHash(e,t,n){return this.sendOperationRequest({pubkey:e,hash:t,options:n},Vu)}getPendingAccountTransactionsByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},$u)}getAccountNextNonce(e,t){return this.sendOperationRequest({pubkey:e,options:t},Yu)}protectedDryRunTxs(e,t){return this.sendOperationRequest({body:e,options:t},Ju)}getTransactionByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Ku)}getTransactionInfoByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Wu)}postTransaction(e,t){return this.sendOperationRequest({body:e,options:t},Xu)}getContract(e,t){return this.sendOperationRequest({pubkey:e,options:t},Zu)}getContractCode(e,t){return this.sendOperationRequest({pubkey:e,options:t},el)}getContractPoI(e,t){return this.sendOperationRequest({pubkey:e,options:t},tl)}getOracleByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},nl)}getOracleQueriesByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},rl)}getOracleQueryByPubkeyAndQueryId(e,t,n){return this.sendOperationRequest({pubkey:e,queryId:t,options:n},il)}getAuctionEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},al)}getNameEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},ol)}getChannelByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},sl)}getPeerPubkey(e){return this.sendOperationRequest({options:e},cl)}getSyncStatus(e){return this.sendOperationRequest({options:e},ul)}getStatus(e){return this.sendOperationRequest({options:e},ll)}getChainEnds(e){return this.sendOperationRequest({options:e},Al)}getCurrency(e){return this.sendOperationRequest({options:e},dl)}getRecentGasPrices(e){return this.sendOperationRequest({options:e},pl)}}const xu=za(i,!1),_u={path:"/v3/headers/top",httpMethod:"GET",responses:{200:{bodyMapper:ks},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},Qu={path:"/v3/key-blocks/current",httpMethod:"GET",responses:{200:{bodyMapper:Ms},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},Pu={path:"/v3/key-blocks/current/hash",httpMethod:"GET",responses:{200:{bodyMapper:Ds},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},zu={path:"/v3/key-blocks/current/height",httpMethod:"GET",responses:{200:{bodyMapper:qs},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},Ru={path:"/v3/key-blocks/pending",httpMethod:"GET",responses:{200:{bodyMapper:Ms},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},ku={path:"/v3/key-blocks/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Ms},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Ou={path:"/v3/key-blocks/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Ms},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Eu],headerParameters:[yu],serializer:xu},Mu={path:"/v3/micro-blocks/hash/{hash}/header",httpMethod:"GET",responses:{200:{bodyMapper:Fs},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Du={path:"/v3/micro-blocks/hash/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:Us},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},qu={path:"/v3/micro-blocks/hash/{hash}/transactions/index/{index}",httpMethod:"GET",responses:{200:{bodyMapper:Gs},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu,{parameterPath:"index",mapper:{constraints:{InclusiveMinimum:1},serializedName:"index",required:!0,type:{name:"Number"}}}],headerParameters:[yu],serializer:xu},Fu={path:"/v3/micro-blocks/hash/{hash}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:Js},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Uu={path:"/v3/generations/current",httpMethod:"GET",responses:{200:{bodyMapper:Ks},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},Gu={path:"/v3/generations/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Ks},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Lu={path:"/v3/generations/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Ks},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Eu],headerParameters:[yu],serializer:xu},Hu={path:"/v3/accounts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Ws},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},ju={path:"/v3/accounts/{pubkey}/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Ws},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0},410:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Eu,Bu],headerParameters:[yu],serializer:xu},Vu={path:"/v3/accounts/{pubkey}/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Ws},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu,Bu],headerParameters:[yu],serializer:xu},$u={path:"/v3/accounts/{pubkey}/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:Us},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},Yu={path:"/v3/accounts/{pubkey}/next-nonce",httpMethod:"GET",responses:{200:{bodyMapper:Xs},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu,{parameterPath:["options","strategy"],mapper:{defaultValue:"max",serializedName:"strategy",type:{name:"Enum",allowedValues:["max","continuity"]}}}],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},Ju={path:"/v3/dry-run",httpMethod:"POST",responses:{200:{bodyMapper:ic},400:{bodyMapper:Os,isError:!0},403:{bodyMapper:Os,isError:!0}},requestBody:bu,queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu,Nu],mediaType:"json",serializer:xu},Ku={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Gs},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Wu={path:"/v3/transactions/{hash}/info",httpMethod:"GET",responses:{200:{bodyMapper:cc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0},410:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Xu={path:"/v3/transactions",httpMethod:"POST",responses:{200:{bodyMapper:Ac},400:{bodyMapper:Os,isError:!0}},requestBody:vu,queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu,Nu],mediaType:"json",serializer:xu},Zu={path:"/v3/contracts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:dc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},el={path:"/v3/contracts/{pubkey}/code",httpMethod:"GET",responses:{200:{bodyMapper:pc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},tl={path:"/v3/contracts/{pubkey}/poi",httpMethod:"GET",responses:{200:{bodyMapper:mc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},nl={path:"/v3/oracles/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:hc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},rl={path:"/v3/oracles/{pubkey}/queries",httpMethod:"GET",responses:{200:{bodyMapper:gc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu,{parameterPath:["options","from"],mapper:{serializedName:"from",type:{name:"String"}}},{parameterPath:["options","limit"],mapper:{defaultValue:20,constraints:{InclusiveMaximum:1e3,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},{parameterPath:["options","type"],mapper:{defaultValue:"all",serializedName:"type",type:{name:"Enum",allowedValues:["open","closed","all"]}}}],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},il={path:"/v3/oracles/{pubkey}/queries/{query-id}",httpMethod:"GET",responses:{200:{bodyMapper:fc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu,{parameterPath:"queryId",mapper:{serializedName:"query-id",required:!0,type:{name:"String"}}}],headerParameters:[yu],serializer:xu},al={path:"/v3/auctions/{name}",httpMethod:"GET",responses:{200:{bodyMapper:yc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Su],headerParameters:[yu],serializer:xu},ol={path:"/v3/names/{name}",httpMethod:"GET",responses:{200:{bodyMapper:Cc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Su],headerParameters:[yu],serializer:xu},sl={path:"/v3/channels/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Ic},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},cl={path:"/v3/peers/pubkey",httpMethod:"GET",responses:{200:{bodyMapper:wc}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},ul={path:"/v3/sync-status",httpMethod:"GET",responses:{200:{bodyMapper:Ec},404:{bodyMapper:Os,isError:!0}},urlParameters:[Cu],headerParameters:[yu],serializer:xu},ll={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:Bc}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},Al={path:"/v3/status/chain-ends",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"String"}}}}}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},dl={path:"/v3/currency",httpMethod:"GET",responses:{200:{bodyMapper:vc}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},pl={path:"/v3/recent-gas-prices",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"GasPricesItem"}}}}},400:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu};function ml(e,t){hl(e,t),t.add(e)}function hl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function gl(e,t,n){return function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(t,e),n}const fl=["balance","queryFee","fee","amount","nameFee","channelAmount","initiatorAmount","responderAmount","channelReserve","initiatorAmountFinal","responderAmountFinal","gasPrice","minGasPrice","deposit"],yl=["time","gas","gasUsed","nameSalt","nonce","nextNonce","height","blockHeight","topBlockHeight","ttl","nameTtl","clientTtl","inbound","outbound","peerCount","pendingTransactionsCount","effectiveAtHeight","version","solutions","round","minutes","utilization","difficulty","hashrate"];var Cl=new WeakSet,Il=new WeakSet,wl=new WeakSet;class El extends Tu{constructor(...e){super(...e),ml(this,wl),ml(this,Il),ml(this,Cl)}async sendOperationRequest(e,t){const n=It(e,(([e,t])=>[e,gl(this,Il,Nl).call(this,t)]));return gl(this,wl,bl).call(this,await super.sendOperationRequest(n,t))}}function Bl(e,t){return Array.isArray(e)?e.map((e=>gl(this,Cl,Bl).call(this,e,t))):null!=e&&"object"==typeof e?It(e,(([e,n])=>null==n?[e,n]:fl.some((t=>t===e))?[e,t.bigInt(n)]:yl.some((t=>t===e))?[e,t.number(n)]:[e,gl(this,Cl,Bl).call(this,n,t)])):e}function Nl(e){return gl(this,Cl,Bl).call(this,e,{bigInt:e=>e instanceof _?e.toFixed():e.toString(),number:e=>e.toString()})}function bl(e){return gl(this,Cl,Bl).call(this,e,{bigInt:e=>BigInt(e),number:e=>+e})}var vl=new WeakMap;class Sl extends El{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...i}={}){var a,o;super(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[ga("node",(async e=>(await this._getCachedStatus(e)).nodeVersion),"6.2.0","7.0.0")],da(),pa(),fa(n,r),ha((e=>[" ",e.reason,null==e.errorCode?"":` (${e.errorCode})`].join("")))],...i}),o={writable:!0,value:void 0},hl(this,a=vl),a.set(this,o),this.pipeline.removePolicy({name:la}),this.pipeline.removePolicy({name:Aa}),this.pipeline.removePolicy({name:"defaultRetryPolicy"}),this.intAsString=!0}async _getCachedStatus(e){return null!=li(this,vl)?li(this,vl):this.getStatus(e)}async getStatus(...e){const t=super.getStatus(...e);return t.then((()=>{ui(this,vl,t)}),(()=>{})),t}async getNetworkId(){return(await this._getCachedStatus()).networkId}async getNodeInfo(){const{nodeVersion:e,networkId:t,protocols:n,topBlockHeight:r}=await this.getStatus(),i=n.filter((({effectiveAtHeight:e})=>r>=e)).reduce(((e,t)=>t.effectiveAtHeight>e.effectiveAtHeight?t:e),{effectiveAtHeight:-1,version:0}).version;if(null==Bn[i]){const e=i.toString(),t=Object.values(Bn).filter((e=>"number"==typeof e)).map((e=>+e)),n=Math.min(...t).toString(),r=(Math.max(...t)+1).toString();throw new te("consensus protocol",e,n,r)}return{url:this.$host,nodeNetworkId:t,version:e,consensusProtocolVersion:i}}}function Tl(e){const t=ra(e);switch(t.tag){case vn.SignedTx:return Tl(ta(t.encodedTx));case vn.GaMetaTx:return t.gaId}const n=ea(t.tag,t.version).find((([e])=>"nonce"===e))?.[1];if(null==n)throw new U(`Transaction doesn't have nonce: ${vn[t.tag]}`);if(!("senderKey"in n))throw new ie;return t[n.senderKey].replace(/^ok_/,"ak_")}class xl{async signTypedData(e,t,n){throw new ee("signTypedData method")}async signDelegationToContract(e,t){throw new ee("signDelegationToContract method")}async signNameDelegationToContract(e,t,n){throw new ee("signNameDelegationToContract method")}async signAllNamesDelegationToContract(e,t){throw new ee("signAllNamesDelegationToContract method")}async signOracleQueryDelegationToContract(e,t,n){throw new ee("signOracleQueryDelegationToContract method")}async signDelegation(e,t){throw new ee("signDelegation method")}}var _l=n(6176),Ql=n(2341),Pl=n.n(Ql);function zl(e){var t;return en(null!==(t=Pl()(e))&&void 0!==t?t:"")}function Rl(e){const t=(new _l.TypeResolver).resolveType({record:[{name:"name",type:{option:["string"]}},{name:"version",type:{option:["int"]}},{name:"networkId",type:{option:["string"]}},{name:"contractAddress",type:{option:["contract_pubkey"]}}]},{});return en($t((new _l.ContractByteArrayEncoder).encodeWithType(e,t)))}function kl(e,t,n){return en(wt([cn,new Uint8Array([0]),Rl(n),zl(t),en($t(e))]))}let Ol=function(e){return e[e.AensWildcard=1]="AensWildcard",e[e.AensName=2]="AensName",e[e.AensPreclaim=3]="AensPreclaim",e[e.Oracle=4]="Oracle",e[e.OracleResponse=5]="OracleResponse",e}({});const Ml=Nr(Rt.OracleAddress),Dl={serialize(e){return Ml.serialize(Yt($t(e),Rt.OracleAddress))},deserialize(e){return Yt($t(Ml.deserialize(e)),Rt.OracleQueryId)}},ql=[{tag:wr(Ol.AensWildcard),version:wr(1,!0),accountAddress:Nr(Rt.AccountAddress),contractAddress:Nr(Rt.ContractAddress)},{tag:wr(Ol.AensName),version:wr(1,!0),accountAddress:Nr(Rt.AccountAddress),nameId:$r,contractAddress:Nr(Rt.ContractAddress)},{tag:wr(Ol.AensPreclaim),version:wr(1,!0),accountAddress:Nr(Rt.AccountAddress),contractAddress:Nr(Rt.ContractAddress)},{tag:wr(Ol.Oracle),version:wr(1,!0),accountAddress:Nr(Rt.AccountAddress),contractAddress:Nr(Rt.ContractAddress)},{tag:wr(Ol.OracleResponse),version:wr(1,!0),queryId:Dl,contractAddress:Nr(Rt.ContractAddress)}];function Fl(e){return Xi(ql,Ol,e,{},Rt.Bytearray)}function Ul(e,t){return Zi(ql,Ol,e,t,{})}var Gl=n(8287).Buffer;const Ll=new WeakMap;function Hl(e,t,n){const r=[t];n&&r.push("inner_tx");const i=$t(e);return wt([Gl.from(r.join("-")),en(i)])}class jl extends xl{constructor(e){if(super(),64!==(e="string"==typeof e?Gl.from(e,"hex"):e).length)throw new L("secretKey","64 bytes",e.length);Ll.set(this,e),this.address=Yt(nn(e).publicKey,Rt.AccountAddress)}static generate(){return new jl(rn().secretKey)}async sign(e,t){const n=Ll.get(this);if(null==n)throw new ie;return an(e,n)}async signTransaction(e,{innerTx:t,networkId:n,...r}={}){if(null==n)throw new L("networkId","provided",n);const i=$t(e),a=Hl(e,n,!0===t),o=[await this.sign(a,r)];return ta({tag:vn.SignedTx,encodedTx:i,signatures:o})}async signMessage(e,t){return this.sign(un(e),t)}async signTypedData(e,t,{name:n,version:r,networkId:i,contractAddress:a,...o}={}){const s=kl(e,t,{name:n,version:r,networkId:i,contractAddress:a});return Yt(await this.sign(s,o),Rt.Signature)}async signDelegationToContract(e,{networkId:t,consensusProtocolVersion:n,isOracle:r}={}){if(null==r){const e=null!=n?Bn[n]:"unknown";console.warn(`AccountMemory:signDelegationToContract: isOracle is not set. By default, sdk would generate an AENS preclaim delegation signature, but it won't be the same as the oracle delegation signature in Ceres (current protocol is ${e}).`)}if(n===Bn.Ceres){const n=Fl({tag:!0===r?Ol.Oracle:Ol.AensPreclaim,accountAddress:this.address,contractAddress:e});return this.signDelegation(n,{networkId:t})}if(null==t)throw new L("networkId","provided",t);const i=wt([Gl.from(t),$t(this.address),$t(e)]);return Yt(await this.sign(i),Rt.Signature)}async signNameDelegationToContract(e,t,{networkId:n,consensusProtocolVersion:r}={}){if(r===Bn.Ceres){const r=Fl({tag:Ol.AensName,accountAddress:this.address,contractAddress:e,nameId:t});return this.signDelegation(r,{networkId:n})}if(null==n)throw new L("networkId","provided",n);const i=wt([Gl.from(n),$t(this.address),$t(Pn(t)),$t(e)]);return Yt(await this.sign(i),Rt.Signature)}async signAllNamesDelegationToContract(e,{networkId:t,consensusProtocolVersion:n}={}){if(n===Bn.Ceres){const n=Fl({tag:Ol.AensWildcard,accountAddress:this.address,contractAddress:e});return this.signDelegation(n,{networkId:t})}if(null==t)throw new L("networkId","provided",t);const r=wt([Gl.from(t),$t(this.address),Gl.from("AENS"),$t(e)]);return Yt(await this.sign(r),Rt.Signature)}async signOracleQueryDelegationToContract(e,t,{networkId:n,consensusProtocolVersion:r}={}){if(r===Bn.Ceres){const r=Fl({tag:Ol.OracleResponse,queryId:t,contractAddress:e});return this.signDelegation(r,{networkId:n})}const i=$t(t),a=$t(this.address);if(0===i.compare(a))throw new L("oracleQueryId","not equal to account address",t);if(null==n)throw new L("networkId","provided",n);const o=wt([Gl.from(n),i,$t(e)]);return Yt(await this.sign(o),Rt.Signature)}async signDelegation(e,{networkId:t}={}){if(null==t)throw new L("networkId","provided",t);const n=wt([cn,new Uint8Array([1]),Gl.from(t),$t(e)]);return Yt(await this.sign(n),Rt.Signature)}}function Vl(e,{innerTx:t,gasUsed:n,queryFee:r,isInitiator:i}={}){const a=ra(e);if(a.tag===vn.SignedTx)throw new H("Transaction shouldn't be a SignedTx, use `getExecutionCostBySignedTx` instead");let o=0n;return"fee"in a&&"freeloader"!==t&&(o+=BigInt(a.fee)),a.tag===vn.NameClaimTx&&(o+=BigInt(a.nameFee)),a.tag===vn.OracleQueryTx&&(o+=BigInt(a.queryFee)),a.tag===vn.OracleResponseTx&&(o-=BigInt(null!=r?r:0)),a.tag===vn.ChannelSettleTx&&(!0===i&&(o-=BigInt(a.initiatorAmountFinal)),!1===i&&(o-=BigInt(a.responderAmountFinal))),(a.tag===vn.SpendTx&&a.senderId!==a.recipientId||a.tag===vn.ContractCreateTx||a.tag===vn.ContractCallTx||a.tag===vn.ChannelDepositTx)&&"fee-payer"!==t&&(o+=BigInt(a.amount)),a.tag===vn.ContractCreateTx&&(o+=BigInt(a.deposit)),a.tag!==vn.ContractCreateTx&&a.tag!==vn.ContractCallTx&&a.tag!==vn.GaAttachTx&&a.tag!==vn.GaMetaTx||"freeloader"===t||(o+=BigInt(a.gasPrice)*BigInt(null!=n?n:a.gasLimit)),a.tag!==vn.GaMetaTx&&a.tag!==vn.PayingForTx||(o+=Vl(ta(a.tx.encodedTx),a.tag===vn.PayingForTx?{innerTx:"fee-payer"}:{})),o}function $l(e,t,n){const r=ra(e,vn.SignedTx);if(r.encodedTx.tag===vn.GaMetaTx)return Vl(ta(r.encodedTx),n);const i=ta(r.encodedTx),a=Tl(i),[o,s]=[!0,!1].map((e=>on(Hl(i,t,e),r.signatures[0],a)));if(!o&&!s)throw new U("Can't verify signature");return Vl(ta(r.encodedTx),{...o&&{innerTx:"freeloader"},...n})}async function Yl(e,t,{isMined:n,...r}={}){let i=ra(e);const a=i.tag===vn.SignedTx,o=a&&!0===n&&ia(e);if(i.tag===vn.SignedTx&&(i=i.encodedTx),null==r.gasUsed&&!1!==o&&[vn.ContractCreateTx,vn.ContractCallTx,vn.GaAttachTx,vn.GaMetaTx].includes(i.tag)){const{callInfo:e,gaInfo:n}=await t.getTransactionInfoByHash(o),i=null!=e?e:n;if(null==i)throw new re(`callInfo and gaInfo is not available for transaction ${o}`);r.gasUsed=i.gasUsed}if(null==r.queryFee&&vn.OracleResponseTx===i.tag&&(r.queryFee=(await t.getOracleByPubkey(i.oracleId)).queryFee.toString()),null==r.isInitiator&&vn.ChannelSettleTx===i.tag&&!0!==n){const{initiatorId:e}=await t.getChannelByPubkey(i.channelId);r.isInitiator=i.fromId===e}return a?$l(e,await t.getNetworkId(),r):Vl(e,r)}var Jl=n(8287).Buffer;const Kl=[];async function Wl(e,t,n){const r=Tl(ta(e)),[i,{height:a},{consensusProtocolVersion:o,nodeNetworkId:s}]=await Promise.all([t.getAccountByPubkey(r).catch((e=>{if(!Nt(e))throw e;return{id:r,balance:0n,nonce:0}})).then((e=>({...e,id:e.id}))),t.getCurrentKeyBlockHeight(),t.getNodeInfo()]);return(await Promise.all(Kl.map((async r=>r(e,{node:t,account:i,height:a,consensusProtocolVersion:o,nodeNetworkId:s,parentTxTypes:n}))))).flat()}async function Xl(e,t){const n=new Sl(t.$host,{ignoreVersion:!0,pipeline:t.pipeline.clone(),additionalPolicies:[ma()]});return Wl(ra(e),n,[])}Kl.push(((e,{account:t,nodeNetworkId:n,parentTxTypes:r})=>{if(e.tag!==vn.SignedTx)return[];const{encodedTx:i,signatures:a}=e;if(null==(null!=i?i:a))return[];if(1!==a.length)return[];const o=Jl.from([n,...r.includes(vn.PayingForTx)?["inner_tx"]:[]].join("-")),s=$t(ta(i)),c=wt([o,s]),u=wt([o,en(s)]);return on(c,a[0],t.id)||on(u,a[0],t.id)?[]:[{message:"Signature cannot be verified, please ensure that you transaction have the correct prefix and the correct private key for the sender address",key:"InvalidSignature",checkedKeys:["encodedTx","signatures"]}]}),(async(e,{node:t,parentTxTypes:n})=>{let r;return"encodedTx"in e&&(r=e.encodedTx),"tx"in e&&(r=e.tx),null==r?[]:Wl(r,t,[...n,e.tag])}),((e,{height:t})=>"ttl"in e?0===e.ttl||e.ttl>t?[]:[{message:`TTL ${e.ttl} is already expired, current height is ${t}`,key:"ExpiredTTL",checkedKeys:["ttl"]}]:[]),(async(e,{account:t,parentTxTypes:n,node:r})=>{if(0!==n.length)return[];const i=await Yl(ta(e),r).catch((()=>0n));return i<=t.balance?[]:[{message:`Account balance ${t.balance} is not enough to execute the transaction that costs ${i}`,key:"InsufficientBalance",checkedKeys:["amount","fee","nameFee","gasLimit","gasPrice"]}]}),(async(e,{node:t})=>{if(e.tag!==vn.SpendTx||Wt(e.recipientId,Rt.Name))return[];const n=await t.getAccountByPubkey(e.recipientId).catch((e=>{if(!Nt(e))throw e;return null}));return null==n||!0===n.payable?[]:[{message:"Recipient account is not payable",key:"RecipientAccountNotPayable",checkedKeys:["recipientId"]}]}),((e,{account:t})=>{let n;return e.tag===vn.SignedTx&&"generalized"===t.kind&&0!==e.signatures.length&&(n="Generalized account can't be used to generate SignedTx with signatures"),e.tag===vn.GaMetaTx&&"basic"===t.kind&&(n="Basic account can't be used to generate GaMetaTx"),null==n?[]:[{message:n,key:"InvalidAccountType",checkedKeys:["tag"]}]}),((e,{consensusProtocolVersion:t})=>{var n,r;const i=vn.OracleRegisterTx===e.tag,a=vn.ContractCreateTx===e.tag||vn.GaAttachTx===e.tag,o=vn.ContractCallTx===e.tag||vn.GaMetaTx===e.tag,s=null!==(n=null!==(r=i?"oracle-call":null)&&void 0!==r?r:a?"contract-create":null)&&void 0!==n?n:o?"contract-call":null;if(null==s)return[];const c=lr[t][s];let u;if("abiVersion"in e&&(u={abiVersion:e.abiVersion}),"ctVersion"in e&&(u=e.ctVersion),null==u)throw new ie;return!c.abiVersion.includes(u.abiVersion)||a&&!c.vmVersion.includes(u.vmVersion)?[{message:`ABI/VM version ${JSON.stringify(u)} is wrong, supported is: ${JSON.stringify(c)}`,key:"VmAndAbiVersionMismatch",checkedKeys:["ctVersion","abiVersion"]}]:[]}),(async(e,{node:t})=>{if(vn.ContractCallTx!==e.tag)return[];if(e.contractId.startsWith("nm_"))return[];try{const{active:n}=await t.getContract(e.contractId);return n?[]:[{message:`Contract ${e.contractId} is not active`,key:"ContractNotActive",checkedKeys:["contractId"]}]}catch(e){if(!(e instanceof ft)||null==e.response?.bodyAsText)throw e;return[{message:JSON.parse(e.response.bodyAsText).reason,key:"ContractNotFound",checkedKeys:["contractId"]}]}}),((e,{consensusProtocolVersion:t})=>vn.GaAttachTx===e.tag&&Bn.Ceres===t&&1!==e.nonce?[{message:`Account ${e.ownerId} can't become generalized because it is already used`,key:"AccountUsed",checkedKeys:["nonce"]}]:[]));class Zl extends U{constructor(e,t,n){super(e),this.name="InvalidTxError",this.validation=t,this.transaction=n}}async function eA(e,{onNode:t,onAccount:n,verify:r=!0,waitMined:i=!0,confirm:a,innerTx:o,...s}){const c=await n.signTransaction(e,{...s,onNode:t,innerTx:o,networkId:await t.getNetworkId()});if(!0===o)return{hash:ia(c),rawTx:c};if(r){const e=await Xl(c,t);if(e.length>0){const t=`Transaction verification errors: ${e.map((e=>e.message)).join(", ")}`;throw new Zl(t,e,c)}}try{let e;try{e=null!=n?`tx-${n.address}`:null}catch(t){e=null}const{txHash:r}=await t.postTransaction({tx:c},{requestOptions:{customHeaders:{"__retry-code":"400",...null!=e?{__queue:e}:{}}}});if(i){const e=await Vn(r,{onNode:t,...s}),n={...e,hash:e.hash,rawTx:c};if(null!=a&&+a>0){const e="boolean"==typeof a?void 0:a;return{...n,confirmationHeight:await Yn(r,{onNode:t,confirm:e,...s})}}return n}return{hash:r,rawTx:c}}catch(e){throw bt(e),Object.assign(e,{rawTx:c,verifyTx:async()=>Xl(c,t)})}}var tA=n(8287).Buffer;const nA=e=>tA.from(e).toString("base64").replaceAll("/","_").replaceAll("+","-").replace(/=+$/,""),rA=e=>tA.from(e.replaceAll("_","/").replaceAll("-","+"),"base64"),iA=e=>{var t;return nA(null!==(t=Pl()(e))&&void 0!==t?t:"")},aA="eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9";async function oA(e,t){const n={...e};"sub_jwk"in n||(n.sub_jwk={kty:"OKP",crv:"Ed25519",x:nA($t(t.address))}),void 0===n.sub_jwk&&delete n.sub_jwk;const r=`${aA}.${iA(n)}`,i=await t.sign(r);return`${r}.${nA(i)}`}function sA(e,t){var n;const r=e.split(".");if(3!==r.length)throw new L("JWT components count",3,r.length);const[i,a,o]=r;if(i!==aA)throw new L("JWT header",aA,i);const s=JSON.parse(rA(a).toString()),c=null!==(n=s.sub_jwk)&&void 0!==n?n:{},u=null==c.x||"OKP"!==c.kty||"Ed25519"!==c.crv?t:Yt(rA(c.x),Rt.AccountAddress);if(null!=t&&u!==t)throw new L("address",`${u} ("sub_jwk")`,t);if(null!=u&&!on(tA.from(`${i}.${a}`),rA(o),u))throw new je(`JWT is not signed by ${u}`);return{payload:s,signer:u}}function cA(e){try{return sA(e),!0}catch(e){return!1}}function uA(e){sA(e)}function lA(e,t){try{const{signer:n}=sA(e,t);return null!=n}catch(e){return!1}}var AA,dA={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},pA=new Uint8Array(16);function mA(){if(!AA&&!(AA="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return AA(pA)}for(var hA=[],gA=0;gA<256;++gA)hA.push((gA+256).toString(16).substr(1));var fA=function(e,t,n){if(dA.randomUUID&&!t&&!e)return dA.randomUUID();var r=(e=e||{}).random||(e.rng||mA)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(hA[e[t+0]]+hA[e[t+1]]+hA[e[t+2]]+hA[e[t+3]]+"-"+hA[e[t+4]]+hA[e[t+5]]+"-"+hA[e[t+6]]+hA[e[t+7]]+"-"+hA[e[t+8]]+hA[e[t+9]]+"-"+hA[e[t+10]]+hA[e[t+11]]+hA[e[t+12]]+hA[e[t+13]]+hA[e[t+14]]+hA[e[t+15]]).toLowerCase()}(r)},yA=n(8802),CA=n(8287).Buffer;const IA={async argon2id(e,t,n){const{memlimit_kib:r,opslimit:i}=n;return(0,yA.tW)(e,{hashLength:32,salt:t,timeCost:i,memoryCost:r,type:yA.xi})}},wA={"xsalsa20-poly1305":{encrypt:Tt().secretbox,decrypt(...e){const t=Tt().secretbox.open(...e);if(null==t)throw new Re;return t}}},EA={secret_type:"ed25519",symmetric_alg:"xsalsa20-poly1305",kdf:"argon2id",kdf_params:{memlimit_kib:65536,opslimit:3,parallelism:1}};function BA(e,t,n,r=EA.symmetric_alg){return wA[r].encrypt(e,n,t)}async function NA(e,t,n,r){return IA[n](e,t,r)}async function bA(e,{crypto:t}){const n=CA.from(t.kdf_params.salt,"hex");return CA.from(function(e,t,n,r=EA.symmetric_alg){return wA[r].decrypt(e,n,t)}(CA.from(t.ciphertext,"hex"),await NA(e,n,t.kdf,t.kdf_params),CA.from(t.cipher_params.nonce,"hex"),t.symmetric_alg)).toString("hex")}async function vA(e,t,n,r=Tt().randomBytes(24),i=Tt().randomBytes(16),a){const o={...EA,...a},s=await NA(t,i,o.kdf,o.kdf_params),c="string"==typeof n?CA.from(n,"hex"):n;return{name:e,version:1,public_key:Kt(c),id:fA(),crypto:{secret_type:o.secret_type,symmetric_alg:o.symmetric_alg,ciphertext:CA.from(BA(c,s,r,o.symmetric_alg)).toString("hex"),cipher_params:{nonce:CA.from(r).toString("hex")},kdf:o.kdf,kdf_params:{...o.kdf_params,salt:CA.from(i).toString("hex")}}}}var SA=n(9234),TA=n(9235),xA=n(3836),_A=n.n(xA),QA=n(8287).Buffer;const PA=_A().ModeOfOperation.ecb;function zA(e,t){const n=Ot(e);return new PA(n).encrypt(t)}function RA(e,t){const n=QA.from(t),r=Ot(e);return new PA(r).decrypt(n)}class kA extends q{constructor(e){super(e),this.name="DerivationError"}}const OA=QA.from("ed25519 seed"),MA=2147483648;function DA({secretKey:e,chainCode:t},n){if(n<MA)throw new kA(`Segment ${n} is not hardened`);const r=QA.allocUnsafe(4);r.writeUInt32BE(n,0);const i=wt([QA.alloc(1,0),e,r]),a=(0,SA.full)(i,t);return{secretKey:a.slice(0,32),chainCode:a.slice(32)}}function qA(e,t){const n=""===e?[]:(0,TA.fromString)(e).toPathArray();return n.forEach(((e,t)=>{if(e<MA)throw new kA(`Segment #${t+1} is not hardened`)})),n.reduce(((e,t)=>DA(e,t)),t)}function FA(e){const t=(0,SA.full)(e,OA);return{secretKey:t.slice(0,32),chainCode:t.slice(32)}}function UA(e,t){if(!["m","m/"].includes(e.slice(0,2)))throw new kA("Root element is required");const n=FA(t);return qA(e.slice(2),n)}function GA(e){const{secretKey:t,publicKey:n}=e;return{secretKey:QA.from(t).toString("hex"),publicKey:Yt(n,Rt.AccountAddress)}}function LA(e){return Tt().sign.keyPair.fromSeed(e)}function HA(e,t){const n=UA("m/44h/457h",e);return{secretKey:QA.from(zA(t,n.secretKey)).toString("hex"),chainCode:QA.from(zA(t,n.chainCode)).toString("hex")}}function jA(e,t,n){const r={secretKey:RA(t,QA.from(e.secretKey,"hex")),chainCode:RA(t,QA.from(e.chainCode,"hex"))};return new Array(n).fill(void 0).map(((e,t)=>GA(LA(qA(`${t}h/0h/0h`,r).secretKey))))}const VA=(e,t)=>({...GA(LA(qA(`${t}h/0h/0h`,UA("m/44h/457h",e)).secretKey)),idx:t});async function $A(e,t){return eA(await na({_isInternalBuild:!0,...t,tag:vn.NameRevokeTx,nameId:e,accountId:t.onAccount.address}),t)}async function YA(e,t,{extendPointers:n,...r}){const i={...!0===n&&Object.fromEntries((await sr(e,r)).pointers.map((({key:e,id:t})=>[e,t]))),...t},a=Object.values(i).some((e=>Wt(e,Rt.Bytearray))),o=(await r.onNode.getNodeInfo()).consensusProtocolVersion===Bn.Iris;if(a&&o)throw new Z("Raw pointers are available only in Ceres, the current protocol is Iris");const s=await na({_isInternalBuild:!0,...r,tag:vn.NameUpdateTx,version:a?2:1,nameId:e,accountId:r.onAccount.address,pointers:Object.entries(i).map((([e,t])=>({key:e,id:t})))});return eA(s,r)}async function JA(e,t,n){return eA(await na({_isInternalBuild:!0,...n,tag:vn.NameTransferTx,nameId:e,accountId:n.onAccount.address,recipientId:t}),n)}async function KA(e,t){const n=await sr(e,t);return Object.freeze({...n,id:n.id,owner:n.owner,async update(n,r){return{...await YA(e,n,{...t,...r}),...await KA(e,{...t,...r})}},async transfer(n,r){return{...await JA(e,n,{...t,...r}),...await KA(e,{...t,...r})}},async revoke(n){return $A(e,{...t,...n})},async extendTtl(n,r={}){return{...await YA(e,{},{...t,...r,nameTtl:n,extendPointers:!0}),...await KA(e,{...t,...r})}}})}async function WA(e,t,n){const r=await na({_isInternalBuild:!0,...n,tag:vn.NameClaimTx,accountId:n.onAccount.address,nameSalt:t,name:e}),i=await eA(r,n);if(!Gn(e)){const t=null!=i.blockHeight&&i.blockHeight>0?await KA(e,n):{};return Object.assign(i,t)}return i}async function XA(e,t){const n=Xt(),r=zn(e,n),i=await na({_isInternalBuild:!0,...t,tag:vn.NamePreclaimTx,accountId:t.onAccount.address,commitmentId:r});return Object.freeze({...await eA(i,t),salt:n,commitmentId:r,async claim(r){const{version:i,...a}=t;return WA(e,n,{...a,...r})}})}async function ZA(e,t,n){return WA(e,0,{...n,nameFee:t})}function ed(e,t){td(e,t),t.add(e)}function td(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nd(e,t,n){return function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(t,e),n}var rd=new WeakSet,id=new WeakSet,ad=new WeakSet,od=new WeakSet,sd=new WeakMap;function cd({returnType:e,returnValue:t,log:n},r,i,a){let o;switch(e){case"ok":{const e=nd(this,ad,ld).call(this,r);return{decodedResult:this._calldata.decode(this._name,e.name,t),decodedEvents:this.$decodeEvents(n,a)}}case"revert":o=this._calldata.decodeFateString(t);break;case"error":o=$t(t).toString();break;default:throw new re(`Unknown return type: ${e}`)}throw new Te(o,i)}async function ud(e,t,n){const r=await eA(e,{...this.$options,...n});return{hash:r.hash,tx:ra(r.rawTx),txData:r,rawTx:r.rawTx,...null!=r.blockHeight&&await this.$getCallResultByTxHash(r.hash,t,n)}}function ld(e){const t=li(this,sd).functions.find((t=>t.name===e));if(null!=t)return t;if("init"===e)return{arguments:[],name:"init",payable:!1,returns:"unit",stateful:!0};throw new xe(e)}function Ad(e,t,{contractAddressToName:n}){const r={...this.$options.contractAddressToName,...n};if(null!=r[e])return r[e];const i=this._aci.map((({contract:e})=>e)).filter((e=>e?.event)),a=i.map((e=>[e.name,e.event.variant])).map((([e,t])=>t.map((t=>[e,Object.keys(t)[0],Object.values(t)[0]])))).flat().filter((([,e])=>BigInt(`0x${en(e).toString("hex")}`)===t)).filter((([,,e],t,n)=>!n.slice(0,t).some((t=>{return n=t[2],r=e,JSON.stringify(n)===JSON.stringify(r);var n,r}))));switch(a.length){case 0:throw new Qe(t.toString(),e);case 1:return a[0][0];default:throw new Pe(e,a)}}const dd=class{async $compile(){if(null!=this.$options.bytecode)return this.$options.bytecode;if(null==this.$options.onCompiler)throw new H("Can't compile without compiler");if(null!=this.$options.sourceCode){const{bytecode:e}=await this.$options.onCompiler.compileBySourceCode(this.$options.sourceCode,this.$options.fileSystem);this.$options.bytecode=e}if(null!=this.$options.sourceCodePath){const{bytecode:e}=await this.$options.onCompiler.compile(this.$options.sourceCodePath);this.$options.bytecode=e}if(null==this.$options.bytecode)throw new H("Can't compile without sourceCode and sourceCodePath");return this.$options.bytecode}async $getCallResultByTxHash(e,t,n){const{callInfo:r}=await this.$options.onNode.getTransactionInfoByHash(e);if(null==r)throw new D(`callInfo is not available for transaction ${e}`);const i=r;return{...nd(this,rd,cd).call(this,i,t,void 0,n),result:i}}async _estimateGas(e,t,n={}){const{result:r}=await this.$call(e,t,{...n,callStatic:!0});if(null==r)throw new ie;const{gasUsed:i}=r;return Math.floor(1.25*i)}async $deploy(e,t){var n;const{callStatic:r,...i}={...this.$options,...t};if(null==this.$options.bytecode&&await this.$compile(),!0===r)return this.$call("init",e,{...i,callStatic:r});if(null!=this.$options.address)throw new Ee;if(null==i.onAccount)throw new H("Can't deploy without account");const a=i.onAccount.address;if(null==this.$options.bytecode)throw new H("Can't deploy without bytecode");const o=await na({_isInternalBuild:!0,...i,tag:vn.ContractCreateTx,gasLimit:null!==(n=i.gasLimit)&&void 0!==n?n:await this._estimateGas("init",e,i),callData:this._calldata.encode(this._name,"init",e),code:this.$options.bytecode,ownerId:a}),{hash:s,...c}=await nd(this,id,ud).call(this,o,"init",{...i,onAccount:i.onAccount});return this.$options.address=aa(c.rawTx),{...c,...null!=c.result?.log&&{decodedEvents:this.$decodeEvents(c.result.log,i)},owner:a,transaction:s,address:this.$options.address}}async $call(e,t,n={}){var r;const{callStatic:i,top:a,...o}={...this.$options,...n},s=nd(this,ad,ld).call(this,e),{address:c,name:u}=this.$options,l=null!=u?Pn(u):c,{onNode:A}=o;if(null==e)throw new Se;if("init"===e&&!0!==i)throw new Ne('"init" can be called only via dryRun');if("init"!==e&&null!=o.amount&&Number(o.amount)>0&&!s.payable)throw new _e(o.amount,e);let d;try{if(null==o.onAccount)throw new re("Use fallback account");d=o.onAccount.address}catch(e){if(!0!==i||!(e instanceof W&&"Account should be an address (ak-prefixed string), or instance of AccountBase, got undefined instead"===e.message||e instanceof We||e instanceof re&&"Use fallback account"===e.message))throw e;d=hn.pub}const p=this._calldata.encode(this._name,e,t);if(!0===i){if(null==o.nonce){const e=null!=a&&{["number"==typeof a?"height":"hash"]:a},t=await Jn(d,{...e,onNode:A}).catch((e=>{if(!Nt(e))throw e;return{kind:"basic",nonce:0}}));o.nonce="generalized"===t.kind?0:t.nonce+1}const t={...o,onNode:A,callData:p};let n;if("init"===e){if(null==this.$options.bytecode)throw new H('Can\'t dry-run "init" without bytecode');n=await na({...t,tag:vn.ContractCreateTx,code:this.$options.bytecode,ownerId:d})}else{if(null==l)throw new be("Can't dry-run contract without address");n=await na({...t,tag:vn.ContractCallTx,callerId:d,contractId:l})}const{callObj:r,...i}=await ir(n,d,{...o,top:a});if(null==r)throw new re(`callObj is not available for transaction ${n}`);const s=r;return{...i,...nd(this,rd,cd).call(this,s,e,n,o),tx:ra(n),result:s,rawTx:n,hash:ia(n),txData:void 0}}if(null!=a)throw new H("Can't handle `top` option in on-chain contract call");if(null==l)throw new be("Can't call contract without address");const m=await na({_isInternalBuild:!0,...o,tag:vn.ContractCallTx,gasLimit:null!==(r=o.gasLimit)&&void 0!==r?r:await this._estimateGas(e,t,o),callerId:d,contractId:l,callData:p});if(null==o.onAccount)throw new H("Can't call contract on chain without account");return nd(this,id,ud).call(this,m,e,{...o,onAccount:o.onAccount})}$decodeEvents(e,{omitUnknown:t,...n}={}){return e.map((e=>{const r=e.topics.map((e=>BigInt(e)));let i;try{i=nd(this,od,Ad).call(this,e.address,r[0],n)}catch(e){if(null!=t&&t&&e instanceof Qe)return null;throw e}const a=this._calldata.decodeEvent(i,e.data,r),[o,s]=Object.entries(a)[0];return{name:o,args:s,contract:{name:i,address:e.address}}})).filter((e=>null!=e))}static async initialize({onCompiler:e,onNode:t,bytecode:n,aci:r,address:i,sourceCodePath:a,sourceCode:o,fileSystem:s,validateBytecode:c,...u}){if(null==r&&null!=e){let t;var l;null!=a&&(t=await e.compile(a)),null!=o&&(t=await e.compileBySourceCode(o,s)),null!=t&&(r=t.aci,null!==(l=n)&&void 0!==l||(n=t.bytecode))}if(null==r)throw new ve;let A;if(null!=i&&(i=await cr(i,"contract_pubkey",{resolveByNode:!0,onNode:t}),(await t.getNodeInfo()).consensusProtocolVersion!==Bn.Iris&&On(i)&&(A=i)),null==i&&null==o&&null==a&&null==n)throw new be("Can't create instance by ACI without address");if(null!=i&&null==(await or(i,{onNode:t})).active)throw new Be(i);if(!0===c){if(null==i)throw new be("Can't validate bytecode without contract address");const r=(await ar(i,{onNode:t})).bytecode;let c=!1;if(null!=n)c=n===r;else if(null!=o){if(null==e)throw new H("Can't validate bytecode without compiler");c=await e.validateBySourceCode(r,o,s)}else if(null!=a){if(null==e)throw new H("Can't validate bytecode without compiler");c=await e.validate(r,a)}if(!c)throw new we(null!=(null!=o?o:a)?"source code":"bytecode")}return new dd({onCompiler:e,onNode:t,sourceCode:o,sourceCodePath:a,bytecode:n,aci:r,address:i,name:A,fileSystem:s,...u})}constructor({aci:e,...t}){var n,r;ed(this,od),ed(this,ad),ed(this,id),ed(this,rd),r={writable:!0,value:void 0},td(this,n=sd),n.set(this,r),this._aci=e;const i=e[e.length-1];if(null==i.contract)throw new H(`The last 'aci' item should have 'contract' key, got ${Object.keys(i)} keys instead`);ui(this,sd,i.contract),this._name=li(this,sd).name,this._calldata=new _l.Encoder(e),this.$options=t,Object.assign(this,Object.fromEntries(li(this,sd).functions.map((({name:e,arguments:t,stateful:n})=>{const r="init"!==e&&!n;return[e,async(...n)=>{const i=n.length===t.length+1?n.pop():{};if("object"!=typeof i)throw new W(`Options should be an object: ${i}`);return"init"===e?this.$deploy(n,{callStatic:r,...i}):this.$call(e,n,{callStatic:r,...i})}]}))))}};var pd=dd;function md(e,t,{interval:n,onNode:r,...i}){var a;null!==(a=n)&&void 0!==a||(n=Ln("microblock",i));const o=new Set,s=async()=>{var n;const i=(null!==(n=(await r.getOracleQueriesByPubkey(e)).oracleQueries)&&void 0!==n?n:[]).filter((({id:e})=>!o.has(e)));i.forEach((e=>{o.add(e.id),t(e)}))};let c=!1;return(async()=>{for(;!c;)await s().catch(console.error),await Ct(n)})(),()=>{c=!0}}async function hd(e,t,{interval:n,onNode:r,...i}){var a;let o,s,c;null!==(a=n)&&void 0!==a||(n=Ln("microblock",i));do{({response:c,ttl:s}=await r.getOracleQueryByPubkeyAndQueryId(e,t));const a=$t(c);if(a.length>0)return a.toString();await Ct(n),o=await jn({...i,onNode:r,cached:!0})}while(s>=o);throw new J(o)}async function gd(e,t,n){const r=await n.onNode.getOracleQueryByPubkeyAndQueryId(e,t);return{...r,decodedQuery:$t(r.query).toString(),decodedResponse:$t(r.response).toString(),respond:async(e,r)=>Cd(t,e,{...n,...r}),pollForResponse:async r=>hd(e,t,{...n,...r})}}async function fd(e,t,n){const r=n.onAccount.address,i=await na({_isInternalBuild:!0,...n,tag:vn.OracleQueryTx,oracleId:e,senderId:r,query:t}),{nonce:a}=ra(i,vn.OracleQueryTx),o=xn(r,a,e);return{...await eA(i,n),...await gd(e,o,n)}}async function yd(e){const t=Yt($t(e.onAccount.address),Rt.OracleAddress),n=await na({_isInternalBuild:!0,...e,tag:vn.OracleExtendTx,oracleId:t});return{...await eA(n,e),...await Id(t,e)}}async function Cd(e,t,n){const r=Yt($t(n.onAccount.address),Rt.OracleAddress),i=await na({_isInternalBuild:!0,...n,tag:vn.OracleResponseTx,oracleId:r,queryId:e,response:t});return{...await eA(i,n),...await Id(r,n)}}async function Id(e,t){return{...await t.onNode.getOracleByPubkey(e),queries:(await t.onNode.getOracleQueriesByPubkey(e)).oracleQueries,...It({pollQueries:md,postQuery:fd,respondToQuery:Cd,extendOracle:yd,getQuery:gd},(([n,r])=>[n,(...i)=>{const a=i[i.length-1];return null!=a&&"object"==typeof a&&a.constructor===Object?Object.assign(a,{...t,...a}):i.push(t),r(...["extendOracle","respondToQuery"].includes(n)?[]:[e],...i)}]))}}async function wd(e,t,n){const r=n.onAccount.address,i=await na({_isInternalBuild:!0,...n,tag:vn.OracleRegisterTx,accountId:r,queryFormat:e,responseFormat:t});return{...await eA(i,n),...await Id(Yt($t(r),Rt.OracleAddress),n)}}async function Ed(e,t,n){return eA(await na({_isInternalBuild:!0,...n,tag:vn.SpendTx,senderId:n.onAccount.address,recipientId:await cr(t,"account_pubkey",n),amount:e}),n)}async function Bd(e,t,n){if(+e<0||+e>1)throw new L("fraction","a number between 0 and 1",e);const r=await cr(t,"account_pubkey",n),i=n.onAccount.address,a=new _(await Kn.bind(n.onAccount)(i,n)),o=a.times(e).integerValue(_.ROUND_HALF_UP),{fee:s}=ra(await na({_isInternalBuild:!0,...n,tag:vn.SpendTx,senderId:i,recipientId:r,amount:o}),vn.SpendTx),c=o.plus(s).gt(a)?a.minus(s):o;return eA(await na({_isInternalBuild:!0,...n,tag:vn.SpendTx,senderId:i,recipientId:r,amount:c}),n)}async function Nd(e,t){return eA(await na({_isInternalBuild:!0,...t,tag:vn.PayingForTx,payerId:t.onAccount.address,tx:e}),t)}var bd=n(8287).Buffer;async function vd(e,t,{onAccount:n,onCompiler:r,onNode:i,bytecode:a,aci:o,sourceCodePath:s,sourceCode:c,fileSystem:u,...l}){var A;const d=n.address;if("generalized"===(await Jn(d,{onNode:i})).kind)throw new H(`Account ${d} is already GA`);const p=await pd.initialize({onAccount:n,onCompiler:r,onNode:i,bytecode:a,aci:o,sourceCodePath:s,sourceCode:c,fileSystem:u}),m=await na({_isInternalBuild:!0,...l,tag:vn.GaAttachTx,onNode:i,code:await p.$compile(),gasLimit:null!==(A=l.gasLimit)&&void 0!==A?A:await p._estimateGas("init",t,l),ownerId:d,callData:p._calldata.encode(p._name,"init",t),authFun:en(e)}),{hash:h,rawTx:g}=await eA(m,{onNode:i,onAccount:n,onCompiler:r,...l}),f=aa(g);return Object.freeze({owner:d,transaction:h,rawTx:g,gaContractId:f})}async function Sd(e,{fee:t,gasPrice:n,onNode:r}){const{nodeNetworkId:i,consensusProtocolVersion:a}=await r.getNodeInfo();let o=en(wt([bd.from(i),$t(e)]));if(a===Bn.Ceres){if(null==t)throw new L("fee","provided (in Ceres)",t);if(null==n)throw new L("gasPrice","provided (in Ceres)",n);o=en($t(ta({tag:vn.GaMetaTxAuthData,fee:t,gasPrice:n,txHash:Yt(o,Rt.TxHash)})))}return o}async function Td(e,{onNode:t}){const n=ra(e,vn.SignedTx);if(n.encodedTx.tag!==vn.GaMetaTx)throw new L("transaction","to include GaMetaTx",vn[n.encodedTx.tag]);return Sd(ta(n.encodedTx.tx.encodedTx),{fee:n.encodedTx.fee,gasPrice:n.encodedTx.gasPrice,onNode:t})}var xd=n(4997),_d=n(2321),Qd=n(2231);function Pd(e){return Pd="function"==typeof _d&&"symbol"==typeof Qd?function(e){return typeof e}:function(e){return e&&"function"==typeof _d&&e.constructor===_d&&e!==_d.prototype?"symbol":typeof e},Pd(e)}var zd=n(9280);function Rd(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Pd(e)||!e)return e;var n=e[zd];if(void 0!==n){var r=n.call(e,"string");if("object"!=Pd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pd(t)?t:String(t)}(t))in e?xd(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const kd={...t,sendTransaction:eA,...a,...s,...o,createDelegationSignature:async function(e,t,{onAccount:n,omitAddress:r,isOracle:i,...a}){if(t.length>1)throw new L("ids","shorter than 2",t);const{nodeNetworkId:o,consensusProtocolVersion:s}=await a.onNode.getNodeInfo(),c={networkId:o,consensusProtocolVersion:s};if(0===t.length){if(!0===r)throw new L("omitAddress","equal false",r);return $t(await n.signDelegationToContract(e,{...c,isOracle:i}))}const[u]=t;if(On(u)){if(!0===r)throw new L("omitAddress","equal false",r);return $t(await n.signNameDelegationToContract(e,u,c))}if(function(e){if(!e.startsWith("oq_"))throw new L("oq","oracle query",e)}(u),!0!==r)throw new L("omitAddress","equal true",r);return $t(await n.signOracleQueryDelegationToContract(e,u,c))},...c};var Od=new WeakMap;class Md{constructor(e={}){var t,n,r;Rd(this,"_options",{}),r={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Od),n.set(t,r),Object.assign(this._options,e),ui(this,Od,{onAccount:vt((()=>this._options.onAccount)),onNode:vt((()=>this._options.onNode)),onCompiler:vt((()=>this._options.onCompiler))})}getContext(e={}){return{...this._options,...li(this,Od),...e}}async buildTx(e){return na({...this.getContext(),...e})}async initializeContract(e){return pd.initialize(this.getContext(e))}}Object.assign(Md.prototype,It(kd,(([e,t])=>[e,function(...e){e.length=t.length;const n=e[e.length-1];return e[e.length-1]=this.getContext(n),t(...e)}])));var Dd=Md;var qd=new WeakMap;class Fd extends Dd{constructor({nodes:e=[],...t}={}){var n,r,i;super(t),Rd(this,"pool",new Map),i={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=qd),r.set(n,i),e.forEach((({name:e,instance:t},n)=>this.addNode(e,t,0===n))),ui(this,qd,{onNode:vt((()=>this.api)),onCompiler:vt((()=>this.compilerApi)),onAccount:vt((()=>this._resolveAccount()))})}get compilerApi(){if(null==this._options.onCompiler)throw new M("You can't use Compiler API. Compiler is not ready!");return this._options.onCompiler}get api(){return this.ensureNodeConnected(),this.pool.get(this.selectedNodeName)}addNode(e,t,n=!1){if(this.pool.has(e))throw new qe(e);this.pool.set(e,t),(n||null==this.selectedNodeName)&&this.selectNode(e)}selectNode(e){if(!this.pool.has(e))throw new Fe(`Node with name ${e} not in pool`);this.selectedNodeName=e}isNodeConnected(){return null!=this.selectedNodeName}ensureNodeConnected(){if(!this.isNodeConnected())throw new Fe("You can't use Node API. Node is not connected or not defined!")}async getNodeInfo(){return this.ensureNodeConnected(),{name:this.selectedNodeName,...await this.api.getNodeInfo()}}async getNodesInPool(){return Promise.all(Array.from(this.pool.entries()).map((async([e,t])=>({name:e,...await t.getNodeInfo()}))))}addresses(){return[]}_resolveAccount(e=this._options.onAccount){if("string"==typeof e)throw new ee("Address in AccountResolver");if("object"==typeof e)return e;throw new W(`Account should be an address (ak-prefixed string), or instance of AccountBase, got ${String(e)} instead`)}get address(){return this._resolveAccount().address}async sign(e,{onAccount:t,...n}={}){return this._resolveAccount(t).sign(e,n)}async signTransaction(e,{onAccount:t,...n}={}){const r=null!==this.selectedNodeName?await this.api.getNetworkId():void 0;return this._resolveAccount(t).signTransaction(e,{networkId:r,...n})}async signMessage(e,{onAccount:t,...n}={}){return this._resolveAccount(t).signMessage(e,n)}async signTypedData(e,t,{onAccount:n,...r}={}){return this._resolveAccount(n).signTypedData(e,t,r)}async signDelegationToContract(e,{onAccount:t,...n}={}){var r,i;return null!==(r=n.networkId)&&void 0!==r||(n.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),null!==(i=n.consensusProtocolVersion)&&void 0!==i||(n.consensusProtocolVersion=null!==this.selectedNodeName?(await this.api.getNodeInfo()).consensusProtocolVersion:void 0),this._resolveAccount(t).signDelegationToContract(e,n)}async signNameDelegationToContract(e,t,{onAccount:n,...r}={}){var i,a;return null!==(i=r.networkId)&&void 0!==i||(r.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),null!==(a=r.consensusProtocolVersion)&&void 0!==a||(r.consensusProtocolVersion=null!==this.selectedNodeName?(await this.api.getNodeInfo()).consensusProtocolVersion:void 0),this._resolveAccount(n).signNameDelegationToContract(e,t,r)}async signAllNamesDelegationToContract(e,{onAccount:t,...n}={}){var r,i;return null!==(r=n.networkId)&&void 0!==r||(n.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),null!==(i=n.consensusProtocolVersion)&&void 0!==i||(n.consensusProtocolVersion=null!==this.selectedNodeName?(await this.api.getNodeInfo()).consensusProtocolVersion:void 0),this._resolveAccount(t).signAllNamesDelegationToContract(e,n)}async signOracleQueryDelegationToContract(e,t,{onAccount:n,...r}={}){var i,a;return null!==(i=r.networkId)&&void 0!==i||(r.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),null!==(a=r.consensusProtocolVersion)&&void 0!==a||(r.consensusProtocolVersion=null!==this.selectedNodeName?(await this.api.getNodeInfo()).consensusProtocolVersion:void 0),this._resolveAccount(n).signOracleQueryDelegationToContract(e,t,r)}async signDelegation(e,{onAccount:t,...n}={}){var r;return null!==(r=n.networkId)&&void 0!==r||(n.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),this._resolveAccount(t).signDelegation(e,n)}getContext(e={}){return{...this._options,...li(this,qd),...e,...null!=e.onAccount&&{onAccount:this._resolveAccount(e.onAccount)}}}}class Ud extends Fd{constructor({accounts:e,...t}={}){super(t),Rd(this,"accounts",{}),e?.forEach(((e,t)=>this.addAccount(e,{select:0===t})))}_resolveAccount(e=this.selectedAddress){if("string"==typeof e){const t=e;if($t(t),null==this.accounts[t])throw new ae(e);e=this.accounts[t]}return super._resolveAccount(e)}addresses(){return Object.keys(this.accounts)}addAccount(e,{select:t}={}){const{address:n}=e;this.accounts[n]=e,!0===t&&this.selectAccount(n)}removeAccount(e){if(null==this.accounts[e])throw new ae(e);delete this.accounts[e],this.selectedAddress===e&&delete this.selectedAddress}selectAccount(e){if($t(e),null==this.accounts[e])throw new ae(e);this.selectedAddress=e}}let Gd=function(e){return e.to_waellet="to_waellet",e.to_aepp="to_aepp",e}({}),Ld=function(e){return e.window="window",e.extension="extension",e}({}),Hd=function(e){return e.subscribe="subscribe",e.unsubscribe="unsubscribe",e}({}),jd=function(e){return e.readyToConnect="connection.announcePresence",e.updateAddress="address.update",e.address="address.get",e.connect="connection.open",e.unsafeSign="data.unsafeSign",e.sign="transaction.sign",e.signMessage="message.sign",e.signTypedData="typedData.sign",e.signDelegationToContract="delegationToContract.sign",e.signDelegation="delegation.sign",e.subscribeAddress="address.subscribe",e.updateNetwork="networkId.update",e.closeConnection="connection.close",e}({}),Vd=function(e){return e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.WAITING_FOR_CONNECTION_REQUEST="WAITING_FOR_CONNECTION_REQUEST",e}({});const $d=[];class Yd extends P{toJSON(){return{code:this.code,message:this.message,data:this.data}}static deserialize(e){const t=$d.find((t=>t.code===e.code));if(null==t)throw new re(`Can't find RpcError with code: ${e.code}`);return new t(e.data)}}class Jd extends Yd{constructor(e){super("Invalid transaction"),Rd(this,"code",2),this.data=e,this.name="RpcInvalidTransactionError"}}Rd(Jd,"code",2),$d.push(Jd);class Kd extends Yd{constructor(e){super("Operation rejected by user"),Rd(this,"code",4),this.data=e,this.name="RpcRejectedByUserError"}}Rd(Kd,"code",4),$d.push(Kd);class Wd extends Yd{constructor(){super("Unsupported Protocol Version"),Rd(this,"code",5),this.name="RpcUnsupportedProtocolError"}}Rd(Wd,"code",5),$d.push(Wd);class Xd extends Yd{constructor(e){super("Wallet deny your connection request"),Rd(this,"code",9),this.data=e,this.name="RpcConnectionDenyError"}}Rd(Xd,"code",9),$d.push(Xd);class Zd extends Yd{constructor(){super("You are not connected to the wallet"),Rd(this,"code",10),this.name="RpcNotAuthorizeError"}}Rd(Zd,"code",10),$d.push(Zd);class ep extends Yd{constructor(e){super(`You are not subscribed for account ${e}`),Rd(this,"code",11),this.data=e,this.name="RpcPermissionDenyError"}}Rd(ep,"code",11),$d.push(ep);class tp extends Yd{constructor(){super("The peer failed to execute your request due to unknown error"),Rd(this,"code",12),this.name="RpcInternalError"}}Rd(tp,"code",12),$d.push(tp);class np extends Yd{constructor(){super("Method not found"),Rd(this,"code",-32601),this.name="RpcMethodNotFoundError"}}Rd(np,"code",-32601),$d.push(np);var rp=n(8287).Buffer;class ip extends xl{constructor(e,t){super(),this._rpcClient=e,this.address=t}async sign(e){const t=Yt(rp.from(e),Rt.Bytearray),{signature:n}=await this._rpcClient.request(jd.unsafeSign,{onAccount:this.address,data:t});return $t(n)}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null==n)throw new L("networkId","provided",n);const r=await this._rpcClient.request(jd.sign,{onAccount:this.address,tx:e,returnSigned:!0,networkId:n,innerTx:t});if(null==r.signedTransaction)throw new Z("signedTransaction is missed in wallet response");return r.signedTransaction}async signMessage(e){const{signature:t}=await this._rpcClient.request(jd.signMessage,{onAccount:this.address,message:e});return rp.from(t,"hex")}async signTypedData(e,t,{name:n,version:r,contractAddress:i,networkId:a}={}){const{signature:o}=await this._rpcClient.request(jd.signTypedData,{onAccount:this.address,domain:{name:n,version:r,networkId:a,contractAddress:i},aci:t,data:e});return o}async signDelegationToContract(e,{consensusProtocolVersion:t,isOracle:n}={}){if(null==n){const e=null!=t?Bn[t]:"unknown";console.warn(`AccountRpc:signDelegationToContract: isOracle is not set. By default, sdk would generate an AENS preclaim delegation signature, but it won't be the same as the oracle delegation signature in Ceres (current protocol is ${e}).`)}if(t===Bn.Ceres){const t=Fl({tag:!0===n?Ol.Oracle:Ol.AensPreclaim,accountAddress:this.address,contractAddress:e});return this.signDelegation(t)}const{signature:r}=await this._rpcClient.request(jd.signDelegationToContract,{onAccount:this.address,contractAddress:e,isOracle:n});return r}async signNameDelegationToContract(e,t,{consensusProtocolVersion:n}={}){if(n===Bn.Ceres){const n=Fl({tag:Ol.AensName,accountAddress:this.address,contractAddress:e,nameId:t});return this.signDelegation(n)}const{signature:r}=await this._rpcClient.request(jd.signDelegationToContract,{onAccount:this.address,contractAddress:e,name:t});return r}async signAllNamesDelegationToContract(e,{consensusProtocolVersion:t}={}){if(t===Bn.Ceres){const t=Fl({tag:Ol.AensWildcard,accountAddress:this.address,contractAddress:e});return this.signDelegation(t)}const{signature:n}=await this._rpcClient.request(jd.signDelegationToContract,{onAccount:this.address,contractAddress:e,allNames:!0});return n}async signOracleQueryDelegationToContract(e,t,{consensusProtocolVersion:n}={}){if(n===Bn.Ceres){const n=Fl({tag:Ol.OracleResponse,queryId:t,contractAddress:e});return this.signDelegation(n)}const{signature:r}=await this._rpcClient.request(jd.signDelegationToContract,{onAccount:this.address,contractAddress:e,oracleQueryId:t});return r}async signDelegation(e){const{signature:t}=await this._rpcClient.request(jd.signDelegation,{delegation:e,onAccount:this.address});return t}}function ap(e,t){sp(e,t),t.add(e)}function op(e,t,n){sp(e,t),t.set(e,n)}function sp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cp(e,t,n){return function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(t,e),n}var up=new WeakMap,lp=new WeakMap,Ap=new WeakMap,dp=new WeakSet,pp=new WeakSet,mp=new WeakSet,hp=new WeakSet;class gp{constructor(e,t,n){ap(this,hp),ap(this,mp),ap(this,pp),ap(this,dp),op(this,up,{writable:!0,value:new Map}),op(this,lp,{writable:!0,value:0}),op(this,Ap,{writable:!0,value:void 0}),this.connection=e,ui(this,Ap,n),e.connect(cp(this,dp,fp).bind(this),t)}async request(e,t){return cp(this,pp,yp).call(this,ui(this,lp,li(this,lp)+1),e,t),new Promise(((e,t)=>{li(this,up).set(li(this,lp),{resolve:e,reject:t})}))}notify(e,t){cp(this,pp,yp).call(this,void 0,e,t)}}async function fp(e,t){if("2.0"!==e?.jsonrpc)throw new ue(JSON.stringify(e));if("result"in e||"error"in e)return void cp(this,hp,Ip).call(this,e);const n=e;let r,i;try{if(!(n.method in li(this,Ap)))throw new np;const e=n.method;r=await li(this,Ap)[e](n.params,t)}catch(e){bt(e),i=e}if(null!=n.id&&cp(this,mp,Cp).call(this,n.id,n.method,r,null==i||i instanceof Yd?i:new tp),null!=i&&!(i instanceof Yd))throw i}function yp(e,t,n){this.connection.sendMessage({jsonrpc:"2.0",...null!=e?{id:e}:{},method:t,...null!=n?{params:n}:{}})}function Cp(e,t,n,r){this.connection.sendMessage({jsonrpc:"2.0",id:e,method:t,...null!=r?{error:r.toJSON()}:{result:n}})}function Ip({id:e,error:t,result:n}){const r=li(this,up).get(e);if(null==r)throw new le(e);null!=t?r.reject(Yd.deserialize(t)):r.resolve(n),li(this,up).delete(e)}class wp extends Fd{constructor({name:e,onAddressChange:t=(()=>{}),onDisconnect:n=(()=>{}),onNetworkChange:r=(()=>{}),...i}){super(i),this.onAddressChange=t,this.onDisconnect=n,this.onNetworkChange=r,this.name=e}_resolveAccount(e=this.addresses()[0]){if("string"==typeof e){const t=e;if($t(t),!this.addresses().includes(t))throw new Ae(t);this._ensureConnected(),e=new ip(this.rpcClient,t)}return null==e&&this._ensureAccountAccess(),super._resolveAccount(e)}addresses(){if(null==this._accounts)return[];const e=Object.keys(this._accounts.current)[0];return[...null!=e?[e]:[],...Object.keys(this._accounts.connected)]}async connectToWallet(e,{connectNode:t=!1,name:n="wallet-node"}={}){if(null!=this.rpcClient)throw new Ke("You are already connected to wallet");let r;const i=e=>{if(t){if(null==e.node?.url)throw new Xe("Missing URLs of the Node");this.pool.delete(n),this.addNode(n,new Sl(e.node.url),!0)}this.onNetworkChange(e)},a=new gp(e,(()=>{delete this.rpcClient,delete this._accounts,this.onDisconnect(r)}),{[jd.updateAddress]:e=>{this._accounts=e,this.onAddressChange(e)},[jd.updateNetwork]:i,[jd.closeConnection]:e=>{r=e,a.connection.disconnect()},[jd.readyToConnect]:()=>{}}),o=await a.request(jd.connect,{name:this.name,version:1,connectNode:t});return i(o),this.rpcClient=a,o}disconnectWallet(){this._ensureConnected(),this.rpcClient.notify(jd.closeConnection,{reason:"bye"}),this.rpcClient.connection.disconnect()}async askAddresses(){return this._ensureAccountAccess(),this.rpcClient.request(jd.address,void 0)}async subscribeAddress(e,t){this._ensureConnected();const n=await this.rpcClient.request(jd.subscribeAddress,{type:e,value:t});return this._accounts=n.address,n}_ensureConnected(){if(null==this.rpcClient)throw new We("You are not connected to Wallet")}_ensureAccountAccess(){if(this._ensureConnected(),0===this.addresses().length)throw new pe}}var Ep=n(1013);const Bp=n.n(Ep)()({storeAsString:!0}),Np=e=>{if("object"==typeof e&&null!==e&&e.constructor===Object)return It(e,(([e,t])=>[e,Np(t)]));if(Array.isArray(e))return e.map((e=>Np(e)));if("string"==typeof e&&new _(e).toString(10)===e){const t=new _(e);return t.toJSON=()=>t.toString(10),t}return e};var bp={stringify:(...e)=>Bp.stringify(Np(e[0]),...e.slice(1)),parse:Bp.parse},vp=n(8287).Buffer;class Sp extends Ud{constructor({name:e,id:t,type:n,onConnection:r,onSubscription:i,onDisconnect:a,onAskAccounts:o,...s}){super(s),Rd(this,"_clients",new Map),this.onConnection=r,this.onSubscription=i,this.onDisconnect=a,this.onAskAccounts=o,this.name=e,this.id=t,this._type=n}_getAccountsForClient({addressSubscription:e}){const{current:t,connected:n}=this.getAccounts();return{current:e.has("current")||e.has("connected")?t:{},connected:e.has("connected")?n:{}}}_pushAccountsToApps(){null!=this._clients&&Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).filter((e=>0!==e.addressSubscription.size)).forEach((e=>e.rpc.notify(jd.updateAddress,this._getAccountsForClient(e))))}selectAccount(e){super.selectAccount(e),this._pushAccountsToApps()}addAccount(e,t){super.addAccount(e,t),this._pushAccountsToApps()}_getNode(){return this.ensureNodeConnected(),{node:{url:this.api.$host,name:this.selectedNodeName}}}async selectNode(e){super.selectNode(e);const t=await this.api.getNetworkId();Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).forEach((e=>{e.rpc.notify(jd.updateNetwork,{networkId:t,...e.connectNode&&this._getNode()})}))}_getClient(e){const t=this._clients.get(e);if(null==t)throw new de(e);return t}_isRpcClientConnected(e){return Vd.CONNECTED===this._getClient(e).status&&this._getClient(e).rpc.connection.isConnected()}_disconnectRpcClient(e){const t=this._getClient(e);t.rpc.connection.disconnect(),t.status=Vd.DISCONNECTED,t.addressSubscription=new Set}removeRpcClient(e){this._disconnectRpcClient(e),this._clients.delete(e)}addRpcClient(e){const t=fA();let n;const r={id:t,status:Vd.WAITING_FOR_CONNECTION_REQUEST,addressSubscription:new Set,connectNode:!1,rpc:new gp(e,(()=>{this._clients.delete(t),this.onDisconnect(t,n)}),{[jd.closeConnection]:e=>{n=e,this._disconnectRpcClient(t)},[jd.connect]:async({name:e,version:n,icons:i,connectNode:a},o)=>{if(1!==n)throw new Wd;return await this.onConnection(t,{name:e,icons:i,connectNode:a},o),r.status=Vd.CONNECTED,r.connectNode=a,{...await this.getWalletInfo(),...a&&this._getNode()}},[jd.subscribeAddress]:async({type:e,value:n},i)=>{if(!this._isRpcClientConnected(t))throw new Zd;switch(e){case Hd.subscribe:await this.onSubscription(t,{type:e,value:n},i),r.addressSubscription.add(n);break;case Hd.unsubscribe:r.addressSubscription.delete(n);break;default:throw new re(`Unknown subscription type: ${e}`)}return{subscription:Array.from(r.addressSubscription),address:this._getAccountsForClient(r)}},[jd.address]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Zd;return await this.onAskAccounts(t,e,n),this.addresses()},[jd.sign]:async({tx:e,onAccount:n=this.address,returnSigned:r,innerTx:i},a)=>{if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(n))throw new ep(n);const o={onAccount:n,aeppOrigin:a,aeppRpcClientId:t,innerTx:i};if(r||!0===i)return{signedTransaction:await this.signTransaction(e,o)};try{return bp.parse(bp.stringify({transactionHash:await this.sendTransaction(e,{...o,verify:!1})}))}catch(t){const n=await Xl(e,this.api);if(n.length>0)throw new Jd(n);throw t}},[jd.signMessage]:async({message:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(n))throw new ep(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:vp.from(await this.signMessage(e,i)).toString("hex")}},[jd.signTypedData]:async({domain:e,aci:n,data:r,onAccount:i=this.address},a)=>{if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(i))throw new ep(i);const o={...e,onAccount:i,aeppOrigin:a,aeppRpcClientId:t};return{signature:await this.signTypedData(r,n,o)}},[jd.signDelegationToContract]:async({contractAddress:e,name:n,oracleQueryId:r,allNames:i,onAccount:a=this.address,isOracle:o},s)=>{var c,u,l,A;if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(a))throw new ep(a);null!==(c=o)&&void 0!==c||(o=!1);const d={onAccount:a,aeppOrigin:s,aeppRpcClientId:t};return{signature:await(null!==(u=null!==(l=null!==(A=null==n?null:this.signNameDelegationToContract(e,n,d))&&void 0!==A?A:null==r?null:this.signOracleQueryDelegationToContract(e,r,d))&&void 0!==l?l:!0!==i?null:this.signAllNamesDelegationToContract(e,d))&&void 0!==u?u:this.signDelegationToContract(e,{...d,isOracle:o}))}},[jd.unsafeSign]:async({data:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(n))throw new ep(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Yt(await this.sign($t(e),i),Rt.Signature)}},[jd.signDelegation]:async({delegation:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(n))throw new ep(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:await this.signDelegation(e,i)}}})};return this._clients.set(t,r),t}async shareWalletInfo(e){this._getClient(e).rpc.notify(jd.readyToConnect,await this.getWalletInfo())}async getWalletInfo(){return{id:this.id,name:this.name,networkId:await this.api.getNetworkId(),origin:window.location.origin,type:this._type}}getAccounts(){return{current:null!=this.selectedAddress?{[this.selectedAddress]:{}}:{},connected:this.addresses().filter((e=>e!==this.selectedAddress)).reduce(((e,t)=>({...e,[t]:{}})),{})}}}var Tp=new WeakMap;class xp extends xl{constructor(e){var t,n,r;super(),r={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Tp),n.set(t,r),$t(e),this.address=e}async sign(){throw new ee("Can't sign using generalized account")}async signMessage(){throw new ee("Can't sign using generalized account")}async signTypedData(){throw new ee("Can't sign using generalized account")}async signDelegationToContract(){throw new ee("signing delegation to contract using generalized account")}async signNameDelegationToContract(){throw new ee("signing delegation to contract using generalized account")}async signAllNamesDelegationToContract(){throw new ee("signing delegation to contract using generalized account")}async signOracleQueryDelegationToContract(){throw new ee("signing delegation to contract using generalized account")}async signDelegation(){throw new ee("signing delegation using generalized account")}async signTransaction(e,{authData:t,onCompiler:n,onNode:r}){if(null==t||null==n||null==r)throw new L("authData, onCompiler, onNode","provided",null);const{callData:i,sourceCode:a,args:o,fee:s,gasLimit:c,gasPrice:u}="function"==typeof t?await t(e):t,l=null!=i?i:await(async()=>{if(null==li(this,Tp)){const e=await Jn(this.address,{onNode:r});if("generalized"!==e.kind)throw new L("account kind","generalized",e.kind);ui(this,Tp,e.authFun)}if(null==li(this,Tp))throw new re("Account in generalised, but authFun not provided");if(null==a||null==o)throw new Ie("Auth data must contain sourceCode and args or callData.");const e=await pd.initialize({onCompiler:n,onNode:r,sourceCode:a});return e._calldata.encode(e._name,li(this,Tp),o)})(),A=await na({tag:vn.GaMetaTx,tx:{tag:vn.SignedTx,encodedTx:$t(e),signatures:[]},gaId:this.address,authData:l,fee:s,gasLimit:c,gasPrice:u,onNode:r});return ta({tag:vn.SignedTx,encodedTx:$t(A),signatures:[]})}}var _p=n(8287).Buffer;const Qp=224;class Pp extends xl{constructor(e,t,n){super(),this.transport=e,this.index=t,this.address=n,e.decorateAppAPIMethods(this,["signTransaction","signMessage"],"w0w")}async sign(){throw new ee("RAW signing using Ledger HW")}async signTypedData(){throw new ee("Typed data signing using Ledger HW")}async signDelegationToContract(){throw new ee("signing delegation to contract using Ledger HW")}async signNameDelegationToContract(){throw new ee("signing delegation to contract using Ledger HW")}async signAllNamesDelegationToContract(){throw new ee("signing delegation to contract using Ledger HW")}async signOracleQueryDelegationToContract(){throw new ee("signing delegation to contract using Ledger HW")}async signDelegation(){throw new ee("signing delegation using Ledger HW")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new ee("innerTx option in AccountLedger");if(null==n)throw new L("networkId","provided",n);const r=$t(e);let i=0;const a=_p.from(n),o=[];for(;i!==r.length;){const e=0===i?141-a.length:150,t=i+e>r.length?r.length-i:e,n=_p.alloc(0===i?9+a.length+t:t);if(0===i){let e=n.writeUInt32BE(this.index,0);e=n.writeUInt32BE(r.length,e),e=n.writeUInt8(a.length,e),e+=a.copy(n,e,0,a.length),r.copy(n,e,0,150-e)}else r.copy(n,0,i,i+t);o.push(n),i+=t}const s=await o.reduce((async(e,t,n)=>(await e,this.transport.send(Qp,4,0===n?0:128,0,t))),Promise.resolve(_p.alloc(0))),c=[s.subarray(0,64)];return ta({tag:vn.SignedTx,encodedTx:r,signatures:c})}async signMessage(e){let t=0;const n=_p.from(e),r=[];for(;t!==n.length;){const e=0===t?142:150,i=t+e>n.length?n.length-t:e,a=_p.alloc(0===t?8+i:i);0===t?(a.writeUInt32BE(this.index,0),a.writeUInt32BE(n.length,4),n.copy(a,8,t,t+i)):n.copy(a,0,t,t+i),r.push(a),t+=i}const i=await r.reduce((async(e,t,n)=>(await e,this.transport.send(Qp,8,0===n?0:128,0,t))),Promise.resolve(_p.alloc(0)));return i.subarray(0,64)}}var zp=n(8287).Buffer;class Rp{constructor(e){this.transport=e,this.versionCheckPromise=this.getAppConfiguration().then((({version:e})=>{const t=[e,"0.4.4","0.5.0"];if(!_r(...t))throw new te("app on ledger",...t)})),e.decorateAppAPIMethods(this,["getAddress","getAppConfiguration"],"w0w")}async getAppConfiguration(){await this.versionCheckPromise;const e=await this.transport.send(Qp,6,0,0);return{version:[e[1],e[2],e[3]].join(".")}}async getAddress(e,t=!1){await this.versionCheckPromise;const n=zp.alloc(4);n.writeUInt32BE(e,0);const r=await this.transport.send(Qp,2,t?1:0,0,n),i=r[0];return r.subarray(1,1+i).toString("ascii")}async initialize(e){return await this.versionCheckPromise,new Pp(this.transport,e,await this.getAddress(e))}async discover(e){let t=0;const n=[];let r;do{null!=r&&n.push(r),r=await this.initialize(t),t+=1}while(await e.getAccountByPubkey(r.address).then((()=>!0),(()=>!1)));return n}}class kp{}const Op={type:{name:"Composite",className:"Contract",modelProperties:{code:{serializedName:"code",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},Mp={type:{name:"Composite",className:"CompileOpts",modelProperties:{fileSystem:{serializedName:"file_system",type:{name:"Dictionary",value:{type:{name:"any"}}}},srcFile:{serializedName:"src_file",type:{name:"String"}}}}},Dp={type:{name:"Composite",className:"CompilerError",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},pos:{serializedName:"pos",type:{name:"Composite",className:"ErrorPos"}},message:{serializedName:"message",required:!0,type:{name:"String"}},context:{serializedName:"context",type:{name:"String"}}}}},qp={type:{name:"Composite",className:"ErrorPos",modelProperties:{file:{serializedName:"file",type:{name:"String"}},line:{serializedName:"line",required:!0,type:{name:"Number"}},col:{serializedName:"col",required:!0,type:{name:"Number"}}}}},Fp={type:{name:"Composite",className:"CompileResult",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},aci:{serializedName:"aci",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}},warnings:{serializedName:"warnings",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}}}}},Up={type:{name:"Composite",className:"SophiaCallResultInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},Gp={type:{name:"Composite",className:"BytecodeCallResultInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},Lp={type:{name:"Composite",className:"DecodedCallresult",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Hp={type:{name:"Composite",className:"FunctionCallInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},jp={type:{name:"Composite",className:"Calldata",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}}}}},Vp={type:{name:"Composite",className:"DecodeCalldataBytecode",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},$p={type:{name:"Composite",className:"DecodedCalldata",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},Yp={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}}}}},Jp={type:{name:"Composite",className:"DecodeCalldataSource",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}}}}},Kp={type:{name:"Composite",className:"ByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Wp={type:{name:"Composite",className:"FateAssembler",modelProperties:{fateAssembler:{serializedName:"fate-assembler",required:!0,type:{name:"String"}}}}},Xp={type:{name:"Composite",className:"ValidateByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},Zp={type:{name:"Composite",className:"CompilerVersion",modelProperties:{version:{serializedName:"version",required:!0,type:{name:"String"}}}}},em={type:{name:"Composite",className:"ApiVersion",modelProperties:{apiVersion:{serializedName:"api-version",required:!0,type:{name:"String"}}}}},tm={type:{name:"Composite",className:"SophiaBinaryData",modelProperties:{sophiaType:{serializedName:"sophia-type",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},nm={type:{name:"Composite",className:"SophiaJsonData",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},rm={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},im={parameterPath:"body",mapper:Op},am={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},om={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},sm={parameterPath:"body",mapper:Up},cm={parameterPath:"body",mapper:Gp},um={parameterPath:"body",mapper:Hp},lm={parameterPath:"body",mapper:Vp},Am={parameterPath:"body",mapper:Jp},dm={parameterPath:"body",mapper:Kp},pm={parameterPath:"body",mapper:Xp};class mm extends Rs{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-compiler/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}generateACI(e,t){return this.sendOperationRequest({body:e,options:t},gm)}compileContract(e,t){return this.sendOperationRequest({body:e,options:t},fm)}decodeCallResult(e,t){return this.sendOperationRequest({body:e,options:t},ym)}decodeCallResultBytecode(e,t){return this.sendOperationRequest({body:e,options:t},Cm)}encodeCalldata(e,t){return this.sendOperationRequest({body:e,options:t},Im)}decodeCalldataBytecode(e,t){return this.sendOperationRequest({body:e,options:t},wm)}decodeCalldataSource(e,t){return this.sendOperationRequest({body:e,options:t},Em)}getFateAssemblerCode(e,t){return this.sendOperationRequest({body:e,options:t},Bm)}validateByteCode(e,t){return this.sendOperationRequest({body:e,options:t},Nm)}getCompilerVersion(e,t){return this.sendOperationRequest({body:e,options:t},bm)}version(e){return this.sendOperationRequest({options:e},vm)}apiVersion(e){return this.sendOperationRequest({options:e},Sm)}api(e){return this.sendOperationRequest({options:e},Tm)}}const hm=za(u,!1),gm={path:"/aci",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:im,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},fm={path:"/compile",httpMethod:"POST",responses:{200:{bodyMapper:Fp},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:im,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},ym={path:"/decode-call-result",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"any"}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:sm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},Cm={path:"/decode-call-result/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:Lp},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:cm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},Im={path:"/encode-calldata",httpMethod:"POST",responses:{200:{bodyMapper:jp},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:um,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},wm={path:"/decode-calldata/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:$p},400:{bodyMapper:Yp,isError:!0}},requestBody:lm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},Em={path:"/decode-calldata/source",httpMethod:"POST",responses:{200:{bodyMapper:$p},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Am,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},Bm={path:"/fate-assembler",httpMethod:"POST",responses:{200:{bodyMapper:Wp},400:{bodyMapper:Yp,isError:!0}},requestBody:dm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},Nm={path:"/validate-byte-code",httpMethod:"POST",responses:{200:{},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:pm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},bm={path:"/compiler-version",httpMethod:"POST",responses:{200:{bodyMapper:Zp},400:{bodyMapper:Yp,isError:!0}},requestBody:dm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},vm={path:"/version",httpMethod:"GET",responses:{200:{bodyMapper:Zp},500:{bodyMapper:Yp,isError:!0}},urlParameters:[om],headerParameters:[am],serializer:hm},Sm={path:"/api-version",httpMethod:"GET",responses:{200:{bodyMapper:em},500:{bodyMapper:Yp,isError:!0}},urlParameters:[om],headerParameters:[am],serializer:hm},Tm={path:"/api",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Dictionary",value:{type:{name:"any"}}}}},400:{bodyMapper:Yp,isError:!0}},urlParameters:[om],headerParameters:[am],serializer:hm};class xm extends kp{constructor(e,{ignoreVersion:t=!1}={}){let n;super(),this.api=new mm(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[ga("compiler",(async e=>(null!=n||(n=(await this.api.apiVersion(e)).apiVersion),n)),"7.3.0","9.0.0")],ha((e=>{let t="";return"reason"in e&&(t+=` ${e.reason}${null!=e.parameter?` in ${e.parameter}`:""}${null!=e.info?` (${JSON.stringify(e.info)})`:""}`),Array.isArray(e)&&(t+=`\n${e.map((e=>`${e.type}:${e.pos.line}:${e.pos.col}: ${e.message}${null!=e.context?` (${e.context})`:""}`)).join("\n")}`),t}))]}),this.api.pipeline.removePolicy({name:la}),this.api.pipeline.removePolicy({name:Aa})}async compileBySourceCode(e,t){try{var n;const r=await this.api.compileContract({code:e,options:{fileSystem:t}});null!==(n=r.warnings)&&void 0!==n||(r.warnings=[]);const i=r.warnings.map((({type:e,...t})=>t));return{...r,warnings:i}}catch(e){if(e instanceof ft&&400===e.statusCode)throw new M(e.message);throw e}}async compile(e){throw new ee("File system access, use CompilerHttpNode instead")}async generateAciBySourceCode(e,t){try{return await this.api.generateACI({code:e,options:{fileSystem:t}})}catch(e){if(e instanceof ft&&400===e.statusCode)throw new M(e.message);throw e}}async generateAci(e){throw new ee("File system access, use CompilerHttpNode instead")}async validateBySourceCode(e,t,n){try{return await this.api.validateByteCode({bytecode:e,source:t,options:{fileSystem:n}}),!0}catch{return!1}}async validate(e,t){throw new ee("File system access, use CompilerHttpNode instead")}async version(){return(await this.api.version()).version}}function _m(e){return e.replace(/_./g,(e=>e[1].toUpperCase()))}var Qm=n(952);const Pm=1e4,zm=15e3;function Rm(e,...t){const[n,...r]=t;e._eventEmitter.emit(n,...r)}function km(e,t){if(null==t)throw new Ce;e._debug("enter state",t.handler.name),e._fsm=t,null!=t?.handler?.enter&&t.handler.enter(e),Fm(e)}function Om(e,t,n){e._debug(t,`(prev. ${e._status})`,null!=n?n:""),t!==e._status&&(e._status=t,Rm(e,"statusChanged",t))}function Mm(e,t){e._state=t,Rm(e,"stateChanged",t)}function Dm(e,t){e._debug("send message",t.method,t.params),e._websocket.send(bp.stringify({jsonrpc:"2.0",...t}))}function qm(e,t,n={}){Dm(e,{method:t,params:n})}async function Fm(e){if(e._isActionQueueLocked)return;const t=e._actionQueue;if(0===t.length)return;const n=t.findIndex((t=>t.guard(e,e._fsm)));if(-1===n)return;e._actionQueue=t.filter(((e,t)=>n!==t)),e._isActionQueueLocked=!0;const r=await t[n].action(e,e._fsm);e._isActionQueueLocked=!1,km(e,r)}async function Um(e,t){const{handler:n,state:r}=e._fsm,i=await Promise.resolve(n(e,t,r));if(km(e,i),"OffChainNewContract"===t?.params?.data?.updates?.[0]?.op&&"channelOpen"===i?.handler.name){const n=e.round();if(null==n)throw new ie("Round is null");const r=t?.params?.data?.updates?.[0]?.owner;Rm(e,"newContract",tn(r,n+1))}}function Gm(e){e._websocket.close(),clearTimeout(e._pingTimeoutId)}function Lm(e){clearTimeout(e._pingTimeoutId),e._pingTimeoutId=setTimeout((()=>{qm(e,"channels.system",{action:"ping"}),e._pingTimeoutId=setTimeout((()=>{Gm(e),Rm(e,"error",new ge)}),zm)}),Pm)}async function Hm(e,t,n){return new Promise(((r,i)=>{const a=e._nextRpcMessageId;e._nextRpcMessageId+=1,e._rpcCallbacks.set(a,(e=>{if(null!=e.error){var t;const n=null!==(t=e.error.data[0].message)&&void 0!==t?t:"";i(new me(e.error.message+n))}else r(e.result)})),Dm(e,{method:t,id:a,params:n})}))}async function jm(e,t,n,r){var i;let a;if(null!=n.tx)a=await r(n.tx);else{if(null==n.signed_tx)throw new O("Can't find transaction in message");a=await async function(e,t){const{signatures:n,encodedTx:r}=ra(e,vn.SignedTx),i=ta(r),a=await t(i);if("string"==typeof a){const{signatures:e}=ra(a,vn.SignedTx);return ta({tag:vn.SignedTx,signatures:n.concat(e),encodedTx:$t(i)})}return a}(n.signed_tx,r)}const o="string"!=typeof a,s=null!=n.tx?"tx":"signed_tx";return qm(e,t,o?{error:null!==(i=a)&&void 0!==i?i:1}:{[s]:a}),o}function Vm(e,t,n){return n?.reject?.(Object.assign(new fe(`Unexpected message received:\n\n${JSON.stringify(t)}`),{wsMessage:t})),{handler:Zm}}function $m(e,t,n,r){if(null!=r&&"channels.update"===t.method)return r(e,t,n);if("channels.conflict"===t.method)return n.resolve({accepted:!1,errorCode:t.params.data.error_code,errorMessage:t.params.data.error_msg}),{handler:Zm};if("channels.info"===t.method&&"aborted_update"===t.params.data.event)return n.resolve({accepted:!1}),{handler:Zm};if(null!=t.error){const e=t.error.data.map((e=>e.code));return e.includes(1001)?n.reject(new V("Insufficient balance")):e.includes(1002)?n.reject(new H("Amount cannot be negative")):n.reject(new he(t.error.message)),{handler:Zm}}return Vm(0,t,n)}function Ym(e,t){if("channels.info"===t.method){const n=t.params.data.event;let r=null;return"channel_accept"===n&&(r="accepted"),"funding_created"===n&&(r="halfSigned"),null!=r?(Om(e,r),{handler:Km}):"channel_reestablished"===t.params.data.event?{handler:Xm}:"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:Ym}):{handler:Ym}}if("channels.error"===t.method)return Rm(e,"error",new he(t?.payload?.message)),{handler:rh}}async function Jm(e,t,n){if("channels.info"===t.method&&"fsm_up"===t.params.data.event){e._fsmId=t.params.data.fsm_id;const{signedTx:n}=await e.state();return Mm(e,null==n?"":ta(n)),{handler:Zm}}return Vm(0,t,n)}async function Km(e,t){const n="initiator"===e._options.role?"initiator_sign":"responder_sign";if(t.method===`channels.sign.${n}`)return await jm(e,`channels.${n}`,t.params.data,(async t=>e._options.sign(n,t))),{handler:Wm}}function Wm(e,t){if("channels.on_chain_tx"===t.method){const{info:n}=t.params.data,{role:r}=e._options;if("funding_signed"===n&&"initiator"===r||"funding_created"===n&&"responder"===r)return{handler:function t(n,r){if("channels.info"===r.method)switch(r.params.data.event){case"funding_created":case"own_funding_locked":return{handler:t};case"funding_locked":return{handler:Xm}}if("channels.on_chain_tx"===r.method)return Rm(e,"onChainTx",r.params.data.tx,{info:r.params.data.info,type:r.params.data.type}),{handler:t}}}}if("channels.info"===t.method&&"funding_signed"===t.params.data.event&&"initiator"===e._options.role)return e._channelId=t.params.channel_id,Om(e,"signed"),{handler:Wm}}function Xm(e,t){if("channels.info"===t.method&&"open"===t.params.data.event)return e._channelId=t.params.channel_id,{handler(t,n){if("channels.update"===n.method)return Mm(e,n.params.data.state),{handler:Zm}}}}async function Zm(e,t,n){switch(t.method){case"channels.info":switch(t.params.data.event){case"update":case"withdraw_created":case"deposit_created":return{handler:eh};case"own_withdraw_locked":case"withdraw_locked":case"own_deposit_locked":case"deposit_locked":case"peer_disconnected":case"channel_reestablished":case"open":return Rm(e,_m(t.params.data.event)),{handler:Zm};case"fsm_up":return e._fsmId=t.params.data.fsm_id,{handler:Zm};case"timeout":case"close_mutual":case"shutdown":return{handler:Zm};case"closing":return Om(e,"closing"),{handler:Zm};case"closed_confirmed":return Om(e,"closed"),{handler:rh};case"died":return Om(e,"died"),{handler:rh}}break;case"channels.on_chain_tx":return Rm(e,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),{handler:Zm};case"channels.leave":return{handler:Zm};case"channels.update":return Mm(e,t.params.data.state),{handler:Zm};case"channels.sign.shutdown_sign_ack":return eh(e,t,n)}}async function eh(e,t,n){var r;const[,i]=null!==(r=t.method.match(/^channels\.sign\.([^.]+)$/))&&void 0!==r?r:[];return null==i?Vm(0,t,n):await jm(e,`channels.${i}`,t.params.data,(async n=>e._options.sign(i,n,{updates:t.params.data.updates})))?{handler:function e(t,r){return null!=r.error?{handler:e,state:n}:"channels.conflict"===r.method?{handler:Zm}:Vm(0,r,n)},state:n}:{handler:Zm}}async function th(e,t,n){return"channels.sign.shutdown_sign"!==t.method?Vm(0,t,n):(await jm(e,"channels.shutdown_sign",t.params.data,(async e=>n.sign(e))),{handler(e,t){return"channels.on_chain_tx"!==t.method?Vm(0,t,n):{handler:rh,state:n}},state:n})}function nh(e,t,n){return"channels.leave"===t.method?(n.resolve({channelId:t.params.channel_id,signedTx:t.params.data.state}),Gm(e),{handler:rh}):"channels.error"===t.method?(n.reject(new he(t.data.message)),{handler:Zm}):Vm(0,t,n)}function rh(e,t,n){return null==n?{handler:rh}:"closing"===t.params.data.event?{handler:rh,state:n}:"channel_closed"===t.params.data.info?(n.closeTx=t.params.data.tx,{handler:rh,state:n}):"closed_confirmed"===t.params.data.event?(n.resolve(n.closeTx),{handler:rh}):{handler:rh,state:n}}Zm.enter=e=>{Om(e,"open")};var ih=n(7007),ah=n.n(ih);let oh=0;var sh=new WeakMap;class ch{constructor(){var e,t,n;Rd(this,"_eventEmitter",new(ah())),Rd(this,"_nextRpcMessageId",0),Rd(this,"_rpcCallbacks",new Map),Rd(this,"_messageQueue",[]),Rd(this,"_isMessageQueueLocked",!1),Rd(this,"_actionQueue",[]),Rd(this,"_isActionQueueLocked",!1),Rd(this,"_status","disconnected"),Rd(this,"_state",""),n={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=sh),t.set(e,n),oh+=1,ui(this,sh,oh)}_debug(...e){!0===this._options.debug&&console.debug(`Channel #${li(this,sh)}`,...e)}static async initialize(e){return ch._initialize(new ch,e)}static async _initialize(e,t){return await async function(e,t,n,{url:r,...i}){e._options={url:r,...i};const a=new URL(r);Object.entries(i).filter((([e])=>!["sign","debug"].includes(e))).forEach((([e,t])=>a.searchParams.set(e.replace(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)),t.toString()))),a.searchParams.set("protocol","json-rpc"),Om(e,"connecting"),e._websocket=new Qm.w3cwebsocket(a.toString()),await new Promise(((r,a)=>{Object.assign(e._websocket,{onerror:a,onopen:async a=>{if(r(),Om(e,"connected",a),null!=i.reconnectTx){km(e,{handler:n});const{signedTx:t}=await e.state();if(null==t)throw new O("`signedTx` missed in state while reconnection");Mm(e,ta(t))}else km(e,{handler:t});Lm(e)},onclose:t=>{Om(e,"disconnected",t),clearTimeout(e._pingTimeoutId)},onmessage:({data:t})=>function(e,t){const n=bp.parse(t);if(e._debug("received message",n.method,n.params),null==n.id)"channels.message"!==n.method?"channels.system.pong"!==n.method?(e._messageQueue.push(n),async function(e){if(!e._isMessageQueueLocked){for(e._isMessageQueueLocked=!0;e._messageQueue.length>0;){const t=e._messageQueue.shift();if(null==t)throw new ie;try{await Um(e,t)}catch(n){bt(n),Rm(e,"error",new ye(n,t))}}e._isMessageQueueLocked=!1}}(e)):n.params.channel_id!==e._channelId&&null!=e._channelId||Lm(e):Rm(e,"message",n.params.data.message);else{const t=e._rpcCallbacks.get(n.id);if(null==t)return void Rm(e,"error",new O(`Can't find callback by id: ${n.id}`));try{t(n)}finally{e._rpcCallbacks.delete(n.id)}}}(e,t)})}))}(e,null!=t.existingFsmId?Jm:Ym,Zm,t),e}on(e,t){this._eventEmitter.on(e,t)}off(e,t){this._eventEmitter.removeListener(e,t)}disconnect(){return Gm(this)}status(){return this._status}async state(){const e=(t=await Hm(this,"channels.get.offchain_state",{}),Object.entries(t).reduce(((e,[t,n])=>({...e,[_m(t)]:n})),{}));var t;return{calls:ra(e.calls,vn.CallsMtree),...""!==e.halfSignedTx&&{halfSignedTx:ra(e.halfSignedTx,vn.SignedTx)},...""!==e.signedTx&&{signedTx:ra(e.signedTx,vn.SignedTx)},trees:ra(e.trees,vn.StateTrees)}}round(){if(""===this._state)return null;const e=ra(this._state,vn.SignedTx).encodedTx;switch(e.tag){case vn.ChannelCreateTx:return 1;case vn.ChannelOffChainTx:case vn.ChannelWithdrawTx:case vn.ChannelDepositTx:return e.round;default:return null}}id(){if(null==this._channelId)throw new O("Channel is not initialized");return this._channelId}fsmId(){if(null==this._fsmId)throw new O("Channel is not initialized");return this._fsmId}async enqueueAction(e){return async function(e,t,n){const r=new Promise(((r,i)=>{e._actionQueue.push({guard:t,action(){const e=n();return{...e,state:{...e.state,resolve:r,reject:i}}}})}));return Fm(e),r}(this,((e,t)=>t?.handler===Zm),e)}async leave(){return this.enqueueAction((()=>(qm(this,"channels.leave"),{handler:nh})))}async shutdown(e){return this.enqueueAction((()=>(qm(this,"channels.shutdown"),{handler:th,state:{sign:e}})))}static async reconnect(e,t){const{sign:n}=e;return ch.initialize({...e,reconnectTx:await n("reconnect",ta({...t,tag:vn.ChannelClientReconnectTx}))})}}class uh extends ch{async update(e,t,n,r,i=[]){return this.enqueueAction((()=>{qm(this,"channels.update.new",{from:e,to:t,amount:n,meta:i});const a=async(e,t,n)=>"channels.sign.update"===t.method?await jm(this,"channels.update",t.params.data,(async e=>r(e,{updates:t.params.data.updates})))?{handler:a,state:n}:{handler:(e,t)=>$m(this,t,n,(()=>(Mm(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Zm}))),state:n}:"channels.error"===t.method?(n.reject(new he(t.data.message)),{handler:Zm}):$m(this,t,n);return{handler:a}}))}async poi({accounts:e,contracts:t}){return ra((await Hm(this,"channels.get.poi",{accounts:e,contracts:t})).poi,vn.TreesPoi)}async balances(e){return Object.fromEntries((await Hm(this,"channels.get.balances",{accounts:e})).map((e=>[e.account,e.balance])))}async awaitingActionTx(e,t,n){if(t.method!==`channels.sign.${e}_tx`)return Vm(0,t,n);const r=(t,i)=>{if("channels.on_chain_tx"===i.method)return n.onOnChainTx?.(i.params.data.tx),{handler:r,state:n};if("channels.info"===i.method&&[`own_${e}_locked`,`${e}_locked`].includes(i.params.data.event)){const t="deposit"===e?"Deposit":"Withdraw",a=i.params.data.event.startsWith("own_");return n[`on${a?"Own":""}${t}Locked`]?.(),{handler:r,state:n}}return $m(this,i,n,(()=>(Mm(this,i.params.data.state),n.resolve({accepted:!0,signedTx:i.params.data.state}),{handler:Zm})))},{sign:i}=n;return await jm(this,`channels.${e}_tx`,t.params.data,(async e=>i(e,{updates:t.params.data.updates}))),{handler:r,state:n}}async withdraw(e,t,{onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:i}={}){return this.enqueueAction((()=>(qm(this,"channels.withdraw",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("withdraw",t,n),state:{sign:t,onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:i}})))}async deposit(e,t,{onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:i}={}){return this.enqueueAction((()=>(qm(this,"channels.deposit",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("deposit",t,n),state:{sign:t,onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:i}})))}async sendMessage(e,t){const n="object"==typeof e?JSON.stringify(e):e;"connecting"===this.status()&&(await new Promise((e=>{const t=n=>{"connecting"!==n&&(e(),this.off("statusChanged",t))};this.on("statusChanged",t)})),await Ct(500)),qm(this,"channels.message",{info:n,to:t})}}function lh(e){return Object.entries(e).reduce(((e,[t,n])=>({...e,[_m(t)]:n})),{})}class Ah extends uh{static async initialize(e){return ch._initialize(new Ah,e)}async createContract({code:e,callData:t,deposit:n,vmVersion:r,abiVersion:i},a){return this.enqueueAction((()=>(qm(this,"channels.update.new_contract",{code:e,call_data:t,deposit:n,vm_version:r,abi_version:i}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?Vm(0,t,n):(await jm(this,"channels.update",t.params.data,(async e=>n.sign(e))),{handler:(e,t,n)=>$m(this,t,n,(()=>{const e=ra(t.params.data.state,vn.SignedTx).encodedTx;if(e.tag!==vn.ChannelOffChainTx)throw new O(`Tag should be ${vn[vn.ChannelOffChainTx]}, got ${vn[e.tag]} instead`);const r="initiator"===this._options.role?"initiatorId":"responderId",i=this._options[r];Mm(this,t.params.data.state);const a=tn(i,e.round);return Rm(this,"newContract",a),n.resolve({accepted:!0,address:a,signedTx:t.params.data.state}),{handler:Zm}})),state:n}),state:{sign:a}})))}async callContract({amount:e,callData:t,contract:n,abiVersion:r},i){return this.enqueueAction((()=>(qm(this,"channels.update.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?Vm(0,t,n):(await jm(this,"channels.update",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>$m(this,t,n,(()=>(Mm(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Zm}))),state:n}),state:{sign:i}})))}async forceProgress({amount:e,callData:t,contract:n,abiVersion:r,gasLimit:i=1e6,gasPrice:a=fn},o,{onOnChainTx:s}={}){return this.enqueueAction((()=>(qm(this,"channels.force_progress",{amount:e,call_data:t,contract_id:n,abi_version:r,gas_price:a,gas:i}),{handler:async(e,t,n)=>"channels.sign.force_progress_tx"!==t.method?Vm(0,t,n):(await jm(this,"channels.force_progress_sign",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>("channels.on_chain_tx"===t.method&&(n.onOnChainTx?.(t.params.data.tx),Rm(this,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),n.resolve({accepted:!0,tx:t.params.data.tx})),Vm(0,t,n)),state:n}),state:{sign:o,onOnChainTx:s}})))}async callContractStatic({amount:e,callData:t,contract:n,abiVersion:r}){return lh(await Hm(this,"channels.dry_run.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}))}async getContractCall({caller:e,contract:t,round:n}){return lh(await Hm(this,"channels.get.contract_call",{caller_id:e,contract_id:t,round:n}))}async getContractState(e){const t=await Hm(this,"channels.get.contract",{pubkey:e});return lh({...t,contract:lh(t.contract)})}async cleanContractCalls(){return this.enqueueAction((()=>(qm(this,"channels.clean_contract_calls"),{handler(e,t,n){return"channels.calls_pruned.reply"===t.method?(n.resolve(),{handler:Zm}):(n.reject(new fe("Unexpected message received")),{handler:rh})}})))}}var dh=null;"undefined"!=typeof WebSocket?dh=WebSocket:"undefined"!=typeof MozWebSocket?dh=MozWebSocket:void 0!==n.g?dh=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?dh=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(dh=self.WebSocket||self.MozWebSocket);var ph=dh;function mh(e,t){gh(e,t),t.add(e)}function hh(e,t,n){gh(e,t),t.set(e,n)}function gh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fh(e,t,n){return function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(t,e),n}var yh=function(e){return e.Middleware="mdw",e.Node="node",e.All="all",e}(yh||{});class Ch extends P{constructor(e){super(e),this.name="MiddlewareSubscriberError"}}class Ih extends Ch{constructor(e){super("Connection closed"),this.closeEvent=e,this.name="MiddlewareSubscriberDisconnected"}}var wh=new WeakMap,Eh=new WeakMap,Bh=new WeakMap,Nh=new WeakMap,bh=new WeakSet,vh=new WeakSet,Sh=new WeakSet,Th=new WeakSet,xh=new WeakSet,_h=new WeakSet;class Qh{get webSocket(){return li(this,Bh)}constructor(e){mh(this,_h),mh(this,xh),mh(this,Th),mh(this,Sh),mh(this,vh),mh(this,bh),hh(this,Nh,{get:Ph,set:void 0}),hh(this,wh,{writable:!0,value:[]}),hh(this,Eh,{writable:!0,value:[]}),hh(this,Bh,{writable:!0,value:void 0}),this.url=e}async reconnect(){fh(this,Th,Oh).call(this),ui(this,Bh,await new Promise((e=>{const t=new ph(this.url);Object.assign(t,{onopen:()=>e(t),onerror:e=>{fh(this,Sh,kh).call(this,(()=>!0),void 0,e.error)},onmessage:e=>{if("string"!=typeof e.data)throw new re("Unknown incoming message type: "+typeof e.data);fh(this,xh,Mh).call(this,JSON.parse(e.data))},onclose:e=>{fh(this,Sh,kh).call(this,(()=>!0),void 0,new Ih(e)),fh(this,Th,Oh).call(this,!0)}})}))),await Promise.all([...li(this,Nh)].map((e=>fh(this,vh,Rh).call(this,!0,e))))}subscribeKeyBlocks(e){return fh(this,_h,Dh).call(this,"KeyBlocks",yh.Middleware,e)}subscribeKeyBlocksNode(e){return fh(this,_h,Dh).call(this,"KeyBlocks",yh.Node,e)}subscribeKeyBlocksAll(e){return fh(this,_h,Dh).call(this,"KeyBlocks",yh.All,e)}subscribeMicroBlocks(e){return fh(this,_h,Dh).call(this,"MicroBlocks",yh.Middleware,e)}subscribeMicroBlocksNode(e){return fh(this,_h,Dh).call(this,"MicroBlocks",yh.Node,e)}subscribeMicroBlocksAll(e){return fh(this,_h,Dh).call(this,"MicroBlocks",yh.All,e)}subscribeTransactions(e){return fh(this,_h,Dh).call(this,"Transactions",yh.Middleware,e)}subscribeTransactionsNode(e){return fh(this,_h,Dh).call(this,"Transactions",yh.Node,e)}subscribeTransactionsAll(e){return fh(this,_h,Dh).call(this,"Transactions",yh.All,e)}subscribeObject(e,t){return fh(this,_h,Dh).call(this,e,yh.Middleware,t)}subscribeObjectNode(e,t){return fh(this,_h,Dh).call(this,e,yh.Node,t)}subscribeObjectAll(e,t){return fh(this,_h,Dh).call(this,e,yh.All,t)}}function Ph(){return new Set(li(this,wh).map((([e])=>e)))}function zh(e){if(null==li(this,Bh))throw new ie;li(this,Bh).send(JSON.stringify(e))}function Rh(e,t){if(null==li(this,Bh))return;const n=["KeyBlocks","MicroBlocks","Transactions"].includes(t)?t:"Object";fh(this,bh,zh).call(this,{op:e?"Subscribe":"Unsubscribe",payload:n,..."Object"===n&&{target:t}}),li(this,Eh).push([e,t])}function kh(e,t,n){li(this,wh).filter((([t,n])=>e(t,n))).forEach((([,,e])=>e(t,n)))}function Oh(e=!1){null!=li(this,Bh)&&(e||li(this,Bh).close(),Object.assign(li(this,Bh),{onopen:void 0,onerror:void 0,onmessage:void 0}),ui(this,Bh,void 0))}function Mh(e){if("string"==typeof e||Array.isArray(e)){const t=li(this,Eh).shift();if(null==t)throw new re("Request queue is empty");const[n,r]=t;let i;return"string"==typeof e&&(i=new Ch(e)),e.includes(r)!==n&&(i=new re(`Expected ${r} to be${n?"":" not"} included into ${e}`)),void(null!=i&&fh(this,Sh,kh).call(this,(e=>r===e),void 0,i))}fh(this,Sh,kh).call(this,((t,n)=>!(t!==e.subscription&&t!==e.target||n!==e.source&&n!==yh.All)),e.payload)}function Dh(e,t,n){const r=[e,t,n];return 0===li(this,Nh).size&&this.reconnect(),li(this,Nh).has(e)||fh(this,vh,Rh).call(this,!0,e),li(this,wh).push(r),()=>{ui(this,wh,li(this,wh).filter((e=>e!==r))),li(this,Nh).has(e)||fh(this,vh,Rh).call(this,!1,e),0===li(this,Nh).size&&fh(this,Th,Oh).call(this)}}const qh={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Fh={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},Uh={parameterPath:"id",mapper:{serializedName:"id",required:!0,type:{name:"String"}}},Gh={parameterPath:"limit",mapper:{defaultValue:10,constraints:{InclusiveMaximum:100,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},Lh={parameterPath:"scope",mapper:{constraints:{Pattern:new RegExp("(txi|gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},Hh={parameterPath:"direction",mapper:{serializedName:"direction",type:{name:"String"}}},jh={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",type:{name:"String"}}},Vh={parameterPath:"accountId",mapper:{serializedName:"accountId",required:!0,type:{name:"String"}}},$h={parameterPath:["options","contract"],mapper:{serializedName:"contract",type:{name:"String"}}},Yh={parameterPath:"contractId",mapper:{serializedName:"contractId",required:!0,type:{name:"String"}}},Jh={parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},Kh={parameterPath:"hashOrKbi",mapper:{serializedName:"hash_or_kbi",required:!0,type:{name:"String"}}},Wh={parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}},Xh={parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}},Zh={type:{name:"Composite",className:"Paths1I5J7OcV2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Activity"}}}}}}},eg={type:{name:"Composite",className:"Activity",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},type:{serializedName:"type",required:!0,type:{name:"String"}}}}},tg={type:{name:"Composite",className:"PaginatedResponse",modelProperties:{next:{serializedName:"next",required:!0,nullable:!0,type:{name:"String"}},prev:{serializedName:"prev",required:!0,nullable:!0,type:{name:"String"}}}}},ng={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},rg={type:{name:"Composite",className:"Paths17FlgdkV2Aex141GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141Response"}}}}}}},ig={type:{name:"Composite",className:"Aex141Response",modelProperties:{baseUrl:{serializedName:"base_url",required:!0,type:{name:"String"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxi:{serializedName:"contract_txi",required:!0,type:{name:"String"}},extensions:{serializedName:"extensions",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},limits:{serializedName:"limits",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},ag={type:{name:"Composite",className:"PathsAxw0PwV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141OwnedTokenResponse"}}}}}}},og={type:{name:"Composite",className:"Aex141OwnedTokenResponse",modelProperties:{accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}}}}},sg={type:{name:"Composite",className:"PathsN3Ru7DV2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141OwnedTokenResponse"}}}}}}},cg={type:{name:"Composite",className:"PathsRa6Pv6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplatesResponse"}}}}}}},ug={type:{name:"Composite",className:"Aex141TemplatesResponse",modelProperties:{contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},edition:{serializedName:"edition",type:{name:"Dictionary",value:{type:{name:"any"}}}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},templateId:{serializedName:"template_id",required:!0,type:{name:"Number"}},txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},lg={type:{name:"Composite",className:"Paths19B9O7TV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplateTokensResponse"}}}}}}},Ag={type:{name:"Composite",className:"Aex141TemplateTokensResponse",modelProperties:{logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},dg={type:{name:"Composite",className:"Paths1Fe570RV2Aex9GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9Response"}}}}}}},pg={type:{name:"Composite",className:"Aex9Response",modelProperties:{contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxi:{serializedName:"contract_txi",required:!0,type:{name:"Number"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},eventSupply:{serializedName:"event_supply",required:!0,type:{name:"Number"}},extensions:{serializedName:"extensions",type:{name:"Sequence",element:{type:{name:"String"}}}},holders:{serializedName:"holders",required:!0,type:{name:"Number"}},initialSupply:{serializedName:"initial_supply",required:!0,type:{name:"Number"}},name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}}}}},mg={type:{name:"Composite",className:"PathsO9MbpkV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9BalanceResponse"}}}}}}},hg={type:{name:"Composite",className:"Aex9BalanceResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tokenName:{serializedName:"token_name",required:!0,type:{name:"String"}},tokenSymbol:{serializedName:"token_symbol",required:!0,type:{name:"String"}},txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}},txIndex:{serializedName:"tx_index",required:!0,type:{name:"Number"}},txType:{serializedName:"tx_type",required:!0,type:{name:"String"}}}}},gg={type:{name:"Composite",className:"PathsY2JwfkV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9TransferResponse"}}}}}}},fg={type:{name:"Composite",className:"Aex9TransferResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"Number"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},callTxi:{serializedName:"call_txi",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"Number"}},recipient:{serializedName:"recipient",required:!0,type:{name:"String"}},sender:{serializedName:"sender",required:!0,type:{name:"String"}}}}},yg={type:{name:"Composite",className:"Paths5U7W2V2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9TransferResponse"}}}}}}},Cg={type:{name:"Composite",className:"Paths12TleqhV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9TransferResponse"}}}}}}},Ig={type:{name:"Composite",className:"Paths1C2B0UpV2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9ContractBalanceResponse"}}}}}}},wg={type:{name:"Composite",className:"Aex9ContractBalanceResponse",modelProperties:{accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},lastLogIdx:{serializedName:"last_log_idx",required:!0,type:{name:"Number"}},lastTxHash:{serializedName:"last_tx_hash",required:!0,type:{name:"String"}}}}},Eg={type:{name:"Composite",className:"PathsBelvp6V2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{account:{serializedName:"account",type:{name:"String"}},amount:{serializedName:"amount",type:{name:"Number"}},contract:{serializedName:"contract",type:{name:"String"}}}}},Bg={type:{name:"Composite",className:"Paths11X7LpcV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{account:{serializedName:"account",type:{name:"String"}},amount:{serializedName:"amount",type:{name:"Number"}},contract:{serializedName:"contract",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}}}}},Ng={type:{name:"Composite",className:"Paths5LeqfqV2BlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}}}}},bg={type:{name:"Composite",className:"Block",modelProperties:{beneficiary:{serializedName:"beneficiary",type:{name:"String"}},hash:{serializedName:"hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},info:{serializedName:"info",type:{name:"String"}},miner:{serializedName:"miner",type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},pow:{serializedName:"pow",type:{name:"Sequence",element:{type:{name:"Number"}}}},prevHash:{serializedName:"prev_hash",type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",type:{name:"String"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},target:{serializedName:"target",type:{name:"Number"}},time:{serializedName:"time",type:{name:"Number"}},version:{serializedName:"version",type:{name:"Number"}}}}},vg={type:{name:"Composite",className:"NotFoundResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},Sg={type:{name:"Composite",className:"PathsC25EgV2ChannelsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Channel"}}}}}}},Tg={type:{name:"Composite",className:"Channel",modelProperties:{amount:{serializedName:"amount",type:{name:"Number"}},channel:{serializedName:"channel",type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",type:{name:"Number"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Dictionary",value:{type:{name:"any"}}}},initiator:{serializedName:"initiator",type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",type:{name:"Number"}},lastUpdatedHeight:{serializedName:"last_updated_height",type:{name:"String"}},lastUpdatedTime:{serializedName:"last_updated_time",type:{name:"Number"}},lastUpdatedTxType:{serializedName:"last_updated_tx_type",type:{name:"String"}},lockPeriod:{serializedName:"lock_period",type:{name:"Number"}},lockedUntil:{serializedName:"locked_until",type:{name:"Number"}},responder:{serializedName:"responder",type:{name:"String"}},responderAmount:{serializedName:"responder_amount",type:{name:"Number"}},round:{serializedName:"round",type:{name:"Number"}},soloRound:{serializedName:"solo_round",type:{name:"Number"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},updatesCount:{serializedName:"updates_count",type:{name:"String"}}}}},xg={type:{name:"Composite",className:"Paths1Csrt0IV2ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractCall"}}}}}}},_g={type:{name:"Composite",className:"ContractCall",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},callTxHash:{serializedName:"call_tx_hash",type:{name:"String"}},callTxi:{serializedName:"call_txi",type:{name:"Number"}},contractId:{serializedName:"contract_id",type:{name:"String"}},contractTxi:{serializedName:"contract_txi",type:{name:"Number"}},function:{serializedName:"function",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},internalTx:{serializedName:"internal_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},localIdx:{serializedName:"local_idx",type:{name:"Number"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}}}}},Qg={type:{name:"Composite",className:"Paths9Ya94MV2ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractLog"}}}}}}},Pg={type:{name:"Composite",className:"ContractLog",modelProperties:{args:{serializedName:"args",type:{name:"Sequence",element:{type:{name:"Number"}}}},blockHash:{serializedName:"block_hash",type:{name:"String"}},callTxHash:{serializedName:"call_tx_hash",type:{name:"String"}},callTxi:{serializedName:"call_txi",type:{name:"Number"}},contractId:{serializedName:"contract_id",type:{name:"String"}},contractTxi:{serializedName:"contract_txi",type:{name:"Number"}},data:{serializedName:"data",type:{name:"String"}},eventHash:{serializedName:"event_hash",type:{name:"String"}},extCallerContractId:{serializedName:"ext_caller_contract_id",type:{name:"String"}},extCallerContractTxi:{serializedName:"ext_caller_contract_txi",type:{name:"Number"}},height:{serializedName:"height",type:{name:"Number"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},parentContractId:{serializedName:"parent_contract_id",nullable:!0,type:{name:"Number"}}}}},zg={type:{name:"Composite",className:"Contract",modelProperties:{aexnType:{serializedName:"aexn_type",type:{name:"String"}},blockHash:{serializedName:"block_hash",type:{name:"String"}},createTx:{serializedName:"create_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},sourceTxHash:{serializedName:"source_tx_hash",type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",type:{name:"String"}}}}},Rg={type:{name:"Composite",className:"PathsRzn6HzV2DeltastatsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"DeltaStat"}}}}}}},kg={type:{name:"Composite",className:"DeltaStat",modelProperties:{auctionsStarted:{serializedName:"auctions_started",type:{name:"Number"}},blockReward:{serializedName:"block_reward",type:{name:"Number"}},contractsCreated:{serializedName:"contracts_created",type:{name:"Number"}},devReward:{serializedName:"dev_reward",type:{name:"Number"}},height:{serializedName:"height",type:{name:"Number"}},lastTxHash:{serializedName:"last_tx_hash",type:{name:"String"}},namesActivated:{serializedName:"names_activated",type:{name:"Number"}},namesExpired:{serializedName:"names_expired",type:{name:"Number"}},namesRevoked:{serializedName:"names_revoked",type:{name:"Number"}},oraclesExpired:{serializedName:"oracles_expired",type:{name:"Number"}},oraclesRegistered:{serializedName:"oracles_registered",type:{name:"Number"}}}}},Og={type:{name:"Composite",className:"Paths10TrrshV2KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"KeyBlock"}}}}}}},Mg={type:{name:"Composite",className:"KeyBlock",modelProperties:{beneficiary:{serializedName:"beneficiary",type:{name:"String"}},hash:{serializedName:"hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},info:{serializedName:"info",type:{name:"String"}},miner:{serializedName:"miner",type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},pow:{serializedName:"pow",type:{name:"Sequence",element:{type:{name:"Number"}}}},prevHash:{serializedName:"prev_hash",type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",type:{name:"String"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},target:{serializedName:"target",type:{name:"Number"}},time:{serializedName:"time",type:{name:"Number"}},version:{serializedName:"version",type:{name:"Number"}}}}},Dg={type:{name:"Composite",className:"Paths7Hfka2V2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"MicroBlock"}}}}}}},qg={type:{name:"Composite",className:"MicroBlock",modelProperties:{hash:{serializedName:"hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},microBlockIndex:{serializedName:"micro_block_index",type:{name:"Number"}},pofHash:{serializedName:"pof_hash",type:{name:"Sequence",element:{type:{name:"Number"}}}},prevHash:{serializedName:"prev_hash",type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",type:{name:"String"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},time:{serializedName:"time",type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",type:{name:"Number"}},version:{serializedName:"version",type:{name:"Number"}}}}},Fg={type:{name:"Composite",className:"Paths1RxrrvbV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Tx"}}}}}}},Ug={type:{name:"Composite",className:"Tx",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},hash:{serializedName:"hash",type:{name:"String"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"Number"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},txIndex:{serializedName:"tx_index",type:{name:"Number"}}}}},Gg={type:{name:"Composite",className:"Paths16Srg6EV2NamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Name"}}}}}}},Lg={type:{name:"Composite",className:"Name",modelProperties:{active:{serializedName:"active",type:{name:"Boolean"}},hash:{serializedName:"hash",type:{name:"String"}},info:{serializedName:"info",type:{name:"Composite",className:"NameInfo"}},previous:{serializedName:"previous",type:{name:"Sequence",element:{type:{name:"Composite",className:"Name"}}}},status:{serializedName:"status",type:{name:"String"}}}}},Hg={type:{name:"Composite",className:"NameInfo",modelProperties:{activationTime:{serializedName:"activation_time",type:{name:"Number"}},activeFrom:{serializedName:"active_from",type:{name:"Number"}},claims:{serializedName:"claims",type:{name:"Sequence",element:{type:{name:"Number"}}}},expireHeight:{serializedName:"expire_height",type:{name:"Number"}},ownership:{serializedName:"ownership",type:{name:"Composite",className:"NameInfoOwnership"}},pointers:{serializedName:"pointers",type:{name:"Composite",className:"NameInfoPointers"}},transfers:{serializedName:"transfers",type:{name:"Sequence",element:{type:{name:"Number"}}}},updates:{serializedName:"updates",type:{name:"String"}}}}},jg={type:{name:"Composite",className:"NameInfoOwnership",modelProperties:{current:{serializedName:"current",type:{name:"String"}},original:{serializedName:"original",type:{name:"String"}}}}},Vg={type:{name:"Composite",className:"NameInfoPointers",modelProperties:{accountPubkey:{serializedName:"account_pubkey",type:{name:"String"}}}}},$g={type:{name:"Composite",className:"Auction",modelProperties:{active:{serializedName:"active",type:{name:"Boolean"}},info:{serializedName:"info",type:{name:"Composite",className:"AuctionInfo"}}}}},Yg={type:{name:"Composite",className:"AuctionInfo",modelProperties:{auctionEnd:{serializedName:"auction_end",type:{name:"Number"}},bids:{serializedName:"bids",type:{name:"Sequence",element:{type:{name:"Number"}}}},lastBid:{serializedName:"last_bid",type:{name:"Composite",className:"AuctionInfoLastBid"}},name:{serializedName:"name",type:{name:"String"}},previous:{serializedName:"previous",type:{name:"Composite",className:"Auction"}},status:{serializedName:"status",type:{name:"String"}},txIndex:{serializedName:"tx_index",type:{name:"Number"}}}}},Jg={type:{name:"Composite",className:"AuctionInfoLastBid",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},hash:{serializedName:"hash",type:{name:"String"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"Number"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Kg={type:{name:"Composite",className:"Paths1I6PwfdV2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem"}}}}}}},Wg={type:{name:"Composite",className:"Paths7P6Qc1V2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0PropertiesDataItemsAllof1",modelProperties:{status:{serializedName:"status",type:{name:"String"}}}}},Xg={type:{name:"Composite",className:"NameClaim",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Zg={type:{name:"Composite",className:"PathsDjelzuV2NamesIdPointeesGetResponses200ContentApplicationJsonSchema",modelProperties:{active:{serializedName:"active",type:{name:"Dictionary",value:{type:{name:"any"}}}},inactive:{serializedName:"inactive",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},ef={type:{name:"Composite",className:"NameTransfer",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},tf={type:{name:"Composite",className:"NameUpdate",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},nf={type:{name:"Composite",className:"PathsMherz6V2OraclesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Oracle"}}}}}}},rf={type:{name:"Composite",className:"Oracle",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},extends:{serializedName:"extends",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleExtendsItem"}}}},oracle:{serializedName:"oracle",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"Number"}},register:{serializedName:"register",required:!0,type:{name:"Number"}},registerTime:{serializedName:"register_time",type:{name:"Number"}}}}},af={type:{name:"Composite",className:"OracleExtendsItem",modelProperties:{query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}}}}},of={type:{name:"Composite",className:"Paths1LaqrzqV2OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},sf={type:{name:"Composite",className:"OracleQuery",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"Number"}},fee:{serializedName:"fee",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"Number"}},queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},queryTtl:{serializedName:"query_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},response:{serializedName:"response",type:{name:"Composite",className:"OracleResponse"}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},sourceTxHash:{serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},cf={type:{name:"Composite",className:"OracleResponse",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"Number"}},fee:{serializedName:"fee",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",type:{name:"Composite",className:"OracleResponse"}},queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},sourceTxHash:{serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},uf={type:{name:"Composite",className:"Paths3PnwziV2OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleResponse"}}}}}}},lf={type:{name:"Composite",className:"Status",modelProperties:{mdwAsyncTasks:{serializedName:"mdw_async_tasks",type:{name:"Composite",className:"StatusMdwAsyncTasks"}},mdwGensPerMinute:{serializedName:"mdw_gens_per_minute",required:!0,type:{name:"Number"}},mdwHeight:{serializedName:"mdw_height",required:!0,type:{name:"Number"}},mdwLastMigration:{serializedName:"mdw_last_migration",required:!0,type:{name:"Number"}},mdwRevision:{serializedName:"mdw_revision",required:!0,type:{name:"String"}},mdwSynced:{serializedName:"mdw_synced",required:!0,type:{name:"Boolean"}},mdwSyncing:{serializedName:"mdw_syncing",required:!0,type:{name:"Boolean"}},mdwTxIndex:{serializedName:"mdw_tx_index",required:!0,type:{name:"Number"}},mdwVersion:{serializedName:"mdw_version",required:!0,type:{name:"String"}},nodeHeight:{serializedName:"node_height",required:!0,type:{name:"Number"}},nodeProgress:{serializedName:"node_progress",required:!0,type:{name:"Number"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},nodeSyncing:{serializedName:"node_syncing",required:!0,type:{name:"Boolean"}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}}}}},Af={type:{name:"Composite",className:"StatusMdwAsyncTasks",modelProperties:{longTasks:{serializedName:"long_tasks",required:!0,type:{name:"Number"}},producerBuffer:{serializedName:"producer_buffer",required:!0,type:{name:"Number"}},totalPending:{serializedName:"total_pending",required:!0,type:{name:"Number"}}}}},df={type:{name:"Composite",className:"PathsDpxn99V2TotalstatsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"TotalStat"}}}}}}},pf={type:{name:"Composite",className:"TotalStat",modelProperties:{auctionsStarted:{serializedName:"auctions_started",type:{name:"Number"}},blockReward:{serializedName:"block_reward",type:{name:"Number"}},contractsCreated:{serializedName:"contracts_created",type:{name:"Number"}},devReward:{serializedName:"dev_reward",type:{name:"Number"}},height:{serializedName:"height",type:{name:"Number"}},lastTxHash:{serializedName:"last_tx_hash",type:{name:"String"}},namesActivated:{serializedName:"names_activated",type:{name:"Number"}},namesExpired:{serializedName:"names_expired",type:{name:"Number"}},namesRevoked:{serializedName:"names_revoked",type:{name:"Number"}},oraclesExpired:{serializedName:"oracles_expired",type:{name:"Number"}},oraclesRegistered:{serializedName:"oracles_registered",type:{name:"Number"}}}}},mf={type:{name:"Composite",className:"Paths17Cjtx5V2TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Transfer"}}}}}}},hf={type:{name:"Composite",className:"Transfer",modelProperties:{accountId:{serializedName:"account_id",type:{name:"String"}},amount:{serializedName:"amount",type:{name:"Number"}},height:{serializedName:"height",type:{name:"Number"}},kind:{serializedName:"kind",type:{name:"String"}},refTxi:{serializedName:"ref_txi",nullable:!0,type:{name:"Number"}}}}},gf={type:{name:"Composite",className:"Paths1R74KpvV2TxsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Tx"}}}}}}},ff={type:{name:"Composite",className:"Paths16Tt677V2TxsCountIdGetResponses200ContentApplicationJsonSchema",modelProperties:{channelCloseMutualTx:{serializedName:"channel_close_mutual_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelCloseSoloTx:{serializedName:"channel_close_solo_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelCreateTx:{serializedName:"channel_create_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelDepositTx:{serializedName:"channel_deposit_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelForceProgressTx:{serializedName:"channel_force_progress_tx",type:{name:"Number"}},channelOffchainTx:{serializedName:"channel_offchain_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelSettleTx:{serializedName:"channel_settle_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelSlashTx:{serializedName:"channel_slash_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelSnapshotSoloTx:{serializedName:"channel_snapshot_solo_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelWithdrawTx:{serializedName:"channel_withdraw_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},contractCallTx:{serializedName:"contract_call_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},contractCreateTx:{serializedName:"contract_create_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},gaAttachTx:{serializedName:"ga_attach_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},gaMetaTx:{serializedName:"ga_meta_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},nameClaimTx:{serializedName:"name_claim_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},namePreclaimTx:{serializedName:"name_preclaim_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},nameRevokeTx:{serializedName:"name_revoke_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},nameTransferTx:{serializedName:"name_transfer_tx",type:{name:"Number"}},nameUpdateTx:{serializedName:"name_update_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},oracleExtendTx:{serializedName:"oracle_extend_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},oracleQueryTx:{serializedName:"oracle_query_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},oracleRegisterTx:{serializedName:"oracle_register_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},oracleResponseTx:{serializedName:"oracle_response_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},payingForTx:{serializedName:"paying_for_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},spendTx:{serializedName:"spend_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},yf={type:{name:"Composite",className:"Aex141TransferEvent",modelProperties:{blockHeight:{serializedName:"block_height",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"Number"}},recipientId:{serializedName:"recipient_id",type:{name:"String"}},senderId:{serializedName:"sender_id",type:{name:"String"}},tokenId:{serializedName:"token_id",type:{name:"Number"}},txHash:{serializedName:"tx_hash",type:{name:"String"}}}}},Cf={type:{name:"Composite",className:"Aex9TransferEvent",modelProperties:{amount:{serializedName:"amount",type:{name:"Number"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},contractId:{serializedName:"contract_id",type:{name:"String"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"Number"}},recipientId:{serializedName:"recipient_id",type:{name:"String"}},senderId:{serializedName:"sender_id",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}}}}},If={type:{name:"Composite",className:"InternalContractCallEvent",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},callTxHash:{serializedName:"call_tx_hash",type:{name:"String"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}}}}},wf={type:{name:"Composite",className:"InternalTransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"Number"}},kind:{serializedName:"kind",required:!0,type:{name:"String"}},refTxHash:{serializedName:"ref_tx_hash",required:!0,type:{name:"String"}}}}},Ef={type:{name:"Composite",className:"NameClaimEvent",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Bf={type:{name:"Composite",className:"PathsKlr2M2V2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Zh.type.modelProperties,...tg.type.modelProperties}}},Nf={type:{name:"Composite",className:"PathsFlc7UjV2Aex141GetResponses200ContentApplicationJsonSchema",modelProperties:{...rg.type.modelProperties,...tg.type.modelProperties}}},bf={type:{name:"Composite",className:"PathsSs61ZgV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchema",modelProperties:{...ag.type.modelProperties,...tg.type.modelProperties}}},vf={type:{name:"Composite",className:"Paths1Ilysy5V2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchema",modelProperties:{...sg.type.modelProperties,...tg.type.modelProperties}}},Sf={type:{name:"Composite",className:"Paths17O9Fn6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...cg.type.modelProperties,...tg.type.modelProperties}}},Tf={type:{name:"Composite",className:"PathsNuoourV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...lg.type.modelProperties,...tg.type.modelProperties}}},xf={type:{name:"Composite",className:"Paths1Wbogg8V2Aex9GetResponses200ContentApplicationJsonSchema",modelProperties:{...dg.type.modelProperties,...tg.type.modelProperties}}},_f={type:{name:"Composite",className:"Paths1BsirxgV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchema",modelProperties:{...tg.type.modelProperties,...mg.type.modelProperties}}},Qf={type:{name:"Composite",className:"Paths1V0FiznV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchema",modelProperties:{...gg.type.modelProperties,...tg.type.modelProperties}}},Pf={type:{name:"Composite",className:"Paths1X48QgjV2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchema",modelProperties:{...yg.type.modelProperties,...tg.type.modelProperties}}},zf={type:{name:"Composite",className:"Paths1DkkopqV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchema",modelProperties:{...Cg.type.modelProperties,...tg.type.modelProperties}}},Rf={type:{name:"Composite",className:"PathsNi359V2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ig.type.modelProperties,...tg.type.modelProperties}}},kf={type:{name:"Composite",className:"Paths15Ih6XV2BlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ng.type.modelProperties,...tg.type.modelProperties}}},Of={type:{name:"Composite",className:"Paths1Txl2A9V2ChannelsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Sg.type.modelProperties,...tg.type.modelProperties}}},Mf={type:{name:"Composite",className:"Paths187U0XzV2ContractsCallsGetResponses200ContentApplicationJsonSchema",modelProperties:{...xg.type.modelProperties,...tg.type.modelProperties}}},Df={type:{name:"Composite",className:"PathsB246H1V2ContractsLogsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Qg.type.modelProperties,...tg.type.modelProperties}}},qf={type:{name:"Composite",className:"Paths7Pbec0V2DeltastatsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Rg.type.modelProperties,...tg.type.modelProperties}}},Ff={type:{name:"Composite",className:"Paths1Ulxr59V2KeyBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Og.type.modelProperties,...tg.type.modelProperties}}},Uf={type:{name:"Composite",className:"PathsO99PhzV2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Dg.type.modelProperties,...tg.type.modelProperties}}},Gf={type:{name:"Composite",className:"PathsGuqvhdV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Fg.type.modelProperties,...tg.type.modelProperties}}},Lf={type:{name:"Composite",className:"PathsK9TkttV2NamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Gg.type.modelProperties,...tg.type.modelProperties}}},Hf={type:{name:"Composite",className:"Paths3Msq0DV2NamesSearchGetResponses200ContentApplicationJsonSchema",modelProperties:{...Kg.type.modelProperties,...tg.type.modelProperties}}},jf={type:{name:"Composite",className:"PathsB0YvynV2OraclesGetResponses200ContentApplicationJsonSchema",modelProperties:{...nf.type.modelProperties,...tg.type.modelProperties}}},Vf={type:{name:"Composite",className:"Paths4Bbr8KV2OraclesIdQueriesGetResponses200ContentApplicationJsonSchema",modelProperties:{...of.type.modelProperties,...tg.type.modelProperties}}},$f={type:{name:"Composite",className:"Paths1Ky8Ew4V2OraclesIdResponsesGetResponses200ContentApplicationJsonSchema",modelProperties:{...uf.type.modelProperties,...tg.type.modelProperties}}},Yf={type:{name:"Composite",className:"Paths15PsutbV2TotalstatsGetResponses200ContentApplicationJsonSchema",modelProperties:{...df.type.modelProperties,...tg.type.modelProperties}}},Jf={type:{name:"Composite",className:"PathsIgs9Z1V2TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...mf.type.modelProperties,...tg.type.modelProperties}}},Kf={type:{name:"Composite",className:"PathsFclv4TV2TxsGetResponses200ContentApplicationJsonSchema",modelProperties:{...gf.type.modelProperties,...tg.type.modelProperties}}},Wf={type:{name:"Composite",className:"Paths1R02SlwV2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema",modelProperties:{...Eg.type.modelProperties}}},Xf={type:{name:"Composite",className:"Paths1T9RwnyV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema",modelProperties:{...Bg.type.modelProperties}}},Zf={type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem",modelProperties:{...Lg.type.modelProperties,...Wg.type.modelProperties}}};class ey extends Rs{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-middleware/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountActivities(e,t){return this.sendOperationRequest({id:e,options:t},ny)}getSortedAex141Contracts(e){return this.sendOperationRequest({options:e},ry)}getAex141OwnedTokens(e,t){return this.sendOperationRequest({accountId:e,options:t},iy)}getAex141TokenOwner(e,t,n){return this.sendOperationRequest({contractId:e,tokenId:t,options:n},ay)}getAex141ContractOwners(e,t){return this.sendOperationRequest({contractId:e,options:t},oy)}getAex141ContractTemplates(e,t){return this.sendOperationRequest({contractId:e,options:t},sy)}getAex141TemplateTokens(e,t,n){return this.sendOperationRequest({contractId:e,templateId:t,options:n},cy)}getAex141ByContract(e,t){return this.sendOperationRequest({id:e,options:t},uy)}getSortedAex9Tokens(e){return this.sendOperationRequest({options:e},ly)}getAex9AccountBalances(e,t){return this.sendOperationRequest({accountId:e,options:t},Ay)}getAex9TokensCount(e){return this.sendOperationRequest({options:e},dy)}getAex9PairTransfers(e,t,n){return this.sendOperationRequest({sender:e,recipient:t,options:n},py)}getAex9SenderTransfers(e,t){return this.sendOperationRequest({id:e,options:t},my)}getAex9RecipientTransfers(e,t){return this.sendOperationRequest({id:e,options:t},hy)}getAex9ContractBalances(e,t){return this.sendOperationRequest({contractId:e,options:t},gy)}getAex9ContractAccountBalance(e,t,n,r){return this.sendOperationRequest({contractId:e,accountId:t,hash:n,options:r},fy)}getAex9ContractAccountBalanceHistory(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},yy)}getAex9LogsCount(e,t){return this.sendOperationRequest({contractId:e,options:t},Cy)}getAex9ByContract(e,t){return this.sendOperationRequest({id:e,options:t},Iy)}getBlocks(e){return this.sendOperationRequest({options:e},wy)}getBlock(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},Ey)}getBlockByMbi(e,t,n){return this.sendOperationRequest({kbi:e,mbi:t,options:n},By)}getChannels(e){return this.sendOperationRequest({options:e},Ny)}getChannel(e,t){return this.sendOperationRequest({id:e,options:t},by)}getContractsCalls(e){return this.sendOperationRequest({options:e},vy)}getContractsLogs(e){return this.sendOperationRequest({options:e},Sy)}getContract(e,t){return this.sendOperationRequest({id:e,options:t},Ty)}getDeltastats(e){return this.sendOperationRequest({options:e},xy)}getKeyBlocks(e){return this.sendOperationRequest({options:e},_y)}getKeyBlock(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},Qy)}getKeyBlockMicroBlocks(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},Py)}getMicroBlock(e,t){return this.sendOperationRequest({hash:e,options:t},zy)}getMicroBlockTransactions(e,t){return this.sendOperationRequest({hash:e,options:t},Ry)}getNames(e){return this.sendOperationRequest({options:e},ky)}getNamesAuctions(e){return this.sendOperationRequest({options:e},Oy)}searchNames(e){return this.sendOperationRequest({options:e},My)}getName(e,t){return this.sendOperationRequest({id:e,options:t},Dy)}getNameAuction(e,t){return this.sendOperationRequest({id:e,options:t},qy)}getNameClaims(e,t){return this.sendOperationRequest({id:e,options:t},Fy)}getNamePointees(e,t){return this.sendOperationRequest({id:e,options:t},Uy)}getNamePointers(e,t){return this.sendOperationRequest({id:e,options:t},Gy)}getNameTransfers(e,t){return this.sendOperationRequest({id:e,options:t},Ly)}getNameUpdates(e,t){return this.sendOperationRequest({id:e,options:t},Hy)}getOracles(e){return this.sendOperationRequest({options:e},jy)}getOracle(e,t){return this.sendOperationRequest({id:e,options:t},Vy)}getOracleQueries(e,t){return this.sendOperationRequest({id:e,options:t},$y)}getOracleResponses(e,t){return this.sendOperationRequest({id:e,options:t},Yy)}getStatus(e){return this.sendOperationRequest({options:e},Jy)}getTotalstats(e){return this.sendOperationRequest({options:e},Ky)}getTransfers(e){return this.sendOperationRequest({options:e},Wy)}getTxs(e){return this.sendOperationRequest({options:e},Xy)}getTxCount(e){return this.sendOperationRequest({options:e},Zy)}getTxCountById(e,t){return this.sendOperationRequest({id:e,options:t},eC)}getTx(e,t){return this.sendOperationRequest({hashOrIndex:e,options:t},tC)}}const ty=za(l,!1),ny={path:"/v2/accounts/{id}/activities",httpMethod:"GET",responses:{200:{bodyMapper:Bf},400:{bodyMapper:ng,isError:!0}},queryParameters:[{parameterPath:["options","ownedOnly"],mapper:{serializedName:"owned_only",type:{name:"Boolean"}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"String"}}},Gh,Lh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},ry={path:"/v2/aex141",httpMethod:"GET",responses:{200:{bodyMapper:Nf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh,{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},jh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},iy={path:"/v2/aex141/owned-nfts/{accountId}",httpMethod:"GET",responses:{200:{bodyMapper:bf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh,$h],urlParameters:[Fh,Vh],headerParameters:[qh],serializer:ty},ay={path:"/v2/aex141/{contractId}/owner/{tokenId}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"String"}}},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Yh,{parameterPath:"tokenId",mapper:{serializedName:"tokenId",required:!0,type:{name:"Number"}}}],headerParameters:[qh],serializer:ty},oy={path:"/v2/aex141/{contractId}/owners",httpMethod:"GET",responses:{200:{bodyMapper:vf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,Yh],headerParameters:[qh],serializer:ty},sy={path:"/v2/aex141/{contractId}/templates",httpMethod:"GET",responses:{200:{bodyMapper:Sf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,Yh],headerParameters:[qh],serializer:ty},cy={path:"/v2/aex141/{contractId}/templates/{templateId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:Tf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,Yh,{parameterPath:"templateId",mapper:{serializedName:"templateId",required:!0,type:{name:"Number"}}}],headerParameters:[qh],serializer:ty},uy={path:"/v2/aex141/{id}",httpMethod:"GET",responses:{200:{bodyMapper:ig},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},ly={path:"/v2/aex9",httpMethod:"GET",responses:{200:{bodyMapper:xf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh,jh,{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}}],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Ay={path:"/v2/aex9/account-balances/{account_id}",httpMethod:"GET",responses:{200:{bodyMapper:_f},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,{parameterPath:"accountId",mapper:{serializedName:"account_id",required:!0,type:{name:"String"}}}],headerParameters:[qh],serializer:ty},dy={path:"/v2/aex9/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}}},urlParameters:[Fh],headerParameters:[qh],serializer:ty},py={path:"/v2/aex9/transfers/from-to/{sender}/{recipient}",httpMethod:"GET",responses:{200:{bodyMapper:Qf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,{parameterPath:"sender",mapper:{serializedName:"sender",required:!0,type:{name:"String"}}},{parameterPath:"recipient",mapper:{serializedName:"recipient",required:!0,type:{name:"String"}}}],headerParameters:[qh],serializer:ty},my={path:"/v2/aex9/transfers/from/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Pf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},hy={path:"/v2/aex9/transfers/to/{id}",httpMethod:"GET",responses:{200:{bodyMapper:zf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},gy={path:"/v2/aex9/{contractId}/balances",httpMethod:"GET",responses:{200:{bodyMapper:Rf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh,Jh],urlParameters:[Fh,Yh],headerParameters:[qh],serializer:ty},fy={path:"/v2/aex9/{contractId}/balances/{accountId}",httpMethod:"GET",responses:{200:{bodyMapper:Wf},400:{bodyMapper:ng,isError:!0}},queryParameters:[{parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}}],urlParameters:[Fh,Vh,Yh],headerParameters:[qh],serializer:ty},yy={path:"/v2/aex9/{contractId}/balances/{accountId}/history",httpMethod:"GET",responses:{200:{bodyMapper:Xf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Vh,Yh],headerParameters:[qh],serializer:ty},Cy={path:"/v2/aex9/{contractId}/logs-count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Yh],headerParameters:[qh],serializer:ty},Iy={path:"/v2/aex9/{id}",httpMethod:"GET",responses:{200:{bodyMapper:pg},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},wy={path:"/v2/blocks",httpMethod:"GET",responses:{200:{bodyMapper:kf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Ey={path:"/v2/blocks/{hash_or_kbi}",httpMethod:"GET",responses:{200:{bodyMapper:bg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Kh],headerParameters:[qh],serializer:ty},By={path:"/v2/blocks/{kbi}/{mbi}",httpMethod:"GET",responses:{200:{bodyMapper:bg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,{parameterPath:"kbi",mapper:{serializedName:"kbi",required:!0,type:{name:"Number"}}},{parameterPath:"mbi",mapper:{serializedName:"mbi",required:!0,type:{name:"Number"}}}],headerParameters:[qh],serializer:ty},Ny={path:"/v2/channels",httpMethod:"GET",responses:{200:{bodyMapper:Of},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh,{parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}}],urlParameters:[Fh],headerParameters:[qh],serializer:ty},by={path:"/v2/channels/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Tg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},vy={path:"/v2/contracts/calls",httpMethod:"GET",responses:{200:{bodyMapper:Mf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Sy={path:"/v2/contracts/logs",httpMethod:"GET",responses:{200:{bodyMapper:Df},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh,{parameterPath:["options","contractId"],mapper:{serializedName:"contract_id",type:{name:"String"}}},{parameterPath:["options","event"],mapper:{serializedName:"event",type:{name:"String"}}},{parameterPath:["options","function"],mapper:{serializedName:"function",type:{name:"String"}}},{parameterPath:["options","functionPrefix"],mapper:{serializedName:"function_prefix",type:{name:"String"}}},{parameterPath:["options","data"],mapper:{serializedName:"data",type:{name:"String"}}},{parameterPath:["options","aexnArgs"],mapper:{serializedName:"aexn-args",type:{name:"Boolean"}}}],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Ty={path:"/v2/contracts/{id}",httpMethod:"GET",responses:{200:{bodyMapper:zg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},xy={path:"/v2/deltastats",httpMethod:"GET",responses:{200:{bodyMapper:qf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},_y={path:"/v2/key-blocks",httpMethod:"GET",responses:{200:{bodyMapper:Ff},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Qy={path:"/v2/key-blocks/{hash_or_kbi}",httpMethod:"GET",responses:{200:{bodyMapper:Mg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Kh],headerParameters:[qh],serializer:ty},Py={path:"/v2/key-blocks/{hash_or_kbi}/micro-blocks",httpMethod:"GET",responses:{200:{bodyMapper:Uf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Kh],headerParameters:[qh],serializer:ty},zy={path:"/v2/micro-blocks/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:qg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Wh],headerParameters:[qh],serializer:ty},Ry={path:"/v2/micro-blocks/{hash}/txs",httpMethod:"GET",responses:{200:{bodyMapper:Gf},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Wh],headerParameters:[qh],serializer:ty},ky={path:"/v2/names",httpMethod:"GET",responses:{200:{bodyMapper:Lf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh,Jh,{parameterPath:["options","ownedBy"],mapper:{serializedName:"owned_by",type:{name:"String"}}},Xh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Oy={path:"/v2/names/auctions",httpMethod:"GET",responses:{200:{bodyMapper:$g},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},My={path:"/v2/names/search",httpMethod:"GET",responses:{200:{bodyMapper:Hf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Dy={path:"/v2/names/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Lg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},qy={path:"/v2/names/{id}/auction",httpMethod:"GET",responses:{200:{bodyMapper:$g},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Fy={path:"/v2/names/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:Xg},404:{bodyMapper:vg,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Uy={path:"/v2/names/{id}/pointees",httpMethod:"GET",responses:{200:{bodyMapper:Zg},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Gy={path:"/v2/names/{id}/pointers",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Dictionary",value:{type:{name:"any"}}}}},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Ly={path:"/v2/names/{id}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:ef},404:{bodyMapper:vg,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Hy={path:"/v2/names/{id}/updates",httpMethod:"GET",responses:{200:{bodyMapper:tf},404:{bodyMapper:vg,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},jy={path:"/v2/oracles",httpMethod:"GET",responses:{200:{bodyMapper:jf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh,Xh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Vy={path:"/v2/oracles/{id}",httpMethod:"GET",responses:{200:{bodyMapper:rf},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},$y={path:"/v2/oracles/{id}/queries",httpMethod:"GET",responses:{200:{bodyMapper:Vf},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Yy={path:"/v2/oracles/{id}/responses",httpMethod:"GET",responses:{200:{bodyMapper:$f},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Jy={path:"/v2/status",httpMethod:"GET",responses:{200:{bodyMapper:lf}},urlParameters:[Fh],headerParameters:[qh],serializer:ty},Ky={path:"/v2/totalstats",httpMethod:"GET",responses:{200:{bodyMapper:Yf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Wy={path:"/v2/transfers",httpMethod:"GET",responses:{200:{bodyMapper:Jf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Xy={path:"/v2/txs",httpMethod:"GET",responses:{200:{bodyMapper:Kf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh,$h,{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:"Multi"},{parameterPath:["options","typeGroup"],mapper:{serializedName:"type_group",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:"Multi"},{parameterPath:["options","account"],mapper:{serializedName:"account",type:{name:"String"}}},{parameterPath:["options","channel"],mapper:{serializedName:"channel",type:{name:"String"}}},{parameterPath:["options","oracle"],mapper:{serializedName:"oracle",type:{name:"String"}}},{parameterPath:["options","senderId"],mapper:{serializedName:"sender_id",type:{name:"String"}}},{parameterPath:["options","recipientId"],mapper:{serializedName:"recipient_id",type:{name:"String"}}},{parameterPath:["options","entrypoint"],mapper:{serializedName:"entrypoint",type:{name:"String"}}}],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Zy={path:"/v2/txs/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}}},queryParameters:[Lh,{parameterPath:["options","txType"],mapper:{serializedName:"tx_type",type:{name:"String"}}},{parameterPath:["options","id"],mapper:{serializedName:"id",type:{name:"String"}}}],urlParameters:[Fh],headerParameters:[qh],serializer:ty},eC={path:"/v2/txs/count/{id}",httpMethod:"GET",responses:{200:{bodyMapper:ff},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},tC={path:"/v2/txs/{hash_or_index}",httpMethod:"GET",responses:{200:{bodyMapper:Ug},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,{parameterPath:"hashOrIndex",mapper:{serializedName:"hash_or_index",required:!0,type:{name:"String"}}}],headerParameters:[qh],serializer:ty};function nC(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function rC(e,t,n){return function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(t,e),n}const iC=[],aC=[];var oC=new WeakSet,sC=new WeakSet,cC=new WeakSet;class uC extends ey{constructor(...e){super(...e),nC(this,cC),nC(this,sC),nC(this,oC)}async sendOperationRequest(e,t){const n=It(e,(([e,t])=>[e,rC(this,sC,AC).call(this,t)]));return rC(this,cC,dC).call(this,await super.sendOperationRequest(n,t))}}function lC(e,t){return Array.isArray(e)?e.map((e=>rC(this,oC,lC).call(this,e,t))):null!=e&&"object"==typeof e?It(e,(([e,n])=>null==n?[e,n]:iC.some((t=>t===e))?[e,t.bigInt(n)]:aC.some((t=>t===e))?[e,t.number(n)]:[e,rC(this,oC,lC).call(this,n,t)])):e}function AC(e){return rC(this,oC,lC).call(this,e,{bigInt:e=>e instanceof _?e.toFixed():e.toString(),number:e=>e.toString()})}function dC(e){return rC(this,oC,lC).call(this,e,{bigInt:e=>BigInt(e),number:e=>+e})}class pC extends uC{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...i}={}){let a;super(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[ga("middleware",(async e=>(null!=a||(a=(await this.getStatus(e)).mdwVersion),a)),"1.47.0","2.0.0")],da(),pa(),fa(n,r),ha((e=>` ${e.error}`))],...i}),this.pipeline.removePolicy({name:la}),this.pipeline.removePolicy({name:Aa}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}}var mC=(e,t)=>(e.connect((e=>t.sendMessage(e)),(()=>t.disconnect())),t.connect((t=>e.sendMessage(t)),(()=>e.disconnect())),()=>{e.disconnect(),t.disconnect()});class hC{constructor({debug:e=!1}){this.debug=e}connect(e,t){if(this.isConnected())throw new Ke("You already connected")}disconnect(){if(!this.isConnected())throw new We("You dont have connection. Please connect before")}receiveMessage(e){this.debug&&console.log("Receive message:",e)}sendMessage(e){this.debug&&console.log("Send message:",e)}}function gC(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}var fC=new WeakMap,yC=new WeakMap,CC=new WeakMap;class IC extends hC{constructor({target:e,self:t=window,origin:n,sendDirection:r,receiveDirection:i=Gd.to_aepp,...a}={}){super(a),gC(this,fC,{writable:!0,value:void 0}),gC(this,yC,{writable:!0,value:void 0}),gC(this,CC,{writable:!0,value:void 0}),ui(this,yC,e),ui(this,CC,t),this.origin=n,this.sendDirection=r,this.receiveDirection=i}isConnected(){return null!=this.listener}connect(e,t){super.connect(e,t),this.listener=t=>{var n;if("object"!=typeof t.data||"2.0"!==(null!==(n=t.data.jsonrpc)&&void 0!==n?n:t.data.data?.jsonrpc))return;if(null!=this.origin&&this.origin!==t.origin)return;if(null!=li(this,yC)&&li(this,yC)!==t.source)return;this.receiveMessage(t);let{data:r}=t;if(null!=r.type){if(t.data.type!==this.receiveDirection)return;r=r.data}e(r,t.origin,t.source)},li(this,CC).addEventListener("message",this.listener),ui(this,fC,t)}disconnect(){if(super.disconnect(),null==this.listener||null==li(this,fC))throw new re("Expected to not happen, required for TS");li(this,CC).removeEventListener("message",this.listener),delete this.listener,li(this,fC).call(this),ui(this,fC,void 0)}sendMessage(e){var t;if(null==li(this,yC))throw new Xe("Can't send messages without target");const n=null!=this.sendDirection?{type:this.sendDirection,data:e}:e;super.sendMessage(n),li(this,yC).postMessage(n,null!==(t=this.origin)&&void 0!==t?t:"*")}}var wC=(e,t)=>{if(null==window)throw new X("Window object not found, you can run wallet detector only in browser");const n={};return e.connect((({method:e,params:r},i,a)=>{if(e!==jd.readyToConnect||null!=n[r.id])return;const o={info:r,getConnection(){return new IC({target:a,..."extension"===r.type?{sendDirection:Gd.to_waellet,receiveDirection:Gd.to_aepp,..."null"!==window.origin&&{origin:window.origin}}:{origin:r.origin}})}};n[o.info.id]=o,t({wallets:n,newWallet:o})}),(()=>{})),()=>e.disconnect()};var EC=new WeakMap;class BC extends hC{constructor({port:e,...t}){var n,r,i;super(t),i={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=EC),r.set(n,i),this.port=e}disconnect(){if(super.disconnect(),this.port.disconnect(),null==li(this,EC))throw new ie;this.port.onMessage.removeListener(li(this,EC)[0]),this.port.onDisconnect.removeListener(li(this,EC)[1]),ui(this,EC,void 0)}connect(e,t){super.connect(e,t),ui(this,EC,[(t,n)=>{var r;this.receiveMessage(t),e(t,null!==(r=n.sender?.url)&&void 0!==r?r:"",n)},t]),this.port.onMessage.addListener(li(this,EC)[0]),this.port.onDisconnect.addListener(li(this,EC)[1])}sendMessage(e){super.sendMessage(e),this.port.postMessage(e)}isConnected(){return null!=li(this,EC)}}class NC extends Yd{constructor(e){super("Broadcast failed"),Rd(this,"code",3),this.data=e,this.name="RpcBroadcastError"}}Rd(NC,"code",3);const bC=12;function vC(e,t){const n=(new _l.TypeResolver).resolveType(t,{});return(new _l.ContractByteArrayEncoder).encodeWithType(e,n)}function SC(e,t){const n=(new _l.TypeResolver).resolveType(t,{});return(new _l.ContractByteArrayEncoder).decodeWithType(e,n)}const TC=18e4,xC=36e3,_C=3600,QC=_C,PC={type:Oi.delta,value:500},zC={type:Oi.delta,value:10},RC={type:Oi.delta,value:10}}(),r}()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Aeternity=t():e.Aeternity=t()}(self,(function(){return function(){var e={9226:function(e,t,n){const r=n(9986),i=n(7776),a=n(9101),o=n(2813),s=n(8836),{FateTypeCalldata:c,FateTypeString:u}=n(3182),l=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new o,this._canonicalMapper=new s}encodeCall(e,t,n){const{types:r,required:i}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<i)throw new l(`Non matching number of arguments. ${t} expects between ${i} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode(c(t,r),n)}decodeCall(e,t,n){const{types:r,_required:i}=this._typeResolver.getCallTypes(e,t),a=c(t,r);return this._byteArrayEncoder.decodeWithType(n,a)}decodeResult(e,t,n,r="ok"){if("ok"===r){const r=this._typeResolver.getReturnType(e,t);return this._byteArrayEncoder.decodeWithType(n,r)}if("error"===r){const e=new TextDecoder,t=this._apiEncoder.decodeWithType(n,"contract_bytearray");return e.decode(t)}if("revert"===r)return this._byteArrayEncoder.decodeWithType(n,u());throw new l(`Unknown call result type: "${r}"`)}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}}},7776:function(e,t,n){const r=n(7815),i=n(4495),{FateTypeEvent:a}=n(3182),o=({type:e})=>{let t,n=e;var r;return(r=n)&&"object"==typeof r&&r.constructor===Object&&([[n,t]]=Object.entries(n)),"option"===n};e.exports=class extends r{constructor(e){super(),this.aci=e}getCallTypes(e,t){const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(n){const e=n.arguments.map((e=>this.resolveType(e.type))),t=n.arguments.filter(o);return{types:e,required:e.length-t.length}}if("init"===t)return{types:[],required:0};throw new i(`Unknown function ${t}`)}getReturnType(e,t){if("init"===t)return this.resolveType("void");const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(!n)throw new i(`Unknown function ${t}`);return this.resolveType(n.returns)}getEventType(e,t){const n=this.getNamespaceAci(e);if(!n.hasOwnProperty("event"))throw new i("Missing event declaration");return a(this.resolveType(n.event),t)}isCustomType(e){if("string"!=typeof e)return!1;if(this.isStdType(e))return!1;const[t,n]=e.split(".");return!!this.getNamespaceAci(t)}isStdType(e){return"Set.set"===e}getNamespaceAci(e){for(const t of this.aci){const[[n,r]]=Object.entries(t);if(r.name===e)return r}return null}resolveTypeDef(e,t=[]){const[n,r]=e.split("."),a=this.getNamespaceAci(n);if(!a)throw new i("Unknown namespace for "+JSON.stringify(e));if(a.name===e)return["contract_pubkey",[]];const o=[...a.typedefs||a.type_defs,...a.state?[{name:"state",typedef:a.state,vars:[]}]:[]].find((e=>e.name===r));if(!o)throw new i("Unknown type definition: "+JSON.stringify(e));const s={};return o.vars.forEach(((e,n)=>{const[[r,i]]=Object.entries(e);s[i]=t[n]})),[s.hasOwnProperty(o.typedef)?s[o.typedef]:o.typedef,s]}}},9101:function(e,t,n){const r=n(2122),i=n(6911),a=n(5450),o=n(5345),s={key_block_hash:{tag:"kh",size:32,encoder:i},micro_block_hash:{tag:"mh",size:32,encoder:i},block_pof_hash:{tag:"bf",size:32,encoder:i},block_tx_hash:{tag:"bx",size:32,encoder:i},block_state_hash:{tag:"bs",size:32,encoder:i},contract_bytearray:{tag:"cb",size:0,encoder:r},contract_pubkey:{tag:"ct",size:32,encoder:i},account_pubkey:{tag:"ak",size:32,encoder:i},channel:{tag:"ch",size:32,encoder:i},oracle_pubkey:{tag:"ok",size:32,encoder:i},oracle_query_id:{tag:"oq",size:32,encoder:i},peer_pubkey:{tag:"pp",size:32,encoder:i},name:{tag:"nm",size:0,encoder:i},tx_hash:{tag:"th",size:32,encoder:i},signature:{tag:"sg",size:64,encoder:i},commitment:{tag:"cm",size:32,encoder:i},bytearray:{tag:"ba",size:0,encoder:r}},c={kh:"key_block_hash",mh:"micro_block_hash",bf:"block_pof_hash",bx:"block_tx_hash",bs:"block_state_hash",cb:"contract_bytearray",ct:"contract_pubkey",ak:"account_pubkey",ch:"channel",ok:"oracle_pubkey",oq:"oracle_query_id",pp:"peer_pubkey",nm:"name",th:"tx_hash",sg:"signature",cm:"commitment",ba:"bytearray"};e.exports=class{encode(e,t){if(!s.hasOwnProperty(e))throw new o(e,`Unsupported API type ${e}`);const n=s[e];if(n.size>0&&t.length!==n.size)throw new o(e,`Invalid payload. Expected size ${n.size}, but got ${t.length}`);const r=n.encoder.encode(t);return`${n.tag}_${r}`}decode(e){const t=e.substring(0,2);if(!c.hasOwnProperty(t))throw new a(`Invalid API data format. Unsupported tag: ${t}`);if("_"!==e[2])throw new a(`Invalid API data format. Expected _ separator on position 2, got ${e[2]}`);const n=s[c[t]],r=e.substring(3),i=n.encoder.decode(r);if(n.size>0&&i.length!==n.size)throw new a(`Invalid API data format. Expected size ${n.size}, but got ${i.length}`);return i}decodeWithType(e,t){const n=e.substring(0,2);if(!s.hasOwnProperty(t))throw new o(t,"Unsupported API type");const r=s[t].tag;if(n!==r){const n=this.capitalizeType(t);throw new o(t,`${n} should start with ${r}_, got ${e} instead`)}return this.decode(e)}capitalizeType(e){const t=e.replace("_"," ");return t.charAt(0).toUpperCase()+t.slice(1)}}},146:function(e,t,n){const r=n(9986),i=n(5192),a=n(9101),o=n(2813),{FateTypeCalldata:s,FateTypeString:c}=n(3182),u=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new o}encodeCall(e,t){const{types:n,required:r}=this._typeResolver.getCallTypes(e);if(t.length>n.length||t.length<r)throw new u(`Non matching number of arguments. ${e} expects between ${r} and ${n.length} number of arguments but got ${t.length}`);return this._byteArrayEncoder.encode(s(e,n),t)}decodeCall(e){const{functionId:t,args:n}=this._byteArrayEncoder.decodeWithType(e,s());return{functionId:t,functionName:this._typeResolver.getFunctionName(t),args:n}}decodeResult(e,t,n="ok"){if("ok"===n){const n=this._typeResolver.getReturnType(e);return this._byteArrayEncoder.decodeWithType(t,n)}if("error"===n){const e=new TextDecoder,n=this._apiEncoder.decodeWithType(t,"contract_bytearray");return e.decode(n)}if("revert"===n)return this._byteArrayEncoder.decodeWithType(t,c());throw new u(`Unknown call resutls type: "${n}"`)}}},5192:function(e,t,n){const r=n(9479),i=n(4495),{FateTypeVoid:a,FateTypeTuple:o,FateTypeEvent:s,FateTypeList:c,FateTypeMap:u,FateTypeVariant:l,FateTypeOracleAddress:A,FateTypeOracleQueryAddress:d}=n(3182);e.exports=class{constructor(e){this._contractEncoder=new r,this._encodedContract=e,this._contract=null}get _bytecode(){return null===this._contract&&(this._contract=this._contractEncoder.decode(this._encodedContract)),this._contract.bytecode}getFunctionId(e){const{symbols:t}=this._bytecode;return Object.keys(t).find((n=>t[n]===e))}getFunction(e){const{functions:t}=this._bytecode;return t.find((t=>t.id===e))}getFunctionName(e){const{name:t}=this.getFunction(e);return t}getCallTypes(e){const t=this.getFunction(this.getFunctionId(e));if(t){const e=t.args.valueTypes.map((e=>this.resolveType(e)));return{types:e,required:e.length}}if("init"===e)return{types:[],required:0};throw new i(`Unknown function ${e}`)}getReturnType(e){if("init"===e)return a();const t=this.getFunction(this.getFunctionId(e));if(t)return this.resolveType(t.returnType);throw new i(`Unknown function ${e}`)}getEventType(e){const t=this.getFunction(this.getFunctionId("Chain.event"));if(!t)throw new i("The contract does not have event declaration");const n=t.args.valueTypes[0];return s(this.resolveType(n),e)}resolveType(e){if("variant"===e.name){const t=e.variants.map(((e,t)=>({[t]:e.valueTypes.map((e=>this.resolveType(e)))})));return l(t)}let t=[];return Array.isArray(e.valueTypes)&&(t=e.valueTypes.map((e=>this.resolveType(e)))),"tuple"===e.name?o(t):"list"===e.name?c(...t):"map"===e.name?u(...t):"oracle"===e.name?A(...t):"oracle_query"===e.name?d(...t):e}}},9986:function(e,t,n){const r=n(9945),i=n(9101),a=n(8836),o=n(7746);e.exports=class{constructor(){this._serializer=new r,this._apiEncoder=new i,this._externalDataFactory=new o,this._canonicalMapper=new a}encode(e,t){const n=this._externalDataFactory.create(e,t),r=this._serializer.serialize(n),i=new Uint8Array(r.flat(1/0));return this._apiEncoder.encode("contract_bytearray",i)}decode(e){const t=this._apiEncoder.decodeWithType(e,"contract_bytearray"),n=this._serializer.deserialize(t);return this._canonicalMapper.toCanonical(n)}decodeWithType(e,t){const n=this._apiEncoder.decodeWithType(e,"contract_bytearray"),r=this._serializer.deserializeWithType(n,t);return this._canonicalMapper.toCanonical(r)}}},9479:function(e,t,n){const r=n(858),i=n(9101),a=n(9945),o=n(2664),{byteArray2Int:s,byteArray2Hex:c}=n(1247);e.exports=class{constructor(){this._apiEncoder=new i,this._bytecodeSerializer=new o(new a)}decode(e){const t=this._apiEncoder.decodeWithType(e,"contract_bytearray"),n=r.decode(t,!0),i=new TextDecoder;return{tag:s(n.data[0]),vsn:s(n.data[1]),sourceHash:c(n.data[2]),aevmTypeInfo:n.data[3],compilerVersion:i.decode(n.data[5]),payable:Boolean(n.data[6][0]),bytecode:this._bytecodeSerializer.deserialize(new Uint8Array(n.data[4]))}}}},8269:function(e){e.exports=class{constructor(e){this._valueFactory=e}get valueFactory(){return this._valueFactory}supports({_name:e,_valueTypes:t}){return!1}create(e,t){throw new Error("Not implemented.")}}},8824:function(e,t,n){const r=n(1047),i=n(4537),a=n(8269),o=["bls12_381.fr","bls12_381.fp"];e.exports=class extends a{supports({name:e,_valueTypes:t}){return o.includes(e)}create(e,t){switch(e.name){case"bls12_381.fr":return new r(t);case"bls12_381.fp":return new i(t);default:throw new Error(`Unsupported type "${e.name}"`)}}}},9310:function(e,t,n){const{symbolIdentifier:r}=n(7439),i=n(5345),a=n(3585),o=n(8269);e.exports=class extends o{supports({name:e,_valueTypes:t}){return"calldata"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate calldata arguments must be an Array, got ${t} instead`);const n=this.valueFactory.createMultiple(e.argumentTypes,t),o=r(e.functionName);return new a(o,e.argumentTypes,n)}}},6753:function(e,t,n){const r=n(6949),i=n(7412),a=n(715),o=n(5542),s=n(344),c=n(2182),u=n(9398),l=n(329),A=n(6571),d=n(7196),p=n(8824),m=n(9310);e.exports=class{constructor(){this._factories=[new a(this),new o(this),new s(this),new c(this),new u(this),new l(this),new d(this),new A(this),new p(this),new m(this)]}createMultiple(e,t){return r(t.length===e.length,`Number of types (${e.length}) and values (${t.length}) should match`),i(e,t).map((e=>this.create(...e)))}create(e,t){const n=this._factories.find((t=>t.supports(e)));return r(n,`Unsupported type "${e.name}"`),n.create(e,t)}}},7196:function(e,t,n){const{hash:r}=n(7439),{byteArray2Int:i}=n(1247),a=n(4495),o=n(8269),s=["string","signature","bytes"];e.exports=class extends o{supports({name:e,_valueTypes:t}){return"event"===e}create({variantType:e,topics:t},n){const[o,...s]=t;if("bigint"!=typeof o)throw new a(`Event name hash (first topic) should be of type "BigInt", got "${typeof o}" instead.`);const c=e.variants.map((e=>i(r(Object.keys(e)[0])))).findIndex((e=>e===o));if(-1===c)throw new a("Event name hash does not match any event variant constructor");const u=e.variants[c],l=Object.keys(u)[0],[A]=Object.values(u),d=A.map((e=>this._isData(e)?n:s.shift()));return this.valueFactory.create(e,{[l]:d})}_isData(e){return!(!s.includes(e.name)||"bytes"===e.name&&e.size<=32)}}},5542:function(e,t,n){const r=n(889),i=n(5345),a=n(8269);e.exports=class extends a{supports({name:e,_valueTypes:t}){return"list"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate list must be an Array, got ${t} instead`);const n=t.map((t=>this.valueFactory.create(e.valuesType,t)));return new r(e.valuesType,n)}}},2182:function(e,t,n){const r=n(5603),i=n(8269);e.exports=class extends i{supports({name:e,_valueTypes:t}){return"map"===e}create(e,t){const n=[];for(const r of t)n.push([this.valueFactory.create(e.keyType,r[0]),this.valueFactory.create(e.valueType,r[1])]);return new r(e.keyType,e.valueType,n)}}},715:function(e,t,n){const r=n(9512),i=n(6465),a=n(2280),o=n(1649),s=n(1143),c=n(1794),u=n(2325),l=n(9640),A=n(8767),d=n(9216),p=n(9511),m=n(3131),h=n(8269),g=["int","bool","string","bits","hash","bytes","signature","account_pubkey","contract_pubkey","channel","oracle_pubkey","oracle_query_id"];e.exports=class extends h{supports({name:e,_valueTypes:t}){return g.includes(e)}create(e,t){switch(e.name){case"int":return new r(t);case"bool":return new i(t);case"string":return new a(t);case"bits":return new u(t);case"hash":return new o(t);case"bytes":return new c(t,e.valueTypes);case"signature":return new s(t);case"account_pubkey":return new l(t);case"contract_pubkey":return new A(t);case"channel":return new d(t);case"oracle_pubkey":return new p(t);case"oracle_query_id":return new m(t);default:throw new Error(`Unsupported type "${e.name}"`)}}}},329:function(e,t,n){const r=n(8269),i=n(4899),{FateTypeRecord:a}=n(3182),o=n(5345);e.exports=class extends r{supports({name:e,_valueTypes:t}){return"record"===e}create(e,t){if("object"!=typeof t)throw new o(e.name,`Fate record must be an Object, got ${t} instead`);const n=Object.keys(t).length;if(n!==e.keys.length)throw new o(e.name,`Number of expected keys (${e.keys.length}) and actual keys (${n}) should match`);const r=e.valueTypes.map(((n,r)=>{const i=e.keys[r];return this.valueFactory.create(n,t[i])}));return 1===r.length?r[0]:new i(a(e.keys,e.valueTypes),r)}}},344:function(e,t,n){const r=n(5981),i=n(8269);e.exports=class extends i{supports({name:e,_valueTypes:t}){return"set"===e}create(e,t){const n=[];for(const r of t)n.push(this.valueFactory.create(e.valuesType,r));return new r(e.valuesType,n)}}},9398:function(e,t,n){const r=n(4899),i=n(5345),a=n(8269);e.exports=class extends a{supports({name:e,_valueTypes:t}){return"tuple"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate tuple must be an Array, got ${t} instead`);const n=e.valueTypes.map(((e,n)=>this.valueFactory.create(e,t[n])));return 1===n.length?n[0]:new r(e.valueTypes,n)}}},6571:function(e,t,n){const r=n(9560),i=n(5345),a=n(8269),o=["variant","Chain.ttl","AENS.pointee","AENSv2.pointee","AENS.name","AENSv2.name"];e.exports=class extends a{supports({name:e,_valueTypes:t}){return o.includes(e)}create(e,t){if(!this.isValid(t))throw new i(e.name,`Variant should be an object mapping constructor to array of values, got "${t}" instead`);const[n,a]=Object.entries(t)[0],o=e.variants.map((e=>{const[[,t]]=Object.entries(e);return t.length})),s=e.variants.findIndex((e=>{const[[t,r]]=Object.entries(e);return t===n}));if(-1===s)throw new i(e.name,`Unknown variant constructor: ${n}`);const[[,c]]=Object.entries(e.variants[s]);if(a.length!==c.length)throw new i(e.name,`"${n}" variant constructor expects ${c.length} argument(s) but got ${a.length} instead`);const u=this.valueFactory.createMultiple(c,a);return new r(o,s,u,c,e.variants)}isValid(e){return"object"==typeof e&&null!==e&&1===Object.entries(e).length&&Array.isArray(Object.values(e)[0])}}},4841:function(e,t,n){const r=n(9986),i=n(7776),a=n(9101),o=n(2813),s=n(8836),{FateTypeCalldata:c,FateTypeString:u}=n(3182),l=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new o,this._canonicalMapper=new s}encode(e,t,n){const{types:r,required:i}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<i)throw new l(`Non matching number of arguments. ${t} expects between ${i} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode(c(t,r),n)}decode(e,t,n){const r=this._typeResolver.getReturnType(e,t);return this._byteArrayEncoder.decodeWithType(n,r)}decodeContractByteArray(e){return this._byteArrayEncoder.decode(e)}decodeString(e){const t=new TextDecoder,n=this._apiEncoder.decodeWithType(e,"contract_bytearray");return t.decode(n)}decodeFateString(e){return this._byteArrayEncoder.decodeWithType(e,u())}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}}},7611:function(e){class t extends Error{constructor(e){super(e),this.name="EncoderError"}}e.exports=t},3541:function(e){class t extends Error{constructor(e){super("Invalid FATE prefix: 0b"+e.toString(2).padStart(8,"0")),this.name="FatePrefixError",this.prefix=e}}e.exports=t},5345:function(e){class t extends Error{constructor(e,t){super(t),this.name="FateTypeError",this.type=e}}e.exports=t},5450:function(e){class t extends Error{constructor(e){super(e),this.name="FormatError"}}e.exports=t},9520:function(e){class t extends Error{constructor(e){super(e),this.name="InternalError"}}e.exports=t},4275:function(e){class t extends Error{constructor(e){super(e),this.name="SerializerError"}}e.exports=t},4495:function(e){class t extends Error{constructor(e){super(e),this.name="TypeResolveError"}}e.exports=t},2813:function(e,t,n){const r=n(9101),i=n(6753),a=n(8836);e.exports=class{constructor(){this._dataFactory=new i,this._apiEncoder=new r,this._canonicalMapper=new a}decodeWithType(e,t){const n=this._apiEncoder.decode(e),r=this._dataFactory.create(t,n);return this._canonicalMapper.toCanonical(r)}}},7746:function(e,t,n){const r=n(6753),i=n(991);e.exports=class extends r{constructor(){super(),this._mapper=new i}create(e,t){const n=this._mapper.toInternal(e,t);return super.create(e,n)}}},5167:function(e,t,n){const r=n(6949),i=n(889),a=n(4899),{FateTypeTuple:o,FateTypeInt:s}=n(3182),c=(e,t)=>{if(0===e.length)return-1;if(0===t.length)return 1;const n=p(e.itemsType);for(let r=0;r<e.length;r++){if(void 0===t.items[r])return 1;const i=n(e.items[r],t.items[r]);if(0!==i)return i}return e.length===t.length?0:-1},u=e=>{const t=p(e);return(e,n)=>t(e.key,n.key)},l=(e,t)=>{const n=new i(s(),e.valueOf()),r=new i(s(),t.valueOf());return c(n,r)},A=(e,t)=>Number(BigInt(e)-BigInt(t)),d={int:A,bool:(e,t)=>e-t,string:(e,t)=>{const n=new TextEncoder,r=e.toString(),i=t.toString();return r.length===i.length?l(n.encode(e),n.encode(t)):r.length-i.length},bits:(e,t)=>e<0||t<0?-A(e,t):A(e,t),list:c,tuple:(e,t)=>{if(0===e.size)return-1;const n=e.size-t.size;if(0!==n)return n;for(let n=0;n<e.size;n++){const r=e.valueTypes[n],i=p(r)(e.items[n],t.items[n]);if(0!==i)return i}return 0},variant:(e,t)=>{const n=e.arities.length-t.arities.length;if(0!==n)return n;const r=new i(e.aritiesType,e.arities),s=new i(t.aritiesType,t.arities),c=p(r)(r,s);if(0!==c)return c;const u=e.tag-t.tag;return 0!==u?u:p(o())(new a(e.valueTypes,e.value),new a(t.valueTypes,t.value))},map:(e,t)=>{const n=[...e.items],r=[...t.items];n.sort(u(e.keyType)),r.sort(u(t.keyType));const i=p(e.keyType),a=p(e.valueType);for(let e=0;e<n.length;e++){if(void 0===r[e])return 1;const t=n[e],o=r[e],s=i(t.key,o.key);if(0!==s)return s;const c=a(t.value,o.value);if(0!==c)return c}return n.length===r.length?0:-1},bytes:l,account_pubkey:l,channel:l,contract_pubkey:l,oracle_query_id:l,oracle_pubkey:l},p=e=>(r(e.hasOwnProperty("name"),`Cannot determine type name of ${JSON.stringify(e)}`),r(d.hasOwnProperty(e.name),`Unsupported comparator for ${e.name}`),d[e.name]);e.exports=p},7824:function(e){e.exports=Object.freeze({0:{mnemonic:"RETURN",args:0,end:!0},1:{mnemonic:"RETURNR",args:1,end:!0},2:{mnemonic:"CALL",args:1,end:!0},3:{mnemonic:"CALL_R",args:5,end:!0},4:{mnemonic:"CALL_T",args:1,end:!0},5:{mnemonic:"CALL_GR",args:6,end:!0},6:{mnemonic:"JUMP",args:1,end:!0},7:{mnemonic:"JUMPIF",args:2,end:!0},8:{mnemonic:"SWITCH_V2",args:3,end:!0},9:{mnemonic:"SWITCH_V3",args:4,end:!0},10:{mnemonic:"SWITCH_VN",args:2,end:!0},11:{mnemonic:"CALL_VALUE",args:1,end:!1},12:{mnemonic:"PUSH",args:1,end:!1},13:{mnemonic:"DUPA",args:0,end:!1},14:{mnemonic:"DUP",args:1,end:!1},15:{mnemonic:"POP",args:1,end:!1},16:{mnemonic:"INCA",args:0,end:!1},17:{mnemonic:"INC",args:1,end:!1},18:{mnemonic:"DECA",args:0,end:!1},19:{mnemonic:"DEC",args:1,end:!1},20:{mnemonic:"ADD",args:3,end:!1},21:{mnemonic:"SUB",args:3,end:!1},22:{mnemonic:"MUL",args:3,end:!1},23:{mnemonic:"DIV",args:3,end:!1},24:{mnemonic:"MOD",args:3,end:!1},25:{mnemonic:"POW",args:3,end:!1},26:{mnemonic:"STORE",args:2,end:!1},27:{mnemonic:"SHA3",args:2,end:!1},28:{mnemonic:"SHA256",args:2,end:!1},29:{mnemonic:"BLAKE2B",args:2,end:!1},30:{mnemonic:"LT",args:3,end:!1},31:{mnemonic:"GT",args:3,end:!1},32:{mnemonic:"EQ",args:3,end:!1},33:{mnemonic:"ELT",args:3,end:!1},34:{mnemonic:"EGT",args:3,end:!1},35:{mnemonic:"NEQ",args:3,end:!1},36:{mnemonic:"AND",args:3,end:!1},37:{mnemonic:"OR",args:3,end:!1},38:{mnemonic:"NOT",args:2,end:!1},39:{mnemonic:"TUPLE",args:2,end:!1},40:{mnemonic:"ELEMENT",args:3,end:!1},41:{mnemonic:"SETELEMENT",args:4,end:!1},42:{mnemonic:"MAP_EMPTY",args:1,end:!1},43:{mnemonic:"MAP_LOOKUP",args:3,end:!1},44:{mnemonic:"MAP_LOOKUPD",args:4,end:!1},45:{mnemonic:"MAP_UPDATE",args:4,end:!1},46:{mnemonic:"MAP_DELETE",args:3,end:!1},47:{mnemonic:"MAP_MEMBER",args:3,end:!1},48:{mnemonic:"MAP_FROM_LIST",args:2,end:!1},49:{mnemonic:"MAP_SIZE",args:2,end:!1},50:{mnemonic:"MAP_TO_LIST",args:2,end:!1},51:{mnemonic:"IS_NIL",args:2,end:!1},52:{mnemonic:"CONS",args:3,end:!1},53:{mnemonic:"HD",args:2,end:!1},54:{mnemonic:"TL",args:2,end:!1},55:{mnemonic:"LENGTH",args:2,end:!1},56:{mnemonic:"NIL",args:1,end:!1},57:{mnemonic:"APPEND",args:3,end:!1},58:{mnemonic:"STR_JOIN",args:3,end:!1},59:{mnemonic:"INT_TO_STR",args:2,end:!1},60:{mnemonic:"ADDR_TO_STR",args:2,end:!1},61:{mnemonic:"STR_REVERSE",args:2,end:!1},62:{mnemonic:"STR_LENGTH",args:2,end:!1},63:{mnemonic:"BYTES_TO_INT",args:2,end:!1},64:{mnemonic:"BYTES_TO_STR",args:2,end:!1},65:{mnemonic:"BYTES_CONCAT",args:3,end:!1},66:{mnemonic:"BYTES_SPLIT",args:3,end:!1},67:{mnemonic:"INT_TO_ADDR",args:2,end:!1},68:{mnemonic:"VARIANT",args:4,end:!1},69:{mnemonic:"VARIANT_TEST",args:3,end:!1},70:{mnemonic:"VARIANT_ELEMENT",args:3,end:!1},71:{mnemonic:"BITS_NONEA",args:0,end:!1},72:{mnemonic:"BITS_NONE",args:1,end:!1},73:{mnemonic:"BITS_ALLA",args:0,end:!1},74:{mnemonic:"BITS_ALL",args:1,end:!1},75:{mnemonic:"BITS_ALL_N",args:2,end:!1},76:{mnemonic:"BITS_SET",args:3,end:!1},77:{mnemonic:"BITS_CLEAR",args:3,end:!1},78:{mnemonic:"BITS_TEST",args:3,end:!1},79:{mnemonic:"BITS_SUM",args:2,end:!1},80:{mnemonic:"BITS_OR",args:3,end:!1},81:{mnemonic:"BITS_AND",args:3,end:!1},82:{mnemonic:"BITS_DIFF",args:3,end:!1},83:{mnemonic:"BALANCE",args:1,end:!1},84:{mnemonic:"ORIGIN",args:1,end:!1},85:{mnemonic:"CALLER",args:1,end:!1},86:{mnemonic:"BLOCKHASH",args:2,end:!1},87:{mnemonic:"BENEFICIARY",args:1,end:!1},88:{mnemonic:"TIMESTAMP",args:1,end:!1},89:{mnemonic:"GENERATION",args:1,end:!1},90:{mnemonic:"MICROBLOCK",args:1,end:!1},91:{mnemonic:"DIFFICULTY",args:1,end:!1},92:{mnemonic:"GASLIMIT",args:1,end:!1},93:{mnemonic:"GAS",args:1,end:!1},94:{mnemonic:"ADDRESS",args:1,end:!1},95:{mnemonic:"GASPRICE",args:1,end:!1},96:{mnemonic:"LOG0",args:1,end:!1},97:{mnemonic:"LOG1",args:2,end:!1},98:{mnemonic:"LOG2",args:3,end:!1},99:{mnemonic:"LOG3",args:4,end:!1},100:{mnemonic:"LOG4",args:5,end:!1},101:{mnemonic:"SPEND",args:2,end:!1},102:{mnemonic:"ORACLE_REGISTER",args:7,end:!1},103:{mnemonic:"ORACLE_QUERY",args:8,end:!1},104:{mnemonic:"ORACLE_RESPOND",args:6,end:!1},105:{mnemonic:"ORACLE_EXTEND",args:3,end:!1},106:{mnemonic:"ORACLE_GET_ANSWER",args:5,end:!1},107:{mnemonic:"ORACLE_GET_QUESTION",args:5,end:!1},108:{mnemonic:"ORACLE_QUERY_FEE",args:2,end:!1},109:{mnemonic:"AENS_RESOLVE",args:4,end:!1},110:{mnemonic:"AENS_PRECLAIM",args:3,end:!1},111:{mnemonic:"AENS_CLAIM",args:5,end:!1},112:{mnemonic:"AENS_UPDATE",args:6,end:!1},113:{mnemonic:"AENS_TRANSFER",args:4,end:!1},114:{mnemonic:"AENS_REVOKE",args:3,end:!1},115:{mnemonic:"BALANCE_OTHER",args:2,end:!1},116:{mnemonic:"VERIFY_SIG",args:4,end:!1},117:{mnemonic:"VERIFY_SIG_SECP256K1",args:4,end:!1},118:{mnemonic:"CONTRACT_TO_ADDRESS",args:2,end:!1},119:{mnemonic:"AUTH_TX_HASH",args:1,end:!1},120:{mnemonic:"ORACLE_CHECK",args:4,end:!1},121:{mnemonic:"ORACLE_CHECK_QUERY",args:5,end:!1},122:{mnemonic:"IS_ORACLE",args:2,end:!1},123:{mnemonic:"IS_CONTRACT",args:2,end:!1},124:{mnemonic:"IS_PAYABLE",args:2,end:!1},125:{mnemonic:"CREATOR",args:1,end:!1},126:{mnemonic:"ECVERIFY_SECP256K1",args:4,end:!1},127:{mnemonic:"ECRECOVER_SECP256K1",args:3,end:!1},128:{mnemonic:"ADDRESS_TO_CONTRACT",args:2,end:!1},129:{mnemonic:"BLS12_381_G1_NEG",args:2,end:!1},130:{mnemonic:"BLS12_381_G1_NORM",args:2,end:!1},131:{mnemonic:"BLS12_381_G1_VALID",args:2,end:!1},132:{mnemonic:"BLS12_381_G1_IS_ZERO",args:2,end:!1},133:{mnemonic:"BLS12_381_G1_ADD",args:3,end:!1},134:{mnemonic:"BLS12_381_G1_MUL",args:3,end:!1},135:{mnemonic:"BLS12_381_G2_NEG",args:2,end:!1},136:{mnemonic:"BLS12_381_G2_NORM",args:2,end:!1},137:{mnemonic:"BLS12_381_G2_VALID",args:2,end:!1},138:{mnemonic:"BLS12_381_G2_IS_ZERO",args:2,end:!1},139:{mnemonic:"BLS12_381_G2_ADD",args:3,end:!1},140:{mnemonic:"BLS12_381_G2_MUL",args:3,end:!1},141:{mnemonic:"BLS12_381_GT_INV",args:2,end:!1},142:{mnemonic:"BLS12_381_GT_ADD",args:3,end:!1},143:{mnemonic:"BLS12_381_GT_MUL",args:3,end:!1},144:{mnemonic:"BLS12_381_GT_POW",args:3,end:!1},145:{mnemonic:"BLS12_381_GT_IS_ONE",args:2,end:!1},146:{mnemonic:"BLS12_381_PAIRING",args:3,end:!1},147:{mnemonic:"BLS12_381_MILLER_LOOP",args:3,end:!1},148:{mnemonic:"BLS12_381_FINAL_EXP",args:2,end:!1},149:{mnemonic:"BLS12_381_INT_TO_FR",args:2,end:!1},150:{mnemonic:"BLS12_381_INT_TO_FP",args:2,end:!1},151:{mnemonic:"BLS12_381_FR_TO_INT",args:2,end:!1},152:{mnemonic:"BLS12_381_FP_TO_INT",args:2,end:!1},153:{mnemonic:"AENS_LOOKUP",args:2,end:!1},154:{mnemonic:"ORACLE_EXPIRY",args:2,end:!1},155:{mnemonic:"AUTH_TX",args:1,end:!1},156:{mnemonic:"STR_TO_LIST",args:2,end:!1},157:{mnemonic:"STR_FROM_LIST",args:2,end:!1},158:{mnemonic:"STR_TO_UPPER",args:2,end:!1},159:{mnemonic:"STR_TO_LOWER",args:2,end:!1},160:{mnemonic:"CHAR_TO_INT",args:2,end:!1},161:{mnemonic:"CHAR_FROM_INT",args:2,end:!1},162:{mnemonic:"CALL_PGR",args:7,end:!0},163:{mnemonic:"CREATE",args:3,end:!0},164:{mnemonic:"CLONE",args:4,end:!0},165:{mnemonic:"CLONE_G",args:5,end:!0},166:{mnemonic:"BYTECODE_HASH",args:2,end:!1},167:{mnemonic:"FEE",args:1,end:!1},168:{mnemonic:"ADDRESS_TO_BYTES",args:2,end:!1},169:{mnemonic:"POSEIDON",args:3,end:!1},170:{mnemonic:"MULMOD",args:4,end:!1},171:{mnemonic:"BAND",args:3,end:!1},172:{mnemonic:"BOR",args:3,end:!1},173:{mnemonic:"BXOR",args:3,end:!1},174:{mnemonic:"BNOT",args:2,end:!1},175:{mnemonic:"BSL",args:3,end:!1},176:{mnemonic:"BSR",args:3,end:!1},250:{mnemonic:"DEACTIVATE",args:0,end:!1},251:{mnemonic:"ABORT",args:1,end:!0},252:{mnemonic:"EXIT",args:1,end:!0},253:{mnemonic:"NOP",args:0,end:!1},254:{mnemonic:"FUNCTION",args:0,end:!1},255:{mnemonic:"EXTEND",args:0,end:!1}})},8707:function(e){e.exports=Object.freeze({SMALL_INT:0,LONG_STRING:1,SHORT_STRING:1,SHORT_LIST:3,TYPE_INTEGER:7,TYPE_BOOLEAN:23,TYPE_LIST:39,TYPE_TUPLE:55,TYPE_OBJECT:71,TYPE_BITS:87,TYPE_MAP:103,TYPE_STRING:119,TYPE_VARIANT:135,TYPE_BYTES:151,TYPE_CONTRACT_BYTEARRAY:167,TYPE_VAR:231,TYPE_ANY:247,LONG_TUPLE:11,SHORT_TUPLE:11,LONG_LIST:31,MAP:47,EMPTY_TUPLE:63,POS_BITS:79,EMPTY_STRING:95,POS_BIG_INT:111,FALSE:127,OBJECT:159,VARIANT:175,MAP_ID:191,NEG_BITS:207,EMPTY_MAP:223,NEG_BIG_INT:239,TRUE:255,OTYPE_ADDRESS:0,OTYPE_BYTES:1,OTYPE_CONTRACT:2,OTYPE_ORACLE:3,OTYPE_ORACLE_QUERY:4,OTYPE_CHANNEL:5})},3182:function(e){const t=e=>({name:"bytes",size:e}),n=(e,t)=>({name:"map",keyType:e,valueType:t}),r=e=>({name:"variant",variants:e}),i=()=>r([{RelativeTTL:[{name:"int"}]},{FixedTTL:[{name:"int"}]}]),a=()=>r([{"AENS.AccountPt":[{name:"account_pubkey"}]},{"AENS.OraclePt":[{name:"account_pubkey"}]},{"AENS.ContractPt":[{name:"account_pubkey"}]},{"AENS.ChannelPt":[{name:"account_pubkey"}]}]),o=()=>{const e=[{"AENSv2.AccountPt":[{name:"account_pubkey"}]},{"AENSv2.OraclePt":[{name:"account_pubkey"}]},{"AENSv2.ContractPt":[{name:"account_pubkey"}]},{"AENSv2.ChannelPt":[{name:"account_pubkey"}]},{"AENSv2.DataPt":[t()]}];return r(e)};e.exports={FateTypeVoid:()=>({name:"void"}),FateTypeInt:()=>({name:"int"}),FateTypeBool:()=>({name:"bool"}),FateTypeString:()=>({name:"string"}),FateTypeBits:()=>({name:"bits"}),FateTypeBytes:t,FateTypeHash:()=>({name:"hash"}),FateTypeSignature:()=>({name:"signature"}),FateTypeAccountAddress:()=>({name:"account_pubkey"}),FateTypeContractAddress:()=>({name:"contract_pubkey"}),FateTypeChannelAddress:()=>({name:"channel"}),FateTypeOracleAddress:(e,t)=>({name:"oracle_pubkey",questionType:e,answerType:t}),FateTypeOracleQueryAddress:(e,t)=>({name:"oracle_query_id",questionType:e,answerType:t}),FateTypeByteArray:()=>({name:"byte_array"}),FateTypeList:e=>({name:"list",valuesType:e}),FateTypeTuple:(e=[])=>({name:"tuple",valueTypes:e}),FateTypeRecord:(e,t)=>({name:"record",keys:e,valueTypes:t}),FateTypeSet:e=>({name:"set",valuesType:e}),FateTypeMap:n,FateTypeVariant:r,FateTypeType:e=>({name:"type",type:e}),FateTypeOption:e=>r([{None:[]},{Some:e}]),FateTypeChainTTL:i,FateTypeChainGAMetaTx:()=>r([{"Chain.GAMetaTx":[{name:"account_pubkey"},{name:"int"}]}]),FateTypeChainPayingForTx:()=>r([{"Chain.PayingForTx":[{name:"account_pubkey"},{name:"int"}]}]),FateTypeChainBaseTx:()=>r([{"Chain.SpendTx":[{name:"account_pubkey"},{name:"int"},{name:"string"}]},{"Chain.OracleRegisterTx":[]},{"Chain.OracleQueryTx":[]},{"Chain.OracleResponseTx":[]},{"Chain.OracleExtendTx":[]},{"Chain.NamePreclaimTx":[]},{"Chain.NameClaimTx":[{name:"string"}]},{"Chain.NameUpdateTx":[{name:"hash"}]},{"Chain.NameRevokeTx":[{name:"hash"}]},{"Chain.NameTransferTx":[{name:"account_pubkey"},{name:"hash"}]},{"Chain.ChannelCreateTx":[{name:"account_pubkey"}]},{"Chain.ChannelDepositTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelWithdrawTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelForceProgressTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseMutualTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseSoloTx":[{name:"account_pubkey"}]},{"Chain.ChannelSlashTx":[{name:"account_pubkey"}]},{"Chain.ChannelSettleTx":[{name:"account_pubkey"}]},{"Chain.ChannelSnapshotSoloTx":[{name:"account_pubkey"}]},{"Chain.ContractCreateTx":[{name:"account_pubkey"}]},{"Chain.ContractCallTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.GAAttachTx":[]}]),FateTypeAENSPointee:a,FateTypeAENSv2Pointee:o,FateTypeAENSName:()=>{const e=[{"AENS.Name":[{name:"account_pubkey"},i(),n({name:"string"},a())]}];return r(e)},FateTypeAENSv2Name:()=>{const e=[{"AENSv2.Name":[{name:"account_pubkey"},i(),n({name:"string"},o())]}];return r(e)},FateTypeEvent:(e,t)=>({name:"event",variantType:e,topics:t}),FateTypeBls12381Fr:()=>({name:"bls12_381.fr"}),FateTypeBls12381Fp:()=>({name:"bls12_381.fp"}),FateTypeCalldata:(e,t)=>({name:"calldata",functionName:e,argumentTypes:t}),FateTypeVar:e=>({name:"tvar",id:e}),FateTypeAny:()=>({name:"any"})}},8836:function(e,t,n){const r=n(9101),{montBytes2Int:i}=n(2041),{byteArray2Hex:a}=n(1247);e.exports=class{constructor(){this._apiEncoder=new r}toCanonical(e){return e.accept(this)}visitData(e){return e.valueOf()}visitAddress(e){return this._apiEncoder.encode(e.name,e.value)}visitList(e){return e.items.map((e=>e.accept(this)))}visitSet(e){return new Set(e.items.map((e=>e.accept(this))))}visitMap(e){const t=new Map;for(const[n,r]of e.iterator)t.set(n.accept(this),r.accept(this));return t}visitTuple(e){return e.prepareItems((e=>e.accept(this)))}visitVariant(e){const t=e.value.map((e=>e.accept(this)));if("None"!==e.variantName)return"Some"===e.variantName?t[0]:{[e.variantName]:t}}visitBls12381Fr(e){return i(e.valueOf(),"r")}visitBls12381Fp(e){return i(e.valueOf(),"p")}visitCalldata(e){const{functionId:t,args:n}=e.valueOf();return{functionId:a(t),args:n.map((e=>e.accept(this)))}}}},991:function(e,t,n){const r=n(9101),{int2MontBytes:i}=n(2041),a=n(5345);e.exports=class{constructor(){this._apiEncoder=new r}toInternal(e,t){switch(e.name){case"account_pubkey":case"contract_pubkey":case"channel":case"oracle_pubkey":case"oracle_query_id":return this.toAddress(e,t);case"variant":return this.toVariant(e,t);case"map":return this.toMap(e,t);case"set":return this.toSet(e,t);case"record":return this.toRecord(e,t);case"bls12_381.fr":return this.toBls12381Fr(e,t);case"bls12_381.fp":return this.toBls12381Fp(e,t);default:return t}}toAddress({name:e,_:t},n){return this._apiEncoder.decodeWithType(n,e)}toVariant(e,t){if(!this.isOptionVariant(e))return t;if([void 0,null].includes(t))return{None:[]};const[n]=Object.keys(t);return["Some","None"].includes(n)?t:{Some:[t]}}isOptionVariant({_name:e,variants:t}){return t.some((({None:e})=>e&&0===e.length))&&t.some((({Some:e})=>e))}toMap(e,t){if("object"!=typeof t||null===t)throw new a("map",`Fate map must be one of: Map, Array, Object; got ${t} instead`);return Array.isArray(t)||t instanceof Map?t:Object.entries(t)}toSet(e,t){if(t instanceof Set)return t;if(Array.isArray(t))return new Set(t);throw new a("set",`Fate set must be a Set or Array, got "${t}" instead`)}toRecord(e,t){return e.keys.reduce(((e,n)=>({...e,[n]:t[n]})),{})}validateBls12381Field(e,t){if("bigint"!=typeof t&&!Number.isInteger(t))throw new a(e.name,`Should be one of: BigInt or Number; got ${t} instead`)}toBls12381Fr(e,t){return this.validateBls12381Field(e,t),i(t,"r")}toBls12381Fp(e,t){return this.validateBls12381Field(e,t),i(t,"p")}}},9945:function(e,t,n){const r=n(9291),i=n(8517),a=n(1666),o=n(5323),s=n(5499),c=n(1251),u=n(5980),l=n(7596),A=n(284),d=n(1849),p=n(8766),m=n(9737),h=n(5411),g=n(6291),f=n(1885),y=n(4157),C=n(5945),I=n(8566),w=n(2021),E=n(8950),B=n(6937),N=n(8003),b=n(4323),v=n(4275);e.exports=class extends a{constructor(){super(),this.typeFactory=new r,this._serializers={void:new m,bool:new c,int:new p,tuple:new w(this),record:new w(this),list:new h(this),set:new g(this),map:new f(this),byte_array:new u,string:new I,hash:new l,signature:new l,bits:new s,variant:new E(this),bytes:new l,account_pubkey:new o,contract_pubkey:new d,oracle_pubkey:new C,oracle_query_id:new y,channel:new A,"bls12_381.fr":new B,"bls12_381.fp":new B,calldata:new N(this),type:new b}}_getSerializer(e){if(!e.hasOwnProperty("name"))throw new v("Unsupported type: "+JSON.stringify(e));const t=e.name;if(!this._serializers.hasOwnProperty(t))throw new v("Unsupported type: "+JSON.stringify(t));return this._serializers[t]}serialize(e){if("object"!=typeof e)throw new v("Only object serialization is supported. Got: "+JSON.stringify(e));if(!(e instanceof i))throw new v("Only instances of FateData is supported.");return this._getSerializer(e).serialize(e)}deserializeWithType(e,t){if(!(e instanceof Uint8Array))throw new v("Only instances of Uint8Array is supported.");return this._getSerializer(t).deserialize(e,t)}deserialize(e){if(!(e instanceof Uint8Array))throw new v("Only instances of Uint8Array is supported.");const t=this.typeFactory.createType(e);return this.deserializeWithType(e,t)}deserializeStream(e,t){if(!(e instanceof Uint8Array))throw new v("Only instances of Uint8Array is supported.");let n=t;return void 0===t&&(n=this.typeFactory.createType(e)),this._getSerializer(n).deserializeStream(e,t)}}},5323:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),o=n(9640);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ADDRESS,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new o(n.data),new Uint8Array(n.remainder)]}}},1666:function(e,t,n){const r=n(4275);e.exports=class{constructor(e){this.globalSerializer=e}serialize(e){throw new r("Not implemented.")}deserialize(e,t){const[n,r]=this.deserializeStream(e,t);return n}deserializeStream(e,t){throw new r("Not implemented.")}}},5499:function(e,t,n){const r=n(8707),i=n(6128),a=n(2325),o=n(1666),s=n(1351);e.exports=class extends o{serialize(e){return[e.value>=0?r.POS_BITS:r.NEG_BITS,...i.encode(s(e.value))]}deserializeStream(e){const t=new Uint8Array(e),n=t[0]===r.POS_BITS?1n:-1n,[o,s]=i.decode(t.slice(1));return[new a(o*n),new Uint8Array(s)]}}},6937:function(e,t,n){const r=n(1666),i=n(7596),a=n(1047),o=n(4537),s=new i,c=(e,t)=>{switch(e.name){case"bls12_381.fr":return new a(t);case"bls12_381.fp":return new o(t);default:throw new Error(`Unsupported type "${e.name}"`)}};e.exports=class extends r{serialize(e){return s.serialize(e)}deserializeStream(e,t){const[n,r]=s.deserializeStream(e);return[c(t,n.valueOf()),r]}}},1251:function(e,t,n){const r=n(8707),i=n(6465),a=n(1666),o=n(3541);e.exports=class extends a{serialize(e){return!0===e.valueOf()?[r.TRUE]:[r.FALSE]}deserializeStream(e){const t=new Uint8Array(e),n=t[0],a=t.slice(1);if(n===r.TRUE)return[new i(!0),a];if(n===r.FALSE)return[new i(!1),a];throw new o(n)}}},5980:function(e,t,n){const r=n(8707),i=n(1666),a=n(30),o=new(n(8766));e.exports=class extends i{serialize(e){return 0===e.length?[r.EMPTY_STRING]:e.length<64?[e.length<<2|r.SHORT_STRING,...e.valueOf()]:[r.LONG_STRING,...o.serialize(e.length-64),...e.valueOf()]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(n===r.EMPTY_STRING)return[new a,t.slice(1)];if(n===r.LONG_STRING){const[e,n]=o.deserializeStream(t.slice(1)),r=Number(e.valueOf())+64;return[new a(n.slice(0,r)),n.slice(r)]}const i=1+(n>>2);return[new a(t.slice(1,i)),t.slice(i)]}}},2664:function(e,t,n){const r=n(858),i=n(1666),a=n(4323),{byteArray2Hex:o,byteArray2Int:s}=n(1247),c=n(7824),{FateTypeByteArray:u,FateTypeString:l,FateTypeMap:A}=n(3182),d={3:"immediate",2:"var",1:"arg",0:"stack"};e.exports=class extends i{constructor(e){super(e),this._typeSerializer=new a}deserialize(e){const t=r.decode(e,!0),n=r.decode(t.remainder,!0),i=r.decode(n.remainder),a=this.deserializeSymbols(n.data);return{functions:this.deserializeFunctions(t.data,a),symbols:a,annotations:this.deserializeAnnotations(i)}}deserializeFunctions(e,t){let n={},r=e;const i=[];for(;r.length;)[n,r]=this.deserializeFunction(r,t),i.push(n);return i}deserializeFunction(e,t){const n=e[0],r=o(e.slice(1,5));if(254!==n)throw new Error(`Wrong function prefix, expeted 0xfe got 0x${e[0].toString(16)}`);const i=t[r],[a,s]=this.deserializeAttributes(e.slice(5)),[c,u,l]=this.deserializeSignature(s),[A,d]=this.deserializeInstructions(l);return[{id:r,name:i,attributes:a,args:c,returnType:u,instructions:A},d]}deserializeInstructions(e){let t={},n=e;const r=[];let i=0,a=!1;for(;n.length&&254!==n[0];)void 0===r[i]&&(r[i]=[]),[t,n,a]=this.deserializeInstruction(n),r[i].push(t),a&&i++;return[r,n]}deserializeInstruction(e){const t=e[0],n=e.slice(1);if(!c.hasOwnProperty(t))throw new Error(`Unsupported opcode: 0x${t.toString(16)}`);const r=c[t],{mnemonic:i,end:a}=r;if(0===r.args)return[{mnemonic:i,args:[]},n,a];const[o,s]=this.deserializeArguments(n,r.args);return[{mnemonic:i,args:o},s,a]}deserializeArguments(e,t){const n=t<=4?1:2,r=e.subarray(0,n),i=e.slice(n),a=((e,t=1)=>{const n=[];let r=Number(s(e));for(let e=0;e<2*t;e+=2)n.push(3&r),r>>=2;if(0!==r)throw new Error(`Invalid argument modifier data. Unexpected padding: 0b${r.toString(2)}`);return n})(r,t),o=[];let c,u=i;return a.forEach((e=>{[c,u]=this.deserializeArgument(e,u),o.push(c)})),[o,u]}deserializeArgument(e,t){const n=d[e];if("stack"===n)return[{mod:n,arg:0},t];const[r,i]=this.globalSerializer.deserializeStream(t);return[{mod:n,arg:r.valueOf()},i]}deserializeSignature(e){const[t,n]=this._typeSerializer.deserializeStream(e),[r,i]=this._typeSerializer.deserializeStream(n);return[t,r,i]}deserializeAttributes(e){const[t,n]=this.globalSerializer.deserializeStream(e),r=Number(t.valueOf()),i=[];return 1&r&&i.push("private"),2&r&&i.push("payable"),[i,n]}deserializeSymbols(e){const t=A(u(),l()),n=this.globalSerializer.deserializeWithType(e,t).valueOf(),r={};return n.forEach(((e,t)=>{const n=o(t);r[n]=e})),r}deserializeAnnotations(e){return this.globalSerializer.deserialize(e).valueOf()}}},7596:function(e,t,n){const r=n(8707),i=n(5980),a=n(1794),o=n(1666),s=new i;e.exports=class extends o{serialize(e){return[r.OBJECT,r.OTYPE_BYTES,...s.serialize(e.value)]}deserializeStream(e){const t=new Uint8Array(e),[n,r]=s.deserializeStream(t.slice(2));return[new a(n.valueOf()),r]}}},8003:function(e,t,n){const r=n(4899),i=n(3585),a=n(30),o=n(1666),{FateTypeTuple:s,FateTypeByteArray:c}=n(3182);e.exports=class extends o{serialize(e){const t=new a(e.functionId),n=new r(e.argTypes,e.args),i=new r([t.type,n.type],[t,n]);return this.globalSerializer.serialize(i)}deserialize(e,t){const n=s([c(),s(t.argumentTypes)]),[r]=this.globalSerializer.deserializeStream(e,n),[a,o]=r.items;return new i(a.valueOf(),o.valueTypes,o.items)}}},284:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),o=n(9216);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_CHANNEL,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new o(n.data),new Uint8Array(n.remainder)]}}},1849:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),o=n(8767);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_CONTRACT,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new o(n.data),new Uint8Array(n.remainder)]}}},8766:function(e,t,n){const r=n(8707),i=n(6128),a=n(9512),o=n(1666),s=n(3541),c=n(1351);e.exports=class extends o{serialize(e){const t=e instanceof a?e.value:BigInt(e),n=c(t);if(n<64){const e=Number(n);return t>=0?[e<<1]:[254&(128|e<<1)]}return t<0?[r.NEG_BIG_INT,...i.encode(n-64n)]:[r.POS_BIG_INT,...i.encode(n-64n)]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(0==(1&n))return 0==(128&n)?[new a(n>>1),t.slice(1)]:[new a(-((126&n)>>1)),t.slice(1)];if(n===r.POS_BIG_INT||n===r.NEG_BIG_INT){const e=n===r.POS_BIG_INT?1n:-1n,[o,s]=i.decode(t.slice(1));return[new a((o+64n)*e),new Uint8Array(s)]}throw new s(n)}}},5411:function(e,t,n){const r=n(6128),i=n(8707),a=n(889),o=n(1666);e.exports=class extends o{serialize(e){const t=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0),n=e.items.length;return n<16?[n<<4|i.SHORT_LIST,...t]:[i.LONG_LIST,...r.encode(n-16),...t]}deserializeStream(e,t){const n=new Uint8Array(e),o=n[0];let s,c,u=0n,l=n.slice(1);o===i.LONG_LIST&&([u,l]=r.decode(n.slice(1)),u+=16n),(15&o)===i.SHORT_LIST&&(u=BigInt((240&o)>>4)),void 0!==t&&(s=t.valuesType);const A=[];for(let e=0n;e<u;e++)[c,l]=this.globalSerializer.deserializeStream(l,s),A.push(c);return 0n===u?[new a,l]:(void 0===t&&(s=A[0].type),[new a(s,A),l])}}},1885:function(e,t,n){const r=n(8707),i=n(6128),a=n(1666),o=n(5167),s=n(5603),c=n(3541);e.exports=class extends a{serialize(e){const t=e.length,n=o(e.keyType),a=[...e.items];a.sort(((e,t)=>n(e.key,t.key)));const s=a.map((e=>[this.globalSerializer.serialize(e.key),this.globalSerializer.serialize(e.value)]));return[r.MAP,...i.encode(t),...s.flat(1/0)]}deserializeStream(e,t){const n=new Uint8Array(e),a=n[0];if(a!==r.MAP)throw new c(a);const[o,u]=i.decode(n.slice(1));let l,A,d=u;if(0n===o)return[new s,d];void 0!==t&&({keyType:l,valueType:A}=t);const p=[];for(let e=0n;e<o;e++){const[e,t]=this.globalSerializer.deserializeStream(d,l),[n,r]=this.globalSerializer.deserializeStream(t,A);p.push([e,n]),d=r}const m=p[0];return void 0===t&&(l=m[0].type,A=m[1].type),[new s(l,A,p),d]}}},4157:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),o=n(3131);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ORACLE_QUERY,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new o(n.data),new Uint8Array(n.remainder)]}}},5945:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),o=n(9511);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ORACLE,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new o(n.data),new Uint8Array(n.remainder)]}}},6291:function(e,t,n){const r=n(1666),{FateTypeTuple:i,FateTypeMap:a}=n(3182),o=n(5603),s=n(4899),c=n(5981);e.exports=class extends r{serialize(e){return this.globalSerializer.serialize(new o(e.itemsType,i(),e.items.map((e=>[e,new s]))))}deserializeStream(e,t){const n=a(t.valuesType,i()),[r,o]=this.globalSerializer.deserializeStream(e,n);return[new c(t.valuesType,r.keys),o]}}},8566:function(e,t,n){const r=n(8707),i=n(1666),a=n(5980),o=n(2280),s=n(3541),c=new a;e.exports=class extends i{serialize(e){const t=(new TextEncoder).encode(e);return c.serialize(t)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if((3&n)!==r.SHORT_STRING&&![r.EMPTY_STRING,r.LONG_STRING].includes(n))throw new s(n);const i=new TextDecoder,[a,u]=c.deserializeStream(t);return[new o(i.decode(a.valueOf())),u]}}},2021:function(e,t,n){const r=n(8707),i=n(4899),a=n(1666),o=n(6128);e.exports=class extends a{serialize(e){const t=e.size;if(0===t)return[r.EMPTY_TUPLE];const n=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0);return t<16?[t<<4|r.SHORT_TUPLE,...n]:[r.LONG_TUPLE,...o.encode(t-16),...n]}deserializeStream(e,t){const n=new Uint8Array(e),a=n[0];let s=0n,c=n.slice(1);if(a===r.EMPTY_TUPLE)return[new i,c];(15&a)===r.SHORT_TUPLE&&(s=(240&a)>>4),a===r.LONG_TUPLE&&([s,c]=o.decode(n.slice(1)),s+=16n);let u=[];void 0!==t&&(u=t.valueTypes);const l=[];let A=null;for(let e=0n;e<s;e++)[A,c]=this.globalSerializer.deserializeStream(c,u[e]),l.push(A);let d=t;return void 0===t&&(d=l.map((e=>e.type))),[new i(d,l),c]}}},4323:function(e,t,n){const r=n(8707),i=n(1666),a=n(8766),o=n(3541),{FateTypeInt:s,FateTypeBool:c,FateTypeString:u,FateTypeBits:l,FateTypeBytes:A,FateTypeAccountAddress:d,FateTypeContractAddress:p,FateTypeOracleAddress:m,FateTypeOracleQueryAddress:h,FateTypeChannelAddress:g,FateTypeList:f,FateTypeMap:y,FateTypeTuple:C,FateTypeVariant:I,FateTypeVar:w,FateTypeAny:E}=n(3182),B={[r.TYPE_INTEGER]:s(),[r.TYPE_BOOLEAN]:c(),[r.TYPE_BITS]:l(),[r.TYPE_STRING]:u(),[r.TYPE_ANY]:E()},N={[r.OTYPE_ADDRESS]:d(),[r.OTYPE_CONTRACT]:p(),[r.OTYPE_ORACLE]:m(),[r.OTYPE_ORACLE_QUERY]:h(),[r.OTYPE_CHANNEL]:g()};e.exports=class extends i{constructor(e){super(e),this._intSerializer=new a}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(B.hasOwnProperty(n))return[B[n],t.slice(1)];if(n===r.TYPE_OBJECT){const e=t[1];if(!N.hasOwnProperty(e))throw new o(e,"Unsupported object type");return[N[e],t.slice(2)]}if(n===r.TYPE_VAR)return[w(t[1]),t.slice(2)];if(n===r.TYPE_BYTES){const[e,n]=this._intSerializer.deserializeStream(t.slice(1));return[A(e.valueOf()),n]}if(n===r.TYPE_LIST){const[e,n]=this.deserializeStream(t.slice(1));return[f(e),n]}if(n===r.TYPE_MAP){const[e,n]=this.deserializeStream(t.slice(1)),[r,i]=this.deserializeStream(n);return[y(e,r),i]}if(n===r.TYPE_TUPLE){const e=t[1],n=[];let r,i=t.slice(2);for(let t=0;t<e;t++)[r,i]=this.deserializeStream(i),n.push(r);return[C(n),i]}if(n===r.TYPE_VARIANT){const e=t[1],n=[];let r,i=t.slice(2);for(let t=0;t<e;t++)[r,i]=this.deserializeStream(i),n.push(r);return[I(n),i]}throw new o(n)}}},8950:function(e,t,n){const r=n(858),i=n(8707),a=n(4899),o=n(9560),{FateTypeTuple:s}=n(3182),c=n(1666);e.exports=class extends c{serialize(e){const t=new a(e.valueTypes,e.value);return[i.VARIANT,...r.encode(new Uint8Array(e.arities)),e.tag,...this.globalSerializer.serialize(t)]}deserializeStream(e,t){const n=new Uint8Array(e),i=r.decode(n.slice(1),!0),a=[...i.data],c=i.remainder[0],u=i.remainder.slice(1);let l,A=[];void 0!==t&&void 0!==t.variants&&(A=t.variants,l=s(Object.values(A[c])[0]));const[d,p]=this.globalSerializer.deserializeStream(u,l);return[new o(a,c,d.items,d.valueTypes,A),p]}}},9737:function(e,t,n){const r=n(4779),i=n(1666);e.exports=class extends i{serialize(){return""}deserialize(){return new r}deserializeStream(e){return[new r,e]}}},9291:function(e,t,n){const r=n(6949),i=n(8707),a=n(3541),{FateTypeInt:o,FateTypeBool:s,FateTypeString:c,FateTypeBits:u,FateTypeBytes:l,FateTypeAccountAddress:A,FateTypeContractAddress:d,FateTypeOracleAddress:p,FateTypeOracleQueryAddress:m,FateTypeChannelAddress:h,FateTypeList:g,FateTypeMap:f,FateTypeTuple:y,FateTypeVariant:C,FateTypeType:I}=n(3182),w={[i.OTYPE_ADDRESS]:A(),[i.OTYPE_BYTES]:l(),[i.OTYPE_CONTRACT]:d(),[i.OTYPE_ORACLE]:p(),[i.OTYPE_ORACLE_QUERY]:m(),[i.OTYPE_CHANNEL]:h()};e.exports=class{createType(e){const t=e[0];if(t===i.TRUE||t===i.FALSE)return s();if((1&t)===i.SMALL_INT||t===i.POS_BIG_INT||t===i.NEG_BIG_INT)return o();if((3&t)===i.SHORT_STRING||t===i.LONG_STRING||t===i.EMPTY_STRING)return c();if((15&t)===i.SHORT_LIST||t===i.LONG_LIST)return g();if((15&t)===i.SHORT_TUPLE||t===i.LONG_TUPLE||t===i.EMPTY_TUPLE)return y();if(t===i.MAP||t===i.EMPTY_MAP)return f();if(t===i.POS_BITS||t===i.NEG_BITS)return u();if(t===i.VARIANT)return C();if(t===i.OBJECT){const t=e[1];return r(w.hasOwnProperty(t),`Unsupported object type "${t}"`),w[t]}if(t===i.TYPE_INTEGER||t===i.TYPE_BOOLEAN||t===i.TYPE_LIST||t===i.TYPE_TUPLE||t===i.TYPE_OBJECT||t===i.TYPE_BITS||t===i.TYPE_MAP||t===i.TYPE_STRING||t===i.TYPE_VARIANT||t===i.TYPE_BYTES||t===i.TYPE_CONTRACT_BYTEARRAY||t===i.TYPE_VAR||t===i.TYPE_ANY)return I();throw new a(t)}}},7815:function(e,t,n){const r=n(4495),{FateTypeVoid:i,FateTypeInt:a,FateTypeBool:o,FateTypeString:s,FateTypeBits:c,FateTypeBytes:u,FateTypeHash:l,FateTypeSignature:A,FateTypeAccountAddress:d,FateTypeContractAddress:p,FateTypeOracleAddress:m,FateTypeOracleQueryAddress:h,FateTypeList:g,FateTypeMap:f,FateTypeTuple:y,FateTypeRecord:C,FateTypeSet:I,FateTypeVariant:w,FateTypeOption:E,FateTypeChainTTL:B,FateTypeChainGAMetaTx:N,FateTypeChainPayingForTx:b,FateTypeChainBaseTx:v,FateTypeAENSPointee:S,FateTypeAENSv2Pointee:T,FateTypeAENSName:x,FateTypeAENSv2Name:_,FateTypeBls12381Fr:Q,FateTypeBls12381Fp:P}=n(3182);e.exports=class{isCustomType(){return!1}resolveTypeDef(e,t){return[e,t]}resolveValueTypes(e,t){return Array.isArray(e)?e.map((e=>{const n=e.hasOwnProperty("type")?e.type:e,r=t.hasOwnProperty(n)?t[n]:n;return this.resolveType(r,t)})):[]}resolveType(e,t={}){let n=e,w=[],z=[];var R;if((R=e)&&"object"==typeof R&&R.constructor===Object&&([[n,w]]=Object.entries(e)),this.isCustomType(n)){const[e,t]=this.resolveTypeDef(n,w);return this.resolveType(e,t)}if("variant"!==n&&(z=this.resolveValueTypes(w,t)),"void"===n)return i();if("unit"===n)return y([]);if("int"===n)return a();if("bool"===n)return o();if("string"===n)return s();if("bits"===n)return c();if("hash"===n)return l();if("signature"===n)return A();if("address"===n)return d();if("contract_pubkey"===n)return p();if("Chain.ttl"===n)return B();if("Chain.ga_meta_tx"===n)return N();if("Chain.paying_for_tx"===n)return b();if("Chain.base_tx"===n)return v();if("AENS.pointee"===n)return S();if("AENSv2.pointee"===n)return T();if("AENS.name"===n)return x();if("AENSv2.name"===n)return _();if("Set.set"===n)return I(...z);if("MCL_BLS12_381.fr"===n)return Q();if("MCL_BLS12_381.fp"===n)return P();if("bytes"===n)return u("any"===w?void 0:w);if("list"===n)return g(...z);if("map"===n)return f(...z);if(("tuple"===n||"record"===n)&&1===z.length)return z[0];if("tuple"===n)return y(z);if("record"===n){const e=w.map((e=>e.name));return C(e,z)}if("variant"===n)return this.resolveVariant(w,t);if("option"===n)return E(z);if("oracle"===n)return m(...z);if("oracle_query"===n)return h(...z);throw new r("Cannot resolve type: "+JSON.stringify(e))}resolveVariant(e,t){const n=e.map((e=>{const[[n,r]]=Object.entries(e);return{[n]:r.map((e=>{const n=t.hasOwnProperty(e)?t[e]:e;return this.resolveType(n,t)}))}}));return w(n)}}},5711:function(e,t,n){const r=n(9226);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encodeCall(e,t,n){return this._internalEncoder.encodeCall(e,t,n)}decodeCall(e,t,n){return this._internalEncoder.decodeCall(e,t,n)}decodeResult(e,t,n,r="ok"){return this._internalEncoder.decodeResult(e,t,n,r)}decodeEvent(e,t,n){return this._internalEncoder.decodeEvent(e,t,n)}}},1877:function(e,t,n){const r=n(146);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encodeCall(e,t){return this._internalEncoder.encodeCall(e,t)}decodeCall(e){return this._internalEncoder.decodeCall(e)}decodeResult(e,t="ok"){return this._internalEncoder.decodeResult(e,t)}}},4747:function(e,t,n){const r=n(9986);e.exports=class{constructor(){this._internalEncoder=new r}encodeWithType(e,t){return this._internalEncoder.encode(t,e)}decode(e){return this._internalEncoder.decode(e)}decodeWithType(e,t){return this._internalEncoder.decodeWithType(e,t)}}},9316:function(e,t,n){const r=n(9479);e.exports=class{constructor(){this._internalEncoder=new r}decode(e){return this._internalEncoder.decode(e)}}},3442:function(e,t,n){const r=n(4841);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encode(e,t,n){return this._internalEncoder.encode(e,t,n)}decode(e,t,n){return this._internalEncoder.decode(e,t,n)}decodeContractByteArray(e){return this._internalEncoder.decodeContractByteArray(e)}decodeString(e){return this._internalEncoder.decodeString(e)}decodeFateString(e){return this._internalEncoder.decodeFateString(e)}decodeEvent(e,t,n){return this._internalEncoder.decodeEvent(e,t,n)}}},6278:function(e,t,n){const r=n(9101);e.exports=class{constructor(){this._internalEncoder=new r}encode(e,t){return this._internalEncoder.encode(e,t)}decode(e){return this._internalEncoder.decode(e)}}},9102:function(e,t,n){const r=n(7815);e.exports=class{constructor(){this._internalResolver=new r}resolveType(e,t={}){return this._internalResolver.resolveType(e,t)}}},6176:function(e,t,n){const r=n(3442),i=n(5711),a=n(1877),o=n(4747),s=n(6278),c=n(9316),u=n(9102);e.exports={Encoder:r,AciContractCallEncoder:i,BytecodeContractCallEncoder:a,ContractByteArrayEncoder:o,FateApiEncoder:s,ContractEncoder:c,TypeResolver:u}},9640:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"account_pubkey","ak")}}},3533:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e,t,n){super(e,32,t),this._prefix=n}get prefix(){return this._prefix}accept(e){return e.visitAddress(this)}}},2325:function(e,t,n){const r=n(8517);e.exports=class extends r{constructor(e){super("bits"),this._value=BigInt(e)}get value(){return this._value}valueOf(){return this._value}}},6859:function(e,t,n){const r=n(8517),i=n(5345);e.exports=class extends r{constructor(e,t,n){if(super(n),!Array.isArray(e)&&!ArrayBuffer.isView(e))throw new i(n,`Should be one of: Array or ArrayBuffer; got ${e} instead`);const r=new Uint8Array(e);if(r.byteLength!==t)throw new i(n,`Invalid length: got ${r.byteLength} bytes instead of ${t} bytes`);this._value=r,this._size=t}get value(){return this._value}get size(){return this._size}valueOf(){return this._value}}},4537:function(e,t,n){const r=n(6859),{FateTypeBls12381Fp:i}=n(3182);e.exports=class extends r{constructor(e){super(e,48,"bls12_381.fp")}get type(){return i()}accept(e){return e.visitBls12381Fp(this)}}},1047:function(e,t,n){const r=n(6859),{FateTypeBls12381Fr:i}=n(3182);e.exports=class extends r{constructor(e){super(e,32,"bls12_381.fr")}get type(){return i()}accept(e){return e.visitBls12381Fr(this)}}},6465:function(e,t,n){const r=n(8517),{FateTypeBool:i}=n(3182);e.exports=class extends r{constructor(e){super("bool"),this._value=!!e}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},30:function(e,t,n){const r=n(8517),{FateTypeByteArray:i}=n(3182);e.exports=class extends r{constructor(e=[]){super("byte_array"),this._value=new Uint8Array(e)}get length(){return this._value.length}get type(){return i()}valueOf(){return this._value}}},1794:function(e,t,n){const r=n(8517),{int2ByteArray:i}=n(1247),a=n(6423),o=n(5345);e.exports=class extends r{constructor(e,t,n="bytes"){if(super(n),this._value=((e,t=0)=>{if(Array.isArray(e)||ArrayBuffer.isView(e))return new Uint8Array(e);if("string"==typeof e)return a(e);if("bigint"!=typeof e&&!Number.isInteger(e))throw new o("byte_array",`Should be one of: Array, ArrayBuffer, hex string, Number, BigInt; got ${e} instead`);const n=i(e);if(n.length>=t)return n;const r=new Uint8Array(t);return r.set(n,t-n.length),r})(e,t),t&&this._value.byteLength!==t)throw new o(n,`Invalid length: got ${this._value.byteLength} bytes instead of ${t} bytes`);this._size=t}get value(){return this._value}get size(){return this._size}valueOf(){return this._value}}},3585:function(e,t,n){const r=n(8517);e.exports=class extends r{constructor(e,t,n){super("calldata"),this._functionId=new Uint8Array(e),this._argTypes=t,this._args=n}get functionId(){return this._functionId}get argTypes(){return this._argTypes}get args(){return this._args}valueOf(){return{functionId:this._functionId,args:this._args}}accept(e){return e.visitCalldata(this)}}},9216:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"channel","ch")}}},8767:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"contract_pubkey","ct")}}},8517:function(e,t,n){const r=n(9520);e.exports=class{constructor(e){this.name=e}valueOf(){throw new r("Not implemented.")}accept(e){return e.visitData(this)}}},1649:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e){super(e,32,"hash")}}},9512:function(e,t,n){const r=n(8517),{FateTypeInt:i}=n(3182);e.exports=class extends r{constructor(e){super("int"),this._value=BigInt(e)}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},889:function(e,t,n){const r=n(8517),{FateTypeList:i}=n(3182);e.exports=class extends r{constructor(e,t=[]){super("list"),this._itemsType=e,this.items=Array.from(t)}get itemsType(){return this._itemsType}get type(){return i(this.itemsType)}get length(){return this.items.length}valueOf(){return this.items.map((e=>e.valueOf()))}accept(e){return e.visitList(this)}}},5603:function(e,t,n){const r=n(8517),{FateTypeMap:i}=n(3182),a=e=>{const[t,n]=e;return{key:t,value:n}};e.exports=class extends r{constructor(e,t,n=[]){super("map"),this._keyType=e,this._valueType=t,this._type=i(e,t),this._value=new Map(n)}get items(){return[...this._value.entries()].map(a)}get keyType(){return this._keyType}get valueType(){return this._valueType}get type(){return this._type}get length(){return this._value.size}get iterator(){return this._value[Symbol.iterator]()}get keys(){return this._value.keys()}valueOf(){const e=new Map;for(const[t,n]of this.iterator)e.set(t.valueOf(),n.valueOf());return e}accept(e){return e.visitMap(this)}}},9511:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"oracle_pubkey","ok")}}},3131:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"oracle_query_id","oq")}}},5981:function(e,t,n){const r=n(8517),{FateTypeSet:i}=n(3182);e.exports=class extends r{constructor(e,t=[]){super("set"),this._itemsType=e,this._items=new Set(t)}get items(){return Array.from(this._items.values())}get itemsType(){return this._itemsType}get type(){return i(this.itemsType)}get length(){return this._items.size}valueOf(){return new Set(this.items.map((e=>e.valueOf())))}accept(e){return e.visitSet(this)}}},1143:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e){super(e,64,"signature")}}},2280:function(e,t,n){const r=n(8517),{FateTypeString:i}=n(3182);e.exports=class extends r{constructor(e){var t;super("string"),this._value=(t=e)instanceof Uint8Array?(new TextDecoder).decode(t):t.toString()}get type(){return i()}toString(){return this._value}valueOf(){return this._value}}},4899:function(e,t,n){const r=n(8517),{FateTypeTuple:i}=n(3182);e.exports=class extends r{constructor(e=[],t=[]){super("tuple"),this._valueTypes=e.hasOwnProperty("valueTypes")?e.valueTypes:e,this._type=Array.isArray(e)?i(e):e,this._items=Array.from(t)}get valueTypes(){return this._valueTypes}get type(){return this._type}get size(){return this._items.length}get items(){return this._items}valueOf(){return this.prepareItems((e=>e.valueOf()))}prepareItems(e){const t=this._items.map(e);return"record"===this._type.name?(n=this._type.keys,r=t,n.reduce(((e,t,n)=>(e[t]=r[n],e)),{})):t;var n,r}accept(e){return e.visitTuple(this)}}},9560:function(e,t,n){const r=n(8517),{FateTypeVariant:i,FateTypeTuple:a,FateTypeInt:o}=n(3182);e.exports=class extends r{constructor(e,t,n=[],r=[],a=[]){super("variant"),this.arities=Array.from(e),this._tag=t,this._value=n,this._valueTypes=r,this._type=i(a)}get valueTypes(){return this._valueTypes}get type(){return this._type}get tag(){return this._tag}get value(){return this._value}get aritiesType(){return o()}get variantType(){return a(this._valueTypes)}get variants(){return this._type.variants}get variantName(){if(0===this.variants.length)return this.tag;const e=this.variants[this.tag];return Object.keys(e)[0]}valueOf(){if(0===this.variants.length)return this;const e=this._value.map((e=>e.valueOf()));return{[this.variantName]:e}}accept(e){return e.visitVariant(this)}}},4779:function(e,t,n){const r=n(8517),{FateTypeVoid:i}=n(3182);e.exports=class extends r{constructor(){super("void"),this._value=void 0}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},6128:function(e,t,n){const r=n(858),{int2ByteArray:i,byteArray2Int:a}=n(1247);e.exports={encode(e){return new Uint8Array(r.encode(i(e)))},decode(e){const t=r.decode(e,!0);return[a(t.data),t.remainder]}}},1351:function(e){e.exports=e=>e>0?e:-1n*e},6949:function(e,t,n){const r=n(9520);e.exports=(e,t)=>{if(!e)throw new r(t)}},6911:function(e,t,n){const r=n(6763),{addChecksum:i,getPayload:a}=n(2122);e.exports={encode:e=>r.encode(i(e)),decode:e=>a(r.decode(e))}},2122:function(e,t,n){const r=n(4107),{Buffer:i}=n(2861),a=n(5450),o=e=>(new r).update(e).digest(),s=e=>o(o(e)).slice(0,4),c=e=>{const t=i.from(e),n=s(e);return i.concat([t,n],t.length+4)},u=e=>{const t=i.from(e),n=t.slice(0,-4),r=t.slice(-4),o=s(n);if(!r.equals(o))throw new a("Invalid checksum");return new Uint8Array(n)};e.exports={addChecksum:c,getPayload:u,encode:e=>c(e).toString("base64"),decode:e=>{const t=i.from(e,"base64");return u(t)}}},2041:function(e,t,n){const{int2ByteArray:r,byteArray2IntBE:i}=n(1247),a={r:{R:1n<<256n,N:0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001n},p:{R:1n<<384n,N:0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn}},o=(e,t)=>{if(0n===t)return[1n,0n,e];const[n,r,i]=o(t,e%t);return[r,n-r*(e/t),i]};e.exports={int2MontBytes:(e,t)=>{const n=a[t],i=BigInt(e)*n.R%n.N;return r(i)},montBytes2Int:(e,t)=>{const n=a[t],r=i(e),s=((e,t)=>{const[n,r,i]=o(e,t);return(n+t)%t})(n.R,n.N);return r*s%n.N}}},7439:function(e,t,n){const r=n(4156),i=e=>Array.from(r.blake2b(e,null,32));e.exports={hash:i,symbolIdentifier:e=>i(e).slice(0,4)}},6423:function(e,t,n){const r=n(5450);e.exports=e=>{const t=e.match(/^(0x)?([a-f0-9]*)$/i);if(!t)throw new r(`Invalid hex string: ${e}`);return new Uint8Array(t[2].split(/(.{1,2})/).filter((e=>e)).map((e=>parseInt(e,16))))}},1247:function(e){const t=e=>{const n=BigInt(e);return n<256n?new Uint8Array([Number(n)]):new Uint8Array([...t(n>>8n),Number(0xffn&n)])},n=e=>[...e].map((e=>e.toString(16).padStart(2,"0")));e.exports={int2ByteArray:t,byteArray2Int:e=>{const t=n(e);return BigInt("0x"+t.join(""))},byteArray2IntBE:e=>{const t=n(e).reverse();return BigInt("0x"+t.join(""))},byteArray2Hex:e=>n(e).join("")}},7412:function(e){e.exports=(e,...t)=>e.map(((e,n)=>t.reduce(((e,t)=>[...e,t[n]]),[e])))},9424:function(e,t,n){var r=n(8287).Buffer;e.exports=(()=>{var e={721:function(e,t){e.exports="AGFzbQEAAAABkwESYAF/AX9gA39/fwF/YAJ/fwBgAn9/AX9gAX8AYAR/f39/AX9gA39/fwBgBH9/f38AYAJ/fgBgAn5/AX5gAn5+AX5gBX9/f39/AGAAAGAGf3x/f39/AX9gCH9/f39/f39/AX9gEX9/f39/f39/f39/f39/f39/AX9gBn9/f39/fwF/YA1/f39/f39/f39/f39/AX8CDQIBYQFhAAABYQFiAAEDPTwJCgECAQIEAAABAAsGAAEHAQIAAwICAwIIAAIDAAcMAwYABQAEBgAABQUAAQECBAEBCAABDg8EEAAFEQMEBQFwAQMDBQcBAYAC//8BBgkBfwFBoKLAAgsHMQwBYwIAAWQAIAFlADwBZgAJAWcACAFoADsBaQA6AWoAOQFrAQABbAA3AW0ANgFuADQJCAEAQQELAgs1CoeyATwIACAAIAGtigseACAAIAF8IABCAYZC/v///x+DIAFC/////w+DfnwLgQQBA38gAkGABE8EQCAAIAEgAhABGiAADwsgACACaiEDAkAgACABc0EDcUUEQAJAIABBA3FFBEAgACECDAELIAJFBEAgACECDAELIAAhAgNAIAIgAS0AADoAACABQQFqIQEgAkEBaiICQQNxRQ0BIAIgA0kNAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgACADQQRrIgRLBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsZAAJAIABFDQBB8BwoAgBF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dGogB0EKdGohByABIAhBCnRqIQkCQCADKAIEQRBGBEAgASACQQp0aiAHIAlBABARDAELIAEgAkEKdGohASAEKAIARQRAIAEgByAJQQAQEQwBCyABIAcgCUEBEBELIApBAWoiCiADKAIQTw0BIAhBAWohCCACQQFqIQEgAygCFCECDAALAAsgBkGAGGokACADKAIYIgUhAiAMQQFqIgwgBUkNAAsLIAIhASALQQFqIgtBBEcNAAsgDUEBaiINIAMoAghJDQALCyAEQSBqJABBACEBCyABIgINACMAQYAQayIBJAAgAEUgA0VyRQRAIAFBgAhqIAMoAgAgAygCFEEKdGpBgAhrEBcgAygCGEECTwRAQQEhAgNAIAFBgAhqIAMoAgAgAygCFCIEIAIgBGxqQQp0akGACGsQFiACQQFqIgIgAygCGEkNAAsLIAFBgAhqIQRBACECA0AgASACQQN0IgVqIAQgBWopAwAQMyACQQFqIgJBgAFHDQALIAAoAgAgACgCBCABQYAIEB8gBEGACBAFIAFBgAgQBSADKAIAIgIgAygCDEEKdCIEEAUCQCAAKAJAIgAEQCACIAQgABECAAwBCyACEAgLCyABQYAQaiQAQQAhAgsgA0EwaiQAIAILJwEBfwJAAkACQAJAIAAOAwABAgMLQdATDwtBixEPC0GeEyEBCyABC48DAQF/IwBBgANrIgQkACAEQQA2AowBIARBjAFqIAEQBwJAIAFBwABNBEAgBEGQAWogARAYQQBIDQEgBEGQAWogBEGMAWpBBBAGQQBIDQEgBEGQAWogAiADEAZBAEgNASAEQZABaiAAIAEQEhoMAQsgBEGQAWpBwAAQGEEASA0AIARBkAFqIARBjAFqQQQQBkEASA0AIARBkAFqIAIgAxAGQQBIDQAgBEGQAWogBEFAa0HAABASQQBIDQAgACAEKQNANwAAIAAgBCkDSDcACCAAIAQpA1g3ABggACAEKQNQNwAQIABBIGohACABQSBrIgJBwQBPBEADQCAEIARBQGtBwAAQBCIBQUBrQcAAIAEQMkEASA0CIAAgASkDQDcAACAAIAEpA0g3AAggACAEKQNYNwAYIAAgBCkDUDcAECAAQSBqIQAgAkEgayICQcAASw0ACwsgBCAEQUBrQcAAEAQiAUFAayACIAEQMkEASA0AIAAgAUFAayACEAQaCyAEQZABakHwARAFIARBgANqJAALEwBBjB5BnB02AgBBxB1BKjYCAAuXAgAgAEUEQEEADwsCfwJAIAAEfyABQf8ATQ0BAkBBjB4oAgAoAgBFBEAgAUGAf3FBgL8DRg0DDAELIAFB/w9NBEAgACABQT9xQYABcjoAASAAIAFBBnZBwAFyOgAAQQIMBAsgAUGAQHFBgMADRyABQYCwA09xRQRAIAAgAUE/cUGAAXI6AAIgACABQQx2QeABcjoAACAAIAFBBnZBP3FBgAFyOgABQQMMBAsgAUGAgARrQf//P00EQCAAIAFBP3FBgAFyOgADIAAgAUESdkHwAXI6AAAgACABQQZ2QT9xQYABcjoAAiAAIAFBDHZBP3FBgAFyOgABQQQMBAsLQfgcQRk2AgBBfwVBAQsMAQsgACABOgAAQQELC7wCAAJAAkACQAJAAkACQAJAAkACQAJAAkAgAUEJaw4SAAgJCggJAQIDBAoJCgoICQUGBwsgAiACKAIAIgFBBGo2AgAgACABKAIANgIADwsgAiACKAIAIgFBBGo2AgAgACABMgEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMwEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMAAANwMADwsgAiACKAIAIgFBBGo2AgAgACABMQAANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKwMAOQMADwsgACACQQARAgALDwsgAiACKAIAIgFBBGo2AgAgACABNAIANwMADwsgAiACKAIAIgFBBGo2AgAgACABNQIANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKQMANwMAC2sBBH8gACgCACwAABAPRQRAQQAPCwNAIAAoAgAhA0F/IQEgAkHMmbPmAE0EQEF/IAMsAABBMGsiBCACQQpsIgFqIARB/////wcgAWtKGyEBCyAAIANBAWo2AgAgASECIAMsAAEQDw0ACyABC40VAhJ/An4jAEHQAGsiBSQAIAVByg42AkwgBUE3aiEUIAVBOGohEAJAAkACQAJAA0AgBEH/////ByAMa0oNASAEIAxqIQwgBSgCTCIJIQQCQAJAAkAgCS0AACIIBEADQAJAAkAgCEH/AXEiBkUEQCAEIQgMAQsgBkElRw0BIAQhCANAIAQtAAFBJUcNASAFIARBAmoiBjYC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b24yaQBUaGUgcGFzc3dvcmQgZG9lcyBub3QgbWF0Y2ggdGhlIHN1cHBsaWVkIGhhc2gAT3V0cHV0IHBvaW50ZXIgbWlzbWF0Y2gAT3V0cHV0IGlzIHRvbyBsb25nAFNhbHQgaXMgdG9vIGxvbmcAU2VjcmV0IGlzIHRvbyBsb25nAFBhc3N3b3JkIGlzIHRvbyBsb25nAEFzc29jaWF0ZWQgZGF0YSBpcyB0b28gbG9uZwBUaHJlYWRpbmcgZmFpbHVyZQBNZW1vcnkgY29zdCBpcyB0b28gbGFyZ2UAVGltZSBjb3N0IGlzIHRvbyBsYXJnZQBVbmtub3duIGVycm9yIGNvZGUAYXJnb24yaWQAQXJnb24yaWQARW5jb2RpbmcgZmFpbGVkAERlY29kaW5nIGZhaWxlZABhcmdvbjJkAEFyZ29uMmQAQXJnb24yX0NvbnRleHQgY29udGV4dCBpcyBOVUxMAE91dHB1dCBwb2ludGVyIGlzIE5VTEwAVGhlIGFsbG9jYXRlIG1lbW9yeSBjYWxsYmFjayBpcyBOVUxMAFRoZSBmcmVlIG1lbW9yeSBjYWxsYmFjayBpcyBOVUxMAE9LACR2PQAsdD0ALHA9ACRtPQBUaGVyZSBpcyBubyBzdWNoIHZlcnNpb24gb2YgQXJnb24yAFNhbHQgcG9pbnRlciBpcyBOVUxMLCBidXQgc2FsdCBsZW5ndGggaXMgbm90IDAAU2VjcmV0IHBvaW50ZXIgaXMgTlVMTCwgYnV0IHNlY3JldCBsZW5ndGggaXMgbm90IDAAUGFzc3dvcmQgcG9pbnRlciBpcyBOVUxMLCBidXQgcGFzc3dvcmQgbGVuZ3RoIGlzIG5vdCAwAEFzc29jaWF0ZWQgZGF0YSBwb2ludGVyIGlzIE5VTEwsIGJ1dCBhZCBsZW5ndGggaXMgbm90IDAAKG51bGwpAAAAmwgAALsHAABJCQAAwAkAALAJAADwBwAAHwgAADAIAADJCAAAbwoAAOAJAAAWCgAAOwoAAEMIAAArCwAAwQoAAJIKAAD0CgAAAggAABEIAABbCQAAWwgAAHQJAAB0CAAABQkAAHQHAAAtCQAAngcAAPQIAABiBwAAGAkAAIgHAADhCAAATgcAAP8JAABcCgAAAQAAABkACgAZGRkAAAAABQAAAAAAAAkAAAAACwAAAAAAAAAAGQARChkZGQMKBwABAAkLGAAACQYLAAALAAYZAAAAGRkZAEHRGAshDgAAAAAAAAAAGQAKDRkZGQANAAACAAkOAAAACQAOAAAOAEGLGQsBDABBlxkLFRMAAAAAEwAAAAAJDAAAAAAADAAADABBxRkLARAAQdEZCxUPAAAABA8AAAAACRAAAAAAABAAABAAQf8ZCwESAEGLGgseEQAAAAARAAAAAAkSAAAAAAASAAASAAAaAAAAGhoaAEHCGgsOGgAAABoaGgAAAAAAAAkAQfMaCwEUAEH/GgsVFwAAAAAXAAAAAAkUAAAAAAAUAAAUAEGtGwsBFgBBuRsLJxUAAAAAFQAAAAAJFgAAAAAAFgAAFgAAMDEyMzQ1Njc4OUFCQ0RFRgBBhBwLAQIAQawcCwj//////////wBB8BwLBwEAAAAgEVA="},477:(e,t,n)=>{e.exports=function(e){e=void 0!==(e=e||{})?e:{};var t,n,r=Object.assign,i=r({},e),a=[],o="object"==typeof window,s="function"==typeof importScripts,c="";(o||s)&&(s?c=self.location.href:"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s&&(n=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),t=(e,t,n)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)}),e.print||console.log.bind(console);var u,l,A=e.printErr||console.warn.bind(console);r(e,i),i=null,e.arguments&&(a=e.arguments),e.thisProgram&&e.thisProgram,e.quit&&e.quit,e.wasmBinary&&(u=e.wasmBinary),e.noExitRuntime,"object"!=typeof WebAssembly&&v("no native wasm support detected");var d,p,m=!1,h="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function g(t){d=t,e.HEAP8=new Int8Array(t),e.HEAP16=new Int16Array(t),e.HEAP32=new Int32Array(t),e.HEAPU8=p=new Uint8Array(t),e.HEAPU16=new Uint16Array(t),e.HEAPU32=new Uint32Array(t),e.HEAPF32=new Float32Array(t),e.HEAPF64=new Float64Array(t)}e.INITIAL_MEMORY;var f,y,C,I=[],w=[],E=[],B=0,N=null,b=null;function v(t){throw e.onAbort&&e.onAbort(t),A(t="Aborted("+t+")"),m=!0,t+=". Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(t)}function S(e){return e.startsWith("data:application/octet-stream;base64,")}function T(e){return e.startsWith("file://")}function x(e){try{if(e==y&&u)return new Uint8Array(u);if(n)return n(e);throw"both async and sync fetching of the wasm failed"}catch(e){v(e)}}function _(t){for(;t.length>0;){var n=t.shift();if("function"!=typeof n){var r=n.func;"number"==typeof r?void 0===n.arg?Q(r)():Q(r)(n.arg):r(void 0===n.arg?null:n.arg)}else n(e)}}function Q(e){return f.get(e)}function P(e){try{return l.grow(e-d.byteLength+65535>>>16),g(l.buffer),1}catch(e){}}e.preloadedImages={},e.preloadedAudios={},S(y="argon2.wasm")||(C=y,y=e.locateFile?e.locateFile(C,c):c+C);var z,R={b:function(e,t,n){p.copyWithin(e,t,t+n)},a:function(e){var t,n=p.length,r=2147418112;if((e>>>=0)>r)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,e+100663296),P(Math.min(r,((t=Math.max(e,a))%65536>0&&(t+=65536-t%65536),t))))return!0}return!1}},k=(function(){var n={a:R};function r(t,n){var r,i=t.exports;e.asm=i,g((l=e.asm.c).buffer),f=e.asm.k,r=e.asm.d,w.unshift(r),function(t){if(B--,e.monitorRunDependencies&&e.monitorRunDependencies(B),0==B&&(null!==N&&(clearInterval(N),N=null),b)){var n=b;b=null,n()}}()}function i(e){r(e.instance)}function a(e){return function(){if(!u&&(o||s)){if("function"==typeof fetch&&!T(y))return fetch(y,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+y+"'";return e.arrayBuffer()})).catch((function(){return x(y)}));if(t)return new Promise((function(e,n){t(y,(function(t){e(new Uint8Array(t))}),n)}))}return Promise.resolve().then((function(){return x(y)}))}().then((function(e){return WebAssembly.instantiate(e,n)})).then((function(e){return e})).then(e,(function(e){A("failed to asynchronously prepare wasm: "+e),v(e)}))}if(B++,e.monitorRunDependencies&&e.monitorRunDependencies(B),e.instantiateWasm)try{return e.instantiateWasm(n,r)}catch(e){return A("Module.instantiateWasm callback failed with error: "+e),!1}u||"function"!=typeof WebAssembly.instantiateStreaming||S(y)||T(y)||"function"!=typeof fetch?a(i):fetch(y,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,n).then(i,(function(e){return A("wasm streaming compile failed: "+e),A("falling back to ArrayBuffer instantiation"),a(i)}))}))}(),e.___wasm_call_ctors=function(){return(e.___wasm_call_ctors=e.asm.d).apply(null,arguments)},e._argon2_hash=function(){return(e._argon2_hash=e.asm.e).apply(null,arguments)},e._malloc=function(){return(k=e._malloc=e.asm.f).apply(null,arguments)}),O=(e._free=function(){return(e._free=e.asm.g).apply(null,arguments)},e._argon2_verify=function(){return(e._argon2_verify=e.asm.h).apply(null,arguments)},e._argon2_error_message=function(){return(e._argon2_error_message=e.asm.i).apply(null,arguments)},e._argon2_encodedlen=function(){return(e._argon2_encodedlen=e.asm.j).apply(null,arguments)},e._argon2_hash_ext=function(){return(e._argon2_hash_ext=e.asm.l).apply(null,arguments)},e._argon2_verify_ext=function(){return(e._argon2_verify_ext=e.asm.m).apply(null,arguments)},e.stackAlloc=function(){return(O=e.stackAlloc=e.asm.n).apply(null,arguments)});function M(t){function n(){z||(z=!0,e.calledRun=!0,m||(_(w),e.onRuntimeInitialized&&e.onRuntimeInitialized(),function(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)t=e.postRun.shift(),E.unshift(t);var t;_(E)}()))}t=t||a,B>0||(function(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)t=e.preRun.shift(),I.unshift(t);var t;_(I)}(),B>0||(e.setStatus?(e.setStatus("Running..."),setTimeout((function(){setTimeout((function(){e.setStatus("")}),1),n()}),1)):n()))}if(e.allocate=function(e,t){var n;return n=1==t?O(e.length):k(e.length),e.subarray||e.slice?p.set(e,n):p.set(new Uint8Array(e),n),n},e.UTF8ToString=function(e,t){return e?function(e,t,n){for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.subarray&&h)return h.decode(e.subarray(t,i));for(var a="";t<i;){var o=e[t++];if(128&o){var s=63&e[t++];if(192!=(224&o)){var c=63&e[t++];if((o=224==(240&o)?(15&o)<<12|s<<6|c:(7&o)<<18|s<<12|c<<6|63&e[t++])<65536)a+=String.fromCharCode(o);else{var u=o-65536;a+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else a+=String.fromCharCode((31&o)<<6|s)}else a+=String.fromCharCode(o)}return a}(p,e,t):""},e.ALLOC_NORMAL=0,b=function e(){z||M(),z||(b=e)},e.run=M,e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();return M(),e.unloadRuntime=function(){"undefined"!=typeof self&&delete self.Module,e=jsModule=l=f=d=p=void 0},e}},145:()=>{},967:()=>{}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.r(i),n.d(i,{ArgonType:()=>s,hash:()=>d,verify:()=>p,unloadRuntime:()=>m,default:()=>h});var e=n(477),t=n.n(e),a=n(721),o=n.n(a);const s={Argon2d:0,Argon2i:1,Argon2id:2};function c(e){if(c._promise)return c._promise;if(c._module)return Promise.resolve(c._module);let n;return n=function(){if("function"==typeof loadArgon2WasmBinary)return loadArgon2WasmBinary();const e=o();if(e)return Promise.resolve(function(e){if("function"==typeof r)return new Uint8Array(r.from(e,"base64"));const t=atob(e),n=new Uint8Array(new ArrayBuffer(t.length));for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}(e));const t="string"==typeof argon2WasmPath?argon2WasmPath:"node_modules/argon2-browser/dist/argon2.wasm";return fetch(t).then((e=>e.arrayBuffer())).then((e=>new Uint8Array(e)))}().then((n=>function(e){const n=t()(e);return new Promise((e=>{n.postRun=()=>e(n)}))}({wasmBinary:n,wasmMemory:e?function(e){const t=Math.min(Math.max(Math.ceil(1024*e/65536),256)+256,32767);return new WebAssembly.Memory({initial:t,maximum:32767})}(e):void 0}))),c._promise=n,n.then((e=>(c._module=e,delete c._promise,e)))}function u(e,t){return e.allocate(t,"i8",e.ALLOC_NORMAL)}function l(e,t){return u(e,new Uint8Array([...t,0]))}function A(e){if("string"!=typeof e)return e;if("function"==typeof TextEncoder)return(new TextEncoder).encode(e);if("function"==typeof r)return r.from(e);throw new Error("Don't know how to encode UTF8")}function d(e){const t=e.mem||1024;return c(t).then((n=>{const r=e.time||1,i=e.parallelism||1,a=A(e.pass),o=l(n,a),c=a.length,d=A(e.salt),p=l(n,d),m=d.length,h=e.type||s.Argon2d,g=n.allocate(new Array(e.hashLen||24),"i8",n.ALLOC_NORMAL),f=e.secret?u(n,e.secret):0,y=e.secret?e.secret.byteLength:0,C=e.ad?u(n,e.ad):0,I=e.ad?e.ad.byteLength:0,w=e.hashLen||24,E=n._argon2_encodedlen(r,t,i,m,w,h),B=n.allocate(new Array(E+1),"i8",n.ALLOC_NORMAL);let N,b,v;try{b=n._argon2_hash_ext(r,t,i,o,c,p,m,g,w,B,E,h,f,y,C,I,19)}catch(e){N=e}if(0!==b||N){try{N||(N=n.UTF8ToString(n._argon2_error_message(b)))}catch(e){}v={message:N,code:b}}else{let e="";const t=new Uint8Array(w);for(let r=0;r<w;r++){const i=n.HEAP8[g+r];t[r]=i,e+=("0"+(255&i).toString(16)).slice(-2)}v={hash:t,hashHex:e,encoded:n.UTF8ToString(B)}}try{n._free(o),n._free(p),n._free(g),n._free(B),C&&n._free(C),f&&n._free(f)}catch(e){}if(N)throw v;return v}))}function p(e){return c().then((t=>{const n=A(e.pass),r=l(t,n),i=n.length,a=e.secret?u(t,e.secret):0,o=e.secret?e.secret.byteLength:0,c=e.ad?u(t,e.ad):0,d=e.ad?e.ad.byteLength:0,p=l(t,A(e.encoded));let m,h,g,f=e.type;if(void 0===f){let t=e.encoded.split("$")[1];t&&(t=t.replace("a","A"),f=s[t]||s.Argon2d)}try{h=t._argon2_verify_ext(p,r,i,a,o,c,d,f)}catch(e){m=e}if(h||m){try{m||(m=t.UTF8ToString(t._argon2_error_message(h)))}catch(e){}g={message:m,code:h}}try{t._free(r),t._free(p)}catch(e){}if(m)throw g;return g}))}function m(){c._module&&(c._module.unloadRuntime(),delete c._promise,delete c._module)}const h={ArgonType:s,hash:d,verify:p,unloadRuntime:m}})(),i})()},8802:function(e,t,n){const{hash:r}=n(9424);t.xi=2,t.tW=function(e,t){return r({pass:e,hashLen:t.hashLength,salt:t.salt,time:t.timeCost,mem:t.memoryCost,type:t.type,...t}).then((({hash:e})=>e))}},3836:function(e){!function(t){"use strict";function n(e){return parseInt(e)===e}function r(e){if(!n(e.length))return!1;for(var t=0;t<e.length;t++)if(!n(e[t])||e[t]<0||e[t]>255)return!1;return!0}function i(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!r(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(n(e.length)&&r(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function a(e){return new Uint8Array(e)}function o(e,t,n,r,i){null==r&&null==i||(e=e.slice?e.slice(r,i):Array.prototype.slice.call(e,r,i)),t.set(e,n)}var s,c={toBytes:function(e){var t=[],n=0;for(e=encodeURI(e);n<e.length;){var r=e.charCodeAt(n++);37===r?(t.push(parseInt(e.substr(n,2),16)),n+=2):t.push(r)}return i(t)},fromBytes:function(e){for(var t=[],n=0;n<e.length;){var r=e[n];r<128?(t.push(String.fromCharCode(r)),n++):r>191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[n+1])),n+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return t.join("")}},u=(s="0123456789abcdef",{toBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},fromBytes:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(s[(240&r)>>4]+s[15&r])}return t.join("")}}),l={16:10,24:12,32:14},A=[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],d=[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],p=[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],m=[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],h=[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],g=[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],f=[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],y=[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],C=[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],I=[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],w=[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],E=[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],B=[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],N=[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],b=[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 v(e){for(var t=[],n=0;n<e.length;n+=4)t.push(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]);return t}var S=function(e){if(!(this instanceof S))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:i(e,!0)}),this._prepare()};S.prototype._prepare=function(){var e=l[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var n,r=4*(e+1),i=this.key.length/4,a=v(this.key);for(t=0;t<i;t++)n=t>>2,this._Ke[n][t%4]=a[t],this._Kd[e-n][t%4]=a[t];for(var o,s=0,c=i;c<r;){if(o=a[i-1],a[0]^=d[o>>16&255]<<24^d[o>>8&255]<<16^d[255&o]<<8^d[o>>24&255]^A[s]<<24,s+=1,8!=i)for(t=1;t<i;t++)a[t]^=a[t-1];else{for(t=1;t<i/2;t++)a[t]^=a[t-1];for(o=a[i/2-1],a[i/2]^=d[255&o]^d[o>>8&255]<<8^d[o>>16&255]<<16^d[o>>24&255]<<24,t=i/2+1;t<i;t++)a[t]^=a[t-1]}for(t=0;t<i&&c<r;)u=c>>2,p=c%4,this._Ke[u][p]=a[t],this._Kd[e-u][p]=a[t++],c++}for(var u=1;u<e;u++)for(var p=0;p<4;p++)o=this._Kd[u][p],this._Kd[u][p]=E[o>>24&255]^B[o>>16&255]^N[o>>8&255]^b[255&o]},S.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,n=[0,0,0,0],r=v(e),i=0;i<4;i++)r[i]^=this._Ke[0][i];for(var o=1;o<t;o++){for(i=0;i<4;i++)n[i]=m[r[i]>>24&255]^h[r[(i+1)%4]>>16&255]^g[r[(i+2)%4]>>8&255]^f[255&r[(i+3)%4]]^this._Ke[o][i];r=n.slice()}var s,c=a(16);for(i=0;i<4;i++)s=this._Ke[t][i],c[4*i]=255&(d[r[i]>>24&255]^s>>24),c[4*i+1]=255&(d[r[(i+1)%4]>>16&255]^s>>16),c[4*i+2]=255&(d[r[(i+2)%4]>>8&255]^s>>8),c[4*i+3]=255&(d[255&r[(i+3)%4]]^s);return c},S.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,n=[0,0,0,0],r=v(e),i=0;i<4;i++)r[i]^=this._Kd[0][i];for(var o=1;o<t;o++){for(i=0;i<4;i++)n[i]=y[r[i]>>24&255]^C[r[(i+3)%4]>>16&255]^I[r[(i+2)%4]>>8&255]^w[255&r[(i+1)%4]]^this._Kd[o][i];r=n.slice()}var s,c=a(16);for(i=0;i<4;i++)s=this._Kd[t][i],c[4*i]=255&(p[r[i]>>24&255]^s>>24),c[4*i+1]=255&(p[r[(i+3)%4]>>16&255]^s>>16),c[4*i+2]=255&(p[r[(i+2)%4]>>8&255]^s>>8),c[4*i+3]=255&(p[255&r[(i+1)%4]]^s);return c};var T=function(e){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new S(e)};T.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=a(e.length),n=a(16),r=0;r<e.length;r+=16)o(e,n,0,r,r+16),o(n=this._aes.encrypt(n),t,r);return t},T.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=a(e.length),n=a(16),r=0;r<e.length;r+=16)o(e,n,0,r,r+16),o(n=this._aes.decrypt(n),t,r);return t};var x=function(e,t){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=a(16);this._lastCipherblock=i(t,!0),this._aes=new S(e)};x.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=a(e.length),n=a(16),r=0;r<e.length;r+=16){o(e,n,0,r,r+16);for(var s=0;s<16;s++)n[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(n),o(this._lastCipherblock,t,r)}return t},x.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=a(e.length),n=a(16),r=0;r<e.length;r+=16){o(e,n,0,r,r+16),n=this._aes.decrypt(n);for(var s=0;s<16;s++)t[r+s]=n[s]^this._lastCipherblock[s];o(e,this._lastCipherblock,0,r,r+16)}return t};var _=function(e,t,n){if(!(this instanceof _))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 size)")}else t=a(16);n||(n=1),this.segmentSize=n,this._shiftRegister=i(t,!0),this._aes=new S(e)};_.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,n=i(e,!0),r=0;r<n.length;r+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)n[r+a]^=t[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(n,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return n},_.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,n=i(e,!0),r=0;r<n.length;r+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)n[r+a]^=t[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(e,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return n};var Q=function(e,t){if(!(this instanceof Q))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=a(16);this._lastPrecipher=i(t,!0),this._lastPrecipherIndex=16,this._aes=new S(e)};Q.prototype.encrypt=function(e){for(var t=i(e,!0),n=0;n<t.length;n++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[n]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},Q.prototype.decrypt=Q.prototype.encrypt;var P=function(e){if(!(this instanceof P))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=a(16),this.setValue(e)):this.setBytes(e)};P.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");if(e>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},P.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},P.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var z=function(e,t){if(!(this instanceof z))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof P||(t=new P(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new S(e)};z.prototype.encrypt=function(e){for(var t=i(e,!0),n=0;n<t.length;n++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[n]^=this._remainingCounter[this._remainingCounterIndex++];return t},z.prototype.decrypt=z.prototype.encrypt;var R={AES:S,Counter:P,ModeOfOperation:{ecb:T,cbc:x,cfb:_,ofb:Q,ctr:z},utils:{hex:u,utf8:c},padding:{pkcs7:{pad:function(e){var t=16-(e=i(e,!0)).length%16,n=a(e.length+t);o(e,n);for(var r=e.length;r<n.length;r++)n[r]=t;return n},strip:function(e){if((e=i(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var n=e.length-t,r=0;r<t;r++)if(e[n+r]!==t)throw new Error("PKCS#7 invalid padding byte");var s=a(n);return o(e,s,0,0,n),s}}},_arrayTest:{coerceArray:i,createArray:a,copyArray:o}};e.exports=R}()},5364:function(e){"use strict";e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var r=0;r<e.length;r++){var i=e.charAt(r),a=i.charCodeAt(0);if(255!==t[a])throw new TypeError(i+" is ambiguous");t[a]=r}var o=e.length,s=e.charAt(0),c=Math.log(o)/Math.log(256),u=Math.log(256)/Math.log(o);function l(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;for(var n=0,r=0,i=0;e[n]===s;)r++,n++;for(var a=(e.length-n)*c+1>>>0,u=new Uint8Array(a);e[n];){var l=t[e.charCodeAt(n)];if(255===l)return;for(var A=0,d=a-1;(0!==l||A<i)&&-1!==d;d--,A++)l+=o*u[d]>>>0,u[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=A,n++}for(var p=a-i;p!==a&&0===u[p];)p++;for(var m=new Uint8Array(r+(a-p)),h=r;p!==a;)m[h++]=u[p++];return m}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var c=(a-i)*u+1>>>0,l=new Uint8Array(c);i!==a;){for(var A=t[i],d=0,p=c-1;(0!==A||d<r)&&-1!==p;p--,d++)A+=256*l[p]>>>0,l[p]=A%o>>>0,A=A/o>>>0;if(0!==A)throw new Error("Non-zero carry");r=d,i++}for(var m=c-r;m!==c&&0===l[m];)m++;for(var h=s.repeat(n);m<c;++m)h+=e.charAt(l[m]);return h},decodeUnsafe:l,decode:function(e){var t=l(e);if(t)return t;throw new Error("Non-base"+o+" character")}}}},7526:function(e,t){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=s(e),o=a[0],c=a[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,c)),l=0,A=c>0?o-4:o;for(n=0;n<A;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,u=r-i;s<u;s+=o)a.push(c(e,s,s+o>u?u:s+o));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},1594:function(e,t,n){var r;!function(i){"use strict";var a,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,c=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",A=1e14,d=14,p=9007199254740991,m=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,g=1e9;function f(e){var t=0|e;return e>0||e===t?t:t-1}function y(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(t=e[r++]+"",n=d-t.length;n--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function C(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,u=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==u,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>u^n?1:-1;for(s=(c=i.length)<(u=a.length)?c:u,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==u?0:c>u^n?1:-1}function I(e,t,n,r){if(e<t||e>n||e!==c(e))throw Error(u+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return f(e.e/d)==t&&e.c[t]%2!=0}function E(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function B(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}a=function e(t){var n,r,i,a,N,b,v,S,T,x,_=H.prototype={constructor:H,toString:null,valueOf:null},Q=new H(1),P=20,z=4,R=-7,k=21,O=-1e7,M=1e7,D=!1,q=1,F=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},G="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function H(e,t){var n,a,s,u,A,m,h,g,f=this;if(!(f instanceof H))return new H(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>M?f.c=f.e=null:e.e<O?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((m="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,A=e;A>=10;A/=10,u++);return void(u>M?f.c=f.e=null:(f.e=u,f.c=[e]))}g=String(e)}else{if(!o.test(g=String(e)))return i(f,g,m);f.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(u=g.indexOf("."))>-1&&(g=g.replace(".","")),(A=g.search(/e/i))>0?(u<0&&(u=A),u+=+g.slice(A+1),g=g.substring(0,A)):u<0&&(u=g.length)}else{if(I(t,2,G.length,"Base"),10==t&&L)return Y(f=new H(e),P+f.e+1,z);if(g=String(e),m="number"==typeof e){if(0*e!=0)return i(f,g,m,t);if(f.s=1/e<0?(g=g.slice(1),-1):1,H.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else f.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(n=G.slice(0,t),u=A=0,h=g.length;A<h;A++)if(n.indexOf(a=g.charAt(A))<0){if("."==a){if(A>u){u=h;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,A=-1,u=0;continue}return i(f,String(e),m,t)}m=!1,(u=(g=r(g,t,10,f.s)).indexOf("."))>-1?g=g.replace(".",""):u=g.length}for(A=0;48===g.charCodeAt(A);A++);for(h=g.length;48===g.charCodeAt(--h););if(g=g.slice(A,++h)){if(h-=A,m&&H.DEBUG&&h>15&&(e>p||e!==c(e)))throw Error(l+f.s*e);if((u=u-A-1)>M)f.c=f.e=null;else if(u<O)f.c=[f.e=0];else{if(f.e=u,f.c=[],A=(u+1)%d,u<0&&(A+=d),A<h){for(A&&f.c.push(+g.slice(0,A)),h-=d;A<h;)f.c.push(+g.slice(A,A+=d));A=d-(g=g.slice(A)).length}else A-=h;for(;A--;g+="0");f.c.push(+g)}}else f.c=[f.e=0]}function j(e,t,n,r){var i,a,o,s,c;if(null==n?n=z:I(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)c=y(e.c),c=1==r||2==r&&(o<=R||o>=k)?E(c,o):B(c,o,"0");else if(a=(e=Y(new H(e),t,n)).e,s=(c=y(e.c)).length,1==r||2==r&&(t<=a||a<=R)){for(;s<t;c+="0",s++);c=E(c,a)}else if(t-=o,c=B(c,a,"0"),a+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-s)>0)for(a+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function V(e,t){for(var n,r,i=1,a=new H(e[0]);i<e.length;i++)(!(r=new H(e[i])).s||(n=C(a,r))===t||0===n&&a.s===t)&&(a=r);return a}function $(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*d-1)>M?e.c=e.e=null:n<O?e.c=[e.e=0]:(e.e=n,e.c=t),e}function Y(e,t,n,r){var i,a,o,u,l,p,h,g=e.c,f=m;if(g){e:{for(i=1,u=g[0];u>=10;u/=10,i++);if((a=t-i)<0)a+=d,o=t,l=g[p=0],h=c(l/f[i-o-1]%10);else if((p=s((a+1)/d))>=g.length){if(!r)break e;for(;g.length<=p;g.push(0));l=h=0,i=1,o=(a%=d)-d+1}else{for(l=u=g[p],i=1;u>=10;u/=10,i++);h=(o=(a%=d)-d+i)<0?0:c(l/f[i-o-1]%10)}if(r=r||t<0||null!=g[p+1]||(o<0?l:l%f[i-o-1]),r=n<4?(h||r)&&(0==n||n==(e.s<0?3:2)):h>5||5==h&&(4==n||r||6==n&&(a>0?o>0?l/f[i-o]:0:g[p-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,r?(t-=e.e+1,g[0]=f[(d-t%d)%d],e.e=-t||0):g[0]=e.e=0,e;if(0==a?(g.length=p,u=1,p--):(g.length=p+1,u=f[d-a],g[p]=o>0?c(l/f[i-o]%f[o])*u:0),r)for(;;){if(0==p){for(a=1,o=g[0];o>=10;o/=10,a++);for(o=g[0]+=u,u=1;o>=10;o/=10,u++);a!=u&&(e.e++,g[0]==A&&(g[0]=1));break}if(g[p]+=u,g[p]!=A)break;g[p--]=0,u=1}for(a=g.length;0===g[--a];g.pop());}e.e>M?e.c=e.e=null:e.e<O&&(e.c=[e.e=0])}return e}function J(e){var t,n=e.e;return null===n?e.toString():(t=y(e.c),t=n<=R||n>=k?E(t,n):B(t,n,"0"),e.s<0?"-"+t:t)}return H.clone=e,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(I(n=e[t],0,g,t),P=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(I(n=e[t],0,8,t),z=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(I(n[0],-g,0,t),I(n[1],0,g,t),R=n[0],k=n[1]):(I(n,-g,g,t),R=-(k=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)I(n[0],-g,-1,t),I(n[1],1,g,t),O=n[0],M=n[1];else{if(I(n,-g,g,t),!n)throw Error(u+t+" cannot be zero: "+n);O=-(M=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(u+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw D=!n,Error(u+"crypto unavailable");D=n}else D=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(I(n=e[t],0,9,t),q=n),e.hasOwnProperty(t="POW_PRECISION")&&(I(n=e[t],0,g,t),F=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(u+t+" not an object: "+n);U=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(u+t+" invalid: "+n);L="0123456789"==n.slice(0,10),G=n}}return{DECIMAL_PLACES:P,ROUNDING_MODE:z,EXPONENTIAL_AT:[R,k],RANGE:[O,M],CRYPTO:D,MODULO_MODE:q,POW_PRECISION:F,FORMAT:U,ALPHABET:G}},H.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!H.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-g&&i<=g&&i===c(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%d)<1&&(t+=d),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=A||n!==c(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(u+"Invalid BigNumber: "+e)},H.maximum=H.max=function(){return V(arguments,-1)},H.minimum=H.min=function(){return V(arguments,1)},H.random=(a=9007199254740992,N=Math.random()*a&2097151?function(){return c(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,a,o=0,l=[],A=new H(Q);if(null==e?e=P:I(e,0,g),i=s(e/d),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));o<i;)(a=131072*t[o]+(t[o+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[o]=n[0],t[o+1]=n[1]):(l.push(a%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw D=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(i*=7);o<i;)(a=281474976710656*(31&t[o])+1099511627776*t[o+1]+4294967296*t[o+2]+16777216*t[o+3]+(t[o+4]<<16)+(t[o+5]<<8)+t[o+6])>=9e15?crypto.randomBytes(7).copy(t,o):(l.push(a%1e14),o+=7);o=i/7}if(!D)for(;o<i;)(a=N())<9e15&&(l[o++]=a%1e14);for(i=l[--o],e%=d,i&&e&&(a=m[d-e],l[o]=c(i/a)*a);0===l[o];l.pop(),o--);if(o<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=d);for(o=1,a=l[0];a>=10;a/=10,o++);o<d&&(r-=d-o)}return A.e=r,A.c=l,A}),H.sum=function(){for(var e=1,t=arguments,n=new H(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,a,o=[0],s=0,c=e.length;s<c;){for(a=o.length;a--;o[a]*=t);for(o[0]+=r.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>n-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}return function(r,i,a,o,s){var c,u,l,A,d,p,m,h,g=r.indexOf("."),f=P,C=z;for(g>=0&&(A=F,F=0,r=r.replace(".",""),p=(h=new H(i)).pow(r.length-g),F=A,h.c=t(B(y(p.c),p.e,"0"),10,a,e),h.e=h.c.length),l=A=(m=t(r,i,a,s?(c=G,e):(c=e,G))).length;0==m[--A];m.pop());if(!m[0])return c.charAt(0);if(g<0?--l:(p.c=m,p.e=l,p.s=o,m=(p=n(p,h,f,C,a)).c,d=p.r,l=p.e),g=m[u=l+f+1],A=a/2,d=d||u<0||null!=m[u+1],d=C<4?(null!=g||d)&&(0==C||C==(p.s<0?3:2)):g>A||g==A&&(4==C||d||6==C&&1&m[u-1]||C==(p.s<0?8:7)),u<1||!m[0])r=d?B(c.charAt(1),-f,c.charAt(0)):c.charAt(0);else{if(m.length=u,d)for(--a;++m[--u]>a;)m[u]=0,u||(++l,m=[1].concat(m));for(A=m.length;!m[--A];);for(g=0,r="";g<=A;r+=c.charAt(m[g++]));r=B(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,u=t%h,l=t/h|0;for(e=e.slice();c--;)s=((i=u*(a=e[c]%h)+(r=l*a+(o=e[c]/h|0)*u)%h*h+s)/n|0)+(r/h|0)+l*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var u,l,p,m,h,g,y,C,I,w,E,B,N,b,v,S,T,x=r.s==i.s?1:-1,_=r.c,Q=i.c;if(!(_&&_[0]&&Q&&Q[0]))return new H(r.s&&i.s&&(_?!Q||_[0]!=Q[0]:Q)?_&&0==_[0]||!Q?0*x:x/0:NaN);for(I=(C=new H(x)).c=[],x=a+(l=r.e-i.e)+1,s||(s=A,l=f(r.e/d)-f(i.e/d),x=x/d|0),p=0;Q[p]==(_[p]||0);p++);if(Q[p]>(_[p]||0)&&l--,x<0)I.push(1),m=!0;else{for(b=_.length,S=Q.length,p=0,x+=2,(h=c(s/(Q[0]+1)))>1&&(Q=e(Q,h,s),_=e(_,h,s),S=Q.length,b=_.length),N=S,E=(w=_.slice(0,S)).length;E<S;w[E++]=0);T=Q.slice(),T=[0].concat(T),v=Q[0],Q[1]>=s/2&&v++;do{if(h=0,(u=t(Q,w,S,E))<0){if(B=w[0],S!=E&&(B=B*s+(w[1]||0)),(h=c(B/v))>1)for(h>=s&&(h=s-1),y=(g=e(Q,h,s)).length,E=w.length;1==t(g,w,y,E);)h--,n(g,S<y?T:Q,y,s),y=g.length,u=1;else 0==h&&(u=h=1),y=(g=Q.slice()).length;if(y<E&&(g=[0].concat(g)),n(w,g,E,s),E=w.length,-1==u)for(;t(Q,w,S,E)<1;)h++,n(w,S<E?T:Q,E,s),E=w.length}else 0===u&&(h++,w=[0]);I[p++]=h,w[0]?w[E++]=_[N]||0:(w=[_[N]],E=1)}while((N++<b||null!=w[0])&&x--);m=null!=w[0],I[0]||I.splice(0,1)}if(s==A){for(p=1,x=I[0];x>=10;x/=10,p++);Y(C,a+(C.e=p+l*d-1)+1,o,m)}else C.e=l,C.r=+m;return C}}(),b=/^(-?)0([xbo])(?=\w[\w.]*$)/i,v=/^([^.]+)\.$/,S=/^\.([^.]+)$/,T=/^-?(Infinity|NaN)$/,x=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,a=n?t:t.replace(x,"");if(T.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(b,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,a=a.replace(v,"$1").replace(S,"0.$1")),t!=a))return new H(a,i);if(H.DEBUG)throw Error(u+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},_.absoluteValue=_.abs=function(){var e=new H(this);return e.s<0&&(e.s=1),e},_.comparedTo=function(e,t){return C(this,new H(e,t))},_.decimalPlaces=_.dp=function(e,t){var n,r,i,a=this;if(null!=e)return I(e,0,g),null==t?t=z:I(t,0,8),Y(new H(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-f(this.e/d))*d,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},_.dividedBy=_.div=function(e,t){return n(this,new H(e,t),P,z)},_.dividedToIntegerBy=_.idiv=function(e,t){return n(this,new H(e,t),0,1)},_.exponentiatedBy=_.pow=function(e,t){var n,r,i,a,o,l,A,p,m=this;if((e=new H(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+J(e));if(null!=t&&(t=new H(t)),o=e.e>14,!m.c||!m.c[0]||1==m.c[0]&&!m.e&&1==m.c.length||!e.c||!e.c[0])return p=new H(Math.pow(+J(m),o?e.s*(2-w(e)):+J(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new H(NaN);(r=!l&&m.isInteger()&&t.isInteger())&&(m=m.mod(t))}else{if(e.e>9&&(m.e>0||m.e<-1||(0==m.e?m.c[0]>1||o&&m.c[1]>=24e7:m.c[0]<8e13||o&&m.c[0]<=9999975e7)))return a=m.s<0&&w(e)?-0:0,m.e>-1&&(a=1/a),new H(l?1/a:a);F&&(a=s(F/d+2))}for(o?(n=new H(.5),l&&(e.s=1),A=w(e)):A=(i=Math.abs(+J(e)))%2,p=new H(Q);;){if(A){if(!(p=p.times(m)).c)break;a?p.c.length>a&&(p.c.length=a):r&&(p=p.mod(t))}if(i){if(0===(i=c(i/2)))break;A=i%2}else if(Y(e=e.times(n),e.e+1,1),e.e>14)A=w(e);else{if(0==(i=+J(e)))break;A=i%2}m=m.times(m),a?m.c&&m.c.length>a&&(m.c.length=a):r&&(m=m.mod(t))}return r?p:(l&&(p=Q.div(p)),t?p.mod(t):a?Y(p,F,z,void 0):p)},_.integerValue=function(e){var t=new H(this);return null==e?e=z:I(e,0,8),Y(t,t.e+1,e)},_.isEqualTo=_.eq=function(e,t){return 0===C(this,new H(e,t))},_.isFinite=function(){return!!this.c},_.isGreaterThan=_.gt=function(e,t){return C(this,new H(e,t))>0},_.isGreaterThanOrEqualTo=_.gte=function(e,t){return 1===(t=C(this,new H(e,t)))||0===t},_.isInteger=function(){return!!this.c&&f(this.e/d)>this.c.length-2},_.isLessThan=_.lt=function(e,t){return C(this,new H(e,t))<0},_.isLessThanOrEqualTo=_.lte=function(e,t){return-1===(t=C(this,new H(e,t)))||0===t},_.isNaN=function(){return!this.s},_.isNegative=function(){return this.s<0},_.isPositive=function(){return this.s>0},_.isZero=function(){return!!this.c&&0==this.c[0]},_.minus=function(e,t){var n,r,i,a,o=this,s=o.s;if(t=(e=new H(e,t)).s,!s||!t)return new H(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/d,u=e.e/d,l=o.c,p=e.c;if(!c||!u){if(!l||!p)return l?(e.s=-t,e):new H(p?o:NaN);if(!l[0]||!p[0])return p[0]?(e.s=-t,e):new H(l[0]?o:3==z?-0:0)}if(c=f(c),u=f(u),l=l.slice(),s=c-u){for((a=s<0)?(s=-s,i=l):(u=c,i=p),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(a=(s=l.length)<(t=p.length))?s:t,s=t=0;t<r;t++)if(l[t]!=p[t]){a=l[t]<p[t];break}if(a&&(i=l,l=p,p=i,e.s=-e.s),(t=(r=p.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=A-1;r>s;){if(l[--r]<p[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=A}l[r]-=p[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?$(e,l,u):(e.s=3==z?-1:1,e.c=[e.e=0],e)},_.modulo=_.mod=function(e,t){var r,i,a=this;return e=new H(e,t),!a.c||!e.s||e.c&&!e.c[0]?new H(NaN):!e.c||a.c&&!a.c[0]?new H(a):(9==q?(i=e.s,e.s=1,r=n(a,e,0,3),e.s=i,r.s*=i):r=n(a,e,0,q),(e=a.minus(r.times(e))).c[0]||1!=q||(e.s=a.s),e)},_.multipliedBy=_.times=function(e,t){var n,r,i,a,o,s,c,u,l,p,m,g,y,C,I,w=this,E=w.c,B=(e=new H(e,t)).c;if(!(E&&B&&E[0]&&B[0]))return!w.s||!e.s||E&&!E[0]&&!B||B&&!B[0]&&!E?e.c=e.e=e.s=null:(e.s*=w.s,E&&B?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=f(w.e/d)+f(e.e/d),e.s*=w.s,(c=E.length)<(p=B.length)&&(y=E,E=B,B=y,i=c,c=p,p=i),i=c+p,y=[];i--;y.push(0));for(C=A,I=h,i=p;--i>=0;){for(n=0,m=B[i]%I,g=B[i]/I|0,a=i+(o=c);a>i;)n=((u=m*(u=E[--o]%I)+(s=g*u+(l=E[o]/I|0)*m)%I*I+y[a]+n)/C|0)+(s/I|0)+g*l,y[a--]=u%C;y[a]=n}return n?++r:y.splice(0,1),$(e,y,r)},_.negated=function(){var e=new H(this);return e.s=-e.s||null,e},_.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new H(e,t)).s,!i||!t)return new H(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/d,o=e.e/d,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new H(i/0);if(!s[0]||!c[0])return c[0]?e:new H(s[0]?r:0*i)}if(a=f(a),o=f(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for((i=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/A|0,s[t]=A===s[t]?0:s[t]%A;return i&&(s=[i].concat(s),++o),$(e,s,o)},_.precision=_.sd=function(e,t){var n,r,i,a=this;if(null!=e&&e!==!!e)return I(e,1,g),null==t?t=z:I(t,0,8),Y(new H(a),e,t);if(!(n=a.c))return null;if(r=(i=n.length-1)*d+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},_.shiftedBy=function(e){return I(e,-9007199254740991,p),this.times("1e"+e)},_.squareRoot=_.sqrt=function(){var e,t,r,i,a,o=this,s=o.c,c=o.s,u=o.e,l=P+4,A=new H("0.5");if(1!==c||!s||!s[0])return new H(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(c=Math.sqrt(+J(o)))||c==1/0?(((t=y(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=f((u+1)/2)-(u<0||u%2),r=new H(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new H(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(a=r,r=A.times(a.plus(n(o,a,l,1))),y(a.c).slice(0,c)===(t=y(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Y(r,r.e+P+2,1),e=!r.times(r).eq(o));break}if(!i&&(Y(a,a.e+P+2,0),a.times(a).eq(o))){r=a;break}l+=4,c+=4,i=1}return Y(r,r.e+P+1,z,e)},_.toExponential=function(e,t){return null!=e&&(I(e,0,g),e++),j(this,e,t,1)},_.toFixed=function(e,t){return null!=e&&(I(e,0,g),e=e+this.e+1),j(this,e,t)},_.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=U;else if("object"!=typeof n)throw Error(u+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split("."),s=+n.groupSize,c=+n.secondaryGroupSize,l=n.groupSeparator||"",A=o[0],d=o[1],p=i.s<0,m=p?A.slice(1):A,h=m.length;if(c&&(a=s,s=c,c=a,h-=a),s>0&&h>0){for(a=h%s||s,A=m.substr(0,a);a<h;a+=s)A+=l+m.substr(a,s);c>0&&(A+=l+m.slice(a)),p&&(A="-"+A)}r=d?A+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):A}return(n.prefix||"")+r+(n.suffix||"")},_.toFraction=function(e){var t,r,i,a,o,s,c,l,A,p,h,g,f=this,C=f.c;if(null!=e&&(!(c=new H(e)).isInteger()&&(c.c||1!==c.s)||c.lt(Q)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+J(c));if(!C)return new H(f);for(t=new H(Q),A=r=new H(Q),i=l=new H(Q),g=y(C),o=t.e=g.length-f.e-1,t.c[0]=m[(s=o%d)<0?d+s:s],e=!e||c.comparedTo(t)>0?o>0?t:A:c,s=M,M=1/0,c=new H(g),l.c[0]=0;p=n(c,t,0,1),1!=(a=r.plus(p.times(i))).comparedTo(e);)r=i,i=a,A=l.plus(p.times(a=A)),l=a,t=c.minus(p.times(a=t)),c=a;return a=n(e.minus(r),i,0,1),l=l.plus(a.times(A)),r=r.plus(a.times(i)),l.s=A.s=f.s,h=n(A,i,o*=2,z).minus(f).abs().comparedTo(n(l,r,o,z).minus(f).abs())<1?[A,i]:[l,r],M=s,h},_.toNumber=function(){return+J(this)},_.toPrecision=function(e,t){return null!=e&&I(e,1,g),j(this,e,t,2)},_.toString=function(e){var t,n=this,i=n.s,a=n.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=R||a>=k?E(y(n.c),a):B(y(n.c),a,"0"):10===e&&L?t=B(y((n=Y(new H(n),P+a+1,z)).c),n.e,"0"):(I(e,2,G.length,"Base"),t=r(B(y(n.c),a,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},_.valueOf=_.toJSON=function(){return J(this)},_._isBigNumber=!0,null!=t&&H.set(t),H}(),a.default=a.BigNumber=a,void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},9235:function(e){const t=2147483648;var n=function(e){if(!Array.isArray(e))throw new Error("Input must be an Array");if(0===e.length)throw new Error("Path must contain at least one level");for(var t=0;t<e.length;t++)if("number"!=typeof e[t])throw new Error("Path element is not a number");this.path=e};n.validatePathArray=function(e){try{return n.fromPathArray(e),!0}catch(e){return!1}},n.validateString=function(e,t){try{return n.fromString(e,t),!0}catch(e){return!1}},n.fromPathArray=function(e){return new n(e)},n.fromString=function(e,r){if(/^m\//i.test(e))e=e.slice(2);else if(r)throw new Error("Root element is required");for(var i=e.split("/"),a=new Array(i.length),o=0;o<i.length;o++){var s=/(\d+)([hH\']?)/.exec(i[o]);if(null===s)throw new Error("Invalid input");if(a[o]=parseInt(s[1],10),a[o]>=t)throw new Error("Invalid child index");if("h"===s[2]||"H"===s[2]||"'"===s[2])a[o]+=t;else if(0!=s[2].length)throw new Error("Invalid modifier")}return new n(a)},n.prototype.toPathArray=function(){return this.path},n.prototype.toString=function(e,n){for(var r=new Array(this.path.length),i=0;i<this.path.length;i++){var a=this.path[i];r[i]=a&t?(a&~t)+(n?"h":"'"):a}return(e?"":"m/")+r.join("/")},n.prototype.inspect=function(){return"BIPPath <"+this.toString()+">"},e.exports=n},4156:function(e,t,n){const r=n(829);function i(e,t,n){const r=e[t]+e[n];let i=e[t+1]+e[n+1];r>=4294967296&&i++,e[t]=r,e[t+1]=i}function a(e,t,n,r){let i=e[t]+n;n<0&&(i+=4294967296);let a=e[t+1]+r;i>=4294967296&&a++,e[t]=i,e[t+1]=a}function o(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function s(e,t,n,r,o,s){const c=A[o],u=A[o+1],d=A[s],p=A[s+1];i(l,e,t),a(l,e,c,u);let m=l[r]^l[e],h=l[r+1]^l[e+1];l[r]=h,l[r+1]=m,i(l,n,r),m=l[t]^l[n],h=l[t+1]^l[n+1],l[t]=m>>>24^h<<8,l[t+1]=h>>>24^m<<8,i(l,e,t),a(l,e,d,p),m=l[r]^l[e],h=l[r+1]^l[e+1],l[r]=m>>>16^h<<16,l[r+1]=h>>>16^m<<16,i(l,n,r),m=l[t]^l[n],h=l[t+1]^l[n+1],l[t]=h>>>31^m<<1,l[t+1]=m>>>31^h<<1}const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),u=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}))),l=new Uint32Array(32),A=new Uint32Array(32);function d(e,t){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=c[n];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)A[n]=o(e.b,4*n);for(n=0;n<12;n++)s(0,8,16,24,u[16*n+0],u[16*n+1]),s(2,10,18,26,u[16*n+2],u[16*n+3]),s(4,12,20,28,u[16*n+4],u[16*n+5]),s(6,14,22,30,u[16*n+6],u[16*n+7]),s(0,10,20,30,u[16*n+8],u[16*n+9]),s(2,12,22,24,u[16*n+10],u[16*n+11]),s(4,14,16,26,u[16*n+12],u[16*n+13]),s(6,8,18,28,u[16*n+14],u[16*n+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}const p=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 m(e,t,n,r){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&16!==n.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(r&&16!==r.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};p.fill(0),p[0]=e,t&&(p[1]=t.length),p[2]=1,p[3]=1,n&&p.set(n,32),r&&p.set(r,48);for(let e=0;e<16;e++)i.h[e]=c[e]^o(p,4*e);return t&&(h(i,t),i.c=128),i}function h(e,t){for(let n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,d(e,!1),e.c=0),e.b[e.c++]=t[n]}function g(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;d(e,!0);const t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n);return t}function f(e,t,n,i,a){n=n||64,e=r.normalizeInput(e),i&&(i=r.normalizeInput(i)),a&&(a=r.normalizeInput(a));const o=m(n,t,i,a);return h(o,e),g(o)}e.exports={blake2b:f,blake2bHex:function(e,t,n,i,a){const o=f(e,t,n,i,a);return r.toHex(o)},blake2bInit:m,blake2bUpdate:h,blake2bFinal:g}},829:function(e){function t(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){let t;if(e instanceof Uint8Array)t=e;else{if("string"!=typeof e)throw new Error("Input must be an string, Buffer or Uint8Array");t=(new TextEncoder).encode(e)}return t},toHex:function(e){return Array.prototype.map.call(e,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")},debugPrint:function(e,n,r){let i="\n"+e+" = ";for(let a=0;a<n.length;a+=2){if(32===r)i+=t(n[a]).toUpperCase(),i+=" ",i+=t(n[a+1]).toUpperCase();else{if(64!==r)throw new Error("Invalid size "+r);i+=t(n[a+1]).toUpperCase(),i+=t(n[a]).toUpperCase()}a%6==4?i+="\n"+new Array(e.length+4).join(" "):a<n.length-2&&(i+=" ")}console.log(i)},testSpeed:function(e,t,n){let r=(new Date).getTime();const i=new Uint8Array(t);for(let e=0;e<t;e++)i[e]=e%256;const a=(new Date).getTime();console.log("Generated random input in "+(a-r)+"ms"),r=a;for(let a=0;a<n;a++){const n=e(i),a=(new Date).getTime(),o=a-r;r=a,console.log("Hashed in "+o+"ms: "+n.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(o/1e3)*100)/100+" MB PER SECOND")}}}},6763:function(e,t,n){const r=n(5364);e.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},8287:function(e,t,n){"use strict";const r=n(7526),i=n(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return A(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|h(e,t);let r=s(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(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(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const i=function(e){if(c.isBuffer(e)){const t=0|m(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(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 A(e){return l(e),s(e<0?0:0|m(e))}function d(e){const t=e.length<0?0:0|m(e.length),n=s(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function m(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(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 n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,n);case"utf8":case"utf-8":return v(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return x(this,t,n);case"base64":return b(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function f(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:C(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):C(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function C(e,t,n,r,i){let a,o=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let r=-1;for(a=n;a<s;a++)if(u(e,a)===u(t,-1===r?0:a-r)){if(-1===r&&(r=a),a-r+1===c)return r*o}else-1!==r&&(a-=a-r),r=-1}else for(n+c>s&&(n=s-c),a=n;a>=0;a--){let n=!0;for(let r=0;r<c;r++)if(u(e,a+r)!==u(t,r)){n=!1;break}if(n)return a}return-1}function I(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const a=t.length;let o;for(r>a/2&&(r=a/2),o=0;o<r;++o){const r=parseInt(t.substr(2*o,2),16);if(K(r))return o;e[n+o]=r}return o}function w(e,t,n,r){return Y(V(t,e.length-n),e,n,r)}function E(e,t,n,r){return Y(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function B(e,t,n,r){return Y($(t),e,n,r)}function N(e,t,n,r){return Y(function(e,t){let n,r,i;const a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function b(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function v(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=o}return function(e){const t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=S));return n}(r)}t.kMaxLength=o,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},c.allocUnsafe=function(e){return A(e)},c.allocUnsafeSlow=function(e){return A(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(J(t,Uint8Array))i+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},c.byteLength=h,c.prototype._isBuffer=!0,c.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 t=0;t<e;t+=2)f(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?v(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,i){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0);const s=Math.min(a,o),u=this.slice(r,i),l=e.slice(t,n);for(let e=0;e<s;++e)if(u[e]!==l[e]){a=u[e],o=l[e];break}return a<o?-1:o<a?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let a=!1;for(;;)switch(r){case"hex":return I(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return B(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function T(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function x(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function _(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=W[e[r]];return i}function Q(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function P(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function z(e,t,n,r,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,i){G(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function k(e,t,n,r,i){G(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function O(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,r,a){return t=+t,n>>>=0,a||O(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function D(e,t,n,r,a){return t=+t,n>>>=0,a||O(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||z(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||z(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);z(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);z(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const a=c.isBuffer(e)?e:c.from(e,r),o=a.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};const q={};function F(e,t,n){q[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function U(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function G(e,t,n,r,i,a){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=a>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(a+1)}${r}`:`>= -(2${r} ** ${8*(a+1)-1}${r}) and < 2 ** ${8*(a+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new q.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,i,a)}function L(e,t){if("number"!=typeof e)throw new q.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new q.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new q.ERR_BUFFER_OUT_OF_BOUNDS;throw new q.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=U(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const j=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let i=null;const a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function $(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const W=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},2341:function(e){"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,n,r)=>`${t}${0===r?"":","}${e(void 0===n||"symbol"==typeof n?null:n)}`),"")}]`:`{${Object.keys(t).sort().reduce(((n,r)=>void 0===t[r]||"symbol"==typeof t[r]?n:`${n}${0===n.length?"":","}${e(r)}:${e(t[r])}`),"")}}`}},4903:function(e){var t=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},7007:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}h(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,a,o,u;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){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 A(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(a){r.once&&e.removeEventListener(t,i),n(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=m(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,A(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,A(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},251:function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,c=(1<<s)-1,u=c>>1,l=-7,A=n?i-1:0,d=n?-1:1,p=e[t+A];for(A+=d,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+A],A+=d,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+e[t+A],A+=d,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),a-=u}return(p?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,c,u=8*a-i-1,l=(1<<u)-1,A=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,m=r?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+A>=1?d/c:d*Math.pow(2,1-A))*c>=2&&(o++,c/=2),o+A>=l?(s=0,o=l):o+A>=1?(s=(t*c-1)*Math.pow(2,i),o+=A):(s=t*Math.pow(2,A-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&s,p+=m,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+p]=255&o,p+=m,o/=256,u-=8);e[n+p-m]|=128*h}},6698:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},1013:function(e,t,n){var r=n(7372).stringify,i=n(8146);e.exports=function(e){return{parse:i(e),stringify:r}},e.exports.parse=i(),e.exports.stringify=r},8146:function(e,t,n){var r=null;const i=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,a=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var o,s,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},A=function(e){throw{name:"SyntaxError",message:e,at:o,text:c}},d=function(e){return e&&e!==s&&A("Expected '"+e+"' instead of '"+s+"'"),s=c.charAt(o),o+=1,s},p=function(){var e,i="";for("-"===s&&(i="-",d("-"));s>="0"&&s<="9";)i+=s,d();if("."===s)for(i+=".";d()&&s>="0"&&s<="9";)i+=s;if("e"===s||"E"===s)for(i+=s,d(),"-"!==s&&"+"!==s||(i+=s,d());s>="0"&&s<="9";)i+=s,d();if(e=+i,isFinite(e))return null==r&&(r=n(1594)),i.length>15?t.storeAsString?i:t.useNativeBigInt?BigInt(i):new r(i):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;A("Bad number")},m=function(){var e,t,n,r="";if('"'===s)for(var i=o;d();){if('"'===s)return o-1>i&&(r+=c.substring(i,o-1)),d(),r;if("\\"===s){if(o-1>i&&(r+=c.substring(i,o-1)),d(),"u"===s){for(n=0,t=0;t<4&&(e=parseInt(d(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof l[s])break;r+=l[s]}i=o}}A("Bad string")},h=function(){for(;s&&s<=" ";)d()};return u=function(){switch(h(),s){case"{":return function(){var e,n=Object.create(null);if("{"===s){if(d("{"),h(),"}"===s)return d("}"),n;for(;s;){if(e=m(),h(),d(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&A('Duplicate key "'+e+'"'),!0===i.test(e)?"error"===t.protoAction?A("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===a.test(e)?"error"===t.constructorAction?A("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),h(),"}"===s)return d("}"),n;d(","),h()}}A("Bad object")}();case"[":return function(){var e=[];if("["===s){if(d("["),h(),"]"===s)return d("]"),e;for(;s;){if(e.push(u()),h(),"]"===s)return d("]"),e;d(","),h()}}A("Bad array")}();case'"':return m();case"-":return p();default:return s>="0"&&s<="9"?p():function(){switch(s){case"t":return d("t"),d("r"),d("u"),d("e"),!0;case"f":return d("f"),d("a"),d("l"),d("s"),d("e"),!1;case"n":return d("n"),d("u"),d("l"),d("l"),null}A("Unexpected '"+s+"'")}()}},function(e,t){var n;return c=e+"",o=0,s=" ",n=u(),h(),s&&A("Syntax error"),"function"==typeof t?function e(n,r){var i,a=n[r];return a&&"object"==typeof a&&Object.keys(a).forEach((function(t){void 0!==(i=e(a,t))?a[t]=i:delete a[t]})),t.call(n,r,a)}({"":n},""):n}}},7372:function(e,t,n){var r=n(1594),i=e.exports;!function(){"use strict";var e,t,n,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,(function(e){var t=o[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(i,a){var o,u,l,A,d,p=e,m=a[i],h=null!=m&&(m instanceof r||r.isBigNumber(m));switch(m&&"object"==typeof m&&"function"==typeof m.toJSON&&(m=m.toJSON(i)),"function"==typeof n&&(m=n.call(a,i,m)),typeof m){case"string":return h?m:s(m);case"number":return isFinite(m)?String(m):"null";case"boolean":case"null":case"bigint":return String(m);case"object":if(!m)return"null";if(e+=t,d=[],"[object Array]"===Object.prototype.toString.apply(m)){for(A=m.length,o=0;o<A;o+=1)d[o]=c(o,m)||"null";return l=0===d.length?"[]":e?"[\n"+e+d.join(",\n"+e)+"\n"+p+"]":"["+d.join(",")+"]",e=p,l}if(n&&"object"==typeof n)for(A=n.length,o=0;o<A;o+=1)"string"==typeof n[o]&&(l=c(u=n[o],m))&&d.push(s(u)+(e?": ":":")+l);else Object.keys(m).forEach((function(t){var n=c(t,m);n&&d.push(s(t)+(e?": ":":")+n)}));return l=0===d.length?"{}":e?"{\n"+e+d.join(",\n"+e)+"\n"+p+"}":"{"+d.join(",")+"}",e=p,l}}"function"!=typeof i.stringify&&(i.stringify=function(r,i,a){var o;if(e="",t="","number"==typeof a)for(o=0;o<a;o+=1)t+=" ";else"string"==typeof a&&(t=a);if(n=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return c("",{"":r})})}()},5606:function(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var s,c=[],u=!1,l=-1;function A(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=o(A);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||u||o(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},858:function(e,t){"use strict";function n(e){if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++)t.push(n(e[r]));const r=d(...t);return d(a(r.length,192),r)}const t=g(e);return 1===t.length&&t[0]<128?t:d(a(t.length,128),t)}function r(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function i(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function a(e,t){if(e<56)return Uint8Array.from([e+t]);const n=m(e),r=m(t+55+n.length/2);return Uint8Array.from(A(r+n))}function o(e,t=!1){if(!e||0===e.length)return Uint8Array.from([]);const n=s(g(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function s(e){let t,n,a,o,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,a=128===l?Uint8Array.from([]):r(e,1,t),2===t&&a[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:a,remainder:e.slice(t)}}if(l<=191){if(n=l-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=i(r(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return a=r(e,n,t+n),{data:a,remainder:e.slice(t+n)}}if(l<=247){for(t=l-191,o=r(e,1,t);o.length;)c=s(o),u.push(c.data),o=c.remainder;return{data:u,remainder:e.slice(t)}}{if(n=l-246,t=i(r(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const a=n+t;if(a>e.length)throw new Error("invalid RLP: total length is larger than the data");for(o=r(e,n,a);o.length;)c=s(o),u.push(c.data),o=c.remainder;return{data:u,remainder:e.slice(a)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.decode=t.encode=void 0,t.encode=n,t.decode=o;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let n=0;n<e.length;n++)t+=c[e[n]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function A(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=2*n;t[n]=l(e.slice(r,r+2))}return t}function d(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n}function p(e){return(new TextEncoder).encode(e)}function m(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function h(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function g(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return h(e)?A((t="string"!=typeof(n=e)?n:h(n)?n.slice(2):n).length%2?`0${t}`:t):p(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?A(m(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:d,hexToBytes:A,utf8ToBytes:p};const f={encode:n,decode:o};t.default=f},2861:function(e,t,n){var r=n(8287),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},392:function(e,t,n){var r=n(2861).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,a=e.length,o=this._len,s=0;s<a;){for(var c=o%i,u=Math.min(a-s,i-c),l=0;l<u;l++)n[c+l]=e[s+l];s+=u,(o+=u)%i==0&&this._update(n)}return this._len+=a,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},4107:function(e,t,n){var r=n(6698),i=n(392),a=n(2861).Buffer,o=[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],s=new Array(64);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,n){return n^e&(t^n)}function l(e,t,n){return e&t|n&(e|t)}function A(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,i),c.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},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,c=0|this._e,m=0|this._f,h=0|this._g,g=0|this._h,f=0;f<16;++f)n[f]=e.readInt32BE(4*f);for(;f<64;++f)n[f]=0|(((t=n[f-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[f-7]+p(n[f-15])+n[f-16];for(var y=0;y<64;++y){var C=g+d(c)+u(c,m,h)+o[y]+n[y]|0,I=A(r)+l(r,i,a)|0;g=h,h=m,m=c,c=s+C|0,s=a,a=i,i=r,r=C+I|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0,this._f=m+this._f|0,this._g=h+this._g|0,this._h=g+this._h|0},c.prototype._hash=function(){var e=a.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=c},9234:function(e,t,n){!function(t,r){"use strict";e.exports?e.exports=r(n(8947)):t.nacl.auth=r(t.nacl)}(this,(function(e){"use strict";if(!e)throw new Error("tweetnacl not loaded");var t=128,n=64;function r(r,i){var a,o,s=new Uint8Array(t+Math.max(n,r.length));for(i.length>t&&(i=e.hash(i)),a=0;a<t;a++)s[a]=54;for(a=0;a<i.length;a++)s[a]^=i[a];for(s.set(r,t),o=e.hash(s.subarray(0,t+r.length)),a=0;a<t;a++)s[a]=92;for(a=0;a<i.length;a++)s[a]^=i[a];return s.set(o,t),e.hash(s.subarray(0,t+o.length))}function i(e,t){var n=new Uint8Array(32);return n.set(r(e,t).subarray(0,32)),n}return i.full=function(e,t){return r(e,t)},i.authLength=32,i.authFullLength=64,i.keyLength=32,i}))},8947:function(e,t,n){!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},r=function(){throw new Error("no PRNG")},i=new Uint8Array(16),a=new Uint8Array(32);a[0]=9;var o=t(),s=t([1]),c=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),A=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function m(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function h(e,t,n,r,i){var a,o=0;for(a=0;a<i;a++)o|=e[t+a]^n[r+a];return(1&o-1>>>8)-1}function g(e,t,n,r){return h(e,t,n,r,16)}function f(e,t,n,r){return h(e,t,n,r,32)}function y(e,t,n,r){!function(e,t,n,r){for(var i,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,A=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,m=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,h=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,f=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,C=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,I=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=a,E=o,B=s,N=c,b=u,v=l,S=A,T=d,x=p,_=m,Q=h,P=g,z=f,R=y,k=C,O=I,M=0;M<20;M+=2)w^=(i=(z^=(i=(x^=(i=(b^=(i=w+z|0)<<7|i>>>25)+w|0)<<9|i>>>23)+b|0)<<13|i>>>19)+x|0)<<18|i>>>14,v^=(i=(E^=(i=(R^=(i=(_^=(i=v+E|0)<<7|i>>>25)+v|0)<<9|i>>>23)+_|0)<<13|i>>>19)+R|0)<<18|i>>>14,Q^=(i=(S^=(i=(B^=(i=(k^=(i=Q+S|0)<<7|i>>>25)+Q|0)<<9|i>>>23)+k|0)<<13|i>>>19)+B|0)<<18|i>>>14,O^=(i=(P^=(i=(T^=(i=(N^=(i=O+P|0)<<7|i>>>25)+O|0)<<9|i>>>23)+N|0)<<13|i>>>19)+T|0)<<18|i>>>14,w^=(i=(N^=(i=(B^=(i=(E^=(i=w+N|0)<<7|i>>>25)+w|0)<<9|i>>>23)+E|0)<<13|i>>>19)+B|0)<<18|i>>>14,v^=(i=(b^=(i=(T^=(i=(S^=(i=v+b|0)<<7|i>>>25)+v|0)<<9|i>>>23)+S|0)<<13|i>>>19)+T|0)<<18|i>>>14,Q^=(i=(_^=(i=(x^=(i=(P^=(i=Q+_|0)<<7|i>>>25)+Q|0)<<9|i>>>23)+P|0)<<13|i>>>19)+x|0)<<18|i>>>14,O^=(i=(k^=(i=(R^=(i=(z^=(i=O+k|0)<<7|i>>>25)+O|0)<<9|i>>>23)+z|0)<<13|i>>>19)+R|0)<<18|i>>>14;w=w+a|0,E=E+o|0,B=B+s|0,N=N+c|0,b=b+u|0,v=v+l|0,S=S+A|0,T=T+d|0,x=x+p|0,_=_+m|0,Q=Q+h|0,P=P+g|0,z=z+f|0,R=R+y|0,k=k+C|0,O=O+I|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=E>>>0&255,e[5]=E>>>8&255,e[6]=E>>>16&255,e[7]=E>>>24&255,e[8]=B>>>0&255,e[9]=B>>>8&255,e[10]=B>>>16&255,e[11]=B>>>24&255,e[12]=N>>>0&255,e[13]=N>>>8&255,e[14]=N>>>16&255,e[15]=N>>>24&255,e[16]=b>>>0&255,e[17]=b>>>8&255,e[18]=b>>>16&255,e[19]=b>>>24&255,e[20]=v>>>0&255,e[21]=v>>>8&255,e[22]=v>>>16&255,e[23]=v>>>24&255,e[24]=S>>>0&255,e[25]=S>>>8&255,e[26]=S>>>16&255,e[27]=S>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255,e[32]=x>>>0&255,e[33]=x>>>8&255,e[34]=x>>>16&255,e[35]=x>>>24&255,e[36]=_>>>0&255,e[37]=_>>>8&255,e[38]=_>>>16&255,e[39]=_>>>24&255,e[40]=Q>>>0&255,e[41]=Q>>>8&255,e[42]=Q>>>16&255,e[43]=Q>>>24&255,e[44]=P>>>0&255,e[45]=P>>>8&255,e[46]=P>>>16&255,e[47]=P>>>24&255,e[48]=z>>>0&255,e[49]=z>>>8&255,e[50]=z>>>16&255,e[51]=z>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=k>>>0&255,e[57]=k>>>8&255,e[58]=k>>>16&255,e[59]=k>>>24&255,e[60]=O>>>0&255,e[61]=O>>>8&255,e[62]=O>>>16&255,e[63]=O>>>24&255}(e,t,n,r)}function C(e,t,n,r){!function(e,t,n,r){for(var i,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,A=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,m=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,h=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,f=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,C=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,I=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=0;w<20;w+=2)a^=(i=(f^=(i=(p^=(i=(u^=(i=a+f|0)<<7|i>>>25)+a|0)<<9|i>>>23)+u|0)<<13|i>>>19)+p|0)<<18|i>>>14,l^=(i=(o^=(i=(y^=(i=(m^=(i=l+o|0)<<7|i>>>25)+l|0)<<9|i>>>23)+m|0)<<13|i>>>19)+y|0)<<18|i>>>14,h^=(i=(A^=(i=(s^=(i=(C^=(i=h+A|0)<<7|i>>>25)+h|0)<<9|i>>>23)+C|0)<<13|i>>>19)+s|0)<<18|i>>>14,I^=(i=(g^=(i=(d^=(i=(c^=(i=I+g|0)<<7|i>>>25)+I|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,a^=(i=(c^=(i=(s^=(i=(o^=(i=a+c|0)<<7|i>>>25)+a|0)<<9|i>>>23)+o|0)<<13|i>>>19)+s|0)<<18|i>>>14,l^=(i=(u^=(i=(d^=(i=(A^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+A|0)<<13|i>>>19)+d|0)<<18|i>>>14,h^=(i=(m^=(i=(p^=(i=(g^=(i=h+m|0)<<7|i>>>25)+h|0)<<9|i>>>23)+g|0)<<13|i>>>19)+p|0)<<18|i>>>14,I^=(i=(C^=(i=(y^=(i=(f^=(i=I+C|0)<<7|i>>>25)+I|0)<<9|i>>>23)+f|0)<<13|i>>>19)+y|0)<<18|i>>>14;e[0]=a>>>0&255,e[1]=a>>>8&255,e[2]=a>>>16&255,e[3]=a>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=h>>>0&255,e[9]=h>>>8&255,e[10]=h>>>16&255,e[11]=h>>>24&255,e[12]=I>>>0&255,e[13]=I>>>8&255,e[14]=I>>>16&255,e[15]=I>>>24&255,e[16]=A>>>0&255,e[17]=A>>>8&255,e[18]=A>>>16&255,e[19]=A>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=m>>>0&255,e[29]=m>>>8&255,e[30]=m>>>16&255,e[31]=m>>>24&255}(e,t,n,r)}var I=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(e,t,n,r,i,a,o){var s,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=a[c];for(;i>=64;){for(y(l,u,o,I),c=0;c<64;c++)e[t+c]=n[r+c]^l[c];for(s=1,c=8;c<16;c++)s=s+(255&u[c])|0,u[c]=255&s,s>>>=8;i-=64,t+=64,r+=64}if(i>0)for(y(l,u,o,I),c=0;c<i;c++)e[t+c]=n[r+c]^l[c];return 0}function E(e,t,n,r,i){var a,o,s=new Uint8Array(16),c=new Uint8Array(64);for(o=0;o<16;o++)s[o]=0;for(o=0;o<8;o++)s[o]=r[o];for(;n>=64;){for(y(c,s,i,I),o=0;o<64;o++)e[t+o]=c[o];for(a=1,o=8;o<16;o++)a=a+(255&s[o])|0,s[o]=255&a,a>>>=8;n-=64,t+=64}if(n>0)for(y(c,s,i,I),o=0;o<n;o++)e[t+o]=c[o];return 0}function B(e,t,n,r,i){var a=new Uint8Array(32);C(a,r,i,I);for(var o=new Uint8Array(8),s=0;s<8;s++)o[s]=r[s+16];return E(e,t,n,o,a)}function N(e,t,n,r,i,a,o){var s=new Uint8Array(32);C(s,a,o,I);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=a[u+16];return w(e,t,n,r,i,c,s)}var b=function(e){var t,n,r,i,a,o,s,c;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|i<<9),a=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|a<<12),this.r[5]=a>>>1&8190,o=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(a>>>14|o<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(o>>>11|s<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|c<<8),this.r[9]=c>>>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 v(e,t,n,r,i,a){var o=new b(a);return o.update(n,r,i),o.finish(e,t),0}function S(e,t,n,r,i,a){var o=new Uint8Array(16);return v(o,0,n,r,i,a),g(e,t,o,0)}function T(e,t,n,r,i){var a;if(n<32)return-1;for(N(e,0,t,0,n,r,i),v(e,16,e,32,n-32,e),a=0;a<16;a++)e[a]=0;return 0}function x(e,t,n,r,i){var a,o=new Uint8Array(32);if(n<32)return-1;if(B(o,0,32,r,i),0!==S(t,16,t,32,n-32,o))return-1;for(N(e,0,t,0,n,r,i),a=0;a<32;a++)e[a]=0;return 0}function _(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function Q(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function P(e,t,n){for(var r,i=~(n-1),a=0;a<16;a++)r=i&(e[a]^t[a]),e[a]^=r,t[a]^=r}function z(e,n){var r,i,a,o=t(),s=t();for(r=0;r<16;r++)s[r]=n[r];for(Q(s),Q(s),Q(s),i=0;i<2;i++){for(o[0]=s[0]-65517,r=1;r<15;r++)o[r]=s[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),a=o[15]>>16&1,o[14]&=65535,P(s,o,1-a)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function R(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return z(n,e),z(r,t),f(n,0,r,0)}function k(e){var t=new Uint8Array(32);return z(t,e),1&t[0]}function O(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function M(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function D(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function q(e,t,n){var r,i,a=0,o=0,s=0,c=0,u=0,l=0,A=0,d=0,p=0,m=0,h=0,g=0,f=0,y=0,C=0,I=0,w=0,E=0,B=0,N=0,b=0,v=0,S=0,T=0,x=0,_=0,Q=0,P=0,z=0,R=0,k=0,O=n[0],M=n[1],D=n[2],q=n[3],F=n[4],U=n[5],G=n[6],L=n[7],H=n[8],j=n[9],V=n[10],$=n[11],Y=n[12],J=n[13],K=n[14],W=n[15];a+=(r=t[0])*O,o+=r*M,s+=r*D,c+=r*q,u+=r*F,l+=r*U,A+=r*G,d+=r*L,p+=r*H,m+=r*j,h+=r*V,g+=r*$,f+=r*Y,y+=r*J,C+=r*K,I+=r*W,o+=(r=t[1])*O,s+=r*M,c+=r*D,u+=r*q,l+=r*F,A+=r*U,d+=r*G,p+=r*L,m+=r*H,h+=r*j,g+=r*V,f+=r*$,y+=r*Y,C+=r*J,I+=r*K,w+=r*W,s+=(r=t[2])*O,c+=r*M,u+=r*D,l+=r*q,A+=r*F,d+=r*U,p+=r*G,m+=r*L,h+=r*H,g+=r*j,f+=r*V,y+=r*$,C+=r*Y,I+=r*J,w+=r*K,E+=r*W,c+=(r=t[3])*O,u+=r*M,l+=r*D,A+=r*q,d+=r*F,p+=r*U,m+=r*G,h+=r*L,g+=r*H,f+=r*j,y+=r*V,C+=r*$,I+=r*Y,w+=r*J,E+=r*K,B+=r*W,u+=(r=t[4])*O,l+=r*M,A+=r*D,d+=r*q,p+=r*F,m+=r*U,h+=r*G,g+=r*L,f+=r*H,y+=r*j,C+=r*V,I+=r*$,w+=r*Y,E+=r*J,B+=r*K,N+=r*W,l+=(r=t[5])*O,A+=r*M,d+=r*D,p+=r*q,m+=r*F,h+=r*U,g+=r*G,f+=r*L,y+=r*H,C+=r*j,I+=r*V,w+=r*$,E+=r*Y,B+=r*J,N+=r*K,b+=r*W,A+=(r=t[6])*O,d+=r*M,p+=r*D,m+=r*q,h+=r*F,g+=r*U,f+=r*G,y+=r*L,C+=r*H,I+=r*j,w+=r*V,E+=r*$,B+=r*Y,N+=r*J,b+=r*K,v+=r*W,d+=(r=t[7])*O,p+=r*M,m+=r*D,h+=r*q,g+=r*F,f+=r*U,y+=r*G,C+=r*L,I+=r*H,w+=r*j,E+=r*V,B+=r*$,N+=r*Y,b+=r*J,v+=r*K,S+=r*W,p+=(r=t[8])*O,m+=r*M,h+=r*D,g+=r*q,f+=r*F,y+=r*U,C+=r*G,I+=r*L,w+=r*H,E+=r*j,B+=r*V,N+=r*$,b+=r*Y,v+=r*J,S+=r*K,T+=r*W,m+=(r=t[9])*O,h+=r*M,g+=r*D,f+=r*q,y+=r*F,C+=r*U,I+=r*G,w+=r*L,E+=r*H,B+=r*j,N+=r*V,b+=r*$,v+=r*Y,S+=r*J,T+=r*K,x+=r*W,h+=(r=t[10])*O,g+=r*M,f+=r*D,y+=r*q,C+=r*F,I+=r*U,w+=r*G,E+=r*L,B+=r*H,N+=r*j,b+=r*V,v+=r*$,S+=r*Y,T+=r*J,x+=r*K,_+=r*W,g+=(r=t[11])*O,f+=r*M,y+=r*D,C+=r*q,I+=r*F,w+=r*U,E+=r*G,B+=r*L,N+=r*H,b+=r*j,v+=r*V,S+=r*$,T+=r*Y,x+=r*J,_+=r*K,Q+=r*W,f+=(r=t[12])*O,y+=r*M,C+=r*D,I+=r*q,w+=r*F,E+=r*U,B+=r*G,N+=r*L,b+=r*H,v+=r*j,S+=r*V,T+=r*$,x+=r*Y,_+=r*J,Q+=r*K,P+=r*W,y+=(r=t[13])*O,C+=r*M,I+=r*D,w+=r*q,E+=r*F,B+=r*U,N+=r*G,b+=r*L,v+=r*H,S+=r*j,T+=r*V,x+=r*$,_+=r*Y,Q+=r*J,P+=r*K,z+=r*W,C+=(r=t[14])*O,I+=r*M,w+=r*D,E+=r*q,B+=r*F,N+=r*U,b+=r*G,v+=r*L,S+=r*H,T+=r*j,x+=r*V,_+=r*$,Q+=r*Y,P+=r*J,z+=r*K,R+=r*W,I+=(r=t[15])*O,o+=38*(E+=r*D),s+=38*(B+=r*q),c+=38*(N+=r*F),u+=38*(b+=r*U),l+=38*(v+=r*G),A+=38*(S+=r*L),d+=38*(T+=r*H),p+=38*(x+=r*j),m+=38*(_+=r*V),h+=38*(Q+=r*$),g+=38*(P+=r*Y),f+=38*(z+=r*J),y+=38*(R+=r*K),C+=38*(k+=r*W),a=(r=(a+=38*(w+=r*M))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),A=(r=A+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),C=(r=C+i+65535)-65536*(i=Math.floor(r/65536)),I=(r=I+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),A=(r=A+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),C=(r=C+i+65535)-65536*(i=Math.floor(r/65536)),I=(r=I+i+65535)-65536*(i=Math.floor(r/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=A,e[7]=d,e[8]=p,e[9]=m,e[10]=h,e[11]=g,e[12]=f,e[13]=y,e[14]=C,e[15]=I}function F(e,t){q(e,t,t)}function U(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)F(i,i),2!==r&&4!==r&&q(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function G(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=250;r>=0;r--)F(i,i),1!==r&&q(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function L(e,n,r){var i,a,o=new Uint8Array(32),s=new Float64Array(80),u=t(),l=t(),A=t(),d=t(),p=t(),m=t();for(a=0;a<31;a++)o[a]=n[a];for(o[31]=127&n[31]|64,o[0]&=248,O(s,r),a=0;a<16;a++)l[a]=s[a],d[a]=u[a]=A[a]=0;for(u[0]=d[0]=1,a=254;a>=0;--a)P(u,l,i=o[a>>>3]>>>(7&a)&1),P(A,d,i),M(p,u,A),D(u,u,A),M(A,l,d),D(l,l,d),F(d,p),F(m,u),q(u,A,u),q(A,l,p),M(p,u,A),D(u,u,A),F(l,u),D(A,d,m),q(u,A,c),M(u,u,d),q(A,A,u),q(u,d,m),q(d,l,s),F(l,p),P(u,l,i),P(A,d,i);for(a=0;a<16;a++)s[a+16]=u[a],s[a+32]=A[a],s[a+48]=l[a],s[a+64]=d[a];var h=s.subarray(32),g=s.subarray(16);return U(h,h),q(g,g,h),z(e,g),0}function H(e,t){return L(e,t,a)}function j(e,t){return r(t,32),H(e,t)}function V(e,t,n){var r=new Uint8Array(32);return L(r,n,t),C(e,i,r,I)}b.prototype.blocks=function(e,t,n){for(var r,i,a,o,s,c,u,l,A,d,p,m,h,g,f,y,C,I,w,E=this.fin?0:2048,B=this.h[0],N=this.h[1],b=this.h[2],v=this.h[3],S=this.h[4],T=this.h[5],x=this.h[6],_=this.h[7],Q=this.h[8],P=this.h[9],z=this.r[0],R=this.r[1],k=this.r[2],O=this.r[3],M=this.r[4],D=this.r[5],q=this.r[6],F=this.r[7],U=this.r[8],G=this.r[9];n>=16;)d=A=0,d+=(B+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*z,d+=(N+=8191&(r>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*G),d+=(b+=8191&(i>>>10|(a=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*U),d+=(v+=8191&(a>>>7|(o=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),A=(d+=(S+=8191&(o>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*q))>>>13,d&=8191,d+=(T+=s>>>1&8191)*(5*D),d+=(x+=8191&(s>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*M),d+=(_+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*O),d+=(Q+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*k),p=A+=(d+=(P+=l>>>5|E)*(5*R))>>>13,p+=B*R,p+=N*z,p+=b*(5*G),p+=v*(5*U),A=(p+=S*(5*F))>>>13,p&=8191,p+=T*(5*q),p+=x*(5*D),p+=_*(5*M),p+=Q*(5*O),A+=(p+=P*(5*k))>>>13,p&=8191,m=A,m+=B*k,m+=N*R,m+=b*z,m+=v*(5*G),A=(m+=S*(5*U))>>>13,m&=8191,m+=T*(5*F),m+=x*(5*q),m+=_*(5*D),m+=Q*(5*M),h=A+=(m+=P*(5*O))>>>13,h+=B*O,h+=N*k,h+=b*R,h+=v*z,A=(h+=S*(5*G))>>>13,h&=8191,h+=T*(5*U),h+=x*(5*F),h+=_*(5*q),h+=Q*(5*D),g=A+=(h+=P*(5*M))>>>13,g+=B*M,g+=N*O,g+=b*k,g+=v*R,A=(g+=S*z)>>>13,g&=8191,g+=T*(5*G),g+=x*(5*U),g+=_*(5*F),g+=Q*(5*q),f=A+=(g+=P*(5*D))>>>13,f+=B*D,f+=N*M,f+=b*O,f+=v*k,A=(f+=S*R)>>>13,f&=8191,f+=T*z,f+=x*(5*G),f+=_*(5*U),f+=Q*(5*F),y=A+=(f+=P*(5*q))>>>13,y+=B*q,y+=N*D,y+=b*M,y+=v*O,A=(y+=S*k)>>>13,y&=8191,y+=T*R,y+=x*z,y+=_*(5*G),y+=Q*(5*U),C=A+=(y+=P*(5*F))>>>13,C+=B*F,C+=N*q,C+=b*D,C+=v*M,A=(C+=S*O)>>>13,C&=8191,C+=T*k,C+=x*R,C+=_*z,C+=Q*(5*G),I=A+=(C+=P*(5*U))>>>13,I+=B*U,I+=N*F,I+=b*q,I+=v*D,A=(I+=S*M)>>>13,I&=8191,I+=T*O,I+=x*k,I+=_*R,I+=Q*z,w=A+=(I+=P*(5*G))>>>13,w+=B*G,w+=N*U,w+=b*F,w+=v*q,A=(w+=S*D)>>>13,w&=8191,w+=T*M,w+=x*O,w+=_*k,w+=Q*R,B=d=8191&(A=(A=((A+=(w+=P*z)>>>13)<<2)+A|0)+(d&=8191)|0),N=p+=A>>>=13,b=m&=8191,v=h&=8191,S=g&=8191,T=f&=8191,x=y&=8191,_=C&=8191,Q=I&=8191,P=w&=8191,t+=16,n-=16;this.h[0]=B,this.h[1]=N,this.h[2]=b,this.h[3]=v,this.h[4]=S,this.h[5]=T,this.h[6]=x,this.h[7]=_,this.h[8]=Q,this.h[9]=P},b.prototype.finish=function(e,t){var n,r,i,a,o=new Uint16Array(10);if(this.leftover){for(a=this.leftover,this.buffer[a++]=1;a<16;a++)this.buffer[a]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,a=2;a<10;a++)this.h[a]+=n,n=this.h[a]>>>13,this.h[a]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,o[0]=this.h[0]+5,n=o[0]>>>13,o[0]&=8191,a=1;a<10;a++)o[a]=this.h[a]+n,n=o[a]>>>13,o[a]&=8191;for(o[9]-=8192,r=(1^n)-1,a=0;a<10;a++)o[a]&=r;for(r=~r,a=0;a<10;a++)this.h[a]=this.h[a]&r|o[a];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,a=1;a<8;a++)i=(this.h[a]+this.pad[a]|0)+(i>>>16)|0,this.h[a]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},b.prototype.update=function(e,t,n){var r,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),r=0;r<i;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(i=n-n%16,this.blocks(e,t,i),t+=i,n-=i),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var $=T,Y=x,J=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function K(e,t,n,r){for(var i,a,o,s,c,u,l,A,d,p,m,h,g,f,y,C,I,w,E,B,N,b,v,S,T,x,_=new Int32Array(16),Q=new Int32Array(16),P=e[0],z=e[1],R=e[2],k=e[3],O=e[4],M=e[5],D=e[6],q=e[7],F=t[0],U=t[1],G=t[2],L=t[3],H=t[4],j=t[5],V=t[6],$=t[7],Y=0;r>=128;){for(E=0;E<16;E++)B=8*E+Y,_[E]=n[B+0]<<24|n[B+1]<<16|n[B+2]<<8|n[B+3],Q[E]=n[B+4]<<24|n[B+5]<<16|n[B+6]<<8|n[B+7];for(E=0;E<80;E++)if(i=P,a=z,o=R,s=k,c=O,u=M,l=D,d=F,p=U,m=G,h=L,g=H,f=j,y=V,v=65535&(b=$),S=b>>>16,T=65535&(N=q),x=N>>>16,v+=65535&(b=(H>>>14|O<<18)^(H>>>18|O<<14)^(O>>>9|H<<23)),S+=b>>>16,T+=65535&(N=(O>>>14|H<<18)^(O>>>18|H<<14)^(H>>>9|O<<23)),x+=N>>>16,v+=65535&(b=H&j^~H&V),S+=b>>>16,T+=65535&(N=O&M^~O&D),x+=N>>>16,N=J[2*E],v+=65535&(b=J[2*E+1]),S+=b>>>16,T+=65535&N,x+=N>>>16,N=_[E%16],S+=(b=Q[E%16])>>>16,T+=65535&N,x+=N>>>16,T+=(S+=(v+=65535&b)>>>16)>>>16,v=65535&(b=w=65535&v|S<<16),S=b>>>16,T=65535&(N=I=65535&T|(x+=T>>>16)<<16),x=N>>>16,v+=65535&(b=(F>>>28|P<<4)^(P>>>2|F<<30)^(P>>>7|F<<25)),S+=b>>>16,T+=65535&(N=(P>>>28|F<<4)^(F>>>2|P<<30)^(F>>>7|P<<25)),x+=N>>>16,S+=(b=F&U^F&G^U&G)>>>16,T+=65535&(N=P&z^P&R^z&R),x+=N>>>16,A=65535&(T+=(S+=(v+=65535&b)>>>16)>>>16)|(x+=T>>>16)<<16,C=65535&v|S<<16,v=65535&(b=h),S=b>>>16,T=65535&(N=s),x=N>>>16,S+=(b=w)>>>16,T+=65535&(N=I),x+=N>>>16,z=i,R=a,k=o,O=s=65535&(T+=(S+=(v+=65535&b)>>>16)>>>16)|(x+=T>>>16)<<16,M=c,D=u,q=l,P=A,U=d,G=p,L=m,H=h=65535&v|S<<16,j=g,V=f,$=y,F=C,E%16==15)for(B=0;B<16;B++)N=_[B],v=65535&(b=Q[B]),S=b>>>16,T=65535&N,x=N>>>16,N=_[(B+9)%16],v+=65535&(b=Q[(B+9)%16]),S+=b>>>16,T+=65535&N,x+=N>>>16,I=_[(B+1)%16],v+=65535&(b=((w=Q[(B+1)%16])>>>1|I<<31)^(w>>>8|I<<24)^(w>>>7|I<<25)),S+=b>>>16,T+=65535&(N=(I>>>1|w<<31)^(I>>>8|w<<24)^I>>>7),x+=N>>>16,I=_[(B+14)%16],S+=(b=((w=Q[(B+14)%16])>>>19|I<<13)^(I>>>29|w<<3)^(w>>>6|I<<26))>>>16,T+=65535&(N=(I>>>19|w<<13)^(w>>>29|I<<3)^I>>>6),x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,_[B]=65535&T|x<<16,Q[B]=65535&v|S<<16;v=65535&(b=F),S=b>>>16,T=65535&(N=P),x=N>>>16,N=e[0],S+=(b=t[0])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[0]=P=65535&T|x<<16,t[0]=F=65535&v|S<<16,v=65535&(b=U),S=b>>>16,T=65535&(N=z),x=N>>>16,N=e[1],S+=(b=t[1])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[1]=z=65535&T|x<<16,t[1]=U=65535&v|S<<16,v=65535&(b=G),S=b>>>16,T=65535&(N=R),x=N>>>16,N=e[2],S+=(b=t[2])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[2]=R=65535&T|x<<16,t[2]=G=65535&v|S<<16,v=65535&(b=L),S=b>>>16,T=65535&(N=k),x=N>>>16,N=e[3],S+=(b=t[3])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[3]=k=65535&T|x<<16,t[3]=L=65535&v|S<<16,v=65535&(b=H),S=b>>>16,T=65535&(N=O),x=N>>>16,N=e[4],S+=(b=t[4])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[4]=O=65535&T|x<<16,t[4]=H=65535&v|S<<16,v=65535&(b=j),S=b>>>16,T=65535&(N=M),x=N>>>16,N=e[5],S+=(b=t[5])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[5]=M=65535&T|x<<16,t[5]=j=65535&v|S<<16,v=65535&(b=V),S=b>>>16,T=65535&(N=D),x=N>>>16,N=e[6],S+=(b=t[6])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[6]=D=65535&T|x<<16,t[6]=V=65535&v|S<<16,v=65535&(b=$),S=b>>>16,T=65535&(N=q),x=N>>>16,N=e[7],S+=(b=t[7])>>>16,T+=65535&N,x+=N>>>16,x+=(T+=(S+=(v+=65535&b)>>>16)>>>16)>>>16,e[7]=q=65535&T|x<<16,t[7]=$=65535&v|S<<16,Y+=128,r-=128}return r}function W(e,t,n){var r,i=new Int32Array(8),a=new Int32Array(8),o=new Uint8Array(256),s=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,a[0]=4089235720,a[1]=2227873595,a[2]=4271175723,a[3]=1595750129,a[4]=2917565137,a[5]=725511199,a[6]=4215389547,a[7]=327033209,K(i,a,t,n),n%=128,r=0;r<n;r++)o[r]=t[s-n+r];for(o[n]=128,o[(n=256-128*(n<112?1:0))-9]=0,m(o,n-8,s/536870912|0,s<<3),K(i,a,o,n),r=0;r<8;r++)m(e,8*r,i[r],a[r]);return 0}function X(e,n){var r=t(),i=t(),a=t(),o=t(),s=t(),c=t(),u=t(),A=t(),d=t();D(r,e[1],e[0]),D(d,n[1],n[0]),q(r,r,d),M(i,e[0],e[1]),M(d,n[0],n[1]),q(i,i,d),q(a,e[3],n[3]),q(a,a,l),q(o,e[2],n[2]),M(o,o,o),D(s,i,r),D(c,o,a),M(u,o,a),M(A,i,r),q(e[0],s,c),q(e[1],A,u),q(e[2],u,c),q(e[3],s,A)}function Z(e,t,n){var r;for(r=0;r<4;r++)P(e[r],t[r],n)}function ee(e,n){var r=t(),i=t(),a=t();U(a,n[2]),q(r,n[0],a),q(i,n[1],a),z(e,i),e[31]^=k(r)<<7}function te(e,t,n){var r,i;for(_(e[0],o),_(e[1],s),_(e[2],s),_(e[3],o),i=255;i>=0;--i)Z(e,t,r=n[i/8|0]>>(7&i)&1),X(t,e),X(e,e),Z(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];_(r[0],A),_(r[1],d),_(r[2],s),q(r[3],A,d),te(e,r,n)}function re(e,n,i){var a,o=new Uint8Array(64),s=[t(),t(),t(),t()];for(i||r(n,32),W(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,ne(s,o),ee(e,s),a=0;a<32;a++)n[a+32]=e[a];return 0}var ie=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 ae(e,t){var n,r,i,a;for(r=63;r>=32;--r){for(n=0,i=r-32,a=r-12;i<a;++i)t[i]+=n-16*t[r]*ie[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*ie[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*ie[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function oe(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;ae(e,n)}function se(e,n,r,i){var a,o,s=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),A=[t(),t(),t(),t()];W(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64;var d=r+64;for(a=0;a<r;a++)e[64+a]=n[a];for(a=0;a<32;a++)e[32+a]=s[32+a];for(W(u,e.subarray(32),r+32),oe(u),ne(A,u),ee(e,A),a=32;a<64;a++)e[a]=i[a];for(W(c,e,r+64),oe(c),a=0;a<64;a++)l[a]=0;for(a=0;a<32;a++)l[a]=u[a];for(a=0;a<32;a++)for(o=0;o<32;o++)l[a+o]+=c[a]*s[o];return ae(e.subarray(32),l),d}function ce(e,n,r,i){var a,c=new Uint8Array(32),l=new Uint8Array(64),A=[t(),t(),t(),t()],d=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),i=t(),a=t(),c=t(),l=t(),A=t(),d=t();return _(e[2],s),O(e[1],n),F(a,e[1]),q(c,a,u),D(a,a,e[2]),M(c,e[2],c),F(l,c),F(A,l),q(d,A,l),q(r,d,a),q(r,r,c),G(r,r),q(r,r,a),q(r,r,c),q(r,r,c),q(e[0],r,c),F(i,e[0]),q(i,i,c),R(i,a)&&q(e[0],e[0],p),F(i,e[0]),q(i,i,c),R(i,a)?-1:(k(e[0])===n[31]>>7&&D(e[0],o,e[0]),q(e[3],e[0],e[1]),0)}(d,i))return-1;for(a=0;a<r;a++)e[a]=n[a];for(a=0;a<32;a++)e[a+32]=i[a];if(W(l,e,r),oe(l),te(A,d,l),ne(d,n.subarray(32)),X(A,d),ee(c,A),r-=64,f(n,0,c,0)){for(a=0;a<r;a++)e[a]=0;return-1}for(a=0;a<r;a++)e[a]=n[a+64];return r}var ue=64,le=32,Ae=64;function de(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function pe(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function me(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:C,crypto_stream_xor:N,crypto_stream:B,crypto_stream_salsa20_xor:w,crypto_stream_salsa20:E,crypto_onetimeauth:v,crypto_onetimeauth_verify:S,crypto_verify_16:g,crypto_verify_32:f,crypto_secretbox:T,crypto_secretbox_open:x,crypto_scalarmult:L,crypto_scalarmult_base:H,crypto_box_beforenm:V,crypto_box_afternm:$,crypto_box:function(e,t,n,r,i,a){var o=new Uint8Array(32);return V(o,i,a),$(e,t,n,r,o)},crypto_box_open:function(e,t,n,r,i,a){var o=new Uint8Array(32);return V(o,i,a),Y(e,t,n,r,o)},crypto_box_keypair:j,crypto_hash:W,crypto_sign:se,crypto_sign_keypair:re,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:Ae,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ie,pack25519:z,unpack25519:O,M:q,A:M,S:F,Z:D,pow2523:G,add:X,set25519:_,modL:ae,scalarmult:te,scalarbase:ne},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){pe(e,t,n),de(n,t);for(var r=new Uint8Array(32+e.length),i=new Uint8Array(r.length),a=0;a<e.length;a++)r[a+32]=e[a];return T(i,r,r.length,t,n),i.subarray(16)},e.secretbox.open=function(e,t,n){pe(e,t,n),de(n,t);for(var r=new Uint8Array(16+e.length),i=new Uint8Array(r.length),a=0;a<e.length;a++)r[a+16]=e[a];return r.length<32||0!==x(i,r,r.length,t,n)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(pe(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return L(n,e,t),n},e.scalarMult.base=function(e){if(pe(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return H(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,i){var a=e.box.before(r,i);return e.secretbox(t,n,a)},e.box.before=function(e,t){pe(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var n=new Uint8Array(32);return V(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,i){var a=e.box.before(r,i);return e.secretbox.open(t,n,a)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return j(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(pe(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return H(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(pe(e,t),t.length!==Ae)throw new Error("bad secret key size");var n=new Uint8Array(ue+e.length);return se(n,e,e.length,t),n},e.sign.open=function(e,t){if(pe(e,t),t.length!==le)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=ce(n,e,e.length,t);if(r<0)return null;for(var i=new Uint8Array(r),a=0;a<i.length;a++)i[a]=n[a];return i},e.sign.detached=function(t,n){for(var r=e.sign(t,n),i=new Uint8Array(ue),a=0;a<i.length;a++)i[a]=r[a];return i},e.sign.detached.verify=function(e,t,n){if(pe(e,t,n),t.length!==ue)throw new Error("bad signature size");if(n.length!==le)throw new Error("bad public key size");var r,i=new Uint8Array(ue+e.length),a=new Uint8Array(ue+e.length);for(r=0;r<ue;r++)i[r]=t[r];for(r=0;r<e.length;r++)i[r+ue]=e[r];return ce(a,i,i.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(Ae);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(pe(e),e.length!==Ae)throw new Error("bad secret key size");for(var t=new Uint8Array(le),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(pe(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),n=new Uint8Array(Ae),r=0;r<32;r++)n[r]=e[r];return re(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=Ae,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){pe(e);var t=new Uint8Array(64);return W(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return pe(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===h(e,0,t,0,e.length)},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,n){var r,i=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(i.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=i[r];me(i)})):(t=n(1281))&&t.randomBytes&&e.setPRNG((function(e,n){var r,i=t.randomBytes(n);for(r=0;r<n;r++)e[r]=i[r];me(i)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},8469:function(e,t,n){"use strict";var r=n(2861).Buffer,i=9007199254740991;function a(e){if(e<0||e>i||e%1!=0)throw new RangeError("value out of range")}function o(e){return a(e),e<253?1:e<=65535?3:e<=4294967295?5:9}e.exports={encode:function e(t,n,i){if(a(t),n||(n=r.allocUnsafe(o(t))),!r.isBuffer(n))throw new TypeError("buffer must be a Buffer instance");return i||(i=0),t<253?(n.writeUInt8(t,i),e.bytes=1):t<=65535?(n.writeUInt8(253,i),n.writeUInt16LE(t,i+1),e.bytes=3):t<=4294967295?(n.writeUInt8(254,i),n.writeUInt32LE(t,i+1),e.bytes=5):(n.writeUInt8(255,i),n.writeUInt32LE(t>>>0,i+1),n.writeUInt32LE(t/4294967296|0,i+5),e.bytes=9),n},decode:function e(t,n){if(!r.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");n||(n=0);var i=t.readUInt8(n);if(i<253)return e.bytes=1,i;if(253===i)return e.bytes=3,t.readUInt16LE(n+1);if(254===i)return e.bytes=5,t.readUInt32LE(n+1);e.bytes=9;var o=t.readUInt32LE(n+1),s=4294967296*t.readUInt32LE(n+5)+o;return a(s),s},encodingLength:o}},952:function(e,t,n){var r;if("object"==typeof globalThis)r=globalThis;else try{r=n(4903)}catch(e){}finally{if(r||"undefined"==typeof window||(r=window),!r)throw new Error("Could not determine global this")}var i=r.WebSocket||r.MozWebSocket,a=n(9840);function o(e,t){return t?new i(e,t):new i(e)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(o,e,{get:function(){return i[e]}})})),e.exports={w3cwebsocket:i?o:null,version:a}},9840:function(e,t,n){e.exports=n(9003).version},9180:function(){},1281:function(){},6040:function(e,t,n){"use strict";var r=n(8251);e.exports=r},7264:function(e,t,n){"use strict";var r=n(4139);n(768),n(8549),n(7152),n(1372),e.exports=r},9692:function(e,t,n){"use strict";var r=n(7045);e.exports=r},5663:function(e,t,n){"use strict";var r=n(70);e.exports=r},1926:function(e,t,n){"use strict";n(6750);var r=n(2046).Object,i=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(i.sham=!0)},3842:function(e,t,n){"use strict";n(8545),n(3643),n(4452),n(3997),n(5084),n(2596),n(5721),n(4954),n(4123),n(3377),n(2230),n(5344),n(1660),n(4610),n(3669),n(4810),n(3325),n(7024),n(8172),n(5205);var r=n(2046);e.exports=r.Symbol},1730:function(e,t,n){"use strict";n(9363),n(3643),n(7057),n(4954);var r=n(560);e.exports=r.f("iterator")},1661:function(e,t,n){"use strict";n(8537),n(3669);var r=n(560);e.exports=r.f("toPrimitive")},4997:function(e,t,n){"use strict";var r=n(6040);e.exports=r},2321:function(e,t,n){"use strict";var r=n(7264);n(3939),n(1785),n(8703),n(4664),n(3422),n(36),n(6878),n(9671),n(359),e.exports=r},2231:function(e,t,n){"use strict";var r=n(9692);e.exports=r},9280:function(e,t,n){"use strict";var r=n(5663);e.exports=r},2159:function(e,t,n){"use strict";var r=n(2250),i=n(4640),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not a function")}},43:function(e,t,n){"use strict";var r=n(4018),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a("Can't set "+i(e)+" as a prototype")}},2156:function(e){"use strict";e.exports=function(){}},6624:function(e,t,n){"use strict";var r=n(6285),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not an object")}},4436:function(e,t,n){"use strict";var r=n(7374),i=n(4849),a=n(575),o=function(e){return function(t,n,o){var s,c=r(t),u=a(c),l=i(o,u);if(e&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},726:function(e,t,n){"use strict";var r=n(8311),i=n(1907),a=n(6946),o=n(9298),s=n(575),c=n(6968),u=i([].push),l=function(e){var t=1===e,n=2===e,i=3===e,l=4===e,A=6===e,d=7===e,p=5===e||A;return function(m,h,g,f){for(var y,C,I=o(m),w=a(I),E=s(w),B=r(h,g),N=0,b=f||c,v=t?b(m,E):n||d?b(m,0):void 0;E>N;N++)if((p||N in w)&&(C=B(y=w[N],N,I),e))if(t)v[N]=C;else if(C)switch(e){case 3:return!0;case 5:return y;case 6:return N;case 2:u(v,y)}else switch(e){case 4:return!1;case 7:u(v,y)}return A?-1:i||l?l:v}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},7171:function(e,t,n){"use strict";var r=n(8828),i=n(6264),a=n(5683),o=i("species");e.exports=function(e){return a>=51||!r((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},3427:function(e,t,n){"use strict";var r=n(1907);e.exports=r([].slice)},4010:function(e,t,n){"use strict";var r=n(1793),i=n(5468),a=n(6285),o=n(6264)("species"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===s||r(t.prototype))||a(t)&&null===(t=t[o]))&&(t=void 0)),void 0===t?s:t}},6968:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},5807:function(e,t,n){"use strict";var r=n(1907),i=r({}.toString),a=r("".slice);e.exports=function(e){return a(i(e),8,-1)}},3948:function(e,t,n){"use strict";var r=n(2623),i=n(2250),a=n(5807),o=n(6264)("toStringTag"),s=Object,c="Arguments"===a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=s(e),o))?n:c?a(t):"Object"===(r=a(t))&&i(t.callee)?"Arguments":r}},7382:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},9550:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},1626:function(e,t,n){"use strict";var r=n(9447),i=n(4284),a=n(5817);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},5817:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},5543:function(e,t,n){"use strict";var r=n(470),i=n(4284),a=n(5817);e.exports=function(e,t,n){var o=r(t);o in e?i.f(e,o,a(0,n)):e[o]=n}},9251:function(e,t,n){"use strict";var r=n(4284);e.exports=function(e,t,n){return r.f(e,t,n)}},8055:function(e,t,n){"use strict";var r=n(1626);e.exports=function(e,t,n,i){return i&&i.enumerable?e[t]=n:r(e,t,n),e}},2532:function(e,t,n){"use strict";var r=n(1010),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},9447:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:function(e,t,n){"use strict";var r=n(1010),i=n(6285),a=r.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},8024:function(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},9287:function(e){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},4723:function(e){"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},5683:function(e,t,n){"use strict";var r,i,a=n(1010),o=n(4723),s=a.process,c=a.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},376:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1091:function(e,t,n){"use strict";var r=n(1010),i=n(6024),a=n(2361),o=n(2250),s=n(3846).f,c=n(7463),u=n(2046),l=n(8311),A=n(1626),d=n(9724),p=function(e){var t=function(n,r,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,a)}return i(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,i,m,h,g,f,y,C,I,w=e.target,E=e.global,B=e.stat,N=e.proto,b=E?r:B?r[w]:r[w]&&r[w].prototype,v=E?u:u[w]||A(u,w,{})[w],S=v.prototype;for(h in t)i=!(n=c(E?h:w+(B?".":"#")+h,e.forced))&&b&&d(b,h),f=v[h],i&&(y=e.dontCallGetSet?(I=s(b,h))&&I.value:b[h]),g=i&&y?y:t[h],(n||N||typeof f!=typeof g)&&(C=e.bind&&i?l(g,r):e.wrap&&i?p(g):N&&o(g)?a(g):g,(e.sham||g&&g.sham||f&&f.sham)&&A(C,"sham",!0),A(v,h,C),N&&(d(u,m=w+"Prototype")||A(u,m,{}),A(u[m],h,g),e.real&&S&&(n||!S[h])&&A(S,h,g)))}},8828:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},6024:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype,a=i.apply,o=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(a):function(){return o.apply(a,arguments)})},8311:function(e,t,n){"use strict";var r=n(2361),i=n(2159),a=n(1505),o=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:a?o(e,t):function(){return e.apply(t,arguments)}}},1505:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},3930:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},6833:function(e,t,n){"use strict";var r=n(9447),i=n(9724),a=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,s=i(a,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&o(a,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},1871:function(e,t,n){"use strict";var r=n(1907),i=n(2159);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},2361:function(e,t,n){"use strict";var r=n(5807),i=n(1907);e.exports=function(e){if("Function"===r(e))return i(e)}},1907:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype,a=i.call,o=r&&i.bind.bind(a,a);e.exports=r?o:function(e){return function(){return a.apply(e,arguments)}}},5582:function(e,t,n){"use strict";var r=n(2046),i=n(1010),a=n(2250),o=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},6656:function(e,t,n){"use strict";var r=n(1907),i=n(1793),a=n(2250),o=n(5807),s=n(160),c=r([].push);e.exports=function(e){if(a(e))return e;if(i(e)){for(var t=e.length,n=[],r=0;r<t;r++){var u=e[r];"string"==typeof u?c(n,u):"number"!=typeof u&&"Number"!==o(u)&&"String"!==o(u)||c(n,s(u))}var l=n.length,A=!0;return function(e,t){if(A)return A=!1,t;if(i(this))return t;for(var r=0;r<l;r++)if(n[r]===e)return t}}}},9367:function(e,t,n){"use strict";var r=n(2159),i=n(7136);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},1010:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:function(e,t,n){"use strict";var r=n(1907),i=n(9298),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},8530:function(e){"use strict";e.exports={}},2416:function(e,t,n){"use strict";var r=n(5582);e.exports=r("document","documentElement")},3648:function(e,t,n){"use strict";var r=n(9447),i=n(8828),a=n(9552);e.exports=!r&&!i((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},6946:function(e,t,n){"use strict";var r=n(1907),i=n(8828),a=n(5807),o=Object,s=r("".split);e.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"===a(e)?s(e,""):o(e)}:o},2647:function(e,t,n){"use strict";var r=n(1907),i=n(2250),a=n(3747),o=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(e){return o(e)}),e.exports=a.inspectSource},4932:function(e,t,n){"use strict";var r,i,a,o=n(551),s=n(1010),c=n(6285),u=n(1626),l=n(9724),A=n(3747),d=n(2522),p=n(8530),m="Object already initialized",h=s.TypeError,g=s.WeakMap;if(o||A.state){var f=A.state||(A.state=new g);f.get=f.get,f.has=f.has,f.set=f.set,r=function(e,t){if(f.has(e))throw new h(m);return t.facade=e,f.set(e,t),t},i=function(e){return f.get(e)||{}},a=function(e){return f.has(e)}}else{var y=d("state");p[y]=!0,r=function(e,t){if(l(e,y))throw new h(m);return t.facade=e,u(e,y,t),t},i=function(e){return l(e,y)?e[y]:{}},a=function(e){return l(e,y)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw new h("Incompatible receiver, "+e+" required");return n}}}},1793:function(e,t,n){"use strict";var r=n(5807);e.exports=Array.isArray||function(e){return"Array"===r(e)}},2250:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},5468:function(e,t,n){"use strict";var r=n(1907),i=n(8828),a=n(2250),o=n(3948),s=n(5582),c=n(2647),u=function(){},l=s("Reflect","construct"),A=/^\s*(?:class|function)\b/,d=r(A.exec),p=!A.test(u),m=function(e){if(!a(e))return!1;try{return l(u,[],e),!0}catch(e){return!1}},h=function(e){if(!a(e))return!1;switch(o(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(A,c(e))}catch(e){return!0}};h.sham=!0,e.exports=!l||i((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?h:m},7463:function(e,t,n){"use strict";var r=n(8828),i=n(2250),a=/#|\.prototype\./,o=function(e,t){var n=c[s(e)];return n===l||n!==u&&(i(t)?r(t):!!t)},s=o.normalize=function(e){return String(e).replace(a,".").toLowerCase()},c=o.data={},u=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},7136:function(e){"use strict";e.exports=function(e){return null==e}},6285:function(e,t,n){"use strict";var r=n(2250);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},4018:function(e,t,n){"use strict";var r=n(6285);e.exports=function(e){return r(e)||null===e}},7376:function(e){"use strict";e.exports=!0},5594:function(e,t,n){"use strict";var r=n(5582),i=n(2250),a=n(8280),o=n(1175),s=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&a(t.prototype,s(e))}},7181:function(e,t,n){"use strict";var r=n(5116).IteratorPrototype,i=n(8075),a=n(5817),o=n(4840),s=n(3742),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=i(r,{next:a(+!u,n)}),o(e,l,!1,!0),s[l]=c,e}},183:function(e,t,n){"use strict";var r=n(1091),i=n(3930),a=n(7376),o=n(6833),s=n(2250),c=n(7181),u=n(5972),l=n(9192),A=n(4840),d=n(1626),p=n(8055),m=n(6264),h=n(3742),g=n(5116),f=o.PROPER,y=o.CONFIGURABLE,C=g.IteratorPrototype,I=g.BUGGY_SAFARI_ITERATORS,w=m("iterator"),E="keys",B="values",N="entries",b=function(){return this};e.exports=function(e,t,n,o,m,g,v){c(n,t,o);var S,T,x,_=function(e){if(e===m&&k)return k;if(!I&&e&&e in z)return z[e];switch(e){case E:case B:case N:return function(){return new n(this,e)}}return function(){return new n(this)}},Q=t+" Iterator",P=!1,z=e.prototype,R=z[w]||z["@@iterator"]||m&&z[m],k=!I&&R||_(m),O="Array"===t&&z.entries||R;if(O&&(S=u(O.call(new e)))!==Object.prototype&&S.next&&(a||u(S)===C||(l?l(S,C):s(S[w])||p(S,w,b)),A(S,Q,!0,!0),a&&(h[Q]=b)),f&&m===B&&R&&R.name!==B&&(!a&&y?d(z,"name",B):(P=!0,k=function(){return i(R,this)})),m)if(T={values:_(B),keys:g?k:_(E),entries:_(N)},v)for(x in T)(I||P||!(x in z))&&p(z,x,T[x]);else r({target:t,proto:!0,forced:I||P},T);return a&&!v||z[w]===k||p(z,w,k,{name:m}),h[t]=k,T}},5116:function(e,t,n){"use strict";var r,i,a,o=n(8828),s=n(2250),c=n(6285),u=n(8075),l=n(5972),A=n(8055),d=n(6264),p=n(7376),m=d("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(i=l(l(a)))!==Object.prototype&&(r=i):h=!0),!c(r)||o((function(){var e={};return r[m].call(e)!==e}))?r={}:p&&(r=u(r)),s(r[m])||A(r,m,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},3742:function(e){"use strict";e.exports={}},575:function(e,t,n){"use strict";var r=n(3121);e.exports=function(e){return r(e.length)}},1176:function(e){"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},8075:function(e,t,n){"use strict";var r,i=n(6624),a=n(2220),o=n(376),s=n(8530),c=n(2416),u=n(9552),l=n(2522),A="prototype",d="script",p=l("IE_PROTO"),m=function(){},h=function(e){return"<"+d+">"+e+"</"+d+">"},g=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},f=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;f="undefined"!=typeof document?document.domain&&r?g(r):(t=u("iframe"),n="java"+d+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):g(r);for(var i=o.length;i--;)delete f[A][o[i]];return f()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m[A]=i(e),n=new m,m[A]=null,n[p]=e):n=f(),void 0===t?n:a.f(n,t)}},2220:function(e,t,n){"use strict";var r=n(9447),i=n(8661),a=n(4284),o=n(6624),s=n(7374),c=n(2875);t.f=r&&!i?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),i=c(t),u=i.length,l=0;u>l;)a.f(e,n=i[l++],r[n]);return e}},4284:function(e,t,n){"use strict";var r=n(9447),i=n(3648),a=n(8661),o=n(6624),s=n(470),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,A="enumerable",d="configurable",p="writable";t.f=r?a?function(e,t,n){if(o(e),t=s(t),o(n),"function"==typeof e&&"prototype"===t&&"value"in n&&p in n&&!n[p]){var r=l(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:A in n?n[A]:r[A],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(o(e),t=s(t),o(n),i)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},3846:function(e,t,n){"use strict";var r=n(9447),i=n(3930),a=n(2574),o=n(5817),s=n(7374),c=n(470),u=n(9724),l=n(3648),A=Object.getOwnPropertyDescriptor;t.f=r?A:function(e,t){if(e=s(e),t=c(t),l)try{return A(e,t)}catch(e){}if(u(e,t))return o(!i(a.f,e,t),e[t])}},5407:function(e,t,n){"use strict";var r=n(5807),i=n(7374),a=n(4443).f,o=n(3427),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"===r(e)?function(e){try{return a(e)}catch(e){return o(s)}}(e):a(i(e))}},4443:function(e,t,n){"use strict";var r=n(3045),i=n(376).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},7170:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},5972:function(e,t,n){"use strict";var r=n(9724),i=n(2250),a=n(9298),o=n(2522),s=n(7382),c=o("IE_PROTO"),u=Object,l=u.prototype;e.exports=s?u.getPrototypeOf:function(e){var t=a(e);if(r(t,c))return t[c];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof u?l:null}},8280:function(e,t,n){"use strict";var r=n(1907);e.exports=r({}.isPrototypeOf)},3045:function(e,t,n){"use strict";var r=n(1907),i=n(9724),a=n(7374),o=n(4436).indexOf,s=n(8530),c=r([].push);e.exports=function(e,t){var n,r=a(e),u=0,l=[];for(n in r)!i(s,n)&&i(r,n)&&c(l,n);for(;t.length>u;)i(r,n=t[u++])&&(~o(l,n)||c(l,n));return l}},2875:function(e,t,n){"use strict";var r=n(3045),i=n(376);e.exports=Object.keys||function(e){return r(e,i)}},2574:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},9192:function(e,t,n){"use strict";var r=n(1871),i=n(6624),a=n(43);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),a(r),t?e(n,r):n.__proto__=r,n}}():void 0)},4878:function(e,t,n){"use strict";var r=n(2623),i=n(3948);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},581:function(e,t,n){"use strict";var r=n(3930),i=n(2250),a=n(6285),o=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&i(n=e.toString)&&!a(s=r(n,e)))return s;if(i(n=e.valueOf)&&!a(s=r(n,e)))return s;if("string"!==t&&i(n=e.toString)&&!a(s=r(n,e)))return s;throw new o("Can't convert object to primitive value")}},2046:function(e){"use strict";e.exports={}},4239:function(e,t,n){"use strict";var r=n(7136),i=TypeError;e.exports=function(e){if(r(e))throw new i("Can't call method on "+e);return e}},4840:function(e,t,n){"use strict";var r=n(2623),i=n(4284).f,a=n(1626),o=n(9724),s=n(4878),c=n(6264)("toStringTag");e.exports=function(e,t,n,u){var l=n?e:e&&e.prototype;l&&(o(l,c)||i(l,c,{configurable:!0,value:t}),u&&!r&&a(l,"toString",s))}},2522:function(e,t,n){"use strict";var r=n(5816),i=n(6499),a=r("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},3747:function(e,t,n){"use strict";var r=n(1010),i=n(2532),a="__core-js_shared__",o=r[a]||i(a,{});e.exports=o},5816:function(e,t,n){"use strict";var r=n(7376),i=n(3747);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.35.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE",source:"https://github.com/zloirock/core-js"})},1470:function(e,t,n){"use strict";var r=n(1907),i=n(5482),a=n(160),o=n(4239),s=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,A=a(o(t)),d=i(n),p=A.length;return d<0||d>=p?e?"":void 0:(r=c(A,d))<55296||r>56319||d+1===p||(l=c(A,d+1))<56320||l>57343?e?s(A,d):r:e?u(A,d,d+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},9846:function(e,t,n){"use strict";var r=n(5683),i=n(8828),a=n(1010).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3467:function(e,t,n){"use strict";var r=n(3930),i=n(5582),a=n(6264),o=n(8055);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,s=a("toPrimitive");t&&!t[s]&&o(t,s,(function(e){return r(n,this)}),{arity:1})}},2595:function(e,t,n){"use strict";var r=n(5582),i=n(1907),a=r("Symbol"),o=a.keyFor,s=i(a.prototype.valueOf);e.exports=a.isRegisteredSymbol||function(e){try{return void 0!==o(s(e))}catch(e){return!1}}},9197:function(e,t,n){"use strict";for(var r=n(5816),i=n(5582),a=n(1907),o=n(5594),s=n(6264),c=i("Symbol"),u=c.isWellKnownSymbol,l=i("Object","getOwnPropertyNames"),A=a(c.prototype.valueOf),d=r("wks"),p=0,m=l(c),h=m.length;p<h;p++)try{var g=m[p];o(c[g])&&s(g)}catch(e){}e.exports=function(e){if(u&&u(e))return!0;try{for(var t=A(e),n=0,r=l(d),i=r.length;n<i;n++)if(d[r[n]]==t)return!0}catch(e){}return!1}},4411:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},4849:function(e,t,n){"use strict";var r=n(5482),i=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},7374:function(e,t,n){"use strict";var r=n(6946),i=n(4239);e.exports=function(e){return r(i(e))}},5482:function(e,t,n){"use strict";var r=n(1176);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},3121:function(e,t,n){"use strict";var r=n(5482),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},9298:function(e,t,n){"use strict";var r=n(4239),i=Object;e.exports=function(e){return i(r(e))}},6028:function(e,t,n){"use strict";var r=n(3930),i=n(6285),a=n(5594),o=n(9367),s=n(581),c=n(6264),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!i(e)||a(e))return e;var n,c=o(e,l);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!i(n)||a(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},470:function(e,t,n){"use strict";var r=n(6028),i=n(5594);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},2623:function(e,t,n){"use strict";var r={};r[n(6264)("toStringTag")]="z",e.exports="[object z]"===String(r)},160:function(e,t,n){"use strict";var r=n(3948),i=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},4640:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6499:function(e,t,n){"use strict";var r=n(1907),i=0,a=Math.random(),o=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++i+a,36)}},1175:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:function(e,t,n){"use strict";var r=n(9447),i=n(8828);e.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},551:function(e,t,n){"use strict";var r=n(1010),i=n(2250),a=r.WeakMap;e.exports=i(a)&&/native code/.test(String(a))},366:function(e,t,n){"use strict";var r=n(2046),i=n(9724),a=n(560),o=n(4284).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||o(t,e,{value:a.f(e)})}},560:function(e,t,n){"use strict";var r=n(6264);t.f=r},6264:function(e,t,n){"use strict";var r=n(1010),i=n(5816),a=n(9724),o=n(6499),s=n(9846),c=n(1175),u=r.Symbol,l=i("wks"),A=c?u.for||u:u&&u.withoutSetter||o;e.exports=function(e){return a(l,e)||(l[e]=s&&a(u,e)?u[e]:A("Symbol."+e)),l[e]}},8545:function(e,t,n){"use strict";var r=n(1091),i=n(8828),a=n(1793),o=n(6285),s=n(9298),c=n(575),u=n(8024),l=n(5543),A=n(6968),d=n(7171),p=n(6264),m=n(5683),h=p("isConcatSpreadable"),g=m>=51||!i((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),f=function(e){if(!o(e))return!1;var t=e[h];return void 0!==t?!!t:a(e)};r({target:"Array",proto:!0,arity:1,forced:!g||!d("concat")},{concat:function(e){var t,n,r,i,a,o=s(this),d=A(o,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(f(a=-1===t?o:arguments[t]))for(i=c(a),u(p+i),n=0;n<i;n++,p++)n in a&&l(d,p,a[n]);else u(p+1),l(d,p++,a);return d.length=p,d}})},9363:function(e,t,n){"use strict";var r=n(7374),i=n(2156),a=n(3742),o=n(4932),s=n(4284).f,c=n(183),u=n(9550),l=n(7376),A=n(9447),d="Array Iterator",p=o.set,m=o.getterFor(d);e.exports=c(Array,"Array",(function(e,t){p(this,{type:d,target:r(e),index:0,kind:t})}),(function(){var e=m(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,u(void 0,!0);switch(e.kind){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)}),"values");var h=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!l&&A&&"values"!==h.name)try{s(h,"name",{value:"values"})}catch(e){}},8537:function(){},9721:function(e,t,n){"use strict";var r=n(1091),i=n(5582),a=n(6024),o=n(3930),s=n(1907),c=n(8828),u=n(2250),l=n(5594),A=n(3427),d=n(6656),p=n(9846),m=String,h=i("JSON","stringify"),g=s(/./.exec),f=s("".charAt),y=s("".charCodeAt),C=s("".replace),I=s(1..toString),w=/[\uD800-\uDFFF]/g,E=/^[\uD800-\uDBFF]$/,B=/^[\uDC00-\uDFFF]$/,N=!p||c((function(){var e=i("Symbol")("stringify detection");return"[null]"!==h([e])||"{}"!==h({a:e})||"{}"!==h(Object(e))})),b=c((function(){return'"\\udf06\\ud834"'!==h("\udf06\ud834")||'"\\udead"'!==h("\udead")})),v=function(e,t){var n=A(arguments),r=d(t);if(u(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(u(r)&&(t=o(r,this,m(e),t)),!l(t))return t},a(h,null,n)},S=function(e,t,n){var r=f(n,t-1),i=f(n,t+1);return g(E,e)&&!g(B,i)||g(B,e)&&!g(E,r)?"\\u"+I(y(e,0),16):e};h&&r({target:"JSON",stat:!0,arity:3,forced:N||b},{stringify:function(e,t,n){var r=A(arguments),i=a(N?v:h,null,r);return b&&"string"==typeof i?C(i,w,S):i}})},7024:function(e,t,n){"use strict";var r=n(1010);n(4840)(r.JSON,"JSON",!0)},8172:function(){},6750:function(e,t,n){"use strict";var r=n(1091),i=n(9447),a=n(4284).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!i},{defineProperty:a})},5264:function(e,t,n){"use strict";var r=n(1091),i=n(9846),a=n(8828),o=n(7170),s=n(9298);r({target:"Object",stat:!0,forced:!i||a((function(){o.f(1)}))},{getOwnPropertySymbols:function(e){var t=o.f;return t?t(s(e)):[]}})},3643:function(){},5205:function(){},7057:function(e,t,n){"use strict";var r=n(1470).charAt,i=n(160),a=n(4932),o=n(183),s=n(9550),c="String Iterator",u=a.set,l=a.getterFor(c);o(String,"String",(function(e){u(this,{type:c,string:i(e),index:0})}),(function(){var e,t=l(this),n=t.string,i=t.index;return i>=n.length?s(void 0,!0):(e=r(n,i),t.index+=e.length,s(e,!1))}))},3997:function(e,t,n){"use strict";n(366)("asyncIterator")},3674:function(e,t,n){"use strict";var r=n(1091),i=n(1010),a=n(3930),o=n(1907),s=n(7376),c=n(9447),u=n(9846),l=n(8828),A=n(9724),d=n(8280),p=n(6624),m=n(7374),h=n(470),g=n(160),f=n(5817),y=n(8075),C=n(2875),I=n(4443),w=n(5407),E=n(7170),B=n(3846),N=n(4284),b=n(2220),v=n(2574),S=n(8055),T=n(9251),x=n(5816),_=n(2522),Q=n(8530),P=n(6499),z=n(6264),R=n(560),k=n(366),O=n(3467),M=n(4840),D=n(4932),q=n(726).forEach,F=_("hidden"),U="Symbol",G="prototype",L=D.set,H=D.getterFor(U),j=Object[G],V=i.Symbol,$=V&&V[G],Y=i.RangeError,J=i.TypeError,K=i.QObject,W=B.f,X=N.f,Z=w.f,ee=v.f,te=o([].push),ne=x("symbols"),re=x("op-symbols"),ie=x("wks"),ae=!K||!K[G]||!K[G].findChild,oe=function(e,t,n){var r=W(j,t);r&&delete j[t],X(e,t,n),r&&e!==j&&X(j,t,r)},se=c&&l((function(){return 7!==y(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?oe:X,ce=function(e,t){var n=ne[e]=y($);return L(n,{type:U,tag:e,description:t}),c||(n.description=t),n},ue=function(e,t,n){e===j&&ue(re,t,n),p(e);var r=h(t);return p(n),A(ne,r)?(n.enumerable?(A(e,F)&&e[F][r]&&(e[F][r]=!1),n=y(n,{enumerable:f(0,!1)})):(A(e,F)||X(e,F,f(1,y(null))),e[F][r]=!0),se(e,r,n)):X(e,r,n)},le=function(e,t){p(e);var n=m(t),r=C(n).concat(me(n));return q(r,(function(t){c&&!a(Ae,n,t)||ue(e,t,n[t])})),e},Ae=function(e){var t=h(e),n=a(ee,this,t);return!(this===j&&A(ne,t)&&!A(re,t))&&(!(n||!A(this,t)||!A(ne,t)||A(this,F)&&this[F][t])||n)},de=function(e,t){var n=m(e),r=h(t);if(n!==j||!A(ne,r)||A(re,r)){var i=W(n,r);return!i||!A(ne,r)||A(n,F)&&n[F][r]||(i.enumerable=!0),i}},pe=function(e){var t=Z(m(e)),n=[];return q(t,(function(e){A(ne,e)||A(Q,e)||te(n,e)})),n},me=function(e){var t=e===j,n=Z(t?re:m(e)),r=[];return q(n,(function(e){!A(ne,e)||t&&!A(j,e)||te(r,ne[e])})),r};u||(V=function(){if(d($,this))throw new J("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,t=P(e),n=function(e){var r=void 0===this?i:this;r===j&&a(n,re,e),A(r,F)&&A(r[F],t)&&(r[F][t]=!1);var o=f(1,e);try{se(r,t,o)}catch(e){if(!(e instanceof Y))throw e;oe(r,t,o)}};return c&&ae&&se(j,t,{configurable:!0,set:n}),ce(t,e)},S($=V[G],"toString",(function(){return H(this).tag})),S(V,"withoutSetter",(function(e){return ce(P(e),e)})),v.f=Ae,N.f=ue,b.f=le,B.f=de,I.f=w.f=pe,E.f=me,R.f=function(e){return ce(z(e),e)},c&&(T($,"description",{configurable:!0,get:function(){return H(this).description}}),s||S(j,"propertyIsEnumerable",Ae,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:V}),q(C(ie),(function(e){k(e)})),r({target:U,stat:!0,forced:!u},{useSetter:function(){ae=!0},useSimple:function(){ae=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?y(e):le(y(e),t)},defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:de}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:pe}),O(),M(V,U),Q[F]=!0},5084:function(){},3313:function(e,t,n){"use strict";var r=n(1091),i=n(5582),a=n(9724),o=n(160),s=n(5816),c=n(4411),u=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=o(e);if(a(u,t))return u[t];var n=i("Symbol")(t);return u[t]=n,l[n]=t,n}})},2596:function(e,t,n){"use strict";n(366)("hasInstance")},5721:function(e,t,n){"use strict";n(366)("isConcatSpreadable")},4954:function(e,t,n){"use strict";n(366)("iterator")},4452:function(e,t,n){"use strict";n(3674),n(3313),n(751),n(9721),n(5264)},751:function(e,t,n){"use strict";var r=n(1091),i=n(9724),a=n(5594),o=n(4640),s=n(5816),c=n(4411),u=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!a(e))throw new TypeError(o(e)+" is not a symbol");if(i(u,e))return u[e]}})},3377:function(e,t,n){"use strict";n(366)("matchAll")},4123:function(e,t,n){"use strict";n(366)("match")},2230:function(e,t,n){"use strict";n(366)("replace")},5344:function(e,t,n){"use strict";n(366)("search")},1660:function(e,t,n){"use strict";n(366)("species")},4610:function(e,t,n){"use strict";n(366)("split")},3669:function(e,t,n){"use strict";var r=n(366),i=n(3467);r("toPrimitive"),i()},4810:function(e,t,n){"use strict";var r=n(5582),i=n(366),a=n(4840);i("toStringTag"),a(r("Symbol"),"Symbol")},3325:function(e,t,n){"use strict";n(366)("unscopables")},768:function(e,t,n){"use strict";var r=n(6264),i=n(4284).f,a=r("metadata"),o=Function.prototype;void 0===o[a]&&i(o,a,{value:null})},8549:function(e,t,n){"use strict";n(366)("asyncDispose")},7152:function(e,t,n){"use strict";n(366)("dispose")},3939:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(2595)})},3422:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(2595)})},1785:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(9197)})},36:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(9197)})},8703:function(e,t,n){"use strict";n(366)("matcher")},6878:function(e,t,n){"use strict";n(366)("metadataKey")},1372:function(e,t,n){"use strict";n(366)("metadata")},4664:function(e,t,n){"use strict";n(366)("observable")},9671:function(e,t,n){"use strict";n(366)("patternMatch")},359:function(e,t,n){"use strict";n(366)("replaceAll")},2560:function(e,t,n){"use strict";n(9363);var r=n(9287),i=n(1010),a=n(4840),o=n(3742);for(var s in r)a(i[s],s),o[s]=o.Array},8251:function(e,t,n){"use strict";var r=n(1926);e.exports=r},4139:function(e,t,n){"use strict";var r=n(3842);n(2560),e.exports=r},7045:function(e,t,n){"use strict";var r=n(1730);n(2560),e.exports=r},70:function(e,t,n){"use strict";var r=n(1661);e.exports=r},9003:function(e){"use strict";e.exports={version:"1.0.34"}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{AE_AMOUNT_FORMATS:function(){return Ze},AbiVersion:function(){return bn},AccountBase:function(){return xl},AccountError:function(){return z},AccountGeneralized:function(){return xp},AccountLedger:function(){return Pp},AccountLedgerFactory:function(){return Rp},AeSdk:function(){return Ud},AeSdkAepp:function(){return wp},AeSdkBase:function(){return Fd},AeSdkMethods:function(){return Dd},AeSdkWallet:function(){return Sp},AensError:function(){return R},AensPointerContextError:function(){return oe},AeppError:function(){return k},AlreadyConnectedError:function(){return Ke},AmbiguousEventDefinitionError:function(){return Pe},ArgumentCountMismatchError:function(){return j},ArgumentError:function(){return L},BaseError:function(){return P},BrowserRuntimeConnection:function(){return BC},BrowserWindowMessageConnection:function(){return IC},BytecodeMismatchError:function(){return we},CLIENT_TTL:function(){return QC},CallReturnType:function(){return Mi},Channel:function(){return Ah},ChannelCallError:function(){return me},ChannelConnectionError:function(){return he},ChannelError:function(){return O},ChannelIncomingMessageError:function(){return ye},ChannelPingTimedOutError:function(){return ge},CompilerBase:function(){return kp},CompilerError:function(){return M},CompilerHttp:function(){return xm},ConsensusProtocolVersion:function(){return Bn},Contract:function(){return pd},ContractError:function(){return D},CryptographyError:function(){return q},DRY_RUN_ACCOUNT:function(){return hn},DecodeError:function(){return Ue},DelegationTag:function(){return Ol},DerivationError:function(){return kA},DryRunError:function(){return Le},DuplicateContractError:function(){return Ee},DuplicateNodeError:function(){return qe},Encoded:function(){return e},Encoding:function(){return Rt},IllegalArgumentError:function(){return H},IllegalBidFeeError:function(){return He},InactiveContractError:function(){return Be},InsufficientBalanceError:function(){return V},InsufficientNameFeeError:function(){return se},InternalError:function(){return re},InvalidAensNameError:function(){return ce},InvalidAuthDataError:function(){return Ie},InvalidChecksumError:function(){return ze},InvalidMethodInvocationError:function(){return Ne},InvalidPasswordError:function(){return Re},InvalidRpcMessageError:function(){return ue},InvalidSignatureError:function(){return je},InvalidTxError:function(){return Zl},LogicError:function(){return ne},MAX_AUTH_FUN_GAS:function(){return gn},MESSAGE_DIRECTION:function(){return Gd},METHODS:function(){return jd},MIN_GAS_PRICE:function(){return fn},MemoryAccount:function(){return jl},MerkleTreeHashMismatchError:function(){return ke},MissingCallbackError:function(){return le},MissingContractAddressError:function(){return be},MissingContractDefError:function(){return ve},MissingEventDefinitionError:function(){return Qe},MissingFunctionNameError:function(){return Se},MissingNodeInTreeError:function(){return Oe},MissingParamError:function(){return $},NAME_BID_MAX_LENGTH:function(){return bC},NAME_BID_RANGES:function(){return En},NAME_BID_TIMEOUT_BLOCKS:function(){return In},NAME_FEE_BID_INCREMENT:function(){return Cn},NAME_FEE_MULTIPLIER:function(){return yn},NAME_MAX_CLIENT_TTL:function(){return _C},NAME_MAX_LENGTH_FEE:function(){return wn},NAME_MAX_TTL:function(){return xC},NAME_TTL:function(){return TC},NoSerializerFoundError:function(){return Y},NoSuchContractFunctionError:function(){return xe},NoWalletConnectedError:function(){return We},Node:function(){return Sl},NodeError:function(){return F},NodeInvocationError:function(){return Te},NodeNotFoundError:function(){return Fe},NotImplementedError:function(){return ee},NotPayableFunctionError:function(){return _e},ORACLE_TTL:function(){return PC},ORACLE_TTL_TYPES:function(){return Oi},PayloadLengthError:function(){return Ge},PrefixNotFoundError:function(){return Ve},QUERY_TTL:function(){return zC},RESPONSE_TTL:function(){return RC},RPC_STATUS:function(){return Vd},RequestTimedOutError:function(){return J},RpcBroadcastError:function(){return NC},RpcConnectionDenyError:function(){return Xd},RpcConnectionError:function(){return Xe},RpcError:function(){return Yd},RpcInternalError:function(){return tp},RpcInvalidTransactionError:function(){return Jd},RpcMethodNotFoundError:function(){return np},RpcNotAuthorizeError:function(){return Zd},RpcPermissionDenyError:function(){return ep},RpcRejectedByUserError:function(){return Kd},RpcUnsupportedProtocolError:function(){return Wd},SUBSCRIPTION_TYPES:function(){return Hd},SchemaNotFoundError:function(){return $e},Tag:function(){return vn},TagNotFoundError:function(){return Ye},TransactionError:function(){return U},TxNotInChainError:function(){return Je},TxTimedOutError:function(){return K},TypeError:function(){return W},UnAuthorizedAccountError:function(){return Ae},UnavailableAccountError:function(){return ae},UnexpectedChannelMessageError:function(){return fe},UnexpectedTsError:function(){return ie},UnknownChannelStateError:function(){return Ce},UnknownNodeLengthError:function(){return Me},UnknownPathNibbleError:function(){return De},UnknownRpcClientError:function(){return de},UnsubscribedAccountError:function(){return pe},UnsupportedPlatformError:function(){return X},UnsupportedProtocolError:function(){return Z},UnsupportedVersionError:function(){return te},VmVersion:function(){return Nn},WALLET_TYPE:function(){return Ld},WalletError:function(){return G},_Middleware:function(){return pC},_MiddlewareSubscriber:function(){return Qh},_MiddlewareSubscriberDisconnected:function(){return Ih},_MiddlewareSubscriberError:function(){return Ch},_getPollInterval:function(){return Ln},aensBid:function(){return ZA},aensClaim:function(){return WA},aensPreclaim:function(){return XA},aensQuery:function(){return KA},aensRevoke:function(){return $A},aensTransfer:function(){return JA},aensUpdate:function(){return YA},awaitHeight:function(){return $n},buildAuthTxHash:function(){return Sd},buildAuthTxHashByGaMetaTx:function(){return Td},buildContractId:function(){return Tn},buildContractIdByContractTx:function(){return aa},buildTx:function(){return ta},buildTxAsync:function(){return na},buildTxHash:function(){return ia},commitmentHash:function(){return zn},computeAuctionEndBlock:function(){return Un},computeBidFee:function(){return Fn},connectionProxy:function(){return mC},createGeneralizedAccount:function(){return vd},decode:function(){return $t},decodeFateValue:function(){return SC},deriveChild:function(){return DA},derivePathFromKey:function(){return qA},derivePathFromSeed:function(){return UA},dump:function(){return vA},encode:function(){return Yt},encodeContractAddress:function(){return tn},encodeFateValue:function(){return vC},encodeUnsigned:function(){return Zt},ensureJwt:function(){return uA},ensureName:function(){return kn},extendOracleTtl:function(){return yd},formatAmount:function(){return tt},genSalt:function(){return Xt},generateKeyPair:function(){return rn},generateKeyPairFromSecret:function(){return nn},generateSaveHDWalletFromSeed:function(){return HA},getAccount:function(){return Jn},getAddressFromPriv:function(){return Kt},getBalance:function(){return Kn},getContract:function(){return or},getContractByteCode:function(){return ar},getCurrentGeneration:function(){return Wn},getDefaultPointerKey:function(){return Dn},getExecutionCost:function(){return Vl},getExecutionCostBySignedTx:function(){return $l},getExecutionCostUsingNode:function(){return Yl},getGeneration:function(){return Xn},getHdWalletAccountFromSeed:function(){return VA},getHeight:function(){return jn},getKeyBlock:function(){return er},getKeyPair:function(){return LA},getMasterKeyFromSeed:function(){return FA},getMicroBlockHeader:function(){return tr},getMicroBlockTransactions:function(){return Zn},getMinimumNameFee:function(){return qn},getName:function(){return sr},getOracleObject:function(){return Id},getQueryObject:function(){return gd},getSaveHDWalletAccounts:function(){return jA},getTransactionSignerAddress:function(){return Tl},hash:function(){return en},hashDomain:function(){return Rl},hashJson:function(){return zl},hashTypedData:function(){return kl},isAddressValid:function(){return Wt},isAuctionName:function(){return Gn},isJwt:function(){return cA},isNameValid:function(){return On},isValidKeypair:function(){return dn},messageToHash:function(){return un},oracleQueryId:function(){return xn},packDelegation:function(){return Fl},payForTransaction:function(){return Nd},poll:function(){return Vn},pollForQueries:function(){return md},pollForQueryResponse:function(){return hd},postQueryToOracle:function(){return fd},prefixedAmount:function(){return st},produceNameId:function(){return Pn},readInt:function(){return Rn},recover:function(){return bA},registerOracle:function(){return wd},resolveName:function(){return cr},respondToQuery:function(){return Cd},sendTransaction:function(){return eA},sign:function(){return an},signJwt:function(){return oA},signMessage:function(){return ln},spend:function(){return Ed},toAe:function(){return nt},toAettos:function(){return rt},toBytes:function(){return mn},transferFunds:function(){return Bd},txDryRun:function(){return ir},unpackDelegation:function(){return Ul},unpackJwt:function(){return sA},unpackTx:function(){return ra},verify:function(){return on},verifyJwt:function(){return lA},verifyMessage:function(){return An},verifyTransaction:function(){return Xl},waitForTxConfirm:function(){return Yn},walletDetector:function(){return wC}});var e={};n.r(e),n.d(e,{Encoding:function(){return Rt}});var t={};n.r(t),n.d(t,{_getPollInterval:function(){return Ln},awaitHeight:function(){return $n},getAccount:function(){return Jn},getBalance:function(){return Kn},getContract:function(){return or},getContractByteCode:function(){return ar},getCurrentGeneration:function(){return Wn},getGeneration:function(){return Xn},getHeight:function(){return jn},getKeyBlock:function(){return er},getMicroBlockHeader:function(){return tr},getMicroBlockTransactions:function(){return Zn},getName:function(){return sr},poll:function(){return Vn},resolveName:function(){return cr},txDryRun:function(){return ir},waitForTxConfirm:function(){return Yn}});var i={};n.r(i),n.d(i,{Account:function(){return Ws},AuctionEntry:function(){return yc},ByteCode:function(){return pc},Channel:function(){return Ic},ChannelCloseMutualTx:function(){return jc},ChannelCloseSoloTx:function(){return Vc},ChannelCreateTx:function(){return Uc},ChannelDepositTx:function(){return Gc},ChannelForceProgressTx:function(){return Hc},ChannelSetDelegatesTx:function(){return Kc},ChannelSettleTx:function(){return Yc},ChannelSlashTx:function(){return $c},ChannelSnapshotSoloTx:function(){return Jc},ChannelWithdrawTx:function(){return Lc},CheckTxInPoolResponse:function(){return lu},CommitmentId:function(){return qc},ContractCallObject:function(){return oc},ContractCallTx:function(){return iu},ContractCreateTx:function(){return ru},ContractObject:function(){return dc},CountResponse:function(){return Js},CreateContractUnsignedTx:function(){return gu},Currency:function(){return vc},Delegates:function(){return Hs},DryRunAccount:function(){return ec},DryRunCallContext:function(){return rc},DryRunCallReq:function(){return nc},DryRunInput:function(){return Zs},DryRunInputItem:function(){return tc},DryRunResult:function(){return ac},DryRunResults:function(){return ic},EncodedTx:function(){return lc},ErrorModel:function(){return Os},Event:function(){return sc},GAAttachTx:function(){return su},GAMetaTx:function(){return cu},GAObject:function(){return uc},GasPricesItem:function(){return Tc},Generation:function(){return Ks},HashResponse:function(){return Ds},Header:function(){return ks},HeightResponse:function(){return qs},Image:function(){return Sc},KeyBlock:function(){return Ms},MicroBlockHeader:function(){return Fs},NameClaimTx:function(){return kc},NameEntry:function(){return Cc},NameHash:function(){return Fc},NamePointer:function(){return Ys},NamePreclaimTx:function(){return Rc},NameRevokeTx:function(){return Dc},NameTransferTx:function(){return Mc},NameUpdateTx:function(){return Oc},NextNonceResponse:function(){return Xs},OffChainCallContract:function(){return hu},OffChainDeposit:function(){return pu},OffChainNewContract:function(){return mu},OffChainTransfer:function(){return Au},OffChainUpdate:function(){return js},OffChainWithdrawal:function(){return du},OracleExtendTx:function(){return Qc},OracleQueries:function(){return gc},OracleQuery:function(){return fc},OracleQueryTx:function(){return Pc},OracleRegisterTx:function(){return _c},OracleRespondTx:function(){return zc},PayingForTx:function(){return uu},PeerConnections:function(){return bc},PeerCount:function(){return eu},PeerCountAvailable:function(){return nu},PeerCountConnected:function(){return tu},PeerDetails:function(){return Xc},PeerPubKey:function(){return wc},Peers:function(){return Zc},PoI:function(){return mc},PostTxResponse:function(){return Ac},Protocol:function(){return Nc},PubKey:function(){return Wc},RegisteredOracle:function(){return hc},RelativeTTL:function(){return Vs},SignedTx:function(){return Gs},SignedTxs:function(){return Us},SpendTx:function(){return xc},Status:function(){return Bc},SyncStatus:function(){return Ec},TokenSupply:function(){return ou},Ttl:function(){return $s},Tx:function(){return Ls},TxInfoObject:function(){return cc},UnsignedTx:function(){return au},discriminators:function(){return fu}});var a={};n.r(a),n.d(a,{aensBid:function(){return ZA},aensClaim:function(){return WA},aensPreclaim:function(){return XA},aensQuery:function(){return KA},aensRevoke:function(){return $A},aensTransfer:function(){return JA},aensUpdate:function(){return YA}});var o={};n.r(o),n.d(o,{extendOracleTtl:function(){return yd},getOracleObject:function(){return Id},getQueryObject:function(){return gd},pollForQueries:function(){return md},pollForQueryResponse:function(){return hd},postQueryToOracle:function(){return fd},registerOracle:function(){return wd},respondToQuery:function(){return Cd}});var s={};n.r(s),n.d(s,{payForTransaction:function(){return Nd},spend:function(){return Ed},transferFunds:function(){return Bd}});var c={};n.r(c),n.d(c,{buildAuthTxHash:function(){return Sd},buildAuthTxHashByGaMetaTx:function(){return Td},createGeneralizedAccount:function(){return vd}});var u={};n.r(u),n.d(u,{ApiVersion:function(){return em},ByteCodeInput:function(){return Kp},BytecodeCallResultInput:function(){return Gp},Calldata:function(){return jp},CompileOpts:function(){return Mp},CompileResult:function(){return Fp},CompilerError:function(){return Dp},CompilerVersion:function(){return Zp},Contract:function(){return Op},DecodeCalldataBytecode:function(){return Vp},DecodeCalldataSource:function(){return Jp},DecodedCalldata:function(){return $p},DecodedCallresult:function(){return Lp},ErrorModel:function(){return Yp},ErrorPos:function(){return qp},FateAssembler:function(){return Wp},FunctionCallInput:function(){return Hp},SophiaBinaryData:function(){return tm},SophiaCallResultInput:function(){return Up},SophiaJsonData:function(){return nm},ValidateByteCodeInput:function(){return Xp}});var l={};n.r(l),n.d(l,{Activity:function(){return eg},Aex141OwnedTokenResponse:function(){return og},Aex141Response:function(){return ig},Aex141TemplateTokensResponse:function(){return Ag},Aex141TemplatesResponse:function(){return ug},Aex141TransferEvent:function(){return yf},Aex9BalanceResponse:function(){return hg},Aex9ContractBalanceResponse:function(){return wg},Aex9Response:function(){return pg},Aex9TransferEvent:function(){return Cf},Aex9TransferResponse:function(){return fg},Auction:function(){return $g},AuctionInfo:function(){return Yg},AuctionInfoLastBid:function(){return Jg},Block:function(){return bg},Channel:function(){return Tg},Contract:function(){return zg},ContractCall:function(){return _g},ContractLog:function(){return Pg},DeltaStat:function(){return kg},ErrorResponse:function(){return ng},Get200ApplicationJsonAllOfPropertiesItemsItem:function(){return Zf},InternalContractCallEvent:function(){return If},InternalTransferEvent:function(){return wf},KeyBlock:function(){return Mg},MicroBlock:function(){return qg},Name:function(){return Lg},NameClaim:function(){return Xg},NameClaimEvent:function(){return Ef},NameInfo:function(){return Hg},NameInfoOwnership:function(){return jg},NameInfoPointers:function(){return Vg},NameTransfer:function(){return ef},NameUpdate:function(){return tf},NotFoundResponse:function(){return vg},Oracle:function(){return rf},OracleExtendsItem:function(){return af},OracleQuery:function(){return sf},OracleResponse:function(){return cf},PaginatedResponse:function(){return tg},Paths10TrrshV2KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Og},Paths11X7LpcV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Bg},Paths12TleqhV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Cg},Paths15Ih6XV2BlocksGetResponses200ContentApplicationJsonSchema:function(){return kf},Paths15PsutbV2TotalstatsGetResponses200ContentApplicationJsonSchema:function(){return Yf},Paths16Srg6EV2NamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Gg},Paths16Tt677V2TxsCountIdGetResponses200ContentApplicationJsonSchema:function(){return ff},Paths17Cjtx5V2TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return mf},Paths17FlgdkV2Aex141GetResponses200ContentApplicationJsonSchemaAllof0:function(){return rg},Paths17O9Fn6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema:function(){return Sf},Paths187U0XzV2ContractsCallsGetResponses200ContentApplicationJsonSchema:function(){return Mf},Paths19B9O7TV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return lg},Paths1BsirxgV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchema:function(){return _f},Paths1C2B0UpV2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ig},Paths1Csrt0IV2ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return xg},Paths1DkkopqV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchema:function(){return zf},Paths1Fe570RV2Aex9GetResponses200ContentApplicationJsonSchemaAllof0:function(){return dg},Paths1I5J7OcV2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Zh},Paths1I6PwfdV2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Kg},Paths1Ilysy5V2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchema:function(){return vf},Paths1Ky8Ew4V2OraclesIdResponsesGetResponses200ContentApplicationJsonSchema:function(){return $f},Paths1LaqrzqV2OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return of},Paths1R02SlwV2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema:function(){return Wf},Paths1R74KpvV2TxsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gf},Paths1RxrrvbV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Fg},Paths1T9RwnyV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema:function(){return Xf},Paths1Txl2A9V2ChannelsGetResponses200ContentApplicationJsonSchema:function(){return Of},Paths1Ulxr59V2KeyBlocksGetResponses200ContentApplicationJsonSchema:function(){return Ff},Paths1V0FiznV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchema:function(){return Qf},Paths1Wbogg8V2Aex9GetResponses200ContentApplicationJsonSchema:function(){return xf},Paths1X48QgjV2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchema:function(){return Pf},Paths3Msq0DV2NamesSearchGetResponses200ContentApplicationJsonSchema:function(){return Hf},Paths3PnwziV2OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return uf},Paths4Bbr8KV2OraclesIdQueriesGetResponses200ContentApplicationJsonSchema:function(){return Vf},Paths5LeqfqV2BlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ng},Paths5U7W2V2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchemaAllof0:function(){return yg},Paths7Hfka2V2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Dg},Paths7P6Qc1V2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0PropertiesDataItemsAllof1:function(){return Wg},Paths7Pbec0V2DeltastatsGetResponses200ContentApplicationJsonSchema:function(){return qf},Paths9Ya94MV2ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Qg},PathsAxw0PwV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ag},PathsB0YvynV2OraclesGetResponses200ContentApplicationJsonSchema:function(){return jf},PathsB246H1V2ContractsLogsGetResponses200ContentApplicationJsonSchema:function(){return Df},PathsBelvp6V2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Eg},PathsC25EgV2ChannelsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Sg},PathsDjelzuV2NamesIdPointeesGetResponses200ContentApplicationJsonSchema:function(){return Zg},PathsDpxn99V2TotalstatsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return df},PathsFclv4TV2TxsGetResponses200ContentApplicationJsonSchema:function(){return Kf},PathsFlc7UjV2Aex141GetResponses200ContentApplicationJsonSchema:function(){return Nf},PathsGuqvhdV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchema:function(){return Gf},PathsIgs9Z1V2TransfersGetResponses200ContentApplicationJsonSchema:function(){return Jf},PathsK9TkttV2NamesGetResponses200ContentApplicationJsonSchema:function(){return Lf},PathsKlr2M2V2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchema:function(){return Bf},PathsMherz6V2OraclesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return nf},PathsN3Ru7DV2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return sg},PathsNi359V2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema:function(){return Rf},PathsNuoourV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema:function(){return Tf},PathsO99PhzV2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema:function(){return Uf},PathsO9MbpkV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchemaAllof1:function(){return mg},PathsRa6Pv6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return cg},PathsRzn6HzV2DeltastatsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Rg},PathsSs61ZgV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchema:function(){return bf},PathsY2JwfkV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gg},Status:function(){return lf},StatusMdwAsyncTasks:function(){return Af},TotalStat:function(){return pf},Transfer:function(){return hf},Tx:function(){return Ug}});var A=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,d=Math.ceil,p=Math.floor,m="[BigNumber Error] ",h=m+"Number primitive has more than 15 significant digits: ",g=1e14,f=14,y=9007199254740991,C=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],I=1e7,w=1e9;function E(e){var t=0|e;return e>0||e===t?t:t-1}function B(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(t=e[r++]+"",n=f-t.length;n--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function N(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,u=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==u,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>u^n?1:-1;for(s=(c=i.length)<(u=a.length)?c:u,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==u?0:c>u^n?1:-1}function b(e,t,n,r){if(e<t||e>n||e!==p(e))throw Error(m+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return E(e.e/f)==t&&e.c[t]%2!=0}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function T(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var x=function e(t){var n,r,i,a,o,s,c,u,l,x,_=H.prototype={constructor:H,toString:null,valueOf:null},Q=new H(1),P=20,z=4,R=-7,k=21,O=-1e7,M=1e7,D=!1,q=1,F=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},G="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function H(e,t){var n,a,o,s,c,u,l,d,m=this;if(!(m instanceof H))return new H(e,t);if(null==t){if(e&&!0===e._isBigNumber)return m.s=e.s,void(!e.c||e.e>M?m.c=m.e=null:e.e<O?m.c=[m.e=0]:(m.e=e.e,m.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(m.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>M?m.c=m.e=null:(m.e=s,m.c=[e]))}d=String(e)}else{if(!A.test(d=String(e)))return i(m,d,u);m.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(s=d.indexOf("."))>-1&&(d=d.replace(".","")),(c=d.search(/e/i))>0?(s<0&&(s=c),s+=+d.slice(c+1),d=d.substring(0,c)):s<0&&(s=d.length)}else{if(b(t,2,G.length,"Base"),10==t&&L)return Y(m=new H(e),P+m.e+1,z);if(d=String(e),u="number"==typeof e){if(0*e!=0)return i(m,d,u,t);if(m.s=1/e<0?(d=d.slice(1),-1):1,H.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(h+e)}else m.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(n=G.slice(0,t),s=c=0,l=d.length;c<l;c++)if(n.indexOf(a=d.charAt(c))<0){if("."==a){if(c>s){s=l;continue}}else if(!o&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){o=!0,c=-1,s=0;continue}return i(m,String(e),u,t)}u=!1,(s=(d=r(d,t,10,m.s)).indexOf("."))>-1?d=d.replace(".",""):s=d.length}for(c=0;48===d.charCodeAt(c);c++);for(l=d.length;48===d.charCodeAt(--l););if(d=d.slice(c,++l)){if(l-=c,u&&H.DEBUG&&l>15&&(e>y||e!==p(e)))throw Error(h+m.s*e);if((s=s-c-1)>M)m.c=m.e=null;else if(s<O)m.c=[m.e=0];else{if(m.e=s,m.c=[],c=(s+1)%f,s<0&&(c+=f),c<l){for(c&&m.c.push(+d.slice(0,c)),l-=f;c<l;)m.c.push(+d.slice(c,c+=f));c=f-(d=d.slice(c)).length}else c-=l;for(;c--;d+="0");m.c.push(+d)}}else m.c=[m.e=0]}function j(e,t,n,r){var i,a,o,s,c;if(null==n?n=z:b(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)c=B(e.c),c=1==r||2==r&&(o<=R||o>=k)?S(c,o):T(c,o,"0");else if(a=(e=Y(new H(e),t,n)).e,s=(c=B(e.c)).length,1==r||2==r&&(t<=a||a<=R)){for(;s<t;c+="0",s++);c=S(c,a)}else if(t-=o,c=T(c,a,"0"),a+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-s)>0)for(a+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function V(e,t){for(var n,r,i=1,a=new H(e[0]);i<e.length;i++)(!(r=new H(e[i])).s||(n=N(a,r))===t||0===n&&a.s===t)&&(a=r);return a}function $(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*f-1)>M?e.c=e.e=null:n<O?e.c=[e.e=0]:(e.e=n,e.c=t),e}function Y(e,t,n,r){var i,a,o,s,c,u,l,A=e.c,m=C;if(A){e:{for(i=1,s=A[0];s>=10;s/=10,i++);if((a=t-i)<0)a+=f,o=t,c=A[u=0],l=p(c/m[i-o-1]%10);else if((u=d((a+1)/f))>=A.length){if(!r)break e;for(;A.length<=u;A.push(0));c=l=0,i=1,o=(a%=f)-f+1}else{for(c=s=A[u],i=1;s>=10;s/=10,i++);l=(o=(a%=f)-f+i)<0?0:p(c/m[i-o-1]%10)}if(r=r||t<0||null!=A[u+1]||(o<0?c:c%m[i-o-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(a>0?o>0?c/m[i-o]:0:A[u-1])%10&1||n==(e.s<0?8:7)),t<1||!A[0])return A.length=0,r?(t-=e.e+1,A[0]=m[(f-t%f)%f],e.e=-t||0):A[0]=e.e=0,e;if(0==a?(A.length=u,s=1,u--):(A.length=u+1,s=m[f-a],A[u]=o>0?p(c/m[i-o]%m[o])*s:0),r)for(;;){if(0==u){for(a=1,o=A[0];o>=10;o/=10,a++);for(o=A[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,A[0]==g&&(A[0]=1));break}if(A[u]+=s,A[u]!=g)break;A[u--]=0,s=1}for(a=A.length;0===A[--a];A.pop());}e.e>M?e.c=e.e=null:e.e<O&&(e.c=[e.e=0])}return e}function J(e){var t,n=e.e;return null===n?e.toString():(t=B(e.c),t=n<=R||n>=k?S(t,n):T(t,n,"0"),e.s<0?"-"+t:t)}return H.clone=e,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(m+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(n=e[t],0,w,t),P=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(n=e[t],0,8,t),z=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(b(n[0],-w,0,t),b(n[1],0,w,t),R=n[0],k=n[1]):(b(n,-w,w,t),R=-(k=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)b(n[0],-w,-1,t),b(n[1],1,w,t),O=n[0],M=n[1];else{if(b(n,-w,w,t),!n)throw Error(m+t+" cannot be zero: "+n);O=-(M=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(m+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw D=!n,Error(m+"crypto unavailable");D=n}else D=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(n=e[t],0,9,t),q=n),e.hasOwnProperty(t="POW_PRECISION")&&(b(n=e[t],0,w,t),F=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(m+t+" not an object: "+n);U=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(m+t+" invalid: "+n);L="0123456789"==n.slice(0,10),G=n}}return{DECIMAL_PLACES:P,ROUNDING_MODE:z,EXPONENTIAL_AT:[R,k],RANGE:[O,M],CRYPTO:D,MODULO_MODE:q,POW_PRECISION:F,FORMAT:U,ALPHABET:G}},H.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!H.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-w&&i<=w&&i===p(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%f)<1&&(t+=f),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=g||n!==p(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(m+"Invalid BigNumber: "+e)},H.maximum=H.max=function(){return V(arguments,-1)},H.minimum=H.min=function(){return V(arguments,1)},H.random=(a=9007199254740992,o=Math.random()*a&2097151?function(){return p(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,a,s=0,c=[],u=new H(Q);if(null==e?e=P:b(e,0,w),i=d(e/f),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[s]=n[0],t[s+1]=n[1]):(c.push(a%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw D=!1,Error(m+"crypto unavailable");for(t=crypto.randomBytes(i*=7);s<i;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=i/7}if(!D)for(;s<i;)(a=o())<9e15&&(c[s++]=a%1e14);for(i=c[--s],e%=f,i&&e&&(a=C[f-e],c[s]=p(i/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=f);for(s=1,a=c[0];a>=10;a/=10,s++);s<f&&(r-=f-s)}return u.e=r,u.c=c,u}),H.sum=function(){for(var e=1,t=arguments,n=new H(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,a,o=[0],s=0,c=e.length;s<c;){for(a=o.length;a--;o[a]*=t);for(o[0]+=r.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>n-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}return function(r,i,a,o,s){var c,u,l,A,d,p,m,h,g=r.indexOf("."),f=P,y=z;for(g>=0&&(A=F,F=0,r=r.replace(".",""),p=(h=new H(i)).pow(r.length-g),F=A,h.c=t(T(B(p.c),p.e,"0"),10,a,e),h.e=h.c.length),l=A=(m=t(r,i,a,s?(c=G,e):(c=e,G))).length;0==m[--A];m.pop());if(!m[0])return c.charAt(0);if(g<0?--l:(p.c=m,p.e=l,p.s=o,m=(p=n(p,h,f,y,a)).c,d=p.r,l=p.e),g=m[u=l+f+1],A=a/2,d=d||u<0||null!=m[u+1],d=y<4?(null!=g||d)&&(0==y||y==(p.s<0?3:2)):g>A||g==A&&(4==y||d||6==y&&1&m[u-1]||y==(p.s<0?8:7)),u<1||!m[0])r=d?T(c.charAt(1),-f,c.charAt(0)):c.charAt(0);else{if(m.length=u,d)for(--a;++m[--u]>a;)m[u]=0,u||(++l,m=[1].concat(m));for(A=m.length;!m[--A];);for(g=0,r="";g<=A;r+=c.charAt(m[g++]));r=T(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,u=t%I,l=t/I|0;for(e=e.slice();c--;)s=((i=u*(a=e[c]%I)+(r=l*a+(o=e[c]/I|0)*u)%I*I+s)/n|0)+(r/I|0)+l*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var c,u,l,A,d,m,h,y,C,I,w,B,N,b,v,S,T,x=r.s==i.s?1:-1,_=r.c,Q=i.c;if(!(_&&_[0]&&Q&&Q[0]))return new H(r.s&&i.s&&(_?!Q||_[0]!=Q[0]:Q)?_&&0==_[0]||!Q?0*x:x/0:NaN);for(C=(y=new H(x)).c=[],x=a+(u=r.e-i.e)+1,s||(s=g,u=E(r.e/f)-E(i.e/f),x=x/f|0),l=0;Q[l]==(_[l]||0);l++);if(Q[l]>(_[l]||0)&&u--,x<0)C.push(1),A=!0;else{for(b=_.length,S=Q.length,l=0,x+=2,(d=p(s/(Q[0]+1)))>1&&(Q=e(Q,d,s),_=e(_,d,s),S=Q.length,b=_.length),N=S,w=(I=_.slice(0,S)).length;w<S;I[w++]=0);T=Q.slice(),T=[0].concat(T),v=Q[0],Q[1]>=s/2&&v++;do{if(d=0,(c=t(Q,I,S,w))<0){if(B=I[0],S!=w&&(B=B*s+(I[1]||0)),(d=p(B/v))>1)for(d>=s&&(d=s-1),h=(m=e(Q,d,s)).length,w=I.length;1==t(m,I,h,w);)d--,n(m,S<h?T:Q,h,s),h=m.length,c=1;else 0==d&&(c=d=1),h=(m=Q.slice()).length;if(h<w&&(m=[0].concat(m)),n(I,m,w,s),w=I.length,-1==c)for(;t(Q,I,S,w)<1;)d++,n(I,S<w?T:Q,w,s),w=I.length}else 0===c&&(d++,I=[0]);C[l++]=d,I[0]?I[w++]=_[N]||0:(I=[_[N]],w=1)}while((N++<b||null!=I[0])&&x--);A=null!=I[0],C[0]||C.splice(0,1)}if(s==g){for(l=1,x=C[0];x>=10;x/=10,l++);Y(y,a+(y.e=l+u*f-1)+1,o,A)}else y.e=u,y.r=+A;return y}}(),s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,x=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,a=n?t:t.replace(x,"");if(l.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(s,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,a=a.replace(c,"$1").replace(u,"0.$1")),t!=a))return new H(a,i);if(H.DEBUG)throw Error(m+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},_.absoluteValue=_.abs=function(){var e=new H(this);return e.s<0&&(e.s=1),e},_.comparedTo=function(e,t){return N(this,new H(e,t))},_.decimalPlaces=_.dp=function(e,t){var n,r,i,a=this;if(null!=e)return b(e,0,w),null==t?t=z:b(t,0,8),Y(new H(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-E(this.e/f))*f,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},_.dividedBy=_.div=function(e,t){return n(this,new H(e,t),P,z)},_.dividedToIntegerBy=_.idiv=function(e,t){return n(this,new H(e,t),0,1)},_.exponentiatedBy=_.pow=function(e,t){var n,r,i,a,o,s,c,u,l=this;if((e=new H(e)).c&&!e.isInteger())throw Error(m+"Exponent not an integer: "+J(e));if(null!=t&&(t=new H(t)),o=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new H(Math.pow(+J(l),o?e.s*(2-v(e)):+J(e))),t?u.mod(t):u;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new H(NaN);(r=!s&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||o&&l.c[1]>=24e7:l.c[0]<8e13||o&&l.c[0]<=9999975e7)))return a=l.s<0&&v(e)?-0:0,l.e>-1&&(a=1/a),new H(s?1/a:a);F&&(a=d(F/f+2))}for(o?(n=new H(.5),s&&(e.s=1),c=v(e)):c=(i=Math.abs(+J(e)))%2,u=new H(Q);;){if(c){if(!(u=u.times(l)).c)break;a?u.c.length>a&&(u.c.length=a):r&&(u=u.mod(t))}if(i){if(0===(i=p(i/2)))break;c=i%2}else if(Y(e=e.times(n),e.e+1,1),e.e>14)c=v(e);else{if(0==(i=+J(e)))break;c=i%2}l=l.times(l),a?l.c&&l.c.length>a&&(l.c.length=a):r&&(l=l.mod(t))}return r?u:(s&&(u=Q.div(u)),t?u.mod(t):a?Y(u,F,z,void 0):u)},_.integerValue=function(e){var t=new H(this);return null==e?e=z:b(e,0,8),Y(t,t.e+1,e)},_.isEqualTo=_.eq=function(e,t){return 0===N(this,new H(e,t))},_.isFinite=function(){return!!this.c},_.isGreaterThan=_.gt=function(e,t){return N(this,new H(e,t))>0},_.isGreaterThanOrEqualTo=_.gte=function(e,t){return 1===(t=N(this,new H(e,t)))||0===t},_.isInteger=function(){return!!this.c&&E(this.e/f)>this.c.length-2},_.isLessThan=_.lt=function(e,t){return N(this,new H(e,t))<0},_.isLessThanOrEqualTo=_.lte=function(e,t){return-1===(t=N(this,new H(e,t)))||0===t},_.isNaN=function(){return!this.s},_.isNegative=function(){return this.s<0},_.isPositive=function(){return this.s>0},_.isZero=function(){return!!this.c&&0==this.c[0]},_.minus=function(e,t){var n,r,i,a,o=this,s=o.s;if(t=(e=new H(e,t)).s,!s||!t)return new H(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/f,u=e.e/f,l=o.c,A=e.c;if(!c||!u){if(!l||!A)return l?(e.s=-t,e):new H(A?o:NaN);if(!l[0]||!A[0])return A[0]?(e.s=-t,e):new H(l[0]?o:3==z?-0:0)}if(c=E(c),u=E(u),l=l.slice(),s=c-u){for((a=s<0)?(s=-s,i=l):(u=c,i=A),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(a=(s=l.length)<(t=A.length))?s:t,s=t=0;t<r;t++)if(l[t]!=A[t]){a=l[t]<A[t];break}if(a&&(i=l,l=A,A=i,e.s=-e.s),(t=(r=A.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=g-1;r>s;){if(l[--r]<A[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=g}l[r]-=A[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?$(e,l,u):(e.s=3==z?-1:1,e.c=[e.e=0],e)},_.modulo=_.mod=function(e,t){var r,i,a=this;return e=new H(e,t),!a.c||!e.s||e.c&&!e.c[0]?new H(NaN):!e.c||a.c&&!a.c[0]?new H(a):(9==q?(i=e.s,e.s=1,r=n(a,e,0,3),e.s=i,r.s*=i):r=n(a,e,0,q),(e=a.minus(r.times(e))).c[0]||1!=q||(e.s=a.s),e)},_.multipliedBy=_.times=function(e,t){var n,r,i,a,o,s,c,u,l,A,d,p,m,h,y,C=this,w=C.c,B=(e=new H(e,t)).c;if(!(w&&B&&w[0]&&B[0]))return!C.s||!e.s||w&&!w[0]&&!B||B&&!B[0]&&!w?e.c=e.e=e.s=null:(e.s*=C.s,w&&B?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=E(C.e/f)+E(e.e/f),e.s*=C.s,(c=w.length)<(A=B.length)&&(m=w,w=B,B=m,i=c,c=A,A=i),i=c+A,m=[];i--;m.push(0));for(h=g,y=I,i=A;--i>=0;){for(n=0,d=B[i]%y,p=B[i]/y|0,a=i+(o=c);a>i;)n=((u=d*(u=w[--o]%y)+(s=p*u+(l=w[o]/y|0)*d)%y*y+m[a]+n)/h|0)+(s/y|0)+p*l,m[a--]=u%h;m[a]=n}return n?++r:m.splice(0,1),$(e,m,r)},_.negated=function(){var e=new H(this);return e.s=-e.s||null,e},_.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new H(e,t)).s,!i||!t)return new H(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/f,o=e.e/f,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new H(i/0);if(!s[0]||!c[0])return c[0]?e:new H(s[0]?r:0*i)}if(a=E(a),o=E(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for((i=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/g|0,s[t]=g===s[t]?0:s[t]%g;return i&&(s=[i].concat(s),++o),$(e,s,o)},_.precision=_.sd=function(e,t){var n,r,i,a=this;if(null!=e&&e!==!!e)return b(e,1,w),null==t?t=z:b(t,0,8),Y(new H(a),e,t);if(!(n=a.c))return null;if(r=(i=n.length-1)*f+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},_.shiftedBy=function(e){return b(e,-9007199254740991,y),this.times("1e"+e)},_.squareRoot=_.sqrt=function(){var e,t,r,i,a,o=this,s=o.c,c=o.s,u=o.e,l=P+4,A=new H("0.5");if(1!==c||!s||!s[0])return new H(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(c=Math.sqrt(+J(o)))||c==1/0?(((t=B(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=E((u+1)/2)-(u<0||u%2),r=new H(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new H(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(a=r,r=A.times(a.plus(n(o,a,l,1))),B(a.c).slice(0,c)===(t=B(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Y(r,r.e+P+2,1),e=!r.times(r).eq(o));break}if(!i&&(Y(a,a.e+P+2,0),a.times(a).eq(o))){r=a;break}l+=4,c+=4,i=1}return Y(r,r.e+P+1,z,e)},_.toExponential=function(e,t){return null!=e&&(b(e,0,w),e++),j(this,e,t,1)},_.toFixed=function(e,t){return null!=e&&(b(e,0,w),e=e+this.e+1),j(this,e,t)},_.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=U;else if("object"!=typeof n)throw Error(m+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split("."),s=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=o[0],A=o[1],d=i.s<0,p=d?l.slice(1):l,h=p.length;if(c&&(a=s,s=c,c=a,h-=a),s>0&&h>0){for(a=h%s||s,l=p.substr(0,a);a<h;a+=s)l+=u+p.substr(a,s);c>0&&(l+=u+p.slice(a)),d&&(l="-"+l)}r=A?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?A.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):A):l}return(n.prefix||"")+r+(n.suffix||"")},_.toFraction=function(e){var t,r,i,a,o,s,c,u,l,A,d,p,h=this,g=h.c;if(null!=e&&(!(c=new H(e)).isInteger()&&(c.c||1!==c.s)||c.lt(Q)))throw Error(m+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+J(c));if(!g)return new H(h);for(t=new H(Q),l=r=new H(Q),i=u=new H(Q),p=B(g),o=t.e=p.length-h.e-1,t.c[0]=C[(s=o%f)<0?f+s:s],e=!e||c.comparedTo(t)>0?o>0?t:l:c,s=M,M=1/0,c=new H(p),u.c[0]=0;A=n(c,t,0,1),1!=(a=r.plus(A.times(i))).comparedTo(e);)r=i,i=a,l=u.plus(A.times(a=l)),u=a,t=c.minus(A.times(a=t)),c=a;return a=n(e.minus(r),i,0,1),u=u.plus(a.times(l)),r=r.plus(a.times(i)),u.s=l.s=h.s,d=n(l,i,o*=2,z).minus(h).abs().comparedTo(n(u,r,o,z).minus(h).abs())<1?[l,i]:[u,r],M=s,d},_.toNumber=function(){return+J(this)},_.toPrecision=function(e,t){return null!=e&&b(e,1,w),j(this,e,t,2)},_.toString=function(e){var t,n=this,i=n.s,a=n.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=R||a>=k?S(B(n.c),a):T(B(n.c),a,"0"):10===e&&L?t=T(B((n=Y(new H(n),P+a+1,z)).c),n.e,"0"):(b(e,2,G.length,"Base"),t=r(T(B(n.c),a,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},_.valueOf=_.toJSON=function(){return J(this)},_._isBigNumber=!0,_[Symbol.toStringTag]="BigNumber",_[Symbol.for("nodejs.util.inspect.custom")]=_.valueOf,null!=t&&H.set(t),H}(),_=x;const Q=e=>e.integerValue(_.ROUND_CEIL);class P extends Error{constructor(e){super(e),this.name="BaseError"}}class z extends P{constructor(e){super(e),this.name="AccountError"}}class R extends P{constructor(e){super(e),this.name="AensError"}}class k extends P{constructor(e){super(e),this.name="AeppError"}}class O extends P{constructor(e){super(e),this.name="ChannelError"}}class M extends P{constructor(e){super(e),this.name="CompilerError"}}class D extends P{constructor(e){super(e),this.name="ContractError"}}class q extends P{constructor(e){super(e),this.name="CryptographyError"}}class F extends P{constructor(e){super(e),this.name="NodeError"}}class U extends P{constructor(e){super(e),this.name="TransactionError"}}class G extends P{constructor(e){super(e),this.name="WalletError"}}class L extends P{constructor(e,t,n){super(`${e} should be ${t}, got ${n} instead`),this.name="ArgumentError"}}class H extends q{constructor(e){super(e),this.name="IllegalArgumentError"}}class j extends P{constructor(e,t,n){super(`${e} expects ${t} arguments, got ${n} instead`),this.name="ArgumentCountMismatchError"}}class V extends P{constructor(e){super(e),this.name="InsufficientBalanceError"}}class $ extends P{constructor(e){super(e),this.name="MissingParamError"}}class Y extends P{constructor(){super("Byte serialization not supported"),this.name="NoSerializerFoundError"}}class J extends P{constructor(e){super(`Giving up at height ${e}`),this.name="RequestTimedOutError"}}class K extends P{constructor(e,t){super([`Giving up after ${e} blocks mined`,`transaction hash: ${t}`].join(", ")),this.name="TxTimedOutError"}}class W extends P{constructor(e){super(e),this.name="TypeError"}}class X extends P{constructor(e){super(e),this.name="UnsupportedPlatformError"}}class Z extends P{constructor(e){super(e),this.name="UnsupportedProtocolError"}}class ee extends P{constructor(e){super(e),this.name="NotImplementedError"}}class te extends P{constructor(e,t,n,r){super(`Unsupported ${e} version ${t}. Supported: >= ${n} < ${r}`),this.name="UnsupportedVersionError"}}class ne extends P{constructor(e){super(e),this.name="LogicError"}}class re extends P{constructor(e){super(e),this.name="InternalError"}}class ie extends re{constructor(e="Expected to not happen, required for TS"){super(e),this.name="UnexpectedTsError"}}class ae extends z{constructor(e){super(`Account for ${e} not available`),this.name="UnavailableAccountError"}}class oe extends R{constructor(e,t){super(`Name ${e} don't have pointers for ${t}`),this.name="AensPointerContextError"}}class se extends R{constructor(e,t){super(`the provided fee ${e.toString()} is not enough to execute the claim, required: ${t.toString()}`),this.name="InsufficientNameFeeError"}}class ce extends R{constructor(e){super(e),this.name="InvalidAensNameError"}}class ue extends k{constructor(e){super(`Received invalid message: ${e}`),this.name="InvalidRpcMessageError"}}class le extends k{constructor(e){super(`Can't find callback for this messageId ${e}`),this.name="MissingCallbackError"}}class Ae extends k{constructor(e){super(`You do not have access to account ${e}`),this.name="UnAuthorizedAccountError"}}class de extends k{constructor(e){super(`RpcClient with id ${e} do not exist`),this.name="UnknownRpcClientError"}}class pe extends k{constructor(){super("You are not subscribed for an account."),this.name="UnsubscribedAccountError"}}class me extends O{constructor(e){super(e),this.name="ChannelCallError"}}class he extends O{constructor(e){super(e),this.name="ChannelConnectionError"}}class ge extends O{constructor(){super("Server pong timed out"),this.name="ChannelPingTimedOutError"}}class fe extends O{constructor(e){super(e),this.name="UnexpectedChannelMessageError"}}class ye extends O{constructor(e,t){super(e.message),this.handlerError=e,this.incomingMessage=t,this.name="ChannelIncomingMessageError"}}class Ce extends O{constructor(){super("State Channels FSM entered unknown state"),this.name="UnknownChannelStateError"}}class Ie extends M{constructor(e){super(e),this.name="InvalidAuthDataError"}}class we extends D{constructor(e){super(`Contract ${e} do not correspond to the bytecode deployed on the chain`),this.name="BytecodeMismatchError"}}class Ee extends D{constructor(){super("Contract already deployed"),this.name="DuplicateContractError"}}class Be extends D{constructor(e){super(`Contract with address ${e} not active`),this.name="InactiveContractError"}}class Ne extends D{constructor(e){super(e),this.name="InvalidMethodInvocationError"}}class be extends D{constructor(e){super(e),this.name="MissingContractAddressError"}}class ve extends D{constructor(){super("Either ACI or sourceCode or sourceCodePath is required"),this.name="MissingContractDefError"}}class Se extends D{constructor(){super("Function name is required"),this.name="MissingFunctionNameError"}}class Te extends D{constructor(e,t){super("Invocation failed"+(null==e?"":`: "${e}"`)),this.name="NodeInvocationError",this.transaction=t}}class xe extends D{constructor(e){super(`Function ${e} doesn't exist in contract`),this.name="NoSuchContractFunctionError"}}class _e extends D{constructor(e,t){super(`You try to pay "${e}" to function "${t}" which is not payable. Only payable function can accept coins`),this.name="NotPayableFunctionError"}}class Qe extends D{constructor(e,t){super(`Can't find definition of ${e} event emitted by ${t} (use omitUnknown option to ignore events like this)`),this.name="MissingEventDefinitionError"}}class Pe extends D{constructor(e,t){super(`Found multiple definitions of "${t[0][1]}" event with different types emitted by ${e} in ${t.map((([e])=>`"${e}"`)).join(", ")} contracts (use contractAddressToName option to specify contract name corresponding to address)`),this.name="AmbiguousEventDefinitionError"}}class ze extends q{constructor(){super("Invalid checksum"),this.name="InvalidChecksumError"}}class Re extends q{constructor(){super("Invalid password or nonce"),this.name="InvalidPasswordError"}}class ke extends q{constructor(){super("Node hash is not equal to provided one"),this.name="MerkleTreeHashMismatchError"}}class Oe extends q{constructor(e){super(e),this.name="MissingNodeInTreeError"}}class Me extends q{constructor(e){super(`Unknown node length: ${e}`),this.name="UnknownNodeLengthError"}}class De extends q{constructor(e){super(`Unknown path nibble: ${e}`),this.name="UnknownPathNibbleError"}}class qe extends F{constructor(e){super(`Node with name ${e} already exist`),this.name="DuplicateNodeError"}}class Fe extends F{constructor(e){super(e),this.name="NodeNotFoundError"}}class Ue extends U{constructor(e){super(e),this.name="DecodeError"}}class Ge extends U{constructor(e){super(e),this.name="PayloadLengthError"}}class Le extends U{constructor(e){super(e),this.name="DryRunError"}}class He extends U{constructor(e){super(e),this.name="IllegalBidFeeError"}}class je extends U{constructor(e){super(e),this.name="InvalidSignatureError"}}class Ve extends U{constructor(e){super(`Prefix for id-tag ${e} not found.`),this.name="PrefixNotFoundError"}}class $e extends U{constructor(e,t){super(`Transaction schema not implemented for tag ${e} version ${t}`),this.name="SchemaNotFoundError"}}class Ye extends U{constructor(e){super(`Id tag for prefix ${e} not found.`),this.name="DecodeError"}}class Je extends U{constructor(e){super(`Transaction ${e} is removed from chain`),this.name="TxNotInChainError"}}class Ke extends G{constructor(e){super(e),this.name="AlreadyConnectedError"}}class We extends G{constructor(e){super(e),this.name="NoWalletConnectedError"}}class Xe extends G{constructor(e){super(e),this.name="RpcConnectionError"}}let Ze=function(e){return e.AE="ae",e.MILI_AE="miliAE",e.MICRO_AE="microAE",e.NANO_AE="nanoAE",e.PICO_AE="picoAE",e.FEMTO_AE="femtoAE",e.AETTOS="aettos",e}({});const et={[Ze.AE]:0,[Ze.MILI_AE]:-3,[Ze.MICRO_AE]:-6,[Ze.NANO_AE]:-9,[Ze.PICO_AE]:-12,[Ze.FEMTO_AE]:-15,[Ze.AETTOS]:-18},tt=(e,{denomination:t=Ze.AETTOS,targetDenomination:n=Ze.AETTOS})=>{if("bigint"!=typeof(r=e)&&(!["number","object","string"].includes(typeof r)||isNaN(r)&&!Number.isInteger(r)&&!_.isBigNumber(r)))throw new L("value","a number",e);var r;return new _("bigint"==typeof e?e.toString():e).shiftedBy(et[t]-et[n]).toFixed()},nt=(e,{denomination:t=Ze.AETTOS}={})=>tt(e,{denomination:t,targetDenomination:Ze.AE}),rt=(e,{denomination:t=Ze.AE}={})=>tt(e,{denomination:t}),it=[{name:"exa",magnitude:18},{name:"giga",magnitude:9},{name:"",magnitude:0},{name:"pico",magnitude:-12}],at=e=>it.reduce(((t,n)=>Math.abs(n.magnitude-e)<Math.abs(t.magnitude-e)?n:t)),ot=e=>{var t;return null!==(t=it.find((t=>t.magnitude<=e)))&&void 0!==t?t:it[it.length-1]},st=e=>{var t;const n=new _(e),r=null!==(t=n.e)&&void 0!==t?t:0,{name:i,magnitude:a}=(r<0?at:ot)(r);return`${n.shiftedBy(-a).precision(9+Math.min(r-a,0)).toFixed()}${""!==i?" ":""}${i}`};function ct(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function ut(e){if(ct(e)){const t="string"==typeof e.name,n="string"==typeof e.message;return t&&n}return!1}function lt(e){if(ut(e))return e.message;{let t;try{t="object"==typeof e&&e?JSON.stringify(e):String(e)}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}const At={},dt="REDACTED",pt=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],mt=["api-version"];class ht{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=pt.concat(e),t=mt.concat(t),this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,n)=>{if(n instanceof Error)return Object.assign(Object.assign({},n),{name:n.name,message:n.message});if("headers"===e)return this.sanitizeHeaders(n);if("url"===e)return this.sanitizeUrl(n);if("query"===e)return this.sanitizeQuery(n);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(n)||ct(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}}),2)}sanitizeHeaders(e){const t={};for(const n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=dt;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;const t={};for(const n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?t[n]=e[n]:t[n]=dt;return t}sanitizeUrl(e){if("string"!=typeof e||null===e)return e;const t=new URL(e);if(!t.search)return e;for(const[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,dt);return t.toString()}}const gt=new ht;class ft extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,this.request=t.request,this.response=t.response,Object.setPrototypeOf(this,ft.prototype)}[At](){return`RestError: ${this.message} \n ${gt.sanitize(this)}`}}ft.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",ft.PARSE_ERROR="PARSE_ERROR";var yt=n(8287).Buffer;const Ct=async e=>new Promise((t=>{setTimeout(t,e)})),It=(e,t)=>Object.fromEntries(Object.entries(e).map(t)),wt=(()=>{try{return yt.concat([Uint8Array.from([])]),!1}catch(e){return!0}})()?(e,t)=>yt.concat(e.map((e=>yt.from(e))),t):yt.concat;function Et(e,t){return e in t}function Bt(e,t){return t.includes(e)}function Nt(e){return e instanceof ft&&404===e.statusCode&&e.message.includes("Account not found")}function bt(e){if(!(e instanceof Error))throw e}function vt(e){return new Proxy({},Object.fromEntries(["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf","get","has"].map((t=>[t,(n,...r)=>{const i=e();if(null==i)throw new L("wrapped value","defined",i);if("get"===t&&"_wrappedValue"===r[0])return i;const a=Reflect[t](i,...r);return"function"==typeof a&&"get"===t?a.bind(i):a}]))))}var St=n(8947),Tt=n.n(St),xt=n(4156),_t=n(8469),Qt=n(6763),Pt=n(4107),zt=n.n(Pt);let Rt=function(e){return e.KeyBlockHash="kh",e.MicroBlockHash="mh",e.BlockPofHash="bf",e.BlockTxHash="bx",e.BlockStateHash="bs",e.Channel="ch",e.ContractAddress="ct",e.ContractBytearray="cb",e.ContractStoreKey="ck",e.ContractStoreValue="cv",e.Transaction="tx",e.TxHash="th",e.OracleAddress="ok",e.OracleQuery="ov",e.OracleQueryId="oq",e.OracleResponse="or",e.AccountAddress="ak",e.Signature="sg",e.Commitment="cm",e.PeerPubkey="pp",e.Name="nm",e.State="st",e.Poi="pi",e.StateTrees="ss",e.CallStateTree="cs",e.Bytearray="ba",e}({});var kt=n(8287).Buffer;function Ot(e){return(new(zt())).update(e).digest()}const Mt=[Rt.ContractBytearray,Rt.ContractStoreKey,Rt.ContractStoreValue,Rt.Transaction,Rt.OracleQuery,Rt.OracleResponse,Rt.State,Rt.Poi,Rt.StateTrees,Rt.CallStateTree,Rt.Bytearray],Dt=[Rt.KeyBlockHash,Rt.MicroBlockHash,Rt.BlockPofHash,Rt.BlockTxHash,Rt.BlockStateHash,Rt.Channel,Rt.ContractAddress,Rt.TxHash,Rt.OracleAddress,Rt.OracleQueryId,Rt.AccountAddress,Rt.Signature,Rt.Commitment,Rt.PeerPubkey,Rt.Name],qt={[Rt.KeyBlockHash]:32,[Rt.MicroBlockHash]:32,[Rt.BlockPofHash]:32,[Rt.BlockTxHash]:32,[Rt.BlockStateHash]:32,[Rt.Channel]:32,[Rt.ContractAddress]:32,[Rt.TxHash]:32,[Rt.OracleAddress]:32,[Rt.OracleQueryId]:32,[Rt.AccountAddress]:32,[Rt.Signature]:64,[Rt.Commitment]:32,[Rt.PeerPubkey]:32,[Rt.State]:32};function Ft(e,t){if(!Et(t,qt))return;const n=qt[t];if(null!=n&&e.length!==n)throw new Ge(`Payload should be ${n} bytes, got ${e.length} instead`)}const Ut=e=>Ot(Ot(e)).slice(0,4),Gt=e=>wt([e,Ut(e)]);function Lt(e){const t=e.slice(0,-4);if(!Ut(t).equals(e.slice(-4)))throw new ze;return t}const Ht={encode:e=>Gt(e).toString("base64"),decode:e=>Lt(kt.from(e,"base64"))},jt={encode:e=>(0,Qt.encode)(Gt(e)),decode:e=>Lt(kt.from((0,Qt.decode)(e)))},Vt=e=>{const t=Mt.find((t=>t===e));if(null!=t)return[t,Ht];const n=Dt.find((t=>t===e));if(null!=n)return[n,jt];throw new L("prefix",`one of ${[...Dt,...Mt].join(", ")}`,e)};function $t(e){const[t,n,r]=e.split("_");if(null==n)throw new Ue(`Encoded string missing payload: ${e}`);if(null!=r)throw new Ue(`Encoded string have extra parts: ${e}`);const[i,a]=Vt(t),o=a.decode(n);return Ft(o,i),o}function Yt(e,t){const[,n]=Vt(t);return Ft(e,t),`${t}_${n.encode(e)}`}var Jt=n(8287).Buffer;function Kt(e){const t="string"==typeof e?Jt.from(e,"hex"):e;return Yt(Tt().sign.keyPair.fromSecretKey(t).publicKey,Rt.AccountAddress)}function Wt(e,...t){0===t.length&&(t=[Rt.AccountAddress]);try{$t(e);const n=e.split("_")[0];if(!Bt(n,t))throw new L("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n);return!0}catch(e){return!1}}function Xt(){const[e]=new BigUint64Array(Tt().randomBytes(8).buffer);return Number(e%BigInt(Number.MAX_SAFE_INTEGER))}function Zt(e){const t=Jt.allocUnsafe(4);return t.writeUInt32BE(e),t.slice(t.findIndex((e=>0!==e)))}function en(e){return Jt.from((0,xt.blake2b)(e,void 0,32))}function tn(e,t){const n=$t(e);return Yt(en(wt([n,Zt(t)])),Rt.ContractAddress)}function nn(e){return Tt().sign.keyPair.fromSecretKey(e)}function rn(e=!1){const t=Tt().sign.keyPair(),n=Jt.from(t.publicKey),r=Jt.from(t.secretKey);return e?{publicKey:n,secretKey:r}:{publicKey:Yt(n,Rt.AccountAddress),secretKey:r.toString("hex")}}function an(e,t){return Tt().sign.detached(Jt.from(e),Jt.from(t))}function on(e,t,n){return Tt().sign.detached.verify(e,t,$t(n))}const sn=Jt.from("aeternity Signed Message:\n","utf8"),cn=(0,_t.encode)(sn.length);function un(e){const t=Jt.from(e,"utf8");return en(wt([cn,sn,(0,_t.encode)(t.length),t]))}function ln(e,t){return an(un(e),t)}function An(e,t,n){return on(un(e),t,n)}function dn(e,t){const n=Jt.from("TheMessage");return on(n,an(n,e),Yt("string"==typeof t?Jt.from(t,"hex"):t,Rt.AccountAddress))}var pn=n(8287).Buffer;function mn(e,t=!1){if(null==e)return pn.from([]);if(Number.isInteger(e)||_.isBigNumber(e)||t){if(_.isBigNumber(e)||(e=new _(e)),!e.isInteger())throw new W(`Unexpected not integer value: ${e.toFixed()}`);let t=e.toString(16);return t.length%2==1&&(t=`0${t}`),pn.from(t,"hex")}if("string"==typeof e)return pn.from(e);throw new Y}const hn={pub:"ak_11111111111111111111111111111111273Yts",amount:100000000000000000000000000000000000n},gn=5e4,fn=1e9,yn=1e14,Cn=.05,In=480,wn=31,En=It({31:3,30:5,29:8,28:13,27:21,26:34,25:55,24:89,23:144,22:233,21:377,20:610,19:987,18:1597,17:2584,16:4181,15:6765,14:10946,13:17711,12:28657,11:46368,10:75025,9:121393,8:196418,7:317811,6:514229,5:832040,4:1346269,3:2178309,2:3524578,1:5702887},(([e,t])=>[e,new _(t).times(yn)]));let Bn=function(e){return e[e.Iris=5]="Iris",e[e.Ceres=6]="Ceres",e}({}),Nn=function(e){return e[e.NoVm=0]="NoVm",e[e.Sophia=1]="Sophia",e[e.SophiaImprovementsMinerva=3]="SophiaImprovementsMinerva",e[e.SophiaImprovementsFortuna=4]="SophiaImprovementsFortuna",e[e.Fate=5]="Fate",e[e.SophiaImprovementsLima=6]="SophiaImprovementsLima",e[e.Fate2=7]="Fate2",e[e.Fate3=8]="Fate3",e}({}),bn=function(e){return e[e.NoAbi=0]="NoAbi",e[e.Sophia=1]="Sophia",e[e.Fate=3]="Fate",e}({}),vn=function(e){return e[e.Account=10]="Account",e[e.SignedTx=11]="SignedTx",e[e.SpendTx=12]="SpendTx",e[e.Oracle=20]="Oracle",e[e.OracleRegisterTx=22]="OracleRegisterTx",e[e.OracleQueryTx=23]="OracleQueryTx",e[e.OracleResponseTx=24]="OracleResponseTx",e[e.OracleExtendTx=25]="OracleExtendTx",e[e.Name=30]="Name",e[e.NameClaimTx=32]="NameClaimTx",e[e.NamePreclaimTx=33]="NamePreclaimTx",e[e.NameUpdateTx=34]="NameUpdateTx",e[e.NameRevokeTx=35]="NameRevokeTx",e[e.NameTransferTx=36]="NameTransferTx",e[e.Contract=40]="Contract",e[e.ContractCall=41]="ContractCall",e[e.ContractCreateTx=42]="ContractCreateTx",e[e.ContractCallTx=43]="ContractCallTx",e[e.ChannelCreateTx=50]="ChannelCreateTx",e[e.ChannelDepositTx=51]="ChannelDepositTx",e[e.ChannelWithdrawTx=52]="ChannelWithdrawTx",e[e.ChannelForceProgressTx=521]="ChannelForceProgressTx",e[e.ChannelCloseMutualTx=53]="ChannelCloseMutualTx",e[e.ChannelCloseSoloTx=54]="ChannelCloseSoloTx",e[e.ChannelSlashTx=55]="ChannelSlashTx",e[e.ChannelSettleTx=56]="ChannelSettleTx",e[e.ChannelOffChainTx=57]="ChannelOffChainTx",e[e.ChannelOffChainUpdateTransfer=570]="ChannelOffChainUpdateTransfer",e[e.ChannelOffChainUpdateDeposit=571]="ChannelOffChainUpdateDeposit",e[e.ChannelOffChainUpdateWithdraw=572]="ChannelOffChainUpdateWithdraw",e[e.ChannelOffChainUpdateCreateContract=573]="ChannelOffChainUpdateCreateContract",e[e.ChannelOffChainUpdateCallContract=574]="ChannelOffChainUpdateCallContract",e[e.ChannelClientReconnectTx=575]="ChannelClientReconnectTx",e[e.Channel=58]="Channel",e[e.ChannelSnapshotSoloTx=59]="ChannelSnapshotSoloTx",e[e.TreesPoi=60]="TreesPoi",e[e.StateTrees=62]="StateTrees",e[e.Mtree=63]="Mtree",e[e.MtreeValue=64]="MtreeValue",e[e.ContractsMtree=621]="ContractsMtree",e[e.CallsMtree=622]="CallsMtree",e[e.ChannelsMtree=623]="ChannelsMtree",e[e.NameserviceMtree=624]="NameserviceMtree",e[e.OraclesMtree=625]="OraclesMtree",e[e.AccountsMtree=626]="AccountsMtree",e[e.GaAttachTx=80]="GaAttachTx",e[e.GaMetaTx=81]="GaMetaTx",e[e.PayingForTx=82]="PayingForTx",e[e.GaMetaTxAuthData=810]="GaMetaTxAuthData",e}({});var Sn=n(8287).Buffer;function Tn(e,t){return Yt(en(Sn.from([...$t(e),...mn(t)])),Rt.ContractAddress)}function xn(e,t,n){return Yt(en(Sn.from([...$t(e),...function(e){const t=mn(e,!0);return wt([Sn.alloc(32-t.length),t])}(t),...$t(n)])),Rt.OracleQueryId)}const _n=".chain";function Qn(e){const[t,n,...r]=e.split(".");if(0!==r.length)throw new L("aens name","including only one dot",e);if(n!==_n.slice(1))throw new L("aens name",`suffixed with ${_n}`,e);if(/\p{Emoji_Presentation}/u.test(t))throw new L("aens name","not containing emoji",e);let i;try{const r=new URL(`http://${t}.${n}`);if(r.username+r.password+r.port+r.search+r.hash!==""||"/"!==r.pathname)throw new L("aens name","valid",e);i=r.host}catch(t){if(t instanceof TypeError&&t.message.includes("Invalid URL"))throw new L("aens name","valid",e);throw t}if(!/^[a-z0-9.-]+$/i.test(i))throw new L("aens name","without illegal chars",e);if(i.length>63+_n.length)throw new L("aens name","not too long",e);return i}function Pn(e){return Yt(en(Qn(e)),Rt.Name)}function zn(e,t=Xt()){return Yt(en(wt([Sn.from(Qn(e)),Sn.from(t.toString(16).padStart(64,"0"),"hex")])),Rt.Commitment)}function Rn(e=Sn.from([])){return new _(Sn.from(e).toString("hex"),16).toString(10)}function kn(e){Qn(e)}function On(e){try{return kn(e),!0}catch(e){return!1}}const Mn=[[Rt.AccountAddress,"account_pubkey"],[Rt.OracleAddress,"oracle_pubkey"],[Rt.ContractAddress,"contract_pubkey"],[Rt.Channel,"channel"]];function Dn(e){$t(e);const t=e.substring(0,2),n=Mn.find((([e])=>e===t))?.[1];if(null!=n)return n;throw new L("identifier",`prefixed with one of ${Mn.map((([e])=>`${e}_`)).join(", ")}`,e)}function qn(e){const t=Qn(e).length-_n.length;return En[Math.min(t,wn)]}function Fn(e,{startFee:t,increment:n=Cn}={}){if(Number(n)!==n||n%1==0)throw new He(`Increment must be float. Current increment ${n}`);if(n<Cn)throw new He(`minimum increment percentage is ${Cn}`);return Q(new _(null!=t?t:qn(e)).times(new _(Cn).plus(1)))}function Un(e,t){var n,r,i;const a=Qn(e).length-_n.length;return(null!==(n=null!==(r=null!==(i=a<=4?62*In:null)&&void 0!==i?i:a<=8?31*In:null)&&void 0!==r?r:a<=12?In:null)&&void 0!==n?n:0)+t}function Gn(e){return Qn(e).length<13+_n.length}function Ln(e,{_expectedMineRate:t=18e4,_microBlockCycle:n=3e3}){const r={block:t,microblock:n}[e];return Math.floor(r/3)}const Hn=new WeakMap;async function jn({cached:e=!1,...t}){const n=null!==(i=(r=t.onNode)._wrappedValue)&&void 0!==i?i:r;var r,i;if(e){const e=Hn.get(n);if(null!=e&&e.time>Date.now()-Ln("block",t))return e.height}const{height:a}=await n.getCurrentKeyBlockHeight();return Hn.set(n,{height:a,time:Date.now()}),a}async function Vn(e,{blocks:t=5,interval:n,onNode:r,...i}){var a;let o;null!==(a=n)&&void 0!==a||(n=Ln("microblock",i));do{const a=await r.getTransactionByHash(e);if(-1!==a.blockHeight)return a;null==o&&(o=0!==a.tx.ttl?-1:await jn({...i,onNode:r,cached:!0})+t),await Ct(n)}while(-1===o||await jn({...i,onNode:r,cached:!0})<o);throw new K(t,e)}async function $n(e,{interval:t,onNode:n,...r}){var i;let a;null!==(i=t)&&void 0!==i||(t=Math.min(Ln("block",r),5e3));do{null!=a&&await Ct(t),a=await jn({onNode:n})}while(a<e);return a}async function Yn(e,{confirm:t=3,onNode:n,...r}){const{blockHeight:i}=await n.getTransactionByHash(e),a=await $n(i+t,{onNode:n,...r}),{blockHeight:o}=await n.getTransactionByHash(e);switch(o){case-1:throw new Je(e);case i:return a;default:return Yn(e,{onNode:n,confirm:t,...r})}}async function Jn(e,{height:t,hash:n,onNode:r}){return null!=t?r.getAccountByPubkeyAndHeight(e,t):null!=n?r.getAccountByPubkeyAndHash(e,n):r.getAccountByPubkey(e)}async function Kn(e,{format:t=Ze.AETTOS,...n}){const r=e.startsWith("ok_")?Yt($t(e),Rt.AccountAddress):e,{balance:i}=await Jn(r,n).catch((e=>{if(!Nt(e))throw e;return{balance:0n}}));return tt(i,{targetDenomination:t})}async function Wn({onNode:e}){return e.getCurrentGeneration()}async function Xn(e,{onNode:t}){return"number"==typeof e?t.getGenerationByHeight(e):t.getGenerationByHash(e)}async function Zn(e,{onNode:t}){return(await t.getMicroBlockTransactionsByHash(e)).transactions}async function er(e,{onNode:t}){return"number"==typeof e?t.getKeyBlockByHeight(e):t.getKeyBlockByHash(e)}async function tr(e,{onNode:t}){return t.getMicroBlockHeaderByHash(e)}const nr=new Map;async function rr(e,t){const n=nr.get(e);if(nr.delete(e),null==n)throw new re("Can't get dry-run request");let r;try{const e="number"==typeof n[0].top?(await er(n[0].top,{onNode:t})).hash:n[0].top;r=await t.protectedDryRunTxs({top:e,txEvents:n[0].txEvents,txs:n.map((e=>({tx:e.tx}))),accounts:Array.from(new Set(n.map((e=>e.accountAddress)))).map((e=>({pubKey:e,amount:hn.amount})))})}catch(e){return void n.forEach((({reject:t})=>t(e)))}const{results:i,txEvents:a}=r;i.forEach((({result:e,reason:t,...r},i)=>{const{resolve:o,reject:s,tx:c,accountAddress:u}=n[i];"ok"===e?o({...r,txEvents:a}):s(Object.assign(new Le(t),{tx:c,accountAddress:u}))}))}async function ir(e,t,{top:n,txEvents:r,combine:i,onNode:a}){var o;const s=!0===i?[n,r].join():"immediate",c=null!==(o=nr.get(s))&&void 0!==o?o:[];return nr.set(s,c),new Promise(((o,u)=>{var l;c.push({tx:e,accountAddress:t,top:n,txEvents:r,resolve:o,reject:u}),!0===i?null!==(l=c.timeout)&&void 0!==l||(c.timeout=setTimeout((()=>{rr(s,a)}))):rr(s,a)}))}async function ar(e,{onNode:t}){return t.getContractCode(e)}async function or(e,{onNode:t}){return t.getContract(e)}async function sr(e,{onNode:t}){return t.getNameEntryByName(e)}async function cr(e,t,{verify:n=!0,resolveByNode:r=!1,onNode:i}){if(On(e)){if(n||r){const n=(await i.getNameEntryByName(e)).pointers.find((e=>e.key===t));if(null==n)throw new oe(e,t);if(r)return n.id}return Pn(e)}try{return $t(e),e}catch(t){throw new ce(`Invalid name or address: ${e}`)}}var ur=n(8287).Buffer;const lr={[Bn.Iris]:{"contract-create":{vmVersion:[Nn.Fate2],abiVersion:[bn.Fate]},"contract-call":{vmVersion:[],abiVersion:[bn.Fate,bn.Sophia]},"oracle-call":{vmVersion:[],abiVersion:[bn.NoAbi,bn.Fate]}},[Bn.Ceres]:{"contract-create":{vmVersion:[Nn.Fate3],abiVersion:[bn.Fate]},"contract-call":{vmVersion:[],abiVersion:[bn.Fate]},"oracle-call":{vmVersion:[],abiVersion:[bn.NoAbi,bn.Fate]}}};function Ar(e,t){var n;const r=lr[e][t];return{vmVersion:null!==(n=r.vmVersion[0])&&void 0!==n?n:Nn.Fate2,abiVersion:r.abiVersion[0]}}var dr={serialize(e,t,{consensusProtocolVersion:n=Bn.Iris}){var r;return null!==(r=e)&&void 0!==r||(e=Ar(n,"contract-create")),ur.from([e.vmVersion,0,e.abiVersion])},async prepare(e,t,n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Bn).length&&null!=n.onNode?Ar((await n.onNode.getNodeInfo()).consensusProtocolVersion,"contract-create"):void 0},deserialize(e){const[t,,n]=e;return{vmVersion:+t,abiVersion:+n}}},pr=n(8287).Buffer;function mr(e){return{serialize(t,{buildTx:n}){return ArrayBuffer.isView(t)?pr.from(t):"string"==typeof t&&t.startsWith("tx_")?$t(t):$t(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackTx:n}){return n(Yt(t,Rt.Transaction),e)}}}function hr(e){return{serialize(t,n){return t.map((t=>e.serialize(t,n)))},deserialize(t,n){return t.map((t=>e.deserialize(t,n)))}}}function gr(e,t){return{serialize(e,{buildTx:n}){return $t(n({tag:vn.Mtree,values:Object.entries(e).map((([e,r])=>({tag:vn.MtreeValue,key:$t(e),value:$t(n({...r,tag:t}))})))}))},deserialize(n,{unpackTx:r}){const{values:i}=r(Yt(n,Rt.Transaction),vn.Mtree);return Object.fromEntries(i.filter((({key:t})=>e!==Rt.ContractAddress||32===t.length)).map((({key:n,value:i})=>[Yt(n,e),r(Yt(i,Rt.Transaction),t)])))},recursiveType:!0}}function fr(e,t){return{...t,serialize(n,r){return t.serialize(null!=n?n:e,r)}}}var yr={serialize(e){if(Number(e)<0)throw new L("value","greater or equal to 0",e);return mn(e,!0)},deserialize(e){return Rn(e)}},Cr={serialize(e){return yr.serialize(e)},deserialize(e){return+yr.deserialize(e)}};function Ir(e,t){return{...t,serialize(n,r,i){return t.serialize(e(n),r,i)}}}function wr(e,t){return{serialize(n){if((!0!==t||null!=n)&&n!==e)throw new L("ShortUIntConst",e,n);return Cr.serialize(e)},deserialize(t){const n=Cr.deserialize(t);if(n!==e)throw new L("ShortUIntConst",e,n);return e},constValue:e,constValueOptional:!0===t}}var Er=n(8287).Buffer;const Br=[Rt.AccountAddress,Rt.Name,Rt.Commitment,Rt.OracleAddress,Rt.ContractAddress,Rt.Channel];function Nr(...e){return{serialize(t){const n=t.slice(0,2);if(!Bt(n,Br))throw new Ye(n);if(!Bt(n,e))throw new L("Address encoding",e.join(", "),n);const r=Br.indexOf(n)+1;return Er.from([...mn(r),...$t(t)])},deserialize(t){const n=Er.from(t).readUIntBE(0,1),r=Br[n-1];if(null==r)throw new Ve(n);if(!Bt(r,e))throw new L("Address encoding",e.join(", "),r);return Yt(t.subarray(1),r)}}}var br=n(8287).Buffer;function vr(e,t){return{serialize(e){if(null==e){if(!0===t)return br.from([]);throw new L("Encoded data","provided",e)}return $t(e)},deserialize(t){return Yt(t,e)}}}var Sr=n(8287).Buffer,Tr={serialize(e){return Sr.from(e)},deserialize(e){return e}},xr={...yr,serializeAettos(e,t,n){return null!=e?e:"0"},serialize(e,t,{denomination:n=Ze.AETTOS,...r}){return yr.serialize(this.serializeAettos(null!=e?tt(e,{denomination:n}):e,t,r))}};function _r(e,t,n){const r=e=>e.split(/[-+]/)[0].split(".").map((e=>+e)),i=r(e),a=r(t),o=r(n),s=Math.max(...i,...a,...o)+1,c=e=>e.reverse().reduce(((e,t,n)=>e+t*s**n),0),u=c(i),l=c(a),A=c(o);return u>=l&&u<A}const Qr=new WeakMap;async function Pr(e){const t=Qr.get(e);if(null!=t&&t.time>Date.now()-2e4)return t.gasPrice;const{nodeVersion:n}=await e._getCachedStatus();if(!n.startsWith("6.12.0+")&&!_r(n,"6.13.0","8.0.0"))return 0n;const{minGasPrice:r,utilization:i}=(await e.getRecentGasPrices())[0];let a=i<70?0n:BigInt(new _(r.toString()).times(1.01).integerValue().toFixed());const o=100000n*BigInt(fn);return a>o&&(console.warn([`Estimated gas price ${a} exceeds the maximum safe value for unknown reason.`,`It will be limited to ${o}.`,"To overcome this restriction provide `gasPrice`/`fee` in options."].join(" ")),a=o),Qr.set(e,{gasPrice:a,time:Date.now()}),a}var zr={...xr,async prepare(e,t,{onNode:n,denomination:r}){if(null!=e)return e;if(null==n)throw new L("onNode","provided (or provide `gasPrice` instead)",n);const i=await Pr(n);return 0n!==i?tt(i,{targetDenomination:r}):void 0},serializeAettos(e=fn.toString()){if(+e<fn)throw new H(`Gas price ${e.toString()} must be bigger than ${fn}`);return e}};function Rr(e){const t={[vn.OracleRegisterTx]:"oracleTtlValue",[vn.OracleExtendTx]:"oracleTtlValue",[vn.OracleQueryTx]:"queryTtlValue",[vn.OracleResponseTx]:"responseTtlValue"},{tag:n}=e;return Et(n,t)?e[t[n]]:1}function kr(e,t,n){const{length:r}=$t(e),i=t(e);let a=0;return i.tag!==vn.GaMetaTx&&i.tag!==vn.PayingForTx||(a=$t(n(i.tx.encodedTx)).length),o=i.tag,15e3*(null!==(s={[vn.ChannelForceProgressTx]:30,[vn.ChannelOffChainTx]:0,[vn.ContractCreateTx]:5,[vn.ContractCallTx]:12,[vn.GaAttachTx]:5,[vn.GaMetaTx]:5,[vn.PayingForTx]:.2}[o])&&void 0!==s?s:1)+((e,t,{relativeTtl:n,innerTxSize:r})=>{switch(e){case vn.OracleRegisterTx:case vn.OracleExtendTx:case vn.OracleQueryTx:case vn.OracleResponseTx:return 20*t+Math.ceil(32e3*n/Math.floor(175200));case vn.GaMetaTx:case vn.PayingForTx:return 20*(t-r);default:return 20*t}})(i.tag,r,{relativeTtl:Rr(i),innerTxSize:a});var o,s}const Or="_gas-price:";var Mr={...xr,async prepare(e,t,{onNode:n}){if(null!=e)return e;if(null==n)throw new L("onNode","provided (or provide `fee` instead)",n);const r=await Pr(n);return 0n!==r?Or+r:void 0},serializeAettos(e,{rebuildTx:t,unpackTx:n,buildTx:r,_computingMinFee:i},{_canIncreaseFee:a}){if(null!=i)return i.toFixed();const o=function(e,t,n){let r,i=new _(0);do{r=i,i=new _(fn).times(kr(e(i),t,n))}while(!i.eq(r));return i}((e=>t({_computingMinFee:e})),n,r),s=!0===e?.startsWith(Or)?o.dividedBy(fn).times(e.replace(Or,"")):new _(null!=e?e:o);if(o.gt(s)){if(!0===a)return o.toFixed();throw new H(`Fee ${s.toString()} must be bigger than ${o}`)}return s.toFixed()},serialize(e,t,n){return"string"==typeof e&&e.startsWith(Or)?yr.serialize(this.serializeAettos(e,t,n)):xr.serialize.call(this,e,t,n)}},Dr={...Cr,serialize(e){return Cr.serialize(null!=e?e:0)},async prepare(e,t,{onNode:n,absoluteTtl:r,_isInternalBuild:i,...a}){if(!0!==r&&0!==e&&(null!=e||!0===i)){var o;if(null==n)throw new L("onNode","provided",n);e=(null!==(o=e)&&void 0!==o?o:3)+await jn({...a,onNode:n,cached:!0})}return e}};function qr(e){return{...Cr,async prepare(t,n,r){if(null!=t)return t;const{onNode:i,strategy:a}=r,o=r[e],s="provided (or provide `nonce` instead)";if(null==i)throw new L("onNode",s,i);if(null==o)throw new L("senderId",s,o);return(await i.getAccountNextNonce(o.replace(/^ok_/,"ak_"),{strategy:a}).catch((e=>{if(!Nt(e))throw e;return{nextNonce:1}}))).nextNonce},senderKey:e}}const Fr=Nr(...Br);var Ur={serialize(e){if(e.length>32)throw new H(`Expected 32 pointers or less, got ${e.length} instead`);return e.map((e=>[mn(e.key),Fr.serialize(e.id)]))},deserialize(e){return e.map((([e,t])=>({key:e.toString(),id:Fr.deserialize(t)})))}},Gr=n(8287).Buffer,Lr={serialize(e){return Gr.from(e)},deserialize(e){return e.toString()}},Hr={serialize(e){return Lr.serialize(e)},deserialize(e){return Lr.deserialize(e)}},jr={...xr,serializeAettos(e,t){const n=qn(t.name),r=new _(null!=e?e:n);if(n.gt(r))throw new se(r,n);return r.toFixed()},serialize(e,t,n){return xr.serialize.call(this,e,t,n)}};const Vr=Nr(Rt.Name);var $r={...Vr,serialize(e){return Vr.serialize(On(e)?Pn(e):e)}},Yr=n(8287).Buffer;const Jr=Yr.from([1]),Kr=Yr.from([2]),Wr=Nr(...Br);var Xr={serialize(e){if(e.length>32)throw new H(`Expected 32 pointers or less, got ${e.length} instead`);return e.map((({key:e,id:t})=>{let n;if(Wt(t,...Br)&&(n=[Jr,Wr.serialize(t)]),Wt(t,Rt.Bytearray)){const e=$t(t);if(e.length>1024)throw new L("Raw pointer","shorter than 1025 bytes",`${e.length} bytes`);n=[Kr,e]}if(null==n)throw new Ue(`Unknown AENS pointer value: ${t}`);return[mn(e),Yr.concat(n)]}))},deserialize(e){return e.map((([e,t])=>{const n=t.subarray(0,1),r=t.subarray(1);let i;if(n.equals(Jr)&&(i=Wr.deserialize(r)),n.equals(Kr)&&(i=Yt(r,Rt.Bytearray)),null==i)throw new Ue(`Unknown AENS pointer tag: ${n}`);return{key:e.toString(),id:i}}))}},Zr=n(8287).Buffer,ei={serialize(e){return Zr.from([e?1:0])},deserialize(e){return 1===e[0]}},ti={...Cr,serialize(e,{tag:t,rebuildTx:n,unpackTx:r,buildTx:i,_computingGasLimit:a},{gasMax:o=6e6}){if(null!=a)return Cr.serialize(a);const s=t===vn.GaMetaTx?gn:function(e,t,n,r){return e-+kr(t(e),n,r)}(o,(e=>n({_computingGasLimit:e,_canIncreaseFee:!0})),r,i),c=null!=e?e:s;if(c>s)throw new H(`Gas limit ${c} must be less or equal to ${s}`);return Cr.serialize(c)}},ni=n(8287).Buffer,ri={_getProtocolDetails(e,t){return Ar(e,vn.ContractCallTx===t||vn.GaMetaTx===t?"contract-call":"oracle-call").abiVersion},serialize(e,{tag:t},{consensusProtocolVersion:n=Bn.Iris}){const r=null!=e?e:this._getProtocolDetails(n,t);return ni.from([r])},async prepare(e,{tag:t},n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Bn).length&&null!=n.onNode?this._getProtocolDetails((await n.onNode.getNodeInfo()).consensusProtocolVersion,t):void 0},deserialize(e){return e[0]}},ii=n(8287).Buffer;function ai(e){const t=Object.values(e).filter((e=>"number"==typeof e));return{serialize(e){if("number"!=typeof e)throw new L("value","to be a number",e);if(e>255)throw new L("value","to be less than 256",e);if(!Bt(e,t))throw new L("value","to be a value of Enum",e);return ii.from([e])},deserialize(e){if(1!==e.length)throw new L("buffer","to have single element",e.length);const n=e[0];if(!Bt(n,t))throw new L("value","to be a value of Enum",n);return n}}}var oi={serialize(e){return mn(e)},deserialize(e){return e.toString()}},si={...xr,async prepare(e,t,n){if(null!=e)return e;const{onNode:r,oracleId:i}=n,a="provided (or provide `queryFee` instead)";if(null==r)throw new L("onNode",a,r);if(null==i)throw new L("oracleId",a,i);return(await r.getOracleByPubkey(i)).queryFee.toString()}};function ci(e,t){return e.get(function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(e,t))}function ui(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,ci(t,e),n),n}function li(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,ci(t,e))}var Ai,di=n(858),pi=n(8287).Buffer;function mi(e,t){gi(e,t),t.add(e)}function hi(e,t,n){gi(e,t),t.set(e,n)}function gi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fi(e,t,n){return Ci(t,e),n}function yi(e,t,n){return Ci(t,e),n}function Ci(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ii=function(e){return e[e.Branch=0]="Branch",e[e.Extension=1]="Extension",e[e.Leaf=2]="Leaf",e}(Ii||{}),wi=new WeakMap,Ei=new WeakMap,Bi=new WeakMap,Ni=new WeakMap,bi=new WeakMap,vi=new WeakMap,Si=new WeakSet,Ti=new WeakSet;class xi{get isComplete(){return li(this,Ei)}constructor(e,t,n,r){if(mi(this,Ti),mi(this,Si),hi(this,wi,{writable:!0,value:void 0}),hi(this,Ei,{writable:!0,value:!0}),hi(this,Bi,{writable:!0,value:void 0}),hi(this,Ni,{writable:!0,value:void 0}),hi(this,bi,{writable:!0,value:void 0}),hi(this,vi,{writable:!0,value:void 0}),ui(this,Ni,t),ui(this,bi,n),ui(this,vi,r),ui(this,wi,e[0].toString("hex")),ui(this,Bi,Object.fromEntries(e[1].map((e=>[e[0].toString("hex"),e[1]])))),null!=li(this,Bi)[li(this,wi)])Object.entries(li(this,Bi)).forEach((([e,t])=>{if(yi(xi,xi,_i).call(xi,t)!==e)throw new ke;const{type:n}=yi(xi,xi,Qi).call(xi,t);switch(n){case Ii.Branch:t.slice(0,16).filter((e=>e.length)).forEach((e=>{null==li(this,Bi)[e.toString("hex")]&&ui(this,Ei,!1)}));break;case Ii.Extension:if(null==li(this,Bi)[t[1].toString("hex")])throw new Oe("Can't find a node by hash in extension node");break;case Ii.Leaf:break;default:throw new re(`Unknown MPTree node type: ${n}`)}}));else{if(0!==Object.keys(li(this,Bi)).length)throw new Oe("Can't find a node by root hash");ui(this,Ei,!1)}}isEqual(e){return li(this,wi)===li(e,wi)}serialize(){return[pi.from(li(this,wi),"hex"),Object.entries(li(this,Bi)).map((([e,t])=>[pi.from(e,"hex"),t]))]}get(e){const t=fi(this,Si,Pi).call(this,$t(e).toString("hex"));return null==t?t:li(this,vi).call(this,Yt(t,Rt.Transaction),li(this,bi))}toObject(){return Object.fromEntries(fi(this,Ti,zi).call(this).filter((([e])=>li(this,Ni)!==Rt.ContractAddress||66!==e.length)).map((([e,t])=>[Yt(pi.from(e,"hex"),li(this,Ni)),li(this,vi).call(this,Yt(t,Rt.Transaction),li(this,bi))])))}}function _i(e){return pi.from(en((0,di.encode)(e))).toString("hex")}function Qi(e){switch(e.length){case 17:return{type:Ii.Branch,...0!==e[16].length&&{value:e[16]}};case 2:{const t=e[0][0]>>4;if(t>3)throw new De(t);const n=t<=1?Ii.Extension:Ii.Leaf,r=[0,2].includes(t)?2:1;return{type:n,...n===Ii.Leaf&&{value:e[1]},path:e[0].toString("hex").slice(r)}}default:throw new Me(e.length)}}function Pi(e){let t=li(this,wi),n=e;for(;;){const e=li(this,Bi)[t];if(null==e){if(!this.isComplete)return;throw new re("Can't find node in complete tree")}const{type:r,value:i,path:a}=yi(Ai,Ai,Qi).call(Ai,e);switch(r){case Ii.Branch:if(0===n.length)return i;t=e[+`0x${n[0]}`].toString("hex"),n=n.substring(1);break;case Ii.Extension:if(n.substring(0,a?.length)!==a)return;t=e[1].toString("hex"),n=n.substring(a.length);break;case Ii.Leaf:if(a!==n)return;return i;default:throw new re(`Unknown MPTree node type: ${r}`)}}}function zi(){const e=[],t=(n,r)=>{const i=li(this,Bi)[n];if(null==i){if(!this.isComplete)return;throw new re("Can't find node in complete tree")}const{type:a,value:o,path:s}=yi(Ai,Ai,Qi).call(Ai,i);switch(a){case Ii.Branch:i.slice(0,16).map(((e,t)=>[e,t])).filter((([e])=>e.length)).forEach((([e,n])=>t(e.toString("hex"),r+n.toString(16)))),null!=o&&e.push([r,o]);break;case Ii.Extension:t(i[1].toString("hex"),r+s);break;case Ii.Leaf:if(null==o)throw new ie;e.push([r+s,o]);break;default:throw new re(`Unknown MPTree node type: ${a}`)}};return t(li(this,wi),""),e}function Ri(e,t){return{serialize(e){return e.serialize()},deserialize(n,{unpackTx:r}){return new xi(n,e,t,r)}}}function ki(e){return{serialize(t,{buildTx:n}){return $t(n({tag:e,payload:t}))},deserialize(t,{unpackTx:n}){return n(Yt(t,Rt.Transaction),e).payload},recursiveType:!0}}Ai=xi;let Oi=function(e){return e[e.delta=0]="delta",e[e.block=1]="block",e}({}),Mi=function(e){return e[e.Ok=0]="Ok",e[e.Error=1]="Error",e[e.Revert=2]="Revert",e}({});const Di=mr(),qi=mr(vn.SignedTx),Fi=hr(mr(vn.MtreeValue)),Ui=mr(vn.TreesPoi),Gi=gr(Rt.ContractAddress,vn.Contract),Li=gr(Rt.AccountAddress,vn.Account),Hi=gr(Rt.Bytearray,vn.ContractCall),ji=gr(Rt.Channel,vn.Channel),Vi=gr(Rt.Name,vn.Name),$i=gr(Rt.OracleAddress,vn.Oracle),Yi=fr(3600,Cr),Ji=Ir((e=>{var t;const n=18e4;if(null!==(t=e)&&void 0!==t||(e=n),e>=1&&e<=n)return e;throw new L("nameTtl","a number between 1 and 180000 blocks",e)}),Cr),Ki=[{tag:wr(vn.Account),version:wr(1),nonce:Cr,balance:yr},{tag:wr(vn.Account),version:wr(2,!0),flags:yr,nonce:Cr,balance:yr,gaContract:Nr(Rt.ContractAddress,Rt.Name),gaAuthFun:vr(Rt.ContractBytearray)},{tag:wr(vn.SignedTx),version:wr(1,!0),signatures:hr(Tr),encodedTx:Di},{tag:wr(vn.SpendTx),version:wr(1,!0),senderId:Nr(Rt.AccountAddress),recipientId:Nr(Rt.AccountAddress,Rt.ContractAddress,Rt.Name),amount:xr,fee:Mr,ttl:Dr,nonce:qr("senderId"),payload:vr(Rt.Bytearray,!0)},{tag:wr(vn.Name),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nameTtl:Cr,status:Tr,clientTtl:Cr,pointers:Ur},{tag:wr(vn.NamePreclaimTx),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),commitmentId:Nr(Rt.Commitment),fee:Mr,ttl:Dr},{tag:wr(vn.NameClaimTx),version:wr(2,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),name:Hr,nameSalt:yr,nameFee:jr,fee:Mr,ttl:Dr},{tag:wr(vn.NameUpdateTx),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),nameId:$r,nameTtl:Ji,pointers:Ur,clientTtl:Yi,fee:Mr,ttl:Dr},{tag:wr(vn.NameUpdateTx),version:wr(2),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),nameId:$r,nameTtl:Ji,pointers:Xr,clientTtl:Yi,fee:Mr,ttl:Dr},{tag:wr(vn.NameTransferTx),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),nameId:$r,recipientId:Nr(Rt.AccountAddress,Rt.Name),fee:Mr,ttl:Dr},{tag:wr(vn.NameRevokeTx),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),nameId:$r,fee:Mr,ttl:Dr},{tag:wr(vn.Contract),version:wr(1,!0),owner:Nr(Rt.AccountAddress),ctVersion:dr,code:vr(Rt.ContractBytearray),log:vr(Rt.ContractBytearray),active:ei,referers:hr(Nr(Rt.AccountAddress)),deposit:xr},{tag:wr(vn.ContractCreateTx),version:wr(1,!0),ownerId:Nr(Rt.AccountAddress),nonce:qr("ownerId"),code:vr(Rt.ContractBytearray),ctVersion:dr,fee:Mr,ttl:Dr,deposit:Ir(((e=0)=>{if(0==+e)return e;throw new L("deposit","equal 0 (because is not refundable)",e)}),xr),amount:xr,gasLimit:ti,gasPrice:zr,callData:vr(Rt.ContractBytearray)},{tag:wr(vn.ContractCallTx),version:wr(1,!0),callerId:Nr(Rt.AccountAddress),nonce:qr("callerId"),contractId:Nr(Rt.ContractAddress,Rt.Name),abiVersion:ri,fee:Mr,ttl:Dr,amount:xr,gasLimit:ti,gasPrice:zr,callData:vr(Rt.ContractBytearray)},{tag:wr(vn.ContractCall),version:wr(2,!0),callerId:Nr(Rt.AccountAddress),callerNonce:Cr,height:Cr,contractId:Nr(Rt.ContractAddress),gasPrice:yr,gasUsed:Cr,returnValue:vr(Rt.ContractBytearray),returnType:ai(Mi),log:hr(Tr)},{tag:wr(vn.Oracle),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),queryFormat:oi,responseFormat:oi,queryFee:xr,oracleTtlValue:Cr,abiVersion:ri},{tag:wr(vn.OracleRegisterTx),version:wr(1,!0),accountId:Nr(Rt.AccountAddress),nonce:qr("accountId"),queryFormat:oi,responseFormat:oi,queryFee:xr,oracleTtlType:fr(Oi.delta,ai(Oi)),oracleTtlValue:fr(500,Cr),fee:Mr,ttl:Dr,abiVersion:ri},{tag:wr(vn.OracleExtendTx),version:wr(1,!0),oracleId:Nr(Rt.OracleAddress,Rt.Name),nonce:qr("oracleId"),oracleTtlType:fr(Oi.delta,ai(Oi)),oracleTtlValue:fr(500,Cr),fee:Mr,ttl:Dr},{tag:wr(vn.OracleQueryTx),version:wr(1,!0),senderId:Nr(Rt.AccountAddress),nonce:qr("senderId"),oracleId:Nr(Rt.OracleAddress,Rt.Name),query:oi,queryFee:si,queryTtlType:fr(Oi.delta,ai(Oi)),queryTtlValue:fr(10,Cr),responseTtlType:fr(Oi.delta,ai(Oi)),responseTtlValue:fr(10,Cr),fee:Mr,ttl:Dr},{tag:wr(vn.OracleResponseTx),version:wr(1,!0),oracleId:Nr(Rt.OracleAddress),nonce:qr("oracleId"),queryId:vr(Rt.OracleQueryId),response:oi,responseTtlType:fr(Oi.delta,ai(Oi)),responseTtlValue:fr(10,Cr),fee:Mr,ttl:Dr},{tag:wr(vn.ChannelCreateTx),version:wr(2,!0),initiator:Nr(Rt.AccountAddress),initiatorAmount:yr,responder:Nr(Rt.AccountAddress),responderAmount:yr,channelReserve:yr,lockPeriod:yr,ttl:Dr,fee:Mr,initiatorDelegateIds:hr(Nr(...Br)),responderDelegateIds:hr(Nr(...Br)),stateHash:vr(Rt.State),nonce:qr("initiator")},{tag:wr(vn.ChannelCloseMutualTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),initiatorAmountFinal:yr,responderAmountFinal:yr,ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelCloseSoloTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),payload:vr(Rt.Transaction),poi:Ui,ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelSlashTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),payload:vr(Rt.Transaction),poi:Ui,ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelDepositTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),amount:yr,ttl:Dr,fee:Mr,stateHash:vr(Rt.State),round:Cr,nonce:qr("fromId")},{tag:wr(vn.ChannelWithdrawTx),version:wr(1,!0),channelId:Nr(Rt.Channel),toId:Nr(Rt.AccountAddress),amount:yr,ttl:Dr,fee:Mr,stateHash:vr(Rt.State),round:Cr,nonce:qr("fromId")},{tag:wr(vn.ChannelSettleTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),initiatorAmountFinal:yr,responderAmountFinal:yr,ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelForceProgressTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),payload:vr(Rt.Transaction),round:Cr,update:vr(Rt.ContractBytearray),stateHash:vr(Rt.State),offChainTrees:vr(Rt.StateTrees),ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelOffChainTx),version:wr(2,!0),channelId:Nr(Rt.Channel),round:Cr,stateHash:vr(Rt.State)},{tag:wr(vn.Channel),version:wr(3,!0),initiator:Nr(Rt.AccountAddress),responder:Nr(Rt.AccountAddress),channelAmount:yr,initiatorAmount:yr,responderAmount:yr,channelReserve:yr,initiatorDelegateIds:hr(Nr(...Br)),responderDelegateIds:hr(Nr(...Br)),stateHash:vr(Rt.State),round:Cr,soloRound:yr,lockPeriod:yr,lockedUntil:yr,initiatorAuth:vr(Rt.ContractBytearray),responderAuth:vr(Rt.ContractBytearray)},{tag:wr(vn.ChannelSnapshotSoloTx),version:wr(1,!0),channelId:Nr(Rt.Channel),fromId:Nr(Rt.AccountAddress),payload:vr(Rt.Transaction),ttl:Dr,fee:Mr,nonce:qr("fromId")},{tag:wr(vn.ChannelOffChainUpdateTransfer),version:wr(1,!0),from:Nr(Rt.AccountAddress),to:Nr(Rt.AccountAddress),amount:yr},{tag:wr(vn.ChannelOffChainUpdateDeposit),version:wr(1,!0),from:Nr(Rt.AccountAddress),amount:yr},{tag:wr(vn.ChannelOffChainUpdateWithdraw),version:wr(1,!0),from:Nr(Rt.AccountAddress),amount:yr},{tag:wr(vn.ChannelOffChainUpdateCreateContract),version:wr(1,!0),owner:Nr(Rt.AccountAddress),ctVersion:dr,code:vr(Rt.ContractBytearray),deposit:yr,callData:vr(Rt.ContractBytearray)},{tag:wr(vn.ChannelOffChainUpdateCallContract),version:wr(1,!0),caller:Nr(Rt.AccountAddress),contract:Nr(Rt.ContractAddress),abiVersion:ri,amount:yr,callData:vr(Rt.ContractBytearray),callStack:Tr,gasPrice:zr,gasLimit:ti},{tag:wr(vn.ChannelClientReconnectTx),version:wr(1,!0),channelId:Nr(Rt.Channel),round:Cr,role:oi,pubkey:Nr(Rt.AccountAddress)},{tag:wr(vn.TreesPoi),version:wr(1,!0),accounts:hr(Ri(Rt.AccountAddress,vn.Account)),calls:hr(Ri(Rt.Bytearray,vn.ContractCall)),channels:hr(Ri(Rt.Channel,vn.Channel)),contracts:hr(Ri(Rt.ContractAddress,vn.Contract)),ns:hr(Ri(Rt.Name,vn.Name)),oracles:hr(Ri(Rt.OracleAddress,vn.Oracle))},{tag:wr(vn.StateTrees),version:wr(0,!0),contracts:ki(vn.ContractsMtree),calls:ki(vn.CallsMtree),channels:ki(vn.ChannelsMtree),ns:ki(vn.NameserviceMtree),oracles:ki(vn.OraclesMtree),accounts:ki(vn.AccountsMtree)},{tag:wr(vn.Mtree),version:wr(1,!0),values:Fi},{tag:wr(vn.MtreeValue),version:wr(1,!0),key:Tr,value:Tr},{tag:wr(vn.ContractsMtree),version:wr(1,!0),payload:Gi},{tag:wr(vn.CallsMtree),version:wr(1,!0),payload:Hi},{tag:wr(vn.ChannelsMtree),version:wr(1,!0),payload:ji},{tag:wr(vn.NameserviceMtree),version:wr(1,!0),payload:Vi},{tag:wr(vn.OraclesMtree),version:wr(1,!0),payload:$i},{tag:wr(vn.AccountsMtree),version:wr(1,!0),payload:Li},{tag:wr(vn.GaAttachTx),version:wr(1,!0),ownerId:Nr(Rt.AccountAddress),nonce:qr("ownerId"),code:vr(Rt.ContractBytearray),authFun:Tr,ctVersion:dr,fee:Mr,ttl:Dr,gasLimit:ti,gasPrice:zr,callData:vr(Rt.ContractBytearray)},{tag:wr(vn.GaMetaTx),version:wr(2,!0),gaId:Nr(Rt.AccountAddress),authData:vr(Rt.ContractBytearray),abiVersion:ri,fee:Mr,gasLimit:ti,gasPrice:zr,tx:qi},{tag:wr(vn.PayingForTx),version:wr(1,!0),payerId:Nr(Rt.AccountAddress),nonce:qr("payerId"),fee:Mr,tx:qi},{tag:wr(vn.GaMetaTxAuthData),version:wr(1,!0),fee:xr,gasPrice:zr,txHash:vr(Rt.TxHash)}];function Wi(e,t,n,r){const i=e.filter((e=>e.tag.constValue===n));if(0===i.length)throw new $e(`${t[n]} (${n})`,0);if(null==r){const e=i.find((e=>e.version.constValueOptional));if(null==e)throw new re(`Can't find default schema of ${t[n]} (${n})`);r=e.version.constValue}const a=i.find((e=>e.version.constValue===r));if(null==a)throw new $e(`${t[n]} (${n})`,r);return Object.entries(a)}function Xi(e,t,n,r,i){const a=Wi(e,t,n.tag,n.version).map((([e,t])=>t.serialize(n[e],{...n,...r},n)));return Yt((0,di.encode)(a),i)}function Zi(e,t,n,r,i){const a=(0,di.decode)($t(n)),o=+Rn(a[0]),s=Wi(e,t,o,+Rn(a[1]));if(null!=r&&r!==o)throw new Ue(`Expected ${t[r]} tag, got ${t[o]} instead`);if(a.length!==s.length)throw new L("RLP length",s.length,a.length);return Object.fromEntries(s.map((([e,t],n)=>[e,t.deserialize(a[n],i)])))}function ea(e,t){return Wi(Ki,vn,e,t)}function ta(e,{prefix:t}={}){return Xi(Ki,vn,e,{unpackTx:ra,buildTx:ta,rebuildTx:t=>ta({...e,...t})},null!=t?t:Rt.Transaction)}async function na(e){return await Promise.all(ea(e.tag,e.version).map((async([t,n])=>{null!=n.prepare&&(e[t]=await n.prepare(e[t],e,e))}))),ta(e)}function ra(e,t){return Zi(Ki,vn,e,t,{unpackTx:ra})}function ia(e){return Yt(en("string"==typeof e&&e.startsWith("tx_")?$t(e):e),Rt.TxHash)}function aa(e){let t=ra(e);if(vn.SignedTx===t.tag&&(t=t.encodedTx),vn.ContractCreateTx!==t.tag&&vn.GaAttachTx!==t.tag)throw new L("contractTx","a contractCreateTx or gaAttach",t.tag);return Tn(t.ownerId,t.nonce)}const oa="1.14.0",sa=3;function ca(e){const t=new Map;t.set("core-rest-pipeline",oa),function(e){var t,n,r;const i=globalThis.navigator;e.set("OS",(null!==(r=null!==(n=null===(t=null==i?void 0:i.userAgentData)||void 0===t?void 0:t.platform)&&void 0!==n?n:null==i?void 0:i.platform)&&void 0!==r?r:"unknown").replace(" ",""))}(t);const n=function(e){const t=[];for(const[n,r]of e){const e=r?`${n}/${r}`:n;t.push(e)}return t.join(" ")}(t);return e?`${e} ${n}`:n}const ua="x-ms-useragent",la="userAgentPolicy",Aa="setClientRequestIdPolicy",da=()=>{const e=new Map;return{policy:{name:"request-queues",async sendRequest(t,n){var r;const i=t.headers.get("__queue");t.headers.delete("__queue");const a=async()=>n(t);if(null==i)return a();const o=(null!==(r=e.get(i))&&void 0!==r?r:Promise.resolve()).then(a);return e.set(i,o.catch((()=>{}))),o}},position:"perCall"}},pa=()=>{const e=new Map;return{policy:{name:"combine-get-requests",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const i=JSON.stringify([t.url,t.body]),a=null!==(r=e.get(i))&&void 0!==r?r:n(t);e.set(i,a);try{return await a}finally{e.delete(i)}}},position:"perCall"}},ma=()=>{const e=new Map;return{policy:{name:"aggressive-cache-get-responses",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const i=JSON.stringify([t.url,t.body]),a=null!==(r=e.get(i))&&void 0!==r?r:n(t);return e.set(i,a),a}},position:"perCall"}},ha=e=>({policy:{name:"error-formatter",async sendRequest(t,n){try{return await n(t)}catch(t){if(!(t instanceof ft)||null==t.request)throw t;const n=`${new URL(t.request.url).pathname.slice(1)} error`;if(null==t.response?.bodyAsText)throw""===t.message&&(t.message=`${n}: ${t.code}`),t;const r=t.response.parsedBody;t.message=n;const i=null==r?` ${t.response.status} status code`:e(r);throw""!==i&&(t.message+=`:${i}`),t}}},position:"perCall"}),ga=(e,t,n,r)=>({policy:{name:"version-check",async sendRequest(i,a){if(i.headers.has("__version-check"))return i.headers.delete("__version-check"),a(i);const o=[await t({requestOptions:{customHeaders:{"__version-check":"true"}}}),n,r];if(!_r(...o))throw new te(e,...o);return a(i)}},position:"perCall"}),fa=(e,t)=>({policy:{name:"retry-on-failure",async sendRequest(n,r){var i;const a=null!==(i=n.headers.get("__retry-code"))&&void 0!==i?i:NaN;n.headers.delete("__retry-code");const o=[200,400,403,410,500].filter((e=>e!==+a)),s=new Array(e).fill(0).map(((t,n)=>((n+1)/e)**2)),c=s.reduce(((e,t)=>e+t),0),u=s.map((e=>Math.floor(e/c*t)));let l=new ft("Not expected to be thrown");for(let t=0;t<=e;t+=1){if(0!==t){await Ct(u[t-1]);const e=new URL(n.url);e.searchParams.set("__sdk-retry",t.toString()),n.url=e.toString()}try{return await r(n)}catch(e){var A;if(!(e instanceof ft))throw e;if(o.includes(null!==(A=e.response?.status)&&void 0!==A?A:0))throw e;l=e}}throw l}},position:"perCall"});function ya(e){return e.toLowerCase()}class Ca{constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(ya(e),{name:e,value:String(t).trim()})}get(e){var t;return null===(t=this._headersMap.get(ya(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(ya(e))}delete(e){this._headersMap.delete(ya(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const e of this._headersMap.values())t[e.name]=e.value;else for(const[e,n]of this._headersMap)t[e]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*(e){for(const t of e.values())yield[t.name,t.value]}(this._headersMap)}}function Ia(e){return new Ca(e)}var wa;const Ea="function"==typeof(null===(wa=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===wa?void 0:wa.randomUUID)?globalThis.crypto.randomUUID.bind(globalThis.crypto):function(){let e="";for(let t=0;t<32;t++){const n=Math.floor(16*Math.random());e+=12===t?"4":16===t?3&n|8:n.toString(16),7!==t&&11!==t&&15!==t&&19!==t||(e+="-")}return e};function Ba(){return Ea()}class Na{constructor(e){var t,n,r,i,a,o,s;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:Ia(),this.method=null!==(n=e.method)&&void 0!==n?n:"GET",this.timeout=null!==(r=e.timeout)&&void 0!==r?r:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=null!==(i=e.disableKeepAlive)&&void 0!==i&&i,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(a=e.withCredentials)&&void 0!==a&&a,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||Ba(),this.allowInsecureConnection=null!==(o=e.allowInsecureConnection)&&void 0!==o&&o,this.enableBrowserStreams=null!==(s=e.enableBrowserStreams)&&void 0!==s&&s}}const ba="$",va="_";function Sa(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Ta(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}const xa=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,_a=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function Qa(e,t){var n,r;const i=e.parsedHeaders;if("HEAD"===e.request.method)return Object.assign(Object.assign({},i),{body:e.parsedBody});const a=t&&t.bodyMapper,o=Boolean(null==a?void 0:a.nullable),s=null==a?void 0:a.type.name;if("Stream"===s)return Object.assign(Object.assign({},i),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const c="Composite"===s&&a.type.modelProperties||{},u=Object.keys(c).some((e=>""===c[e].serializedName));if("Sequence"===s||u){const t=null!==(n=e.parsedBody)&&void 0!==n?n:[];for(const n of Object.keys(c))c[n].serializedName&&(t[n]=null===(r=e.parsedBody)||void 0===r?void 0:r[n]);if(i)for(const e of Object.keys(i))t[e]=i[e];return!o||e.parsedBody||i||0!==Object.getOwnPropertyNames(c).length?t:null}return function(e){const t=Object.assign(Object.assign({},e.headers),e.body);return e.hasNullableType&&0===Object.getOwnPropertyNames(t).length?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?Object.assign(Object.assign({},e.headers),{body:e.body}):t}({body:e.parsedBody,headers:i,hasNullableType:o,shouldWrapBody:(l=e.parsedBody,A=s,"Composite"!==A&&"Dictionary"!==A&&("string"==typeof l||"number"==typeof l||"boolean"==typeof l||null!==(null==A?void 0:A.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==l))});var l,A}class Pa{constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,n){const r=(e,r)=>{throw new Error(`"${n}" with value "${t}" should satisfy the constraint "${e}": ${r}.`)};if(e.constraints&&null!=t){const{ExclusiveMaximum:n,ExclusiveMinimum:i,InclusiveMaximum:a,InclusiveMinimum:o,MaxItems:s,MaxLength:c,MinItems:u,MinLength:l,MultipleOf:A,Pattern:d,UniqueItems:p}=e.constraints;if(void 0!==n&&t>=n&&r("ExclusiveMaximum",n),void 0!==i&&t<=i&&r("ExclusiveMinimum",i),void 0!==a&&t>a&&r("InclusiveMaximum",a),void 0!==o&&t<o&&r("InclusiveMinimum",o),void 0!==s&&t.length>s&&r("MaxItems",s),void 0!==c&&t.length>c&&r("MaxLength",c),void 0!==u&&t.length<u&&r("MinItems",u),void 0!==l&&t.length<l&&r("MinLength",l),void 0!==A&&t%A!=0&&r("MultipleOf",A),d){const e="string"==typeof d?new RegExp(d):d;"string"==typeof t&&null!==t.match(e)||r("Pattern",d)}p&&t.some(((e,t,n)=>n.indexOf(e)!==t))&&r("UniqueItems",p)}}serialize(e,t,n,r={xml:{}}){var i,a,o;const s={xml:{rootName:null!==(i=r.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(a=r.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(o=r.xml.xmlCharKey)&&void 0!==o?o:va}};let c={};const u=e.type.name;n||(n=e.serializedName),null!==u.match(/^Sequence$/i)&&(c=[]),e.isConstant&&(t=e.defaultValue);const{required:l,nullable:A}=e;if(l&&A&&void 0===t)throw new Error(`${n} cannot be undefined.`);if(l&&!A&&null==t)throw new Error(`${n} cannot be null or undefined.`);if(!l&&!1===A&&null===t)throw new Error(`${n} cannot be null.`);return null==t||null!==u.match(/^any$/i)?c=t:null!==u.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)?c=function(e,t,n){if(null!=n)if(null!==e.match(/^Number$/i)){if("number"!=typeof n)throw new Error(`${t} with value ${n} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof n.valueOf())throw new Error(`${t} with value "${n}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof n.valueOf()||(r=n,!_a.test(r)))throw new Error(`${t} with value "${n}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof n)throw new Error(`${t} with value ${n} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof n;if(!("string"===e||"function"==typeof n.pipe||"function"==typeof n.tee||n instanceof ArrayBuffer||ArrayBuffer.isView(n)||("function"==typeof Blob||"object"==typeof Blob)&&n instanceof Blob||"function"===e))throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}var r;return n}(u,n,t):null!==u.match(/^Enum$/i)?c=function(e,t,n){if(!t)throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some((e=>"string"==typeof e.valueOf()?e.toLowerCase()===n.toLowerCase():e===n)))throw new Error(`${n} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return n}(n,e.type.allowedValues,t):null!==u.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?c=function(e,t,n){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/i)&&!function(e){return xa.test(e)}(t))throw new Error(`${n} must be a string in ISO 8601 format. Instead was "${t}".`);return t}(u,t,n):null!==u.match(/^ByteArray$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=Sa(t)}return t}(n,t):null!==u.match(/^Base64Url$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=function(e){if(e){if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e,t){let n=e.length;for(;n-1>=0&&"="===e[n-1];)--n;return e.substr(0,n)}(Sa(e)).replace(/\+/g,"-").replace(/\//g,"_")}}(t)}return t}(n,t):null!==u.match(/^Sequence$/i)?c=function(e,t,n,r,i,a){var o;if(!Array.isArray(n))throw new Error(`${r} must be of type Array.`);let s=t.type.element;if(!s||"object"!=typeof s)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}.`);"Composite"===s.type.name&&s.type.className&&(s=null!==(o=e.modelMappers[s.type.className])&&void 0!==o?o:s);const c=[];for(let t=0;t<n.length;t++){const o=e.serialize(s,n[t],r,a);if(i&&s.xmlNamespace){const e=s.xmlNamespacePrefix?`xmlns:${s.xmlNamespacePrefix}`:"xmlns";"Composite"===s.type.name?(c[t]=Object.assign({},o),c[t][ba]={[e]:s.xmlNamespace}):(c[t]={},c[t][a.xml.xmlCharKey]=o,c[t][ba]={[e]:s.xmlNamespace})}else c[t]=o}return c}(this,e,t,n,Boolean(this.isXML),s):null!==u.match(/^Dictionary$/i)?c=function(e,t,n,r,i,a){if("object"!=typeof n)throw new Error(`${r} must be of type object.`);const o=t.type.value;if(!o||"object"!=typeof o)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}.`);const s={};for(const t of Object.keys(n)){const c=e.serialize(o,n[t],r,a);s[t]=Ma(o,c,i,a)}if(i&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns",n=s;return n[ba]={[e]:t.xmlNamespace},n}return s}(this,e,t,n,Boolean(this.isXML),s):null!==u.match(/^Composite$/i)&&(c=function(e,t,n,r,i,a){if(Fa(e,t)&&(t=qa(e,t,n,"clientName")),null!=n){const o={},s=Oa(e,t,r);for(const c of Object.keys(s)){const u=s[c];if(u.readOnly)continue;let l,A=o;if(e.isXML)l=u.xmlIsWrapped?u.xmlName:u.xmlElementName||u.xmlName;else{const e=Ra(u.serializedName);l=e.pop();for(const t of e){null==A[t]&&(void 0!==n[c]&&null!==n[c]||void 0!==u.defaultValue)&&(A[t]={}),A=A[t]}}if(null!=A){if(i&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";A[ba]=Object.assign(Object.assign({},A[ba]),{[e]:t.xmlNamespace})}const o=""!==u.serializedName?r+"."+u.serializedName:r;let s=n[c];const d=Fa(e,t);d&&d.clientName===c&&null==s&&(s=t.serializedName);const p=e.serialize(u,s,o,a);if(void 0!==p&&null!=l){const e=Ma(u,p,i,a);i&&u.xmlIsAttribute?(A[ba]=A[ba]||{},A[ba][l]=p):i&&u.xmlIsWrapped?A[l]={[u.xmlElementName]:e}:A[l]=e}}}const c=function(e,t,n){const r=t.type.additionalProperties;if(!r&&t.type.className){const r=ka(e,t,n);return null==r?void 0:r.type.additionalProperties}return r}(e,t,r);if(c){const t=Object.keys(s);for(const i in n)t.every((e=>e!==i))&&(o[i]=e.serialize(c,n[i],r+'["'+i+'"]',a))}return o}return n}(this,e,t,n,Boolean(this.isXML),s)),c}deserialize(e,t,n,r={xml:{}}){var i,a,o,s;const c={xml:{rootName:null!==(i=r.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(a=r.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(o=r.xml.xmlCharKey)&&void 0!==o?o:va},ignoreUnknownProperties:null!==(s=r.ignoreUnknownProperties)&&void 0!==s&&s};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let u;const l=e.type.name;if(n||(n=e.serializedName),null!==l.match(/^Composite$/i))u=function(e,t,n,r,i){var a,o;const s=null!==(a=i.xml.xmlCharKey)&&void 0!==a?a:va;Fa(e,t)&&(t=qa(e,t,n,"serializedName"));const c=Oa(e,t,r);let u={};const l=[];for(const a of Object.keys(c)){const A=c[a],d=Ra(c[a].serializedName);l.push(d[0]);const{serializedName:p,xmlName:m,xmlElementName:h}=A;let g=r;""!==p&&void 0!==p&&(g=r+"."+p);const f=A.headerCollectionPrefix;if(f){const t={};for(const r of Object.keys(n))r.startsWith(f)&&(t[r.substring(f.length)]=e.deserialize(A.type.value,n[r],g,i)),l.push(r);u[a]=t}else if(e.isXML)if(A.xmlIsAttribute&&n[ba])u[a]=e.deserialize(A,n[ba][m],g,i);else if(A.xmlIsMsText)void 0!==n[s]?u[a]=n[s]:"string"==typeof n&&(u[a]=n);else{const t=h||m||p;if(A.xmlIsWrapped){const t=n[m],r=null!==(o=null==t?void 0:t[h])&&void 0!==o?o:[];u[a]=e.deserialize(A,r,g,i),l.push(m)}else{const r=n[t];u[a]=e.deserialize(A,r,g,i),l.push(t)}}else{let r,o=n,s=0;for(const e of d){if(!o)break;s++,o=o[e]}null===o&&s<d.length&&(o=void 0),r=o;const l=t.type.polymorphicDiscriminator;let p;if(l&&a===l.clientName&&null==r&&(r=t.serializedName),Array.isArray(n[a])&&""===c[a].serializedName){r=n[a];const t=e.deserialize(A,r,g,i);for(const[e,n]of Object.entries(u))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n);u=t}else void 0===r&&void 0===A.defaultValue||(p=e.deserialize(A,r,g,i),u[a]=p)}}const A=t.type.additionalProperties;if(A){const t=e=>{for(const t in c)if(Ra(c[t].serializedName)[0]===e)return!1;return!0};for(const a in n)t(a)&&(u[a]=e.deserialize(A,n[a],r+'["'+a+'"]',i))}else if(n&&!i.ignoreUnknownProperties)for(const e of Object.keys(n))void 0!==u[e]||l.includes(e)||Da(e,i)||(u[e]=n[e]);return u}(this,e,t,n,c);else{if(this.isXML){const e=c.xml.xmlCharKey;void 0!==t[ba]&&void 0!==t[e]&&(t=t[e])}null!==l.match(/^Number$/i)?(u=parseFloat(t),isNaN(u)&&(u=t)):null!==l.match(/^Boolean$/i)?u="true"===t||"false"!==t&&t:null!==l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?u=t:null!==l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?u=new Date(t):null!==l.match(/^UnixTime$/i)?u=function(e){if(e)return new Date(1e3*e)}(t):null!==l.match(/^ByteArray$/i)?u=Ta(t):null!==l.match(/^Base64Url$/i)?u=function(e){if(e){if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return Ta(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==l.match(/^Sequence$/i)?u=function(e,t,n,r,i){var a;let o=t.type.element;if(!o||"object"!=typeof o)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}`);if(n){Array.isArray(n)||(n=[n]),"Composite"===o.type.name&&o.type.className&&(o=null!==(a=e.modelMappers[o.type.className])&&void 0!==a?a:o);const t=[];for(let a=0;a<n.length;a++)t[a]=e.deserialize(o,n[a],`${r}[${a}]`,i);return t}return n}(this,e,t,n,c):null!==l.match(/^Dictionary$/i)&&(u=function(e,t,n,r,i){const a=t.type.value;if(!a||"object"!=typeof a)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}`);if(n){const t={};for(const o of Object.keys(n))t[o]=e.deserialize(a,n[o],r,i);return t}return n}(this,e,t,n,c))}return e.isConstant&&(u=e.defaultValue),u}}function za(e={},t=!1){return new Pa(e,t)}function Ra(e){const t=[];let n="";if(e){const r=e.split(".");for(const e of r)"\\"===e.charAt(e.length-1)?n+=e.substr(0,e.length-1)+".":(n+=e,t.push(n),n="")}return t}function ka(e,t,n){const r=t.type.className;if(!r)throw new Error(`Class name for model "${n}" is not provided in the mapper "${JSON.stringify(t,void 0,2)}".`);return e.modelMappers[r]}function Oa(e,t,n){let r=t.type.modelProperties;if(!r){const i=ka(e,t,n);if(!i)throw new Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(r=null==i?void 0:i.type.modelProperties,!r)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(i)}" of type "${t.type.className}" for object "${n}".`)}return r}function Ma(e,t,n,r){if(!n||!e.xmlNamespace)return t;const i={[e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns"]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[ba])return t;{const e=Object.assign({},t);return e[ba]=i,e}}const a={};return a[r.xml.xmlCharKey]=t,a[ba]=i,a}function Da(e,t){return[ba,t.xml.xmlCharKey].includes(e)}function qa(e,t,n,r){var i;const a=Fa(e,t);if(a){let o=a[r];if(o){"serializedName"===r&&(o=o.replace(/\\/gi,""));const a=n[o],s=null!==(i=t.type.uberParent)&&void 0!==i?i:t.type.className;if("string"==typeof a&&s){const n=function(e,t,n){const r=[n];for(;r.length;){const n=r.shift(),i=t===n?t:n+"."+t;if(Object.prototype.hasOwnProperty.call(e,i))return e[i];for(const[t,i]of Object.entries(e))t.startsWith(n+".")&&i.type.uberParent===n&&i.type.className&&r.push(i.type.className)}}(e.modelMappers.discriminators,a,s);n&&(t=n)}}}return t}function Fa(e,t){return t.type.polymorphicDiscriminator||Ua(e,t.type.uberParent)||Ua(e,t.type.className)}function Ua(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}const Ga={Base64Url:"Base64Url",Boolean:"Boolean",ByteArray:"ByteArray",Composite:"Composite",Date:"Date",DateTime:"DateTime",DateTimeRfc1123:"DateTimeRfc1123",Dictionary:"Dictionary",Enum:"Enum",Number:"Number",Object:"Object",Sequence:"Sequence",String:"String",Stream:"Stream",TimeSpan:"TimeSpan",UnixTime:"UnixTime"};function La(e,t,n){let r=t.parameterPath;const i=t.mapper;let a;if("string"==typeof r&&(r=[r]),Array.isArray(r)){if(r.length>0)if(i.isConstant)a=i.defaultValue;else{let t=Ha(e,r);!t.propertyFound&&n&&(t=Ha(n,r));let o=!1;t.propertyFound||(o=i.required||"options"===r[0]&&2===r.length),a=o?i.defaultValue:t.propertyValue}}else{i.required&&(a={});for(const t in r){const o=i.type.modelProperties[t],s=La(e,{parameterPath:r[t],mapper:o},n);void 0!==s&&(a||(a={}),a[t]=s)}}return a}function Ha(e,t){const n={propertyFound:!1};let r=0;for(;r<t.length;++r){const n=t[r];if(!e||!(n in e))break;e=e[n]}return r===t.length&&(n.propertyValue=e,n.propertyFound=!0),n}const ja=new WeakMap,Va=Symbol.for("@azure/core-client original request");function $a(e){if(function(e){return Va in e}(e))return $a(e[Va]);let t=ja.get(e);return t||(t={},ja.set(e,t)),t}const Ya=["application/json","text/json"],Ja=["application/xml","application/atom+xml"],Ka="deserializationPolicy";var Wa=n(9180);const Xa=void 0!==Wa&&Wa.env&&Wa.env.DEBUG||void 0;let Za,eo=[],to=[];const no=[];Xa&&io(Xa);const ro=Object.assign((e=>oo(e)),{enable:io,enabled:ao,disable:function(){const e=Za||"";return io(""),e},log:function(...e){if(e.length>0){const t=String(e[0]);t.includes(":error")?console.error(...e):t.includes(":warning")?console.warn(...e):t.includes(":info")?console.info(...e):(t.includes(":verbose"),console.debug(...e))}}});function io(e){Za=e,eo=[],to=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?to.push(new RegExp(`^${e.substr(1)}$`)):eo.push(new RegExp(`^${e}$`));for(const e of no)e.enabled=ao(e.namespace)}function ao(e){if(e.endsWith("*"))return!0;for(const t of to)if(t.test(e))return!1;for(const t of eo)if(t.test(e))return!0;return!1}function oo(e){const t=Object.assign((function(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}),{enabled:ao(e),destroy:so,log:ro.log,namespace:e,extend:co});return no.push(t),t}function so(){const e=no.indexOf(this);return e>=0&&(no.splice(e,1),!0)}function co(e){const t=oo(`${this.namespace}:${e}`);return t.log=this.log,t}var uo=ro,lo=n(9180);const Ao=new Set,po=void 0!==lo&&lo.env&&lo.env.AZURE_LOG_LEVEL||void 0;let mo;const ho=uo("azure");ho.log=(...e)=>{uo.log(...e)};const go=["verbose","info","warning","error"];po&&(Eo(po)?function(e){if(e&&!Eo(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${go.join(",")}`);mo=e;const t=[];for(const e of Ao)wo(e)&&t.push(e.namespace);uo.enable(t.join(","))}(po):console.error(`AZURE_LOG_LEVEL set to unknown log level '${po}'; logging is not enabled. Acceptable values: ${go.join(", ")}.`));const fo={verbose:400,info:300,warning:200,error:100};function yo(e){const t=ho.extend(e);return Co(ho,t),{error:Io(t,"error"),warning:Io(t,"warning"),info:Io(t,"info"),verbose:Io(t,"verbose")}}function Co(e,t){t.log=(...t)=>{e.log(...t)}}function Io(e,t){const n=Object.assign(e.extend(t),{level:t});if(Co(e,n),wo(n)){const e=uo.disable();uo.enable(e+","+n.namespace)}return Ao.add(n),n}function wo(e){return Boolean(mo&&fo[e.level]<=fo[mo])}function Eo(e){return go.includes(e)}const Bo=yo("core-rest-pipeline"),No="logPolicy",bo=new Set(["Deserialize","Serialize","Retry","Sign"]);class vo{constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!bo.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!bo.has(t.afterPhase))throw new Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((n=>!(e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase)||(t.push(n.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>n=>t.sendRequest(n,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new vo(this._policies)}static create(){return new vo}orderPolicies(){const e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const r=n("Serialize"),i=n("None"),a=n("Deserialize"),o=n("Retry"),s=n("Sign"),c=[r,i,a,o,s];function u(e){return"Retry"===e?o:"Serialize"===e?r:"Deserialize"===e?a:"Sign"===e?s:i}for(const e of this._policies){const n=e.policy,r=e.options,i=n.name;if(t.has(i))throw new Error("Duplicate policy names not allowed in pipeline");const a={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(a.afterPhase=u(r.afterPhase),a.afterPhase.hasAfterPolicies=!0),t.set(i,a),u(r.phase).policies.add(a)}for(const e of this._policies){const{policy:n,options:r}=e,i=n.name,a=t.get(i);if(!a)throw new Error(`Missing node for policy ${i}`);if(r.afterPolicies)for(const e of r.afterPolicies){const n=t.get(e);n&&(a.dependsOn.add(n),n.dependants.add(a))}if(r.beforePolicies)for(const e of r.beforePolicies){const n=t.get(e);n&&(n.dependsOn.add(a),a.dependants.add(n))}}function l(n){n.hasRun=!0;for(const r of n.policies)if((!r.afterPhase||r.afterPhase.hasRun&&!r.afterPhase.policies.size)&&0===r.dependsOn.size){e.push(r.policy);for(const e of r.dependants)e.dependsOn.delete(r);t.delete(r.policy.name),n.policies.delete(r)}}function A(){for(const e of c){if(l(e),e.policies.size>0&&e!==i)return void(i.hasRun||l(i));e.hasAfterPolicies&&l(i)}}let d=0;for(;t.size>0;){d++;const t=e.length;if(A(),e.length<=t&&d>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}const So="redirectPolicy",To=["GET","HEAD"];function xo(e={}){const{maxRetries:t=20}=e;return{name:So,async sendRequest(e,n){const r=await n(e);return _o(n,r,t)}}}async function _o(e,t,n,r=0){const{request:i,status:a,headers:o}=t,s=o.get("location");if(s&&(300===a||301===a&&To.includes(i.method)||302===a&&To.includes(i.method)||303===a&&"POST"===i.method||307===a)&&r<n){const t=new URL(s,i.url);i.url=t.toString(),303===a&&(i.method="GET",i.headers.delete("Content-Length"),delete i.body),i.headers.delete("Authorization");const o=await e(i);return _o(e,o,n,r+1)}return t}function Qo(e,t){switch(t){case"utf-8":return function(e){return(new TextEncoder).encode(e)}(e);case"base64":return Po(e);case"base64url":return function(e){return Po(e.replace(/-/g,"+").replace(/_/g,"/"))}(e);case"hex":return function(e){const t=new Uint8Array(e.length/2);for(let n=0;n<e.length/2;++n){const r=e[2*n],i=e[2*n+1];if(!zo.has(r)||!zo.has(i))return t.slice(0,n);t[n]=parseInt(`${r}${i}`,16)}return t}(e)}}function Po(e){return new Uint8Array([...atob(e)].map((e=>e.charCodeAt(0))))}const zo=new Set("0123456789abcdefABCDEF"),Ro=Symbol("rawContent");function ko(e){return"function"==typeof e[Ro]?e[Ro]():e.stream()}function Oo(e){return Boolean(e&&"function"==typeof e.pipe)}function Mo(e){return Boolean(e&&"function"==typeof e.getReader&&"function"==typeof e.tee)}async function Do(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(Mo(e))return new Response(e).blob();const t=ko(e);if(Oo(t))throw new Error("Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.");return Do(t)}function qo(e){let t="";for(const[n,r]of e)t+=`${n}: ${r}\r\n`;return t}function Fo(e){return e instanceof Uint8Array?e.byteLength:"function"==typeof e.stream?-1===e.size?void 0:e.size:void 0}const Uo="multipartPolicy",Go=70,Lo=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Ho(){return{name:Uo,async sendRequest(e,t){var n;if(!e.multipartBody)return t(e);if(e.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=e.multipartBody.boundary;const i=null!==(n=e.headers.get("Content-Type"))&&void 0!==n?n:"multipart/mixed",a=i.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!a)throw new Error(`Got multipart request body, but content-type header was not multipart: ${i}`);const[,o,s]=a;if(s&&r&&s!==r)throw new Error(`Multipart boundary was specified as ${s} in the header, but got ${r} in the request body`);return null!=r||(r=s),r?function(e){if(e.length>Go)throw new Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!Lo.has(e))))throw new Error(`Multipart boundary "${e}" contains invalid characters`)}(r):r=`----AzSDKFormBoundary${Ba()}`,e.headers.set("Content-Type",`${o}; boundary=${r}`),await async function(e,t,n){const r=[Qo(`--${n}`,"utf-8"),...t.flatMap((e=>[Qo("\r\n","utf-8"),Qo(qo(e.headers),"utf-8"),Qo("\r\n","utf-8"),e.body,Qo(`\r\n--${n}`,"utf-8")])),Qo("--\r\n\r\n","utf-8")],i=function(e){let t=0;for(const n of e){const e=Fo(n);if(void 0===e)return;t+=e}return t}(r);i&&e.headers.set("Content-Length",i),e.body=await async function(e){const t=[];for(const n of e)t.push(await Do("function"==typeof n?n():n));return new Blob(t)}(r)}(e,e.multipartBody.parts,r),e.multipartBody=void 0,t(e)}}}class jo extends Error{constructor(e){super(e),this.name="AbortError"}}const Vo="The operation was aborted.";function $o(e,t,n){return new Promise(((r,i)=>{let a,o;const s=()=>i(new jo((null==n?void 0:n.abortErrorMsg)?null==n?void 0:n.abortErrorMsg:Vo)),c=()=>{(null==n?void 0:n.abortSignal)&&o&&n.abortSignal.removeEventListener("abort",o)};if(o=()=>(a&&clearTimeout(a),c(),s()),(null==n?void 0:n.abortSignal)&&n.abortSignal.aborted)return s();a=setTimeout((()=>{c(),r(t)}),e),(null==n?void 0:n.abortSignal)&&n.abortSignal.addEventListener("abort",o)}))}function Yo(e,t){const n=e.headers.get(t);if(!n)return;const r=Number(n);return Number.isNaN(r)?void 0:r}const Jo="Retry-After",Ko=["retry-after-ms","x-ms-retry-after-ms",Jo];function Wo(e){if(e&&[429,503].includes(e.status))try{for(const t of Ko){const n=Yo(e,t);if(0===n||n)return n*(t===Jo?1e3:1)}const t=e.headers.get(Jo);if(!t)return;const n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch(e){return}}const Xo=1e3,Zo=64e3;function es(e={}){var t,n;const r=null!==(t=e.retryDelayInMs)&&void 0!==t?t:Xo,i=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:Zo;let a=r;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:n,responseError:r}){const o=!!(A=r)&&("ETIMEDOUT"===A.code||"ESOCKETTIMEDOUT"===A.code||"ECONNREFUSED"===A.code||"ECONNRESET"===A.code||"ENOENT"===A.code||"ENOTFOUND"===A.code),s=o&&e.ignoreSystemErrors,c=function(e){return Boolean(e&&void 0!==e.status&&(e.status>=500||408===e.status)&&501!==e.status&&505!==e.status)}(n),u=c&&e.ignoreHttpStatusCodes,l=n&&(function(e){return Number.isFinite(Wo(e))}(n)||!c);var A;if(l||u||s)return{skipStrategy:!0};if(r&&!o&&!c)return{errorToThrow:r};const d=a*Math.pow(2,t),p=Math.min(i,d);var m,h;return a=p/2+(m=0,h=p/2,m=Math.ceil(m),h=Math.floor(h),Math.floor(Math.random()*(h-m+1))+m),{retryAfterInMs:a}}}}const ts=yo("core-rest-pipeline retryPolicy"),ns="retryPolicy";function rs(e,t={maxRetries:sa}){const n=t.logger||ts;return{name:ns,async sendRequest(r,i){var a,o;let s,c,u=-1;e:for(;;){u+=1,s=void 0,c=void 0;try{n.info(`Retry ${u}: Attempting to send request`,r.requestId),s=await i(r),n.info(`Retry ${u}: Received a response from request`,r.requestId)}catch(e){if(n.error(`Retry ${u}: Received an error from request`,r.requestId),c=e,!e||"RestError"!==c.name)throw e;s=c.response}if(null===(a=r.abortSignal)||void 0===a?void 0:a.aborted)throw n.error(`Retry ${u}: Request aborted.`),new jo;if(u>=(null!==(o=t.maxRetries)&&void 0!==o?o:sa)){if(n.info(`Retry ${u}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),c)throw c;if(s)return s;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${u}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||ts;e.info(`Retry ${u}: Processing retry strategy ${t.name}.`);const n=t.retry({retryCount:u,response:s,responseError:c});if(n.skipStrategy){e.info(`Retry ${u}: Skipped.`);continue t}const{errorToThrow:i,retryAfterInMs:a,redirectTo:o}=n;if(i)throw e.error(`Retry ${u}: Retry strategy ${t.name} throws error:`,i),i;if(a||0===a){e.info(`Retry ${u}: Retry strategy ${t.name} retries after ${a}`),await $o(a,void 0,{abortSignal:r.abortSignal});continue e}if(o){e.info(`Retry ${u}: Retry strategy ${t.name} redirects to ${o}`),r.url=o;continue e}}if(c)throw n.info("None of the retry strategies could work with the received error. Throwing it."),c;if(s)return n.info("None of the retry strategies could work with the received response. Returning it."),s}}}}const is="defaultRetryPolicy",as="formDataPolicy";var os,ss,cs,us,ls=n(5606);"undefined"!=typeof window&&window.document,"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(os=self.constructor)||void 0===os?void 0:os.name)||"ServiceWorkerGlobalScope"===(null===(ss=self.constructor)||void 0===ss?void 0:ss.name)||null===(cs=self.constructor)||void 0===cs||cs.name);const As="undefined"!=typeof Deno&&void 0!==Deno.version&&void 0!==Deno.version.deno,ds=void 0!==ls&&Boolean(ls.version)&&Boolean(null===(us=ls.versions)||void 0===us?void 0:us.node)&&!As,ps=("undefined"!=typeof Bun&&Bun.version,"undefined"!=typeof navigator&&(null===navigator||void 0===navigator||navigator.product),"proxyPolicy is not supported in browser environment"),ms="tlsPolicy",hs={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function gs(e={}){let t=new fs(e.parentContext);return e.span&&(t=t.setValue(hs.span,e.span)),e.namespace&&(t=t.setValue(hs.namespace,e.namespace)),t}class fs{constructor(e){this._contextMap=e instanceof fs?new Map(e._contextMap):new Map}setValue(e,t){const n=new fs(this);return n._contextMap.set(e,t),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new fs(this);return t._contextMap.delete(e),t}}let ys;function Cs(){return ys||(ys={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{}},tracingContext:gs({parentContext:t.tracingContext})}),withContext(e,t,...n){return t(...n)}}),ys}const Is="tracingPolicy";function ws(e){var t;const n=vo.create();var r;return ds&&(e.tlsOptions&&n.addPolicy((r=e.tlsOptions,{name:ms,sendRequest:async(e,t)=>(e.tlsSettings||(e.tlsSettings=r),t(e))})),n.addPolicy(function(){throw new Error(ps)}(e.proxyOptions)),n.addPolicy(function(){throw new Error("decompressResponsePolicy is not supported in browser environment")}())),n.addPolicy({name:as,async sendRequest(e,t){if(e.formData){const t=e.formData,n=new FormData;for(const e of Object.keys(t)){const r=t[e];if(Array.isArray(r))for(const t of r)n.append(e,t);else n.append(e,r)}e.body=n,e.formData=void 0;const r=e.headers.get("Content-Type");r&&-1!==r.indexOf("application/x-www-form-urlencoded")?e.body=new URLSearchParams(n).toString():r&&-1!==r.indexOf("multipart/form-data")&&e.headers.delete("Content-Type")}return t(e)}},{beforePolicies:[Uo]}),n.addPolicy(function(e={}){const t=ca(e.userAgentPrefix);return{name:la,async sendRequest(e,n){return e.headers.has(ua)||e.headers.set(ua,t),n(e)}}}(e.userAgentOptions)),n.addPolicy(function(e="x-ms-client-request-id"){return{name:Aa,async sendRequest(t,n){return t.headers.has(e)||t.headers.set(e,t.requestId),n(t)}}}(null===(t=e.telemetryOptions)||void 0===t?void 0:t.clientRequestIdHeaderName)),n.addPolicy(Ho(),{afterPhase:"Deserialize"}),n.addPolicy(function(e={}){var t;return{name:is,sendRequest:rs([{name:"throttlingRetryStrategy",retry({response:e}){const t=Wo(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}},es(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:sa}).sendRequest}}(e.retryOptions),{phase:"Retry"}),n.addPolicy(function(e={}){const t=ca(e.userAgentPrefix),n=function(){try{return function(e){const{namespace:t,packageName:n,packageVersion:r}=e;function i(e,i,a){var o;const s=Cs().startSpan(e,Object.assign(Object.assign({},a),{packageName:n,packageVersion:r,tracingContext:null===(o=null==i?void 0:i.tracingOptions)||void 0===o?void 0:o.tracingContext}));let c=s.tracingContext;const u=s.span;return c.getValue(hs.namespace)||(c=c.setValue(hs.namespace,t)),u.setAttribute("az.namespace",c.getValue(hs.namespace)),{span:u,updatedOptions:Object.assign({},i,{tracingOptions:Object.assign(Object.assign({},null==i?void 0:i.tracingOptions),{tracingContext:c})})}}function a(e,t,...n){return Cs().withContext(e,t,...n)}return{startSpan:i,withSpan:async function(e,t,n,r){const{span:o,updatedOptions:s}=i(e,t,r);try{const e=await a(s.tracingOptions.tracingContext,(()=>Promise.resolve(n(s,o))));return o.setStatus({status:"success"}),e}catch(e){throw o.setStatus({status:"error",error:e}),e}finally{o.end()}},withContext:a,parseTraceparentHeader:function(e){return Cs().parseTraceparentHeader(e)},createRequestHeaders:function(e){return Cs().createRequestHeaders(e)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:oa})}catch(e){return void Bo.warning(`Error when creating the TracingClient: ${lt(e)}`)}}();return{name:Is,async sendRequest(e,r){var i,a;if(!n||!(null===(i=e.tracingOptions)||void 0===i?void 0:i.tracingContext))return r(e);const{span:o,tracingContext:s}=null!==(a=function(e,t,n){try{const{span:r,updatedOptions:i}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:{"http.method":t.method,"http.url":t.url,requestId:t.requestId}});if(!r.isRecording())return void r.end();n&&r.setAttribute("http.user_agent",n);const a=e.createRequestHeaders(i.tracingOptions.tracingContext);for(const[e,n]of Object.entries(a))t.headers.set(e,n);return{span:r,tracingContext:i.tracingOptions.tracingContext}}catch(e){return void Bo.warning(`Skipping creating a tracing span due to an error: ${lt(e)}`)}}(n,e,t))&&void 0!==a?a:{};if(!o||!s)return r(e);try{const t=await n.withContext(s,r,e);return function(e,t){try{e.setAttribute("http.status_code",t.status);const n=t.headers.get("x-ms-request-id");n&&e.setAttribute("serviceRequestId",n),e.setStatus({status:"success"}),e.end()}catch(e){Bo.warning(`Skipping tracing span processing due to an error: ${lt(e)}`)}}(o,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:ut(t)?t:void 0}),((n=t)instanceof ft||ut(n)&&"RestError"===n.name)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(n){Bo.warning(`Skipping tracing span processing due to an error: ${lt(n)}`)}var n}(o,e),e}}}}(e.userAgentOptions),{afterPhase:"Retry"}),ds&&n.addPolicy(xo(e.redirectOptions),{afterPhase:"Retry"}),n.addPolicy(function(e={}){var t;const n=null!==(t=e.logger)&&void 0!==t?t:Bo.info,r=new ht({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:No,async sendRequest(e,t){if(!n.enabled)return t(e);n(`Request: ${r.sanitize(e)}`);const i=await t(e);return n(`Response status code: ${i.status}`),n(`Headers: ${r.sanitize(i.headers)}`),i}}}(e.loggingOptions),{afterPhase:"Sign"}),n}const Es={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};async function Bs(e){const{scopes:t,getAccessToken:n,request:r}=e,i={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions},a=await n(t,i);a&&e.request.headers.set("Authorization",`Bearer ${a.token}`)}function Ns(e){const{parameterPath:t,mapper:n}=e;let r;return r="string"==typeof t?t:Array.isArray(t)?t.join("."):n.serializedName,r}const bs="serializationPolicy";function vs(e={}){const t=ws(null!=e?e:{});return e.credentialOptions&&t.addPolicy(function(e){var t;const{credential:n,scopes:r,challengeCallbacks:i}=e,a=e.logger||Bo,o=Object.assign({authorizeRequest:null!==(t=null==i?void 0:i.authorizeRequest)&&void 0!==t?t:Bs,authorizeRequestOnChallenge:null==i?void 0:i.authorizeRequestOnChallenge},i),s=n?function(e,t){let n,r=null,i=null;const a=Object.assign(Object.assign({},Es),t),o={get isRefreshing(){return null!==r},get shouldRefresh(){var e;return!o.isRefreshing&&(null!==(e=null==i?void 0:i.expiresOnTimestamp)&&void 0!==e?e:0)-a.refreshWindowInMs<Date.now()},get mustRefresh(){return null===i||i.expiresOnTimestamp-a.forcedRefreshWindowInMs<Date.now()}};function s(t,s){var c;return o.isRefreshing||(r=async function(e,t,n){async function r(){if(!(Date.now()<n)){const t=await e();if(null===t)throw new Error("Failed to refresh access token.");return t}try{return await e()}catch(e){return null}}let i=await r();for(;null===i;)await $o(t),i=await r();return i}((()=>e.getToken(t,s)),a.retryIntervalInMs,null!==(c=null==i?void 0:i.expiresOnTimestamp)&&void 0!==c?c:Date.now()).then((e=>(r=null,i=e,n=s.tenantId,i))).catch((e=>{throw r=null,i=null,n=void 0,e}))),r}return async(e,t)=>n!==t.tenantId||Boolean(t.claims)||o.mustRefresh?s(e,t):(o.shouldRefresh&&s(e,t),i)}(n):()=>Promise.resolve(null);return{name:"bearerTokenAuthenticationPolicy",async sendRequest(e,t){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let n,i;await o.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:e,getAccessToken:s,logger:a});try{n=await t(e)}catch(e){i=e,n=e.response}if(o.authorizeRequestOnChallenge&&401===(null==n?void 0:n.status)&&function(e){const t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t}(n)&&await o.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:e,response:n,getAccessToken:s,logger:a}))return t(e);if(i)throw i;return n}}}({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(function(e={}){const t=e.stringifyXML;return{name:bs,async sendRequest(e,n){const r=$a(e),i=null==r?void 0:r.operationSpec,a=null==r?void 0:r.operationArguments;return i&&a&&(function(e,t,n){var r,i;if(n.headerParameters)for(const r of n.headerParameters){let i=La(t,r);if(null!=i||r.mapper.required){i=n.serializer.serialize(r.mapper,i,Ns(r));const t=r.mapper.headerCollectionPrefix;if(t)for(const n of Object.keys(i))e.headers.set(t+n,i[n]);else e.headers.set(r.mapper.serializedName||Ns(r),i)}}const a=null===(i=null===(r=t.options)||void 0===r?void 0:r.requestOptions)||void 0===i?void 0:i.customHeaders;if(a)for(const t of Object.keys(a))e.headers.set(t,a[t])}(e,a,i),function(e,t,n,r=function(){throw new Error("XML serialization unsupported!")}){var i,a,o,s,c;const u=null===(i=t.options)||void 0===i?void 0:i.serializerOptions,l={xml:{rootName:null!==(a=null==u?void 0:u.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(o=null==u?void 0:u.xml.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=null==u?void 0:u.xml.xmlCharKey)&&void 0!==s?s:va}},A=l.xml.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=La(t,n.requestBody);const i=n.requestBody.mapper,{required:a,serializedName:o,xmlName:s,xmlElementName:u,xmlNamespace:d,xmlNamespacePrefix:p,nullable:m}=i,h=i.type.name;try{if(void 0!==e.body&&null!==e.body||m&&null===e.body||a){const t=Ns(n.requestBody);e.body=n.serializer.serialize(i,e.body,t,l);const a=h===Ga.Stream;if(n.isXML){const t=p?`xmlns:${p}`:"xmlns",n=function(e,t,n,r,i){if(e&&!["Composite","Sequence","Dictionary"].includes(n)){const n={};return n[i.xml.xmlCharKey]=r,n[ba]={[t]:e},n}return r}(d,t,h,e.body,l);h===Ga.Sequence?e.body=r(function(e,t,n,r){if(Array.isArray(e)||(e=[e]),!n||!r)return{[t]:e};const i={[t]:e};return i[ba]={[n]:r},i}(n,u||s||o,t,d),{rootName:s||o,xmlCharKey:A}):a||(e.body=r(n,{rootName:s||o,xmlCharKey:A}))}else{if(h===Ga.String&&((null===(c=n.contentType)||void 0===c?void 0:c.match("text/plain"))||"text"===n.mediaType))return;a||(e.body=JSON.stringify(e.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(o,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(const r of n.formDataParameters){const i=La(t,r);if(null!=i){const t=r.mapper.serializedName||Ns(r);e.formData[t]=n.serializer.serialize(r.mapper,i,Ns(r),l)}}}}(e,a,i,t)),n(e)}}}(e.serializationOptions),{phase:"Serialize"}),t.addPolicy(function(e={}){var t,n,r,i,a,o,s;const c=null!==(n=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==n?n:Ya,u=null!==(i=null===(r=e.expectedContentTypes)||void 0===r?void 0:r.xml)&&void 0!==i?i:Ja,l=e.parseXML,A=e.serializerOptions,d={xml:{rootName:null!==(a=null==A?void 0:A.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(o=null==A?void 0:A.xml.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=null==A?void 0:A.xml.xmlCharKey)&&void 0!==s?s:va}};return{name:Ka,async sendRequest(e,t){const n=await t(e);return async function(e,t,n,r,i){const a=await async function(e,t,n,r,i){var a;if(!(null===(a=n.request.streamResponseStatusCodes)||void 0===a?void 0:a.has(n.status))&&n.bodyAsText){const a=n.bodyAsText,o=n.headers.get("Content-Type")||"",s=o?o.split(";").map((e=>e.toLowerCase())):[];try{if(0===s.length||s.some((t=>-1!==e.indexOf(t))))return n.parsedBody=JSON.parse(a),n;if(s.some((e=>-1!==t.indexOf(e)))){if(!i)throw new Error("Parsing XML not supported.");const e=await i(a,r.xml);return n.parsedBody=e,n}}catch(e){const t=`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,r=e.code||ft.PARSE_ERROR;throw new ft(t,{code:r,statusCode:n.status,request:n.request,response:n})}}return n}(e,t,n,r,i);if(!function(e){const t=$a(e.request),n=null==t?void 0:t.shouldDeserialize;let r;return r=void 0===n||("boolean"==typeof n?n:n(e)),r}(a))return a;const o=$a(a.request),s=null==o?void 0:o.operationSpec;if(!s||!s.responses)return a;const c=function(e){let t;const n=$a(e.request),r=null==n?void 0:n.operationSpec;return r&&(t=(null==n?void 0:n.operationResponseGetter)?null==n?void 0:n.operationResponseGetter(r,e):r.responses[e.status]),t}(a),{error:u,shouldReturnResponse:l}=function(e,t,n,r){var i;const a=200<=e.status&&e.status<300,o=function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?a:!!n;if(o){if(!n)return{error:null,shouldReturnResponse:!1};if(!n.isError)return{error:null,shouldReturnResponse:!1}}const s=null!=n?n:t.responses.default,c=(null===(i=e.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(e.status))?`Unexpected status code: ${e.status}`:e.bodyAsText,u=new ft(c,{statusCode:e.status,request:e.request,response:e});if(!s)throw u;const l=s.bodyMapper,A=s.headersMapper;try{if(e.parsedBody){const n=e.parsedBody;let i;if(l){let e=n;if(t.isXML&&l.type.name===Ga.Sequence){e=[];const t=l.xmlElementName;"object"==typeof n&&t&&(e=n[t])}i=t.serializer.deserialize(l,e,"error.response.parsedBody",r)}const a=n.error||i||n;u.code=a.code,a.message&&(u.message=a.message),l&&(u.response.parsedBody=i)}e.headers&&A&&(u.response.parsedHeaders=t.serializer.deserialize(A,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(t){u.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:u,shouldReturnResponse:!1}}(a,s,c,r);if(u)throw u;if(l)return a;if(c){if(c.bodyMapper){let e=a.parsedBody;s.isXML&&c.bodyMapper.type.name===Ga.Sequence&&(e="object"==typeof e?e[c.bodyMapper.xmlElementName]:[]);try{a.parsedBody=s.serializer.deserialize(c.bodyMapper,e,"operationRes.parsedBody",r)}catch(e){throw new ft(`Error ${e} occurred in deserializing the responseBody - ${a.bodyAsText}`,{statusCode:a.status,request:a.request,response:a})}}else"HEAD"===s.httpMethod&&(a.parsedBody=n.status>=200&&n.status<300);c.headersMapper&&(a.parsedHeaders=s.serializer.deserialize(c.headersMapper,a.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return a}(c,u,n,d,l)}}}(e.deserializationOptions),{phase:"Deserialize"}),t}class Ss{async sendRequest(e){if("https:"!==new URL(e.url).protocol&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);if(e.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");try{return await async function(e){const{abortController:t,abortControllerCleanup:n}=function(e){const t=new AbortController;let n,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new jo("The operation was aborted.");r=e=>{"abort"===e.type&&t.abort()},e.abortSignal.addEventListener("abort",r),n=()=>{var t;r&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",r))}}return e.timeout>0&&setTimeout((()=>{t.abort()}),e.timeout),{abortController:t,abortControllerCleanup:n}}(e);try{const r=function(e){const t=new Headers;for(const[n,r]of e)t.append(n,r);return t}(e.headers),{streaming:i,body:a}=function(e){const t="function"==typeof e.body?e.body():e.body;if(Oo(t))throw new Error("Node streams are not supported in browser environment.");return Mo(t)?{streaming:!0,body:Ts(t,{onProgress:e.onUploadProgress})}:{streaming:!1,body:t}}(e),o=Object.assign(Object.assign({body:a,method:e.method,headers:r,signal:t.signal},"credentials"in Request.prototype?{credentials:e.withCredentials?"include":"same-origin"}:{}),"cache"in Request.prototype?{cache:"no-store"}:{});i&&(o.duplex="half");const s=await fetch(e.url,o);return function(e){return("function"==typeof Blob||"object"==typeof Blob)&&e instanceof Blob}(e.body)&&e.onUploadProgress&&e.onUploadProgress({loadedBytes:e.body.size}),async function(e,t,n){var r,i;const a=function(e){const t=Ia();for(const[n,r]of e.headers)t.set(n,r);return t}(e),o={request:t,headers:a,status:e.status},s=Mo(e.body)?Ts(e.body,{onProgress:t.onDownloadProgress,onEnd:n}):e.body;if((null===(r=t.streamResponseStatusCodes)||void 0===r?void 0:r.has(Number.POSITIVE_INFINITY))||(null===(i=t.streamResponseStatusCodes)||void 0===i?void 0:i.has(o.status)))if(t.enableBrowserStreams)o.browserStreamBody=null!=s?s:void 0;else{const e=new Response(s);o.blobBody=e.blob(),null==n||n()}else{const e=new Response(s);o.bodyAsText=await e.text(),null==n||n()}return o}(s,e,n)}catch(e){throw null==n||n(),e}}(e)}catch(t){throw function(e,t){var n;return e&&"AbortError"===(null==e?void 0:e.name)?e:new ft(`Error sending request: ${e.message}`,{code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:ft.REQUEST_SEND_ERROR,request:t})}(t,e)}}}function Ts(e,t={}){let n=0;const{onProgress:r,onEnd:i}=t;if(function(e){return void 0!==e.pipeThrough&&void 0!==self.TransformStream}(e))return e.pipeThrough(new TransformStream({transform(e,t){null!==e?(t.enqueue(e),n+=e.length,r&&r({loadedBytes:n})):t.terminate()},flush(){null==i||i()}}));{const t=e.getReader();return new ReadableStream({async pull(e){var a;const{done:o,value:s}=await t.read();if(o||!s)return null==i||i(),e.close(),void t.releaseLock();n+=null!==(a=null==s?void 0:s.length)&&void 0!==a?a:0,e.enqueue(s),r&&r({loadedBytes:n})},cancel(e){return null==i||i(),t.cancel(e)}})}}let xs;const _s={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"};function Qs(e,t,n,r){const i=function(e,t,n){var r;const i=new Map;if(null===(r=e.urlParameters)||void 0===r?void 0:r.length)for(const r of e.urlParameters){let a=La(t,r,n);const o=Ns(r);a=e.serializer.serialize(r.mapper,a,o),r.skipEncoding||(a=encodeURIComponent(a)),i.set(`{${r.mapper.serializedName||o}}`,a)}return i}(t,n,r);let a=!1,o=Ps(e,i);if(t.path){let e=Ps(t.path,i);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),e.includes("://")?(o=e,a=!0):o=function(e,t){if(!t)return e;const n=new URL(e);let r=n.pathname;r.endsWith("/")||(r=`${r}/`),t.startsWith("/")&&(t=t.substring(1));const i=t.indexOf("?");if(-1!==i){const e=t.substring(0,i),a=t.substring(i+1);r+=e,a&&(n.search=n.search?`${n.search}&${a}`:a)}else r+=t;return n.pathname=r,n.toString()}(o,e)}const{queryParams:s,sequenceParams:c}=function(e,t,n){var r;const i=new Map,a=new Set;if(null===(r=e.queryParameters)||void 0===r?void 0:r.length)for(const r of e.queryParameters){"Sequence"===r.mapper.type.name&&r.mapper.serializedName&&a.add(r.mapper.serializedName);let o=La(t,r,n);if(null!=o||r.mapper.required){o=e.serializer.serialize(r.mapper,o,Ns(r));const t=r.collectionFormat?_s[r.collectionFormat]:"";if(Array.isArray(o)&&(o=o.map((e=>null==e?"":e))),"Multi"===r.collectionFormat&&0===o.length)continue;!Array.isArray(o)||"SSV"!==r.collectionFormat&&"TSV"!==r.collectionFormat||(o=o.join(t)),r.skipEncoding||(o=Array.isArray(o)?o.map((e=>encodeURIComponent(e))):encodeURIComponent(o)),!Array.isArray(o)||"CSV"!==r.collectionFormat&&"Pipes"!==r.collectionFormat||(o=o.join(t)),i.set(r.mapper.serializedName||Ns(r),o)}}return{queryParams:i,sequenceParams:a}}(t,n,r);return o=function(e,t,n,r=!1){if(0===t.size)return e;const i=new URL(e),a=function(e){const t=new Map;if(!e||"?"!==e[0])return t;const n=(e=e.slice(1)).split("&");for(const e of n){const[n,r]=e.split("=",2),i=t.get(n);i?Array.isArray(i)?i.push(r):t.set(n,[i,r]):t.set(n,r)}return t}(i.search);for(const[e,i]of t){const t=a.get(e);if(Array.isArray(t))if(Array.isArray(i)){t.push(...i);const n=new Set(t);a.set(e,Array.from(n))}else t.push(i);else t?(Array.isArray(i)?i.unshift(t):n.has(e)&&a.set(e,[t,i]),r||a.set(e,i)):a.set(e,i)}const o=[];for(const[e,t]of a)if("string"==typeof t)o.push(`${e}=${t}`);else if(Array.isArray(t))for(const n of t)o.push(`${e}=${n}`);else o.push(`${e}=${t}`);return i.search=o.length?`?${o.join("&")}`:"",i.toString()}(o,s,c,a),o}function Ps(e,t){let n=e;for(const[e,r]of t)n=n.split(e).join(r);return n}const zs=yo("core-client");class Rs{constructor(e={}){var t,n;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&zs.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(xs||(xs=new Ss),xs),this.pipeline=e.pipeline||function(e){const t=function(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}(e),n=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return vs(Object.assign(Object.assign({},e),{credentialOptions:n}))}(e),null===(n=e.additionalPolicies)||void 0===n?void 0:n.length)for(const{policy:t,position:n}of e.additionalPolicies){const e="perRetry"===n?"Sign":void 0;this.pipeline.addPolicy(t,{afterPhase:e})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){const n=t.baseUrl||this._endpoint;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");const r=function(e){return new Na(e)}({url:Qs(n,t,e,this)});r.method=t.httpMethod;const i=$a(r);i.operationSpec=t,i.operationArguments=e;const a=t.contentType||this._requestContentType;a&&t.requestBody&&r.headers.set("Content-Type",a);const o=e.options;if(o){const e=o.requestOptions;e&&(e.timeout&&(r.timeout=e.timeout),e.onUploadProgress&&(r.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(r.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(i.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(r.allowInsecureConnection=!0)),o.abortSignal&&(r.abortSignal=o.abortSignal),o.tracingOptions&&(r.tracingOptions=o.tracingOptions)}this._allowInsecureConnection&&(r.allowInsecureConnection=!0),void 0===r.streamResponseStatusCodes&&(r.streamResponseStatusCodes=function(e){const t=new Set;for(const n in e.responses){const r=e.responses[n];r.bodyMapper&&r.bodyMapper.type.name===Ga.Stream&&t.add(Number(n))}return t}(t));try{const e=await this.sendRequest(r),n=Qa(e,t.responses[e.status]);return(null==o?void 0:o.onResponse)&&o.onResponse(e,n),n}catch(e){if("object"==typeof e&&(null==e?void 0:e.response)){const n=e.response,r=Qa(n,t.responses[e.statusCode]||t.responses.default);e.details=r,(null==o?void 0:o.onResponse)&&o.onResponse(n,r,e)}throw e}}}const ks={type:{name:"Composite",className:"Header",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",type:{name:"String"}},beneficiary:{serializedName:"beneficiary",type:{name:"String"}},target:{serializedName:"target",type:{name:"String"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{type:{name:"String"}}}},nonce:{serializedName:"nonce",type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"String"}},info:{serializedName:"info",type:{name:"String"}},pofHash:{serializedName:"pof_hash",type:{name:"String"}},txsHash:{serializedName:"txs_hash",type:{name:"String"}},signature:{serializedName:"signature",type:{name:"String"}}}}},Os={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}},errorCode:{serializedName:"error_code",type:{name:"String"}}}}},Ms={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",required:!0,type:{name:"String"}},beneficiary:{serializedName:"beneficiary",required:!0,type:{name:"String"}},target:{serializedName:"target",required:!0,type:{name:"String"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{type:{name:"String"}}}},nonce:{serializedName:"nonce",type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"String"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},Ds={type:{name:"Composite",className:"HashResponse",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}}}}},qs={type:{name:"Composite",className:"HeightResponse",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"String"}}}}},Fs={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"String"}},pofHash:{serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},txsHash:{serializedName:"txs_hash",required:!0,type:{name:"String"}},signature:{serializedName:"signature",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"String"}}}}},Us={type:{name:"Composite",className:"SignedTxs",modelProperties:{transactions:{serializedName:"transactions",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedTx"}}}}}}},Gs={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"String"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},hash:{serializedName:"hash",required:!0,type:{name:"String"}},encodedTx:{serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Ls={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{serializedName:"amount",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",type:{name:"String"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{serializedName:"responder_amount",type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",type:{name:"String"}},lockPeriod:{serializedName:"lock_period",type:{name:"String"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},channelId:{serializedName:"channel_id",type:{name:"String"}},fromId:{serializedName:"from_id",type:{name:"String"}},round:{serializedName:"round",type:{name:"String"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{serializedName:"initiator_amount_final",type:{name:"String"}},responderAmountFinal:{serializedName:"responder_amount_final",type:{name:"String"}},poi:{serializedName:"poi",type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},queryFormat:{serializedName:"query_format",type:{name:"String"}},responseFormat:{serializedName:"response_format",type:{name:"String"}},queryFee:{serializedName:"query_fee",type:{name:"String"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{serializedName:"abi_version",type:{name:"String"}},oracleId:{serializedName:"oracle_id",type:{name:"String"}},query:{serializedName:"query",type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},queryId:{serializedName:"query_id",type:{name:"String"}},response:{serializedName:"response",type:{name:"String"}},commitmentId:{serializedName:"commitment_id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},nameSalt:{serializedName:"name_salt",type:{name:"String"}},nameFee:{serializedName:"name_fee",type:{name:"String"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{serializedName:"name_ttl",type:{name:"String"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{serializedName:"client_ttl",type:{name:"String"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{serializedName:"vm_version",type:{name:"String"}},deposit:{serializedName:"deposit",type:{name:"String"}},gas:{serializedName:"gas",type:{name:"String"}},gasPrice:{serializedName:"gas_price",type:{name:"String"}},callData:{serializedName:"call_data",type:{name:"String"}},callerId:{serializedName:"caller_id",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",type:{name:"String"}},gaId:{serializedName:"ga_id",type:{name:"String"}},authData:{serializedName:"auth_data",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}},payerId:{serializedName:"payer_id",type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTx","ChannelCreateTx","ChannelDepositTx","ChannelWithdrawTx","ChannelForceProgressTx","ChannelCloseMutualTx","ChannelCloseSoloTx","ChannelSlashTx","ChannelSettleTx","ChannelSnapshotSoloTx","ChannelSetDelegatesTx","OracleRegisterTx","OracleExtendTx","OracleQueryTx","OracleRespondTx","NamePreclaimTx","NameClaimTx","NameUpdateTx","NameTransferTx","NameRevokeTx","ContractCreateTx","ContractCallTx","GAAttachTx","GAMetaTx","PayingForTx"]}}}}},Hs={type:{name:"Composite",className:"Delegates",modelProperties:{initiator:{serializedName:"initiator",type:{name:"Sequence",element:{type:{name:"String"}}}},responder:{serializedName:"responder",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},js={type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},Vs={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{serializedName:"value",required:!0,type:{name:"String"}}}}},$s={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{serializedName:"value",required:!0,type:{name:"String"}}}}},Ys={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},Js={type:{name:"Composite",className:"CountResponse",modelProperties:{count:{serializedName:"count",required:!0,type:{name:"String"}}}}},Ks={type:{name:"Composite",className:"Generation",modelProperties:{keyBlock:{serializedName:"key_block",type:{name:"Composite",className:"KeyBlock"}},microBlocks:{serializedName:"micro_blocks",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Ws={type:{name:"Composite",className:"Account",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},balance:{serializedName:"balance",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"String"}},payable:{serializedName:"payable",type:{name:"Boolean"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["basic","generalized"]}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{serializedName:"auth_fun",type:{name:"String"}}}}},Xs={type:{name:"Composite",className:"NextNonceResponse",modelProperties:{nextNonce:{serializedName:"next_nonce",required:!0,type:{name:"String"}}}}},Zs={type:{name:"Composite",className:"DryRunInput",modelProperties:{top:{serializedName:"top",type:{name:"String"}},accounts:{serializedName:"accounts",type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunAccount"}}}},txs:{serializedName:"txs",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunInputItem"}}}},txEvents:{defaultValue:!1,serializedName:"tx_events",type:{name:"Boolean"}}}}},ec={type:{name:"Composite",className:"DryRunAccount",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}}}}},tc={type:{name:"Composite",className:"DryRunInputItem",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},callReq:{serializedName:"call_req",type:{name:"Composite",className:"DryRunCallReq"}}}}},nc={type:{name:"Composite",className:"DryRunCallReq",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},amount:{serializedName:"amount",type:{name:"String"}},gas:{serializedName:"gas",type:{name:"String"}},caller:{serializedName:"caller",type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},abiVersion:{serializedName:"abi_version",type:{name:"String"}},context:{serializedName:"context",type:{name:"Composite",className:"DryRunCallContext"}}}}},rc={type:{name:"Composite",className:"DryRunCallContext",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},stateful:{serializedName:"stateful",type:{name:"Boolean"}}}}},ic={type:{name:"Composite",className:"DryRunResults",modelProperties:{results:{serializedName:"results",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunResult"}}}},txEvents:{serializedName:"tx_events",type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},ac={type:{name:"Composite",className:"DryRunResult",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"String"}},reason:{serializedName:"reason",type:{name:"String"}},callObj:{serializedName:"call_obj",type:{name:"Composite",className:"ContractCallObject"}}}}},oc={type:{name:"Composite",className:"ContractCallObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},callerNonce:{serializedName:"caller_nonce",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"String"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},gasUsed:{serializedName:"gas_used",required:!0,type:{name:"String"}},log:{serializedName:"log",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Event"}}}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error","revert"]}}}}},sc={type:{name:"Composite",className:"Event",modelProperties:{address:{serializedName:"address",required:!0,type:{name:"String"}},topics:{serializedName:"topics",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},cc={type:{name:"Composite",className:"TxInfoObject",modelProperties:{callInfo:{serializedName:"call_info",type:{name:"Composite",className:"ContractCallObject"}},gaInfo:{serializedName:"ga_info",type:{name:"Composite",className:"GAObject"}},txInfo:{serializedName:"tx_info",type:{name:"String"}}}}},uc={type:{name:"Composite",className:"GAObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},gasUsed:{serializedName:"gas_used",required:!0,type:{name:"String"}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error"]}},innerObject:{serializedName:"inner_object",type:{name:"Composite",className:"TxInfoObject"}}}}},lc={type:{name:"Composite",className:"EncodedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},Ac={type:{name:"Composite",className:"PostTxResponse",modelProperties:{txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},dc={type:{name:"Composite",className:"ContractObject",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},vmVersion:{serializedName:"vm_version",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},active:{serializedName:"active",required:!0,type:{name:"Boolean"}},referrerIds:{serializedName:"referrer_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},deposit:{serializedName:"deposit",required:!0,type:{name:"String"}}}}},pc={type:{name:"Composite",className:"ByteCode",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},mc={type:{name:"Composite",className:"PoI",modelProperties:{poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},hc={type:{name:"Composite",className:"RegisteredOracle",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}}}}},gc={type:{name:"Composite",className:"OracleQueries",modelProperties:{oracleQueries:{serializedName:"oracle_queries",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},fc={type:{name:"Composite",className:"OracleQuery",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},senderNonce:{serializedName:"sender_nonce",required:!0,type:{name:"String"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"Ttl"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}}}}},yc={type:{name:"Composite",className:"AuctionEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},startedAt:{serializedName:"started_at",type:{name:"String"}},endsAt:{serializedName:"ends_at",required:!0,type:{name:"String"}},highestBidder:{serializedName:"highest_bidder",required:!0,type:{name:"String"}},highestBid:{serializedName:"highest_bid",required:!0,type:{name:"String"}}}}},Cc={type:{name:"Composite",className:"NameEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},owner:{serializedName:"owner",type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"String"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}}}}},Ic={type:{name:"Composite",className:"Channel",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},channelAmount:{serializedName:"channel_amount",required:!0,type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",required:!0,type:{name:"String"}},responderAmount:{serializedName:"responder_amount",required:!0,type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{serializedName:"round",required:!0,type:{name:"String"}},soloRound:{serializedName:"solo_round",required:!0,type:{name:"String"}},lockPeriod:{serializedName:"lock_period",required:!0,type:{name:"String"}},lockedUntil:{serializedName:"locked_until",required:!0,type:{name:"String"}}}}},wc={type:{name:"Composite",className:"PeerPubKey",modelProperties:{pubkey:{serializedName:"pubkey",required:!0,type:{name:"String"}}}}},Ec={type:{name:"Composite",className:"SyncStatus",modelProperties:{progress:{serializedName:"progress",required:!0,type:{name:"Number"}},target:{serializedName:"target",required:!0,type:{name:"String"}},speed:{serializedName:"speed",required:!0,type:{name:"Number"}},estimate:{serializedName:"estimate",required:!0,type:{name:"String"}}}}},Bc={type:{name:"Composite",className:"Status",modelProperties:{genesisKeyBlockHash:{serializedName:"genesis_key_block_hash",required:!0,type:{name:"String"}},solutions:{serializedName:"solutions",required:!0,type:{name:"String"}},difficulty:{serializedName:"difficulty",required:!0,type:{name:"String"}},hashrate:{serializedName:"hashrate",required:!0,type:{name:"String"}},syncing:{serializedName:"syncing",required:!0,type:{name:"Boolean"}},syncProgress:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"sync_progress",type:{name:"Number"}},uptime:{serializedName:"uptime",required:!0,type:{name:"String"}},listening:{serializedName:"listening",required:!0,type:{name:"Boolean"}},protocols:{serializedName:"protocols",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Protocol"}}}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},peerCount:{serializedName:"peer_count",required:!0,type:{name:"String"}},peerConnections:{serializedName:"peer_connections",type:{name:"Composite",className:"PeerConnections"}},pendingTransactionsCount:{serializedName:"pending_transactions_count",required:!0,type:{name:"String"}},networkId:{serializedName:"network_id",required:!0,type:{name:"String"}},peerPubkey:{serializedName:"peer_pubkey",required:!0,type:{name:"String"}},topKeyBlockHash:{serializedName:"top_key_block_hash",required:!0,type:{name:"String"}},topBlockHeight:{serializedName:"top_block_height",required:!0,type:{name:"String"}}}}},Nc={type:{name:"Composite",className:"Protocol",modelProperties:{version:{serializedName:"version",required:!0,type:{name:"String"}},effectiveAtHeight:{serializedName:"effective_at_height",required:!0,type:{name:"String"}}}}},bc={type:{name:"Composite",className:"PeerConnections",modelProperties:{inbound:{serializedName:"inbound",required:!0,type:{name:"String"}},outbound:{serializedName:"outbound",required:!0,type:{name:"String"}}}}},vc={type:{name:"Composite",className:"Currency",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},subunit:{serializedName:"subunit",required:!0,type:{name:"String"}},subunitsPerUnit:{serializedName:"subunits_per_unit",required:!0,type:{name:"String"}},fiatConverstionUrl:{serializedName:"fiat_converstion_url",type:{name:"String"}},logo:{serializedName:"logo",type:{name:"Composite",className:"Image"}},primaryColour:{serializedName:"primary_colour",required:!0,type:{name:"String"}},secondaryColour:{serializedName:"secondary_colour",required:!0,type:{name:"String"}},networkName:{serializedName:"network_name",required:!0,type:{name:"String"}}}}},Sc={type:{name:"Composite",className:"Image",modelProperties:{type:{serializedName:"type",type:{name:"String"}},data:{serializedName:"data",type:{name:"String"}}}}},Tc={type:{name:"Composite",className:"GasPricesItem",modelProperties:{minGasPrice:{serializedName:"min_gas_price",required:!0,type:{name:"String"}},utilization:{serializedName:"utilization",required:!0,type:{name:"String"}},minutes:{serializedName:"minutes",required:!0,type:{name:"String"}}}}},xc={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},_c={type:{name:"Composite",className:"OracleRegisterTx",modelProperties:{queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"String"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},abiVersion:{serializedName:"abi_version",type:{name:"String"}}}}},Qc={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{serializedName:"fee",required:!0,type:{name:"String"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}}}}},Pc={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},zc={type:{name:"Composite",className:"OracleRespondTx",modelProperties:{queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Rc={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},kc={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{serializedName:"name_salt",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Oc={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{serializedName:"name_ttl",required:!0,type:{name:"String"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{serializedName:"client_ttl",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Mc={type:{name:"Composite",className:"NameTransferTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Dc={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},qc={type:{name:"Composite",className:"CommitmentId",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}}}}},Fc={type:{name:"Composite",className:"NameHash",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}}}}},Uc={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",required:!0,type:{name:"String"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{serializedName:"responder_amount",required:!0,type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",required:!0,type:{name:"String"}},lockPeriod:{serializedName:"lock_period",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},Gc={type:{name:"Composite",className:"ChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{serializedName:"round",required:!0,type:{name:"String"}}}}},Lc={type:{name:"Composite",className:"ChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},toId:{serializedName:"to_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{serializedName:"round",required:!0,type:{name:"String"}}}}},Hc={type:{name:"Composite",className:"ChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},round:{serializedName:"round",required:!0,type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},jc={type:{name:"Composite",className:"ChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{serializedName:"initiator_amount_final",required:!0,type:{name:"String"}},responderAmountFinal:{serializedName:"responder_amount_final",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"String"}}}}},Vc={type:{name:"Composite",className:"ChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},$c={type:{name:"Composite",className:"ChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},Yc={type:{name:"Composite",className:"ChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{serializedName:"initiator_amount_final",required:!0,type:{name:"String"}},responderAmountFinal:{serializedName:"responder_amount_final",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"String"}}}}},Jc={type:{name:"Composite",className:"ChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Kc={type:{name:"Composite",className:"ChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{serializedName:"round",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}}}}},Wc={type:{name:"Composite",className:"PubKey",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}}}}},Xc={type:{name:"Composite",className:"PeerDetails",modelProperties:{host:{serializedName:"host",required:!0,type:{name:"String"}},port:{serializedName:"port",required:!0,type:{name:"String"}},firstSeen:{serializedName:"first_seen",required:!0,type:{name:"String"}},lastSeen:{serializedName:"last_seen",required:!0,type:{name:"String"}},genesisHash:{serializedName:"genesis_hash",required:!0,type:{name:"String"}},topHash:{serializedName:"top_hash",required:!0,type:{name:"String"}},topDifficulty:{serializedName:"top_difficulty",required:!0,type:{name:"String"}},networkId:{serializedName:"network_id",type:{name:"String"}},nodeVersion:{serializedName:"node_version",type:{name:"String"}},nodeRevision:{serializedName:"node_revision",type:{name:"String"}},nodeVendor:{serializedName:"node_vendor",type:{name:"String"}},nodeOs:{serializedName:"node_os",type:{name:"String"}}}}},Zc={type:{name:"Composite",className:"Peers",modelProperties:{peers:{serializedName:"peers",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blocked:{serializedName:"blocked",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},eu={type:{name:"Composite",className:"PeerCount",modelProperties:{connected:{serializedName:"connected",type:{name:"Composite",className:"PeerCountConnected"}},available:{serializedName:"available",type:{name:"Composite",className:"PeerCountAvailable"}},blocked:{serializedName:"blocked",required:!0,type:{name:"String"}}}}},tu={type:{name:"Composite",className:"PeerCountConnected",modelProperties:{inbound:{serializedName:"inbound",type:{name:"String"}},outbound:{serializedName:"outbound",type:{name:"String"}}}}},nu={type:{name:"Composite",className:"PeerCountAvailable",modelProperties:{verified:{serializedName:"verified",type:{name:"String"}},unverified:{serializedName:"unverified",type:{name:"String"}}}}},ru={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{serializedName:"vm_version",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},deposit:{serializedName:"deposit",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},gas:{serializedName:"gas",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},iu={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},gas:{serializedName:"gas",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},au={type:{name:"Composite",className:"UnsignedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},ou={type:{name:"Composite",className:"TokenSupply",modelProperties:{accounts:{serializedName:"accounts",type:{name:"String"}},contracts:{serializedName:"contracts",type:{name:"String"}},contractOracles:{serializedName:"contract_oracles",type:{name:"String"}},locked:{serializedName:"locked",type:{name:"String"}},oracles:{serializedName:"oracles",type:{name:"String"}},oracleQueries:{serializedName:"oracle_queries",type:{name:"String"}},pendingRewards:{serializedName:"pending_rewards",type:{name:"String"}},total:{serializedName:"total",type:{name:"String"}}}}},su={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{serializedName:"vm_version",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},gas:{serializedName:"gas",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",required:!0,type:{name:"String"}}}}},cu={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},gas:{serializedName:"gas",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"String"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},uu={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},lu={type:{name:"Composite",className:"CheckTxInPoolResponse",modelProperties:{status:{serializedName:"status",required:!0,type:{name:"String"}}}}},Au={serializedName:"OffChainTransfer",type:{name:"Composite",className:"OffChainTransfer",uberParent:"OffChainUpdate",polymorphicDiscriminator:js.type.polymorphicDiscriminator,modelProperties:{...js.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}}}}},du={serializedName:"OffChainWithdrawal",type:{name:"Composite",className:"OffChainWithdrawal",uberParent:"OffChainUpdate",polymorphicDiscriminator:js.type.polymorphicDiscriminator,modelProperties:{...js.type.modelProperties,to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}}}}},pu={serializedName:"OffChainDeposit",type:{name:"Composite",className:"OffChainDeposit",uberParent:"OffChainUpdate",polymorphicDiscriminator:js.type.polymorphicDiscriminator,modelProperties:{...js.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}}}}},mu={serializedName:"OffChainNewContract",type:{name:"Composite",className:"OffChainNewContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:js.type.polymorphicDiscriminator,modelProperties:{...js.type.modelProperties,owner:{serializedName:"owner",required:!0,type:{name:"String"}},vmVersion:{serializedName:"vm_version",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},code:{serializedName:"code",type:{name:"Composite",className:"ByteCode"}},deposit:{serializedName:"deposit",required:!0,type:{name:"String"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},hu={serializedName:"OffChainCallContract",type:{name:"Composite",className:"OffChainCallContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:js.type.polymorphicDiscriminator,modelProperties:{...js.type.modelProperties,caller:{serializedName:"caller",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},abiVersion:{serializedName:"abi_version",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"String"}},gas:{serializedName:"gas",required:!0,type:{name:"String"}},gasPrice:{serializedName:"gas_price",required:!0,type:{name:"String"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},gu={type:{name:"Composite",className:"CreateContractUnsignedTx",modelProperties:{...au.type.modelProperties,contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}}}}};let fu={OffChainUpdate:js,"OffChainUpdate.OffChainTransfer":Au,"OffChainUpdate.OffChainWithdrawal":du,"OffChainUpdate.OffChainDeposit":pu,"OffChainUpdate.OffChainNewContract":mu,"OffChainUpdate.OffChainCallContract":hu};const yu={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Cu={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},Iu={parameterPath:"intAsString",mapper:{defaultValue:!1,serializedName:"int-as-string",type:{name:"Boolean"}}},wu={parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}},Eu={parameterPath:"height",mapper:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}},Bu={parameterPath:"pubkey",mapper:{serializedName:"pubkey",required:!0,type:{name:"String"}}},Nu={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},bu={parameterPath:"body",mapper:Zs},vu={parameterPath:"body",mapper:lc},Su={parameterPath:"name",mapper:{serializedName:"name",required:!0,type:{name:"String"}}};class Tu extends Rs{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-node/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getTopHeader(e){return this.sendOperationRequest({options:e},_u)}getCurrentKeyBlock(e){return this.sendOperationRequest({options:e},Qu)}getCurrentKeyBlockHash(e){return this.sendOperationRequest({options:e},Pu)}getCurrentKeyBlockHeight(e){return this.sendOperationRequest({options:e},zu)}getPendingKeyBlock(e){return this.sendOperationRequest({options:e},Ru)}getKeyBlockByHash(e,t){return this.sendOperationRequest({hash:e,options:t},ku)}getKeyBlockByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Ou)}getMicroBlockHeaderByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Mu)}getMicroBlockTransactionsByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Du)}getMicroBlockTransactionByHashAndIndex(e,t,n){return this.sendOperationRequest({hash:e,index:t,options:n},qu)}getMicroBlockTransactionsCountByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Fu)}getCurrentGeneration(e){return this.sendOperationRequest({options:e},Uu)}getGenerationByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Gu)}getGenerationByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Lu)}getAccountByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Hu)}getAccountByPubkeyAndHeight(e,t,n){return this.sendOperationRequest({pubkey:e,height:t,options:n},ju)}getAccountByPubkeyAndHash(e,t,n){return this.sendOperationRequest({pubkey:e,hash:t,options:n},Vu)}getPendingAccountTransactionsByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},$u)}getAccountNextNonce(e,t){return this.sendOperationRequest({pubkey:e,options:t},Yu)}protectedDryRunTxs(e,t){return this.sendOperationRequest({body:e,options:t},Ju)}getTransactionByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Ku)}getTransactionInfoByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Wu)}postTransaction(e,t){return this.sendOperationRequest({body:e,options:t},Xu)}getContract(e,t){return this.sendOperationRequest({pubkey:e,options:t},Zu)}getContractCode(e,t){return this.sendOperationRequest({pubkey:e,options:t},el)}getContractPoI(e,t){return this.sendOperationRequest({pubkey:e,options:t},tl)}getOracleByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},nl)}getOracleQueriesByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},rl)}getOracleQueryByPubkeyAndQueryId(e,t,n){return this.sendOperationRequest({pubkey:e,queryId:t,options:n},il)}getAuctionEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},al)}getNameEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},ol)}getChannelByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},sl)}getPeerPubkey(e){return this.sendOperationRequest({options:e},cl)}getSyncStatus(e){return this.sendOperationRequest({options:e},ul)}getStatus(e){return this.sendOperationRequest({options:e},ll)}getChainEnds(e){return this.sendOperationRequest({options:e},Al)}getCurrency(e){return this.sendOperationRequest({options:e},dl)}getRecentGasPrices(e){return this.sendOperationRequest({options:e},pl)}}const xu=za(i,!1),_u={path:"/v3/headers/top",httpMethod:"GET",responses:{200:{bodyMapper:ks},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},Qu={path:"/v3/key-blocks/current",httpMethod:"GET",responses:{200:{bodyMapper:Ms},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},Pu={path:"/v3/key-blocks/current/hash",httpMethod:"GET",responses:{200:{bodyMapper:Ds},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},zu={path:"/v3/key-blocks/current/height",httpMethod:"GET",responses:{200:{bodyMapper:qs},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},Ru={path:"/v3/key-blocks/pending",httpMethod:"GET",responses:{200:{bodyMapper:Ms},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},ku={path:"/v3/key-blocks/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Ms},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Ou={path:"/v3/key-blocks/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Ms},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Eu],headerParameters:[yu],serializer:xu},Mu={path:"/v3/micro-blocks/hash/{hash}/header",httpMethod:"GET",responses:{200:{bodyMapper:Fs},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Du={path:"/v3/micro-blocks/hash/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:Us},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},qu={path:"/v3/micro-blocks/hash/{hash}/transactions/index/{index}",httpMethod:"GET",responses:{200:{bodyMapper:Gs},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu,{parameterPath:"index",mapper:{constraints:{InclusiveMinimum:1},serializedName:"index",required:!0,type:{name:"Number"}}}],headerParameters:[yu],serializer:xu},Fu={path:"/v3/micro-blocks/hash/{hash}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:Js},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Uu={path:"/v3/generations/current",httpMethod:"GET",responses:{200:{bodyMapper:Ks},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},Gu={path:"/v3/generations/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Ks},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Lu={path:"/v3/generations/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Ks},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Eu],headerParameters:[yu],serializer:xu},Hu={path:"/v3/accounts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Ws},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},ju={path:"/v3/accounts/{pubkey}/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Ws},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0},410:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Eu,Bu],headerParameters:[yu],serializer:xu},Vu={path:"/v3/accounts/{pubkey}/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Ws},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu,Bu],headerParameters:[yu],serializer:xu},$u={path:"/v3/accounts/{pubkey}/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:Us},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},Yu={path:"/v3/accounts/{pubkey}/next-nonce",httpMethod:"GET",responses:{200:{bodyMapper:Xs},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu,{parameterPath:["options","strategy"],mapper:{defaultValue:"max",serializedName:"strategy",type:{name:"Enum",allowedValues:["max","continuity"]}}}],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},Ju={path:"/v3/dry-run",httpMethod:"POST",responses:{200:{bodyMapper:ic},400:{bodyMapper:Os,isError:!0},403:{bodyMapper:Os,isError:!0}},requestBody:bu,queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu,Nu],mediaType:"json",serializer:xu},Ku={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Gs},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Wu={path:"/v3/transactions/{hash}/info",httpMethod:"GET",responses:{200:{bodyMapper:cc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0},410:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,wu],headerParameters:[yu],serializer:xu},Xu={path:"/v3/transactions",httpMethod:"POST",responses:{200:{bodyMapper:Ac},400:{bodyMapper:Os,isError:!0}},requestBody:vu,queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu,Nu],mediaType:"json",serializer:xu},Zu={path:"/v3/contracts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:dc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},el={path:"/v3/contracts/{pubkey}/code",httpMethod:"GET",responses:{200:{bodyMapper:pc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},tl={path:"/v3/contracts/{pubkey}/poi",httpMethod:"GET",responses:{200:{bodyMapper:mc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},nl={path:"/v3/oracles/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:hc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},rl={path:"/v3/oracles/{pubkey}/queries",httpMethod:"GET",responses:{200:{bodyMapper:gc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu,{parameterPath:["options","from"],mapper:{serializedName:"from",type:{name:"String"}}},{parameterPath:["options","limit"],mapper:{defaultValue:20,constraints:{InclusiveMaximum:1e3,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},{parameterPath:["options","type"],mapper:{defaultValue:"all",serializedName:"type",type:{name:"Enum",allowedValues:["open","closed","all"]}}}],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},il={path:"/v3/oracles/{pubkey}/queries/{query-id}",httpMethod:"GET",responses:{200:{bodyMapper:fc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu,{parameterPath:"queryId",mapper:{serializedName:"query-id",required:!0,type:{name:"String"}}}],headerParameters:[yu],serializer:xu},al={path:"/v3/auctions/{name}",httpMethod:"GET",responses:{200:{bodyMapper:yc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Su],headerParameters:[yu],serializer:xu},ol={path:"/v3/names/{name}",httpMethod:"GET",responses:{200:{bodyMapper:Cc},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Su],headerParameters:[yu],serializer:xu},sl={path:"/v3/channels/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Ic},400:{bodyMapper:Os,isError:!0},404:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu,Bu],headerParameters:[yu],serializer:xu},cl={path:"/v3/peers/pubkey",httpMethod:"GET",responses:{200:{bodyMapper:wc}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},ul={path:"/v3/sync-status",httpMethod:"GET",responses:{200:{bodyMapper:Ec},404:{bodyMapper:Os,isError:!0}},urlParameters:[Cu],headerParameters:[yu],serializer:xu},ll={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:Bc}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},Al={path:"/v3/status/chain-ends",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"String"}}}}}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},dl={path:"/v3/currency",httpMethod:"GET",responses:{200:{bodyMapper:vc}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu},pl={path:"/v3/recent-gas-prices",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"GasPricesItem"}}}}},400:{bodyMapper:Os,isError:!0}},queryParameters:[Iu],urlParameters:[Cu],headerParameters:[yu],serializer:xu};function ml(e,t){hl(e,t),t.add(e)}function hl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function gl(e,t,n){return function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(t,e),n}const fl=["balance","queryFee","fee","amount","nameFee","channelAmount","initiatorAmount","responderAmount","channelReserve","initiatorAmountFinal","responderAmountFinal","gasPrice","minGasPrice","deposit"],yl=["time","gas","gasUsed","nameSalt","nonce","nextNonce","height","blockHeight","topBlockHeight","ttl","nameTtl","clientTtl","inbound","outbound","peerCount","pendingTransactionsCount","effectiveAtHeight","version","solutions","round","minutes","utilization","difficulty","hashrate"];var Cl=new WeakSet,Il=new WeakSet,wl=new WeakSet;class El extends Tu{constructor(...e){super(...e),ml(this,wl),ml(this,Il),ml(this,Cl)}async sendOperationRequest(e,t){const n=It(e,(([e,t])=>[e,gl(this,Il,Nl).call(this,t)]));return gl(this,wl,bl).call(this,await super.sendOperationRequest(n,t))}}function Bl(e,t){return Array.isArray(e)?e.map((e=>gl(this,Cl,Bl).call(this,e,t))):null!=e&&"object"==typeof e?It(e,(([e,n])=>null==n?[e,n]:fl.some((t=>t===e))?[e,t.bigInt(n)]:yl.some((t=>t===e))?[e,t.number(n)]:[e,gl(this,Cl,Bl).call(this,n,t)])):e}function Nl(e){return gl(this,Cl,Bl).call(this,e,{bigInt:e=>e instanceof _?e.toFixed():e.toString(),number:e=>e.toString()})}function bl(e){return gl(this,Cl,Bl).call(this,e,{bigInt:e=>BigInt(e),number:e=>+e})}var vl=new WeakMap;class Sl extends El{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...i}={}){var a,o;super(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[ga("node",(async e=>(await this._getCachedStatus(e)).nodeVersion),"6.2.0","8.0.0")],da(),pa(),fa(n,r),ha((e=>[" ",e.reason,null==e.errorCode?"":` (${e.errorCode})`].join("")))],...i}),o={writable:!0,value:void 0},hl(this,a=vl),a.set(this,o),this.pipeline.removePolicy({name:la}),this.pipeline.removePolicy({name:Aa}),this.pipeline.removePolicy({name:"defaultRetryPolicy"}),this.intAsString=!0}async _getCachedStatus(e){return null!=li(this,vl)?li(this,vl):this.getStatus(e)}async getStatus(...e){const t=super.getStatus(...e);return t.then((()=>{ui(this,vl,t)}),(()=>{})),t}async getNetworkId(){return(await this._getCachedStatus()).networkId}async getNodeInfo(){const{nodeVersion:e,networkId:t,protocols:n,topBlockHeight:r}=await this.getStatus(),i=n.filter((({effectiveAtHeight:e})=>r>=e)).reduce(((e,t)=>t.effectiveAtHeight>e.effectiveAtHeight?t:e),{effectiveAtHeight:-1,version:0}).version;if(null==Bn[i]){const e=i.toString(),t=Object.values(Bn).filter((e=>"number"==typeof e)).map((e=>+e)),n=Math.min(...t).toString(),r=(Math.max(...t)+1).toString();throw new te("consensus protocol",e,n,r)}return{url:this.$host,nodeNetworkId:t,version:e,consensusProtocolVersion:i}}}function Tl(e){const t=ra(e);switch(t.tag){case vn.SignedTx:return Tl(ta(t.encodedTx));case vn.GaMetaTx:return t.gaId}const n=ea(t.tag,t.version).find((([e])=>"nonce"===e))?.[1];if(null==n)throw new U(`Transaction doesn't have nonce: ${vn[t.tag]}`);if(!("senderKey"in n))throw new ie;return t[n.senderKey].replace(/^ok_/,"ak_")}class xl{async signTypedData(e,t,n){throw new ee("signTypedData method")}async signDelegationToContract(e,t){throw new ee("signDelegationToContract method")}async signNameDelegationToContract(e,t,n){throw new ee("signNameDelegationToContract method")}async signAllNamesDelegationToContract(e,t){throw new ee("signAllNamesDelegationToContract method")}async signOracleQueryDelegationToContract(e,t,n){throw new ee("signOracleQueryDelegationToContract method")}async signDelegation(e,t){throw new ee("signDelegation method")}}var _l=n(6176),Ql=n(2341),Pl=n.n(Ql);function zl(e){var t;return en(null!==(t=Pl()(e))&&void 0!==t?t:"")}function Rl(e){const t=(new _l.TypeResolver).resolveType({record:[{name:"name",type:{option:["string"]}},{name:"version",type:{option:["int"]}},{name:"networkId",type:{option:["string"]}},{name:"contractAddress",type:{option:["contract_pubkey"]}}]},{});return en($t((new _l.ContractByteArrayEncoder).encodeWithType(e,t)))}function kl(e,t,n){return en(wt([cn,new Uint8Array([0]),Rl(n),zl(t),en($t(e))]))}let Ol=function(e){return e[e.AensWildcard=1]="AensWildcard",e[e.AensName=2]="AensName",e[e.AensPreclaim=3]="AensPreclaim",e[e.Oracle=4]="Oracle",e[e.OracleResponse=5]="OracleResponse",e}({});const Ml=Nr(Rt.OracleAddress),Dl={serialize(e){return Ml.serialize(Yt($t(e),Rt.OracleAddress))},deserialize(e){return Yt($t(Ml.deserialize(e)),Rt.OracleQueryId)}},ql=[{tag:wr(Ol.AensWildcard),version:wr(1,!0),accountAddress:Nr(Rt.AccountAddress),contractAddress:Nr(Rt.ContractAddress)},{tag:wr(Ol.AensName),version:wr(1,!0),accountAddress:Nr(Rt.AccountAddress),nameId:$r,contractAddress:Nr(Rt.ContractAddress)},{tag:wr(Ol.AensPreclaim),version:wr(1,!0),accountAddress:Nr(Rt.AccountAddress),contractAddress:Nr(Rt.ContractAddress)},{tag:wr(Ol.Oracle),version:wr(1,!0),accountAddress:Nr(Rt.AccountAddress),contractAddress:Nr(Rt.ContractAddress)},{tag:wr(Ol.OracleResponse),version:wr(1,!0),queryId:Dl,contractAddress:Nr(Rt.ContractAddress)}];function Fl(e){return Xi(ql,Ol,e,{},Rt.Bytearray)}function Ul(e,t){return Zi(ql,Ol,e,t,{})}var Gl=n(8287).Buffer;const Ll=new WeakMap;function Hl(e,t,n){const r=[t];n&&r.push("inner_tx");const i=$t(e);return wt([Gl.from(r.join("-")),en(i)])}class jl extends xl{constructor(e){if(super(),64!==(e="string"==typeof e?Gl.from(e,"hex"):e).length)throw new L("secretKey","64 bytes",e.length);Ll.set(this,e),this.address=Yt(nn(e).publicKey,Rt.AccountAddress)}static generate(){return new jl(rn().secretKey)}async sign(e,t){const n=Ll.get(this);if(null==n)throw new ie;return an(e,n)}async signTransaction(e,{innerTx:t,networkId:n,...r}={}){if(null==n)throw new L("networkId","provided",n);const i=$t(e),a=Hl(e,n,!0===t),o=[await this.sign(a,r)];return ta({tag:vn.SignedTx,encodedTx:i,signatures:o})}async signMessage(e,t){return this.sign(un(e),t)}async signTypedData(e,t,{name:n,version:r,networkId:i,contractAddress:a,...o}={}){const s=kl(e,t,{name:n,version:r,networkId:i,contractAddress:a});return Yt(await this.sign(s,o),Rt.Signature)}async signDelegationToContract(e,{networkId:t,consensusProtocolVersion:n,isOracle:r}={}){if(null==r){const e=null!=n?Bn[n]:"unknown";console.warn(`AccountMemory:signDelegationToContract: isOracle is not set. By default, sdk would generate an AENS preclaim delegation signature, but it won't be the same as the oracle delegation signature in Ceres (current protocol is ${e}).`)}if(n===Bn.Ceres){const n=Fl({tag:!0===r?Ol.Oracle:Ol.AensPreclaim,accountAddress:this.address,contractAddress:e});return this.signDelegation(n,{networkId:t})}if(null==t)throw new L("networkId","provided",t);const i=wt([Gl.from(t),$t(this.address),$t(e)]);return Yt(await this.sign(i),Rt.Signature)}async signNameDelegationToContract(e,t,{networkId:n,consensusProtocolVersion:r}={}){if(r===Bn.Ceres){const r=Fl({tag:Ol.AensName,accountAddress:this.address,contractAddress:e,nameId:t});return this.signDelegation(r,{networkId:n})}if(null==n)throw new L("networkId","provided",n);const i=wt([Gl.from(n),$t(this.address),$t(Pn(t)),$t(e)]);return Yt(await this.sign(i),Rt.Signature)}async signAllNamesDelegationToContract(e,{networkId:t,consensusProtocolVersion:n}={}){if(n===Bn.Ceres){const n=Fl({tag:Ol.AensWildcard,accountAddress:this.address,contractAddress:e});return this.signDelegation(n,{networkId:t})}if(null==t)throw new L("networkId","provided",t);const r=wt([Gl.from(t),$t(this.address),Gl.from("AENS"),$t(e)]);return Yt(await this.sign(r),Rt.Signature)}async signOracleQueryDelegationToContract(e,t,{networkId:n,consensusProtocolVersion:r}={}){if(r===Bn.Ceres){const r=Fl({tag:Ol.OracleResponse,queryId:t,contractAddress:e});return this.signDelegation(r,{networkId:n})}const i=$t(t),a=$t(this.address);if(0===i.compare(a))throw new L("oracleQueryId","not equal to account address",t);if(null==n)throw new L("networkId","provided",n);const o=wt([Gl.from(n),i,$t(e)]);return Yt(await this.sign(o),Rt.Signature)}async signDelegation(e,{networkId:t}={}){if(null==t)throw new L("networkId","provided",t);const n=wt([cn,new Uint8Array([1]),Gl.from(t),$t(e)]);return Yt(await this.sign(n),Rt.Signature)}}function Vl(e,{innerTx:t,gasUsed:n,queryFee:r,isInitiator:i}={}){const a=ra(e);if(a.tag===vn.SignedTx)throw new H("Transaction shouldn't be a SignedTx, use `getExecutionCostBySignedTx` instead");let o=0n;return"fee"in a&&"freeloader"!==t&&(o+=BigInt(a.fee)),a.tag===vn.NameClaimTx&&(o+=BigInt(a.nameFee)),a.tag===vn.OracleQueryTx&&(o+=BigInt(a.queryFee)),a.tag===vn.OracleResponseTx&&(o-=BigInt(null!=r?r:0)),a.tag===vn.ChannelSettleTx&&(!0===i&&(o-=BigInt(a.initiatorAmountFinal)),!1===i&&(o-=BigInt(a.responderAmountFinal))),(a.tag===vn.SpendTx&&a.senderId!==a.recipientId||a.tag===vn.ContractCreateTx||a.tag===vn.ContractCallTx||a.tag===vn.ChannelDepositTx)&&"fee-payer"!==t&&(o+=BigInt(a.amount)),a.tag===vn.ContractCreateTx&&(o+=BigInt(a.deposit)),a.tag!==vn.ContractCreateTx&&a.tag!==vn.ContractCallTx&&a.tag!==vn.GaAttachTx&&a.tag!==vn.GaMetaTx||"freeloader"===t||(o+=BigInt(a.gasPrice)*BigInt(null!=n?n:a.gasLimit)),a.tag!==vn.GaMetaTx&&a.tag!==vn.PayingForTx||(o+=Vl(ta(a.tx.encodedTx),a.tag===vn.PayingForTx?{innerTx:"fee-payer"}:{})),o}function $l(e,t,n){const r=ra(e,vn.SignedTx);if(r.encodedTx.tag===vn.GaMetaTx)return Vl(ta(r.encodedTx),n);const i=ta(r.encodedTx),a=Tl(i),[o,s]=[!0,!1].map((e=>on(Hl(i,t,e),r.signatures[0],a)));if(!o&&!s)throw new U("Can't verify signature");return Vl(ta(r.encodedTx),{...o&&{innerTx:"freeloader"},...n})}async function Yl(e,t,{isMined:n,...r}={}){let i=ra(e);const a=i.tag===vn.SignedTx,o=a&&!0===n&&ia(e);if(i.tag===vn.SignedTx&&(i=i.encodedTx),null==r.gasUsed&&!1!==o&&[vn.ContractCreateTx,vn.ContractCallTx,vn.GaAttachTx,vn.GaMetaTx].includes(i.tag)){const{callInfo:e,gaInfo:n}=await t.getTransactionInfoByHash(o),i=null!=e?e:n;if(null==i)throw new re(`callInfo and gaInfo is not available for transaction ${o}`);r.gasUsed=i.gasUsed}if(null==r.queryFee&&vn.OracleResponseTx===i.tag&&(r.queryFee=(await t.getOracleByPubkey(i.oracleId)).queryFee.toString()),null==r.isInitiator&&vn.ChannelSettleTx===i.tag&&!0!==n){const{initiatorId:e}=await t.getChannelByPubkey(i.channelId);r.isInitiator=i.fromId===e}return a?$l(e,await t.getNetworkId(),r):Vl(e,r)}var Jl=n(8287).Buffer;const Kl=[];async function Wl(e,t,n){const r=Tl(ta(e)),[i,{height:a},{consensusProtocolVersion:o,nodeNetworkId:s}]=await Promise.all([t.getAccountByPubkey(r).catch((e=>{if(!Nt(e))throw e;return{id:r,balance:0n,nonce:0}})).then((e=>({...e,id:e.id}))),t.getCurrentKeyBlockHeight(),t.getNodeInfo()]);return(await Promise.all(Kl.map((async r=>r(e,{node:t,account:i,height:a,consensusProtocolVersion:o,nodeNetworkId:s,parentTxTypes:n}))))).flat()}async function Xl(e,t){const n=new Sl(t.$host,{ignoreVersion:!0,pipeline:t.pipeline.clone(),additionalPolicies:[ma()]});return Wl(ra(e),n,[])}Kl.push(((e,{account:t,nodeNetworkId:n,parentTxTypes:r})=>{if(e.tag!==vn.SignedTx)return[];const{encodedTx:i,signatures:a}=e;if(null==(null!=i?i:a))return[];if(1!==a.length)return[];const o=Jl.from([n,...r.includes(vn.PayingForTx)?["inner_tx"]:[]].join("-")),s=$t(ta(i)),c=wt([o,s]),u=wt([o,en(s)]);return on(c,a[0],t.id)||on(u,a[0],t.id)?[]:[{message:"Signature cannot be verified, please ensure that you transaction have the correct prefix and the correct private key for the sender address",key:"InvalidSignature",checkedKeys:["encodedTx","signatures"]}]}),(async(e,{node:t,parentTxTypes:n})=>{let r;return"encodedTx"in e&&(r=e.encodedTx),"tx"in e&&(r=e.tx),null==r?[]:Wl(r,t,[...n,e.tag])}),((e,{height:t})=>"ttl"in e?0===e.ttl||e.ttl>t?[]:[{message:`TTL ${e.ttl} is already expired, current height is ${t}`,key:"ExpiredTTL",checkedKeys:["ttl"]}]:[]),(async(e,{account:t,parentTxTypes:n,node:r})=>{if(0!==n.length)return[];const i=await Yl(ta(e),r).catch((()=>0n));return i<=t.balance?[]:[{message:`Account balance ${t.balance} is not enough to execute the transaction that costs ${i}`,key:"InsufficientBalance",checkedKeys:["amount","fee","nameFee","gasLimit","gasPrice"]}]}),(async(e,{node:t})=>{if(e.tag!==vn.SpendTx||Wt(e.recipientId,Rt.Name))return[];const n=await t.getAccountByPubkey(e.recipientId).catch((e=>{if(!Nt(e))throw e;return null}));return null==n||!0===n.payable?[]:[{message:"Recipient account is not payable",key:"RecipientAccountNotPayable",checkedKeys:["recipientId"]}]}),((e,{account:t})=>{let n;return e.tag===vn.SignedTx&&"generalized"===t.kind&&0!==e.signatures.length&&(n="Generalized account can't be used to generate SignedTx with signatures"),e.tag===vn.GaMetaTx&&"basic"===t.kind&&(n="Basic account can't be used to generate GaMetaTx"),null==n?[]:[{message:n,key:"InvalidAccountType",checkedKeys:["tag"]}]}),((e,{consensusProtocolVersion:t})=>{var n,r;const i=vn.OracleRegisterTx===e.tag,a=vn.ContractCreateTx===e.tag||vn.GaAttachTx===e.tag,o=vn.ContractCallTx===e.tag||vn.GaMetaTx===e.tag,s=null!==(n=null!==(r=i?"oracle-call":null)&&void 0!==r?r:a?"contract-create":null)&&void 0!==n?n:o?"contract-call":null;if(null==s)return[];const c=lr[t][s];let u;if("abiVersion"in e&&(u={abiVersion:e.abiVersion}),"ctVersion"in e&&(u=e.ctVersion),null==u)throw new ie;return!c.abiVersion.includes(u.abiVersion)||a&&!c.vmVersion.includes(u.vmVersion)?[{message:`ABI/VM version ${JSON.stringify(u)} is wrong, supported is: ${JSON.stringify(c)}`,key:"VmAndAbiVersionMismatch",checkedKeys:["ctVersion","abiVersion"]}]:[]}),(async(e,{node:t})=>{if(vn.ContractCallTx!==e.tag)return[];if(e.contractId.startsWith("nm_"))return[];try{const{active:n}=await t.getContract(e.contractId);return n?[]:[{message:`Contract ${e.contractId} is not active`,key:"ContractNotActive",checkedKeys:["contractId"]}]}catch(e){if(!(e instanceof ft)||null==e.response?.bodyAsText)throw e;return[{message:JSON.parse(e.response.bodyAsText).reason,key:"ContractNotFound",checkedKeys:["contractId"]}]}}),((e,{consensusProtocolVersion:t})=>vn.GaAttachTx===e.tag&&Bn.Ceres===t&&1!==e.nonce?[{message:`Account ${e.ownerId} can't become generalized because it is already used`,key:"AccountUsed",checkedKeys:["nonce"]}]:[]));class Zl extends U{constructor(e,t,n){super(e),this.name="InvalidTxError",this.validation=t,this.transaction=n}}async function eA(e,{onNode:t,onAccount:n,verify:r=!0,waitMined:i=!0,confirm:a,innerTx:o,...s}){const c=await n.signTransaction(e,{...s,onNode:t,innerTx:o,networkId:await t.getNetworkId()});if(!0===o)return{hash:ia(c),rawTx:c};if(r){const e=await Xl(c,t);if(e.length>0){const t=`Transaction verification errors: ${e.map((e=>e.message)).join(", ")}`;throw new Zl(t,e,c)}}try{let e;try{e=null!=n?`tx-${n.address}`:null}catch(t){e=null}const{txHash:r}=await t.postTransaction({tx:c},{requestOptions:{customHeaders:{"__retry-code":"400",...null!=e?{__queue:e}:{}}}});if(i){const e=await Vn(r,{onNode:t,...s}),n={...e,hash:e.hash,rawTx:c};if(null!=a&&+a>0){const e="boolean"==typeof a?void 0:a;return{...n,confirmationHeight:await Yn(r,{onNode:t,confirm:e,...s})}}return n}return{hash:r,rawTx:c}}catch(e){throw bt(e),Object.assign(e,{rawTx:c,verifyTx:async()=>Xl(c,t)})}}var tA=n(8287).Buffer;const nA=e=>tA.from(e).toString("base64").replaceAll("/","_").replaceAll("+","-").replace(/=+$/,""),rA=e=>tA.from(e.replaceAll("_","/").replaceAll("-","+"),"base64"),iA=e=>{var t;return nA(null!==(t=Pl()(e))&&void 0!==t?t:"")},aA="eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9";async function oA(e,t){const n={...e};"sub_jwk"in n||(n.sub_jwk={kty:"OKP",crv:"Ed25519",x:nA($t(t.address))}),void 0===n.sub_jwk&&delete n.sub_jwk;const r=`${aA}.${iA(n)}`,i=await t.sign(r);return`${r}.${nA(i)}`}function sA(e,t){var n;const r=e.split(".");if(3!==r.length)throw new L("JWT components count",3,r.length);const[i,a,o]=r;if(i!==aA)throw new L("JWT header",aA,i);const s=JSON.parse(rA(a).toString()),c=null!==(n=s.sub_jwk)&&void 0!==n?n:{},u=null==c.x||"OKP"!==c.kty||"Ed25519"!==c.crv?t:Yt(rA(c.x),Rt.AccountAddress);if(null!=t&&u!==t)throw new L("address",`${u} ("sub_jwk")`,t);if(null!=u&&!on(tA.from(`${i}.${a}`),rA(o),u))throw new je(`JWT is not signed by ${u}`);return{payload:s,signer:u}}function cA(e){try{return sA(e),!0}catch(e){return!1}}function uA(e){sA(e)}function lA(e,t){try{const{signer:n}=sA(e,t);return null!=n}catch(e){return!1}}var AA,dA={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},pA=new Uint8Array(16);function mA(){if(!AA&&!(AA="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return AA(pA)}for(var hA=[],gA=0;gA<256;++gA)hA.push((gA+256).toString(16).substr(1));var fA=function(e,t,n){if(dA.randomUUID&&!t&&!e)return dA.randomUUID();var r=(e=e||{}).random||(e.rng||mA)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(hA[e[t+0]]+hA[e[t+1]]+hA[e[t+2]]+hA[e[t+3]]+"-"+hA[e[t+4]]+hA[e[t+5]]+"-"+hA[e[t+6]]+hA[e[t+7]]+"-"+hA[e[t+8]]+hA[e[t+9]]+"-"+hA[e[t+10]]+hA[e[t+11]]+hA[e[t+12]]+hA[e[t+13]]+hA[e[t+14]]+hA[e[t+15]]).toLowerCase()}(r)},yA=n(8802),CA=n(8287).Buffer;const IA={async argon2id(e,t,n){const{memlimit_kib:r,opslimit:i}=n;return(0,yA.tW)(e,{hashLength:32,salt:t,timeCost:i,memoryCost:r,type:yA.xi})}},wA={"xsalsa20-poly1305":{encrypt:Tt().secretbox,decrypt(...e){const t=Tt().secretbox.open(...e);if(null==t)throw new Re;return t}}},EA={secret_type:"ed25519",symmetric_alg:"xsalsa20-poly1305",kdf:"argon2id",kdf_params:{memlimit_kib:65536,opslimit:3,parallelism:1}};function BA(e,t,n,r=EA.symmetric_alg){return wA[r].encrypt(e,n,t)}async function NA(e,t,n,r){return IA[n](e,t,r)}async function bA(e,{crypto:t}){const n=CA.from(t.kdf_params.salt,"hex");return CA.from(function(e,t,n,r=EA.symmetric_alg){return wA[r].decrypt(e,n,t)}(CA.from(t.ciphertext,"hex"),await NA(e,n,t.kdf,t.kdf_params),CA.from(t.cipher_params.nonce,"hex"),t.symmetric_alg)).toString("hex")}async function vA(e,t,n,r=Tt().randomBytes(24),i=Tt().randomBytes(16),a){const o={...EA,...a},s=await NA(t,i,o.kdf,o.kdf_params),c="string"==typeof n?CA.from(n,"hex"):n;return{name:e,version:1,public_key:Kt(c),id:fA(),crypto:{secret_type:o.secret_type,symmetric_alg:o.symmetric_alg,ciphertext:CA.from(BA(c,s,r,o.symmetric_alg)).toString("hex"),cipher_params:{nonce:CA.from(r).toString("hex")},kdf:o.kdf,kdf_params:{...o.kdf_params,salt:CA.from(i).toString("hex")}}}}var SA=n(9234),TA=n(9235),xA=n(3836),_A=n.n(xA),QA=n(8287).Buffer;const PA=_A().ModeOfOperation.ecb;function zA(e,t){const n=Ot(e);return new PA(n).encrypt(t)}function RA(e,t){const n=QA.from(t),r=Ot(e);return new PA(r).decrypt(n)}class kA extends q{constructor(e){super(e),this.name="DerivationError"}}const OA=QA.from("ed25519 seed"),MA=2147483648;function DA({secretKey:e,chainCode:t},n){if(n<MA)throw new kA(`Segment ${n} is not hardened`);const r=QA.allocUnsafe(4);r.writeUInt32BE(n,0);const i=wt([QA.alloc(1,0),e,r]),a=(0,SA.full)(i,t);return{secretKey:a.slice(0,32),chainCode:a.slice(32)}}function qA(e,t){const n=""===e?[]:(0,TA.fromString)(e).toPathArray();return n.forEach(((e,t)=>{if(e<MA)throw new kA(`Segment #${t+1} is not hardened`)})),n.reduce(((e,t)=>DA(e,t)),t)}function FA(e){const t=(0,SA.full)(e,OA);return{secretKey:t.slice(0,32),chainCode:t.slice(32)}}function UA(e,t){if(!["m","m/"].includes(e.slice(0,2)))throw new kA("Root element is required");const n=FA(t);return qA(e.slice(2),n)}function GA(e){const{secretKey:t,publicKey:n}=e;return{secretKey:QA.from(t).toString("hex"),publicKey:Yt(n,Rt.AccountAddress)}}function LA(e){return Tt().sign.keyPair.fromSeed(e)}function HA(e,t){const n=UA("m/44h/457h",e);return{secretKey:QA.from(zA(t,n.secretKey)).toString("hex"),chainCode:QA.from(zA(t,n.chainCode)).toString("hex")}}function jA(e,t,n){const r={secretKey:RA(t,QA.from(e.secretKey,"hex")),chainCode:RA(t,QA.from(e.chainCode,"hex"))};return new Array(n).fill(void 0).map(((e,t)=>GA(LA(qA(`${t}h/0h/0h`,r).secretKey))))}const VA=(e,t)=>({...GA(LA(qA(`${t}h/0h/0h`,UA("m/44h/457h",e)).secretKey)),idx:t});async function $A(e,t){return eA(await na({_isInternalBuild:!0,...t,tag:vn.NameRevokeTx,nameId:e,accountId:t.onAccount.address}),t)}async function YA(e,t,{extendPointers:n,...r}){const i={...!0===n&&Object.fromEntries((await sr(e,r)).pointers.map((({key:e,id:t})=>[e,t]))),...t},a=Object.values(i).some((e=>Wt(e,Rt.Bytearray))),o=(await r.onNode.getNodeInfo()).consensusProtocolVersion===Bn.Iris;if(a&&o)throw new Z("Raw pointers are available only in Ceres, the current protocol is Iris");const s=await na({_isInternalBuild:!0,...r,tag:vn.NameUpdateTx,version:a?2:1,nameId:e,accountId:r.onAccount.address,pointers:Object.entries(i).map((([e,t])=>({key:e,id:t})))});return eA(s,r)}async function JA(e,t,n){return eA(await na({_isInternalBuild:!0,...n,tag:vn.NameTransferTx,nameId:e,accountId:n.onAccount.address,recipientId:t}),n)}async function KA(e,t){const n=await sr(e,t);return Object.freeze({...n,id:n.id,owner:n.owner,async update(n,r){return{...await YA(e,n,{...t,...r}),...await KA(e,{...t,...r})}},async transfer(n,r){return{...await JA(e,n,{...t,...r}),...await KA(e,{...t,...r})}},async revoke(n){return $A(e,{...t,...n})},async extendTtl(n,r={}){return{...await YA(e,{},{...t,...r,nameTtl:n,extendPointers:!0}),...await KA(e,{...t,...r})}}})}async function WA(e,t,n){const r=await na({_isInternalBuild:!0,...n,tag:vn.NameClaimTx,accountId:n.onAccount.address,nameSalt:t,name:e}),i=await eA(r,n);if(!Gn(e)){const t=null!=i.blockHeight&&i.blockHeight>0?await KA(e,n):{};return Object.assign(i,t)}return i}async function XA(e,t){const n=Xt(),r=zn(e,n),i=await na({_isInternalBuild:!0,...t,tag:vn.NamePreclaimTx,accountId:t.onAccount.address,commitmentId:r});return Object.freeze({...await eA(i,t),salt:n,commitmentId:r,async claim(r){const{version:i,...a}=t;return WA(e,n,{...a,...r})}})}async function ZA(e,t,n){return WA(e,0,{...n,nameFee:t})}function ed(e,t){td(e,t),t.add(e)}function td(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nd(e,t,n){return function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(t,e),n}var rd=new WeakSet,id=new WeakSet,ad=new WeakSet,od=new WeakSet,sd=new WeakMap;function cd({returnType:e,returnValue:t,log:n},r,i,a){let o;switch(e){case"ok":{const e=nd(this,ad,ld).call(this,r);return{decodedResult:this._calldata.decode(this._name,e.name,t),decodedEvents:this.$decodeEvents(n,a)}}case"revert":o=this._calldata.decodeFateString(t);break;case"error":o=$t(t).toString();break;default:throw new re(`Unknown return type: ${e}`)}throw new Te(o,i)}async function ud(e,t,n){const r=await eA(e,{...this.$options,...n});return{hash:r.hash,tx:ra(r.rawTx),txData:r,rawTx:r.rawTx,...null!=r.blockHeight&&await this.$getCallResultByTxHash(r.hash,t,n)}}function ld(e){const t=li(this,sd).functions.find((t=>t.name===e));if(null!=t)return t;if("init"===e)return{arguments:[],name:"init",payable:!1,returns:"unit",stateful:!0};throw new xe(e)}function Ad(e,t,{contractAddressToName:n}){const r={...this.$options.contractAddressToName,...n};if(null!=r[e])return r[e];const i=this._aci.map((({contract:e})=>e)).filter((e=>e?.event)),a=i.map((e=>[e.name,e.event.variant])).map((([e,t])=>t.map((t=>[e,Object.keys(t)[0],Object.values(t)[0]])))).flat().filter((([,e])=>BigInt(`0x${en(e).toString("hex")}`)===t)).filter((([,,e],t,n)=>!n.slice(0,t).some((t=>{return n=t[2],r=e,JSON.stringify(n)===JSON.stringify(r);var n,r}))));switch(a.length){case 0:throw new Qe(t.toString(),e);case 1:return a[0][0];default:throw new Pe(e,a)}}const dd=class{async $compile(){if(null!=this.$options.bytecode)return this.$options.bytecode;if(null==this.$options.onCompiler)throw new H("Can't compile without compiler");if(null!=this.$options.sourceCode){const{bytecode:e}=await this.$options.onCompiler.compileBySourceCode(this.$options.sourceCode,this.$options.fileSystem);this.$options.bytecode=e}if(null!=this.$options.sourceCodePath){const{bytecode:e}=await this.$options.onCompiler.compile(this.$options.sourceCodePath);this.$options.bytecode=e}if(null==this.$options.bytecode)throw new H("Can't compile without sourceCode and sourceCodePath");return this.$options.bytecode}async $getCallResultByTxHash(e,t,n){const{callInfo:r}=await this.$options.onNode.getTransactionInfoByHash(e);if(null==r)throw new D(`callInfo is not available for transaction ${e}`);const i=r;return{...nd(this,rd,cd).call(this,i,t,void 0,n),result:i}}async _estimateGas(e,t,n={}){const{result:r}=await this.$call(e,t,{...n,callStatic:!0});if(null==r)throw new ie;const{gasUsed:i}=r;return Math.floor(1.25*i)}async $deploy(e,t){var n;const{callStatic:r,...i}={...this.$options,...t};if(null==this.$options.bytecode&&await this.$compile(),!0===r)return this.$call("init",e,{...i,callStatic:r});if(null!=this.$options.address)throw new Ee;if(null==i.onAccount)throw new H("Can't deploy without account");const a=i.onAccount.address;if(null==this.$options.bytecode)throw new H("Can't deploy without bytecode");const o=await na({_isInternalBuild:!0,...i,tag:vn.ContractCreateTx,gasLimit:null!==(n=i.gasLimit)&&void 0!==n?n:await this._estimateGas("init",e,i),callData:this._calldata.encode(this._name,"init",e),code:this.$options.bytecode,ownerId:a}),{hash:s,...c}=await nd(this,id,ud).call(this,o,"init",{...i,onAccount:i.onAccount});return this.$options.address=aa(c.rawTx),{...c,...null!=c.result?.log&&{decodedEvents:this.$decodeEvents(c.result.log,i)},owner:a,transaction:s,address:this.$options.address}}async $call(e,t,n={}){var r;const{callStatic:i,top:a,...o}={...this.$options,...n},s=nd(this,ad,ld).call(this,e),{address:c,name:u}=this.$options,l=null!=u?Pn(u):c,{onNode:A}=o;if(null==e)throw new Se;if("init"===e&&!0!==i)throw new Ne('"init" can be called only via dryRun');if("init"!==e&&null!=o.amount&&Number(o.amount)>0&&!s.payable)throw new _e(o.amount,e);let d;try{if(null==o.onAccount)throw new re("Use fallback account");d=o.onAccount.address}catch(e){if(!0!==i||!(e instanceof W&&"Account should be an address (ak-prefixed string), or instance of AccountBase, got undefined instead"===e.message||e instanceof We||e instanceof re&&"Use fallback account"===e.message))throw e;d=hn.pub}const p=this._calldata.encode(this._name,e,t);if(!0===i){if(null==o.nonce){const e=null!=a&&{["number"==typeof a?"height":"hash"]:a},t=await Jn(d,{...e,onNode:A}).catch((e=>{if(!Nt(e))throw e;return{kind:"basic",nonce:0}}));o.nonce="generalized"===t.kind?0:t.nonce+1}const t={...o,onNode:A,callData:p};let n;if("init"===e){if(null==this.$options.bytecode)throw new H('Can\'t dry-run "init" without bytecode');n=await na({...t,tag:vn.ContractCreateTx,code:this.$options.bytecode,ownerId:d})}else{if(null==l)throw new be("Can't dry-run contract without address");n=await na({...t,tag:vn.ContractCallTx,callerId:d,contractId:l})}const{callObj:r,...i}=await ir(n,d,{...o,top:a});if(null==r)throw new re(`callObj is not available for transaction ${n}`);const s=r;return{...i,...nd(this,rd,cd).call(this,s,e,n,o),tx:ra(n),result:s,rawTx:n,hash:ia(n),txData:void 0}}if(null!=a)throw new H("Can't handle `top` option in on-chain contract call");if(null==l)throw new be("Can't call contract without address");const m=await na({_isInternalBuild:!0,...o,tag:vn.ContractCallTx,gasLimit:null!==(r=o.gasLimit)&&void 0!==r?r:await this._estimateGas(e,t,o),callerId:d,contractId:l,callData:p});if(null==o.onAccount)throw new H("Can't call contract on chain without account");return nd(this,id,ud).call(this,m,e,{...o,onAccount:o.onAccount})}$decodeEvents(e,{omitUnknown:t,...n}={}){return e.map((e=>{const r=e.topics.map((e=>BigInt(e)));let i;try{i=nd(this,od,Ad).call(this,e.address,r[0],n)}catch(e){if(null!=t&&t&&e instanceof Qe)return null;throw e}const a=this._calldata.decodeEvent(i,e.data,r),[o,s]=Object.entries(a)[0];return{name:o,args:s,contract:{name:i,address:e.address}}})).filter((e=>null!=e))}static async initialize({onCompiler:e,onNode:t,bytecode:n,aci:r,address:i,sourceCodePath:a,sourceCode:o,fileSystem:s,validateBytecode:c,...u}){if(null==r&&null!=e){let t;var l;null!=a&&(t=await e.compile(a)),null!=o&&(t=await e.compileBySourceCode(o,s)),null!=t&&(r=t.aci,null!==(l=n)&&void 0!==l||(n=t.bytecode))}if(null==r)throw new ve;let A;if(null!=i&&(i=await cr(i,"contract_pubkey",{resolveByNode:!0,onNode:t}),(await t.getNodeInfo()).consensusProtocolVersion!==Bn.Iris&&On(i)&&(A=i)),null==i&&null==o&&null==a&&null==n)throw new be("Can't create instance by ACI without address");if(null!=i&&null==(await or(i,{onNode:t})).active)throw new Be(i);if(!0===c){if(null==i)throw new be("Can't validate bytecode without contract address");const r=(await ar(i,{onNode:t})).bytecode;let c=!1;if(null!=n)c=n===r;else if(null!=o){if(null==e)throw new H("Can't validate bytecode without compiler");c=await e.validateBySourceCode(r,o,s)}else if(null!=a){if(null==e)throw new H("Can't validate bytecode without compiler");c=await e.validate(r,a)}if(!c)throw new we(null!=(null!=o?o:a)?"source code":"bytecode")}return new dd({onCompiler:e,onNode:t,sourceCode:o,sourceCodePath:a,bytecode:n,aci:r,address:i,name:A,fileSystem:s,...u})}constructor({aci:e,...t}){var n,r;ed(this,od),ed(this,ad),ed(this,id),ed(this,rd),r={writable:!0,value:void 0},td(this,n=sd),n.set(this,r),this._aci=e;const i=e[e.length-1];if(null==i.contract)throw new H(`The last 'aci' item should have 'contract' key, got ${Object.keys(i)} keys instead`);ui(this,sd,i.contract),this._name=li(this,sd).name,this._calldata=new _l.Encoder(e),this.$options=t,Object.assign(this,Object.fromEntries(li(this,sd).functions.map((({name:e,arguments:t,stateful:n})=>{const r="init"!==e&&!n;return[e,async(...n)=>{const i=n.length===t.length+1?n.pop():{};if("object"!=typeof i)throw new W(`Options should be an object: ${i}`);return"init"===e?this.$deploy(n,{callStatic:r,...i}):this.$call(e,n,{callStatic:r,...i})}]}))))}};var pd=dd;function md(e,t,{interval:n,onNode:r,...i}){var a;null!==(a=n)&&void 0!==a||(n=Ln("microblock",i));const o=new Set,s=async()=>{var n;const i=(null!==(n=(await r.getOracleQueriesByPubkey(e)).oracleQueries)&&void 0!==n?n:[]).filter((({id:e})=>!o.has(e)));i.forEach((e=>{o.add(e.id),t(e)}))};let c=!1;return(async()=>{for(;!c;)await s().catch(console.error),await Ct(n)})(),()=>{c=!0}}async function hd(e,t,{interval:n,onNode:r,...i}){var a;let o,s,c;null!==(a=n)&&void 0!==a||(n=Ln("microblock",i));do{({response:c,ttl:s}=await r.getOracleQueryByPubkeyAndQueryId(e,t));const a=$t(c);if(a.length>0)return a.toString();await Ct(n),o=await jn({...i,onNode:r,cached:!0})}while(s>=o);throw new J(o)}async function gd(e,t,n){const r=await n.onNode.getOracleQueryByPubkeyAndQueryId(e,t);return{...r,decodedQuery:$t(r.query).toString(),decodedResponse:$t(r.response).toString(),respond:async(e,r)=>Cd(t,e,{...n,...r}),pollForResponse:async r=>hd(e,t,{...n,...r})}}async function fd(e,t,n){const r=n.onAccount.address,i=await na({_isInternalBuild:!0,...n,tag:vn.OracleQueryTx,oracleId:e,senderId:r,query:t}),{nonce:a}=ra(i,vn.OracleQueryTx),o=xn(r,a,e);return{...await eA(i,n),...await gd(e,o,n)}}async function yd(e){const t=Yt($t(e.onAccount.address),Rt.OracleAddress),n=await na({_isInternalBuild:!0,...e,tag:vn.OracleExtendTx,oracleId:t});return{...await eA(n,e),...await Id(t,e)}}async function Cd(e,t,n){const r=Yt($t(n.onAccount.address),Rt.OracleAddress),i=await na({_isInternalBuild:!0,...n,tag:vn.OracleResponseTx,oracleId:r,queryId:e,response:t});return{...await eA(i,n),...await Id(r,n)}}async function Id(e,t){return{...await t.onNode.getOracleByPubkey(e),queries:(await t.onNode.getOracleQueriesByPubkey(e)).oracleQueries,...It({pollQueries:md,postQuery:fd,respondToQuery:Cd,extendOracle:yd,getQuery:gd},(([n,r])=>[n,(...i)=>{const a=i[i.length-1];return null!=a&&"object"==typeof a&&a.constructor===Object?Object.assign(a,{...t,...a}):i.push(t),r(...["extendOracle","respondToQuery"].includes(n)?[]:[e],...i)}]))}}async function wd(e,t,n){const r=n.onAccount.address,i=await na({_isInternalBuild:!0,...n,tag:vn.OracleRegisterTx,accountId:r,queryFormat:e,responseFormat:t});return{...await eA(i,n),...await Id(Yt($t(r),Rt.OracleAddress),n)}}async function Ed(e,t,n){return eA(await na({_isInternalBuild:!0,...n,tag:vn.SpendTx,senderId:n.onAccount.address,recipientId:await cr(t,"account_pubkey",n),amount:e}),n)}async function Bd(e,t,n){if(+e<0||+e>1)throw new L("fraction","a number between 0 and 1",e);const r=await cr(t,"account_pubkey",n),i=n.onAccount.address,a=new _(await Kn.bind(n.onAccount)(i,n)),o=a.times(e).integerValue(_.ROUND_HALF_UP),{fee:s}=ra(await na({_isInternalBuild:!0,...n,tag:vn.SpendTx,senderId:i,recipientId:r,amount:o}),vn.SpendTx),c=o.plus(s).gt(a)?a.minus(s):o;return eA(await na({_isInternalBuild:!0,...n,tag:vn.SpendTx,senderId:i,recipientId:r,amount:c}),n)}async function Nd(e,t){return eA(await na({_isInternalBuild:!0,...t,tag:vn.PayingForTx,payerId:t.onAccount.address,tx:e}),t)}var bd=n(8287).Buffer;async function vd(e,t,{onAccount:n,onCompiler:r,onNode:i,bytecode:a,aci:o,sourceCodePath:s,sourceCode:c,fileSystem:u,...l}){var A;const d=n.address;if("generalized"===(await Jn(d,{onNode:i})).kind)throw new H(`Account ${d} is already GA`);const p=await pd.initialize({onAccount:n,onCompiler:r,onNode:i,bytecode:a,aci:o,sourceCodePath:s,sourceCode:c,fileSystem:u}),m=await na({_isInternalBuild:!0,...l,tag:vn.GaAttachTx,onNode:i,code:await p.$compile(),gasLimit:null!==(A=l.gasLimit)&&void 0!==A?A:await p._estimateGas("init",t,l),ownerId:d,callData:p._calldata.encode(p._name,"init",t),authFun:en(e)}),{hash:h,rawTx:g}=await eA(m,{onNode:i,onAccount:n,onCompiler:r,...l}),f=aa(g);return Object.freeze({owner:d,transaction:h,rawTx:g,gaContractId:f})}async function Sd(e,{fee:t,gasPrice:n,onNode:r}){const{nodeNetworkId:i,consensusProtocolVersion:a}=await r.getNodeInfo();let o=en(wt([bd.from(i),$t(e)]));if(a===Bn.Ceres){if(null==t)throw new L("fee","provided (in Ceres)",t);if(null==n)throw new L("gasPrice","provided (in Ceres)",n);o=en($t(ta({tag:vn.GaMetaTxAuthData,fee:t,gasPrice:n,txHash:Yt(o,Rt.TxHash)})))}return o}async function Td(e,{onNode:t}){const n=ra(e,vn.SignedTx);if(n.encodedTx.tag!==vn.GaMetaTx)throw new L("transaction","to include GaMetaTx",vn[n.encodedTx.tag]);return Sd(ta(n.encodedTx.tx.encodedTx),{fee:n.encodedTx.fee,gasPrice:n.encodedTx.gasPrice,onNode:t})}var xd=n(4997),_d=n(2321),Qd=n(2231);function Pd(e){return Pd="function"==typeof _d&&"symbol"==typeof Qd?function(e){return typeof e}:function(e){return e&&"function"==typeof _d&&e.constructor===_d&&e!==_d.prototype?"symbol":typeof e},Pd(e)}var zd=n(9280);function Rd(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Pd(e)||!e)return e;var n=e[zd];if(void 0!==n){var r=n.call(e,"string");if("object"!=Pd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pd(t)?t:String(t)}(t))in e?xd(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const kd={...t,sendTransaction:eA,...a,...s,...o,createDelegationSignature:async function(e,t,{onAccount:n,omitAddress:r,isOracle:i,...a}){if(t.length>1)throw new L("ids","shorter than 2",t);const{nodeNetworkId:o,consensusProtocolVersion:s}=await a.onNode.getNodeInfo(),c={networkId:o,consensusProtocolVersion:s};if(0===t.length){if(!0===r)throw new L("omitAddress","equal false",r);return $t(await n.signDelegationToContract(e,{...c,isOracle:i}))}const[u]=t;if(On(u)){if(!0===r)throw new L("omitAddress","equal false",r);return $t(await n.signNameDelegationToContract(e,u,c))}if(function(e){if(!e.startsWith("oq_"))throw new L("oq","oracle query",e)}(u),!0!==r)throw new L("omitAddress","equal true",r);return $t(await n.signOracleQueryDelegationToContract(e,u,c))},...c};var Od=new WeakMap;class Md{constructor(e={}){var t,n,r;Rd(this,"_options",{}),r={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Od),n.set(t,r),Object.assign(this._options,e),ui(this,Od,{onAccount:vt((()=>this._options.onAccount)),onNode:vt((()=>this._options.onNode)),onCompiler:vt((()=>this._options.onCompiler))})}getContext(e={}){return{...this._options,...li(this,Od),...e}}async buildTx(e){return na({...this.getContext(),...e})}async initializeContract(e){return pd.initialize(this.getContext(e))}}Object.assign(Md.prototype,It(kd,(([e,t])=>[e,function(...e){e.length=t.length;const n=e[e.length-1];return e[e.length-1]=this.getContext(n),t(...e)}])));var Dd=Md;var qd=new WeakMap;class Fd extends Dd{constructor({nodes:e=[],...t}={}){var n,r,i;super(t),Rd(this,"pool",new Map),i={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=qd),r.set(n,i),e.forEach((({name:e,instance:t},n)=>this.addNode(e,t,0===n))),ui(this,qd,{onNode:vt((()=>this.api)),onCompiler:vt((()=>this.compilerApi)),onAccount:vt((()=>this._resolveAccount()))})}get compilerApi(){if(null==this._options.onCompiler)throw new M("You can't use Compiler API. Compiler is not ready!");return this._options.onCompiler}get api(){return this.ensureNodeConnected(),this.pool.get(this.selectedNodeName)}addNode(e,t,n=!1){if(this.pool.has(e))throw new qe(e);this.pool.set(e,t),(n||null==this.selectedNodeName)&&this.selectNode(e)}selectNode(e){if(!this.pool.has(e))throw new Fe(`Node with name ${e} not in pool`);this.selectedNodeName=e}isNodeConnected(){return null!=this.selectedNodeName}ensureNodeConnected(){if(!this.isNodeConnected())throw new Fe("You can't use Node API. Node is not connected or not defined!")}async getNodeInfo(){return this.ensureNodeConnected(),{name:this.selectedNodeName,...await this.api.getNodeInfo()}}async getNodesInPool(){return Promise.all(Array.from(this.pool.entries()).map((async([e,t])=>({name:e,...await t.getNodeInfo()}))))}addresses(){return[]}_resolveAccount(e=this._options.onAccount){if("string"==typeof e)throw new ee("Address in AccountResolver");if("object"==typeof e)return e;throw new W(`Account should be an address (ak-prefixed string), or instance of AccountBase, got ${String(e)} instead`)}get address(){return this._resolveAccount().address}async sign(e,{onAccount:t,...n}={}){return this._resolveAccount(t).sign(e,n)}async signTransaction(e,{onAccount:t,...n}={}){const r=null!==this.selectedNodeName?await this.api.getNetworkId():void 0;return this._resolveAccount(t).signTransaction(e,{networkId:r,...n})}async signMessage(e,{onAccount:t,...n}={}){return this._resolveAccount(t).signMessage(e,n)}async signTypedData(e,t,{onAccount:n,...r}={}){return this._resolveAccount(n).signTypedData(e,t,r)}async signDelegationToContract(e,{onAccount:t,...n}={}){var r,i;return null!==(r=n.networkId)&&void 0!==r||(n.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),null!==(i=n.consensusProtocolVersion)&&void 0!==i||(n.consensusProtocolVersion=null!==this.selectedNodeName?(await this.api.getNodeInfo()).consensusProtocolVersion:void 0),this._resolveAccount(t).signDelegationToContract(e,n)}async signNameDelegationToContract(e,t,{onAccount:n,...r}={}){var i,a;return null!==(i=r.networkId)&&void 0!==i||(r.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),null!==(a=r.consensusProtocolVersion)&&void 0!==a||(r.consensusProtocolVersion=null!==this.selectedNodeName?(await this.api.getNodeInfo()).consensusProtocolVersion:void 0),this._resolveAccount(n).signNameDelegationToContract(e,t,r)}async signAllNamesDelegationToContract(e,{onAccount:t,...n}={}){var r,i;return null!==(r=n.networkId)&&void 0!==r||(n.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),null!==(i=n.consensusProtocolVersion)&&void 0!==i||(n.consensusProtocolVersion=null!==this.selectedNodeName?(await this.api.getNodeInfo()).consensusProtocolVersion:void 0),this._resolveAccount(t).signAllNamesDelegationToContract(e,n)}async signOracleQueryDelegationToContract(e,t,{onAccount:n,...r}={}){var i,a;return null!==(i=r.networkId)&&void 0!==i||(r.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),null!==(a=r.consensusProtocolVersion)&&void 0!==a||(r.consensusProtocolVersion=null!==this.selectedNodeName?(await this.api.getNodeInfo()).consensusProtocolVersion:void 0),this._resolveAccount(n).signOracleQueryDelegationToContract(e,t,r)}async signDelegation(e,{onAccount:t,...n}={}){var r;return null!==(r=n.networkId)&&void 0!==r||(n.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),this._resolveAccount(t).signDelegation(e,n)}getContext(e={}){return{...this._options,...li(this,qd),...e,...null!=e.onAccount&&{onAccount:this._resolveAccount(e.onAccount)}}}}class Ud extends Fd{constructor({accounts:e,...t}={}){super(t),Rd(this,"accounts",{}),e?.forEach(((e,t)=>this.addAccount(e,{select:0===t})))}_resolveAccount(e=this.selectedAddress){if("string"==typeof e){const t=e;if($t(t),null==this.accounts[t])throw new ae(e);e=this.accounts[t]}return super._resolveAccount(e)}addresses(){return Object.keys(this.accounts)}addAccount(e,{select:t}={}){const{address:n}=e;this.accounts[n]=e,!0===t&&this.selectAccount(n)}removeAccount(e){if(null==this.accounts[e])throw new ae(e);delete this.accounts[e],this.selectedAddress===e&&delete this.selectedAddress}selectAccount(e){if($t(e),null==this.accounts[e])throw new ae(e);this.selectedAddress=e}}let Gd=function(e){return e.to_waellet="to_waellet",e.to_aepp="to_aepp",e}({}),Ld=function(e){return e.window="window",e.extension="extension",e}({}),Hd=function(e){return e.subscribe="subscribe",e.unsubscribe="unsubscribe",e}({}),jd=function(e){return e.readyToConnect="connection.announcePresence",e.updateAddress="address.update",e.address="address.get",e.connect="connection.open",e.unsafeSign="data.unsafeSign",e.sign="transaction.sign",e.signMessage="message.sign",e.signTypedData="typedData.sign",e.signDelegationToContract="delegationToContract.sign",e.signDelegation="delegation.sign",e.subscribeAddress="address.subscribe",e.updateNetwork="networkId.update",e.closeConnection="connection.close",e}({}),Vd=function(e){return e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.WAITING_FOR_CONNECTION_REQUEST="WAITING_FOR_CONNECTION_REQUEST",e}({});const $d=[];class Yd extends P{toJSON(){return{code:this.code,message:this.message,data:this.data}}static deserialize(e){const t=$d.find((t=>t.code===e.code));if(null==t)throw new re(`Can't find RpcError with code: ${e.code}`);return new t(e.data)}}class Jd extends Yd{constructor(e){super("Invalid transaction"),Rd(this,"code",2),this.data=e,this.name="RpcInvalidTransactionError"}}Rd(Jd,"code",2),$d.push(Jd);class Kd extends Yd{constructor(e){super("Operation rejected by user"),Rd(this,"code",4),this.data=e,this.name="RpcRejectedByUserError"}}Rd(Kd,"code",4),$d.push(Kd);class Wd extends Yd{constructor(){super("Unsupported Protocol Version"),Rd(this,"code",5),this.name="RpcUnsupportedProtocolError"}}Rd(Wd,"code",5),$d.push(Wd);class Xd extends Yd{constructor(e){super("Wallet deny your connection request"),Rd(this,"code",9),this.data=e,this.name="RpcConnectionDenyError"}}Rd(Xd,"code",9),$d.push(Xd);class Zd extends Yd{constructor(){super("You are not connected to the wallet"),Rd(this,"code",10),this.name="RpcNotAuthorizeError"}}Rd(Zd,"code",10),$d.push(Zd);class ep extends Yd{constructor(e){super(`You are not subscribed for account ${e}`),Rd(this,"code",11),this.data=e,this.name="RpcPermissionDenyError"}}Rd(ep,"code",11),$d.push(ep);class tp extends Yd{constructor(){super("The peer failed to execute your request due to unknown error"),Rd(this,"code",12),this.name="RpcInternalError"}}Rd(tp,"code",12),$d.push(tp);class np extends Yd{constructor(){super("Method not found"),Rd(this,"code",-32601),this.name="RpcMethodNotFoundError"}}Rd(np,"code",-32601),$d.push(np);var rp=n(8287).Buffer;class ip extends xl{constructor(e,t){super(),this._rpcClient=e,this.address=t}async sign(e){const t=Yt(rp.from(e),Rt.Bytearray),{signature:n}=await this._rpcClient.request(jd.unsafeSign,{onAccount:this.address,data:t});return $t(n)}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null==n)throw new L("networkId","provided",n);const r=await this._rpcClient.request(jd.sign,{onAccount:this.address,tx:e,returnSigned:!0,networkId:n,innerTx:t});if(null==r.signedTransaction)throw new Z("signedTransaction is missed in wallet response");return r.signedTransaction}async signMessage(e){const{signature:t}=await this._rpcClient.request(jd.signMessage,{onAccount:this.address,message:e});return rp.from(t,"hex")}async signTypedData(e,t,{name:n,version:r,contractAddress:i,networkId:a}={}){const{signature:o}=await this._rpcClient.request(jd.signTypedData,{onAccount:this.address,domain:{name:n,version:r,networkId:a,contractAddress:i},aci:t,data:e});return o}async signDelegationToContract(e,{consensusProtocolVersion:t,isOracle:n}={}){if(null==n){const e=null!=t?Bn[t]:"unknown";console.warn(`AccountRpc:signDelegationToContract: isOracle is not set. By default, sdk would generate an AENS preclaim delegation signature, but it won't be the same as the oracle delegation signature in Ceres (current protocol is ${e}).`)}if(t===Bn.Ceres){const t=Fl({tag:!0===n?Ol.Oracle:Ol.AensPreclaim,accountAddress:this.address,contractAddress:e});return this.signDelegation(t)}const{signature:r}=await this._rpcClient.request(jd.signDelegationToContract,{onAccount:this.address,contractAddress:e,isOracle:n});return r}async signNameDelegationToContract(e,t,{consensusProtocolVersion:n}={}){if(n===Bn.Ceres){const n=Fl({tag:Ol.AensName,accountAddress:this.address,contractAddress:e,nameId:t});return this.signDelegation(n)}const{signature:r}=await this._rpcClient.request(jd.signDelegationToContract,{onAccount:this.address,contractAddress:e,name:t});return r}async signAllNamesDelegationToContract(e,{consensusProtocolVersion:t}={}){if(t===Bn.Ceres){const t=Fl({tag:Ol.AensWildcard,accountAddress:this.address,contractAddress:e});return this.signDelegation(t)}const{signature:n}=await this._rpcClient.request(jd.signDelegationToContract,{onAccount:this.address,contractAddress:e,allNames:!0});return n}async signOracleQueryDelegationToContract(e,t,{consensusProtocolVersion:n}={}){if(n===Bn.Ceres){const n=Fl({tag:Ol.OracleResponse,queryId:t,contractAddress:e});return this.signDelegation(n)}const{signature:r}=await this._rpcClient.request(jd.signDelegationToContract,{onAccount:this.address,contractAddress:e,oracleQueryId:t});return r}async signDelegation(e){const{signature:t}=await this._rpcClient.request(jd.signDelegation,{delegation:e,onAccount:this.address});return t}}function ap(e,t){sp(e,t),t.add(e)}function op(e,t,n){sp(e,t),t.set(e,n)}function sp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cp(e,t,n){return function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(t,e),n}var up=new WeakMap,lp=new WeakMap,Ap=new WeakMap,dp=new WeakSet,pp=new WeakSet,mp=new WeakSet,hp=new WeakSet;class gp{constructor(e,t,n){ap(this,hp),ap(this,mp),ap(this,pp),ap(this,dp),op(this,up,{writable:!0,value:new Map}),op(this,lp,{writable:!0,value:0}),op(this,Ap,{writable:!0,value:void 0}),this.connection=e,ui(this,Ap,n),e.connect(cp(this,dp,fp).bind(this),t)}async request(e,t){return cp(this,pp,yp).call(this,ui(this,lp,li(this,lp)+1),e,t),new Promise(((e,t)=>{li(this,up).set(li(this,lp),{resolve:e,reject:t})}))}notify(e,t){cp(this,pp,yp).call(this,void 0,e,t)}}async function fp(e,t){if("2.0"!==e?.jsonrpc)throw new ue(JSON.stringify(e));if("result"in e||"error"in e)return void cp(this,hp,Ip).call(this,e);const n=e;let r,i;try{if(!(n.method in li(this,Ap)))throw new np;const e=n.method;r=await li(this,Ap)[e](n.params,t)}catch(e){bt(e),i=e}if(null!=n.id&&cp(this,mp,Cp).call(this,n.id,n.method,r,null==i||i instanceof Yd?i:new tp),null!=i&&!(i instanceof Yd))throw i}function yp(e,t,n){this.connection.sendMessage({jsonrpc:"2.0",...null!=e?{id:e}:{},method:t,...null!=n?{params:n}:{}})}function Cp(e,t,n,r){this.connection.sendMessage({jsonrpc:"2.0",id:e,method:t,...null!=r?{error:r.toJSON()}:{result:n}})}function Ip({id:e,error:t,result:n}){const r=li(this,up).get(e);if(null==r)throw new le(e);null!=t?r.reject(Yd.deserialize(t)):r.resolve(n),li(this,up).delete(e)}class wp extends Fd{constructor({name:e,onAddressChange:t=(()=>{}),onDisconnect:n=(()=>{}),onNetworkChange:r=(()=>{}),...i}){super(i),this.onAddressChange=t,this.onDisconnect=n,this.onNetworkChange=r,this.name=e}_resolveAccount(e=this.addresses()[0]){if("string"==typeof e){const t=e;if($t(t),!this.addresses().includes(t))throw new Ae(t);this._ensureConnected(),e=new ip(this.rpcClient,t)}return null==e&&this._ensureAccountAccess(),super._resolveAccount(e)}addresses(){if(null==this._accounts)return[];const e=Object.keys(this._accounts.current)[0];return[...null!=e?[e]:[],...Object.keys(this._accounts.connected)]}async connectToWallet(e,{connectNode:t=!1,name:n="wallet-node"}={}){if(null!=this.rpcClient)throw new Ke("You are already connected to wallet");let r;const i=e=>{if(t){if(null==e.node?.url)throw new Xe("Missing URLs of the Node");this.pool.delete(n),this.addNode(n,new Sl(e.node.url),!0)}this.onNetworkChange(e)},a=new gp(e,(()=>{delete this.rpcClient,delete this._accounts,this.onDisconnect(r)}),{[jd.updateAddress]:e=>{this._accounts=e,this.onAddressChange(e)},[jd.updateNetwork]:i,[jd.closeConnection]:e=>{r=e,a.connection.disconnect()},[jd.readyToConnect]:()=>{}}),o=await a.request(jd.connect,{name:this.name,version:1,connectNode:t});return i(o),this.rpcClient=a,o}disconnectWallet(){this._ensureConnected(),this.rpcClient.notify(jd.closeConnection,{reason:"bye"}),this.rpcClient.connection.disconnect()}async askAddresses(){return this._ensureAccountAccess(),this.rpcClient.request(jd.address,void 0)}async subscribeAddress(e,t){this._ensureConnected();const n=await this.rpcClient.request(jd.subscribeAddress,{type:e,value:t});return this._accounts=n.address,n}_ensureConnected(){if(null==this.rpcClient)throw new We("You are not connected to Wallet")}_ensureAccountAccess(){if(this._ensureConnected(),0===this.addresses().length)throw new pe}}var Ep=n(1013);const Bp=n.n(Ep)()({storeAsString:!0}),Np=e=>{if("object"==typeof e&&null!==e&&e.constructor===Object)return It(e,(([e,t])=>[e,Np(t)]));if(Array.isArray(e))return e.map((e=>Np(e)));if("string"==typeof e&&new _(e).toString(10)===e){const t=new _(e);return t.toJSON=()=>t.toString(10),t}return e};var bp={stringify:(...e)=>Bp.stringify(Np(e[0]),...e.slice(1)),parse:Bp.parse},vp=n(8287).Buffer;class Sp extends Ud{constructor({name:e,id:t,type:n,onConnection:r,onSubscription:i,onDisconnect:a,onAskAccounts:o,...s}){super(s),Rd(this,"_clients",new Map),this.onConnection=r,this.onSubscription=i,this.onDisconnect=a,this.onAskAccounts=o,this.name=e,this.id=t,this._type=n}_getAccountsForClient({addressSubscription:e}){const{current:t,connected:n}=this.getAccounts();return{current:e.has("current")||e.has("connected")?t:{},connected:e.has("connected")?n:{}}}_pushAccountsToApps(){null!=this._clients&&Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).filter((e=>0!==e.addressSubscription.size)).forEach((e=>e.rpc.notify(jd.updateAddress,this._getAccountsForClient(e))))}selectAccount(e){super.selectAccount(e),this._pushAccountsToApps()}addAccount(e,t){super.addAccount(e,t),this._pushAccountsToApps()}_getNode(){return this.ensureNodeConnected(),{node:{url:this.api.$host,name:this.selectedNodeName}}}async selectNode(e){super.selectNode(e);const t=await this.api.getNetworkId();Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).forEach((e=>{e.rpc.notify(jd.updateNetwork,{networkId:t,...e.connectNode&&this._getNode()})}))}_getClient(e){const t=this._clients.get(e);if(null==t)throw new de(e);return t}_isRpcClientConnected(e){return Vd.CONNECTED===this._getClient(e).status&&this._getClient(e).rpc.connection.isConnected()}_disconnectRpcClient(e){const t=this._getClient(e);t.rpc.connection.disconnect(),t.status=Vd.DISCONNECTED,t.addressSubscription=new Set}removeRpcClient(e){this._disconnectRpcClient(e),this._clients.delete(e)}addRpcClient(e){const t=fA();let n;const r={id:t,status:Vd.WAITING_FOR_CONNECTION_REQUEST,addressSubscription:new Set,connectNode:!1,rpc:new gp(e,(()=>{this._clients.delete(t),this.onDisconnect(t,n)}),{[jd.closeConnection]:e=>{n=e,this._disconnectRpcClient(t)},[jd.connect]:async({name:e,version:n,icons:i,connectNode:a},o)=>{if(1!==n)throw new Wd;return await this.onConnection(t,{name:e,icons:i,connectNode:a},o),r.status=Vd.CONNECTED,r.connectNode=a,{...await this.getWalletInfo(),...a&&this._getNode()}},[jd.subscribeAddress]:async({type:e,value:n},i)=>{if(!this._isRpcClientConnected(t))throw new Zd;switch(e){case Hd.subscribe:await this.onSubscription(t,{type:e,value:n},i),r.addressSubscription.add(n);break;case Hd.unsubscribe:r.addressSubscription.delete(n);break;default:throw new re(`Unknown subscription type: ${e}`)}return{subscription:Array.from(r.addressSubscription),address:this._getAccountsForClient(r)}},[jd.address]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Zd;return await this.onAskAccounts(t,e,n),this.addresses()},[jd.sign]:async({tx:e,onAccount:n=this.address,returnSigned:r,innerTx:i},a)=>{if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(n))throw new ep(n);const o={onAccount:n,aeppOrigin:a,aeppRpcClientId:t,innerTx:i};if(r||!0===i)return{signedTransaction:await this.signTransaction(e,o)};try{return bp.parse(bp.stringify({transactionHash:await this.sendTransaction(e,{...o,verify:!1})}))}catch(t){const n=await Xl(e,this.api);if(n.length>0)throw new Jd(n);throw t}},[jd.signMessage]:async({message:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(n))throw new ep(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:vp.from(await this.signMessage(e,i)).toString("hex")}},[jd.signTypedData]:async({domain:e,aci:n,data:r,onAccount:i=this.address},a)=>{if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(i))throw new ep(i);const o={...e,onAccount:i,aeppOrigin:a,aeppRpcClientId:t};return{signature:await this.signTypedData(r,n,o)}},[jd.signDelegationToContract]:async({contractAddress:e,name:n,oracleQueryId:r,allNames:i,onAccount:a=this.address,isOracle:o},s)=>{var c,u,l,A;if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(a))throw new ep(a);null!==(c=o)&&void 0!==c||(o=!1);const d={onAccount:a,aeppOrigin:s,aeppRpcClientId:t};return{signature:await(null!==(u=null!==(l=null!==(A=null==n?null:this.signNameDelegationToContract(e,n,d))&&void 0!==A?A:null==r?null:this.signOracleQueryDelegationToContract(e,r,d))&&void 0!==l?l:!0!==i?null:this.signAllNamesDelegationToContract(e,d))&&void 0!==u?u:this.signDelegationToContract(e,{...d,isOracle:o}))}},[jd.unsafeSign]:async({data:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(n))throw new ep(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Yt(await this.sign($t(e),i),Rt.Signature)}},[jd.signDelegation]:async({delegation:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Zd;if(!this.addresses().includes(n))throw new ep(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:await this.signDelegation(e,i)}}})};return this._clients.set(t,r),t}async shareWalletInfo(e){this._getClient(e).rpc.notify(jd.readyToConnect,await this.getWalletInfo())}async getWalletInfo(){return{id:this.id,name:this.name,networkId:await this.api.getNetworkId(),origin:window.location.origin,type:this._type}}getAccounts(){return{current:null!=this.selectedAddress?{[this.selectedAddress]:{}}:{},connected:this.addresses().filter((e=>e!==this.selectedAddress)).reduce(((e,t)=>({...e,[t]:{}})),{})}}}var Tp=new WeakMap;class xp extends xl{constructor(e){var t,n,r;super(),r={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Tp),n.set(t,r),$t(e),this.address=e}async sign(){throw new ee("Can't sign using generalized account")}async signMessage(){throw new ee("Can't sign using generalized account")}async signTypedData(){throw new ee("Can't sign using generalized account")}async signDelegationToContract(){throw new ee("signing delegation to contract using generalized account")}async signNameDelegationToContract(){throw new ee("signing delegation to contract using generalized account")}async signAllNamesDelegationToContract(){throw new ee("signing delegation to contract using generalized account")}async signOracleQueryDelegationToContract(){throw new ee("signing delegation to contract using generalized account")}async signDelegation(){throw new ee("signing delegation using generalized account")}async signTransaction(e,{authData:t,onCompiler:n,onNode:r}){if(null==t||null==n||null==r)throw new L("authData, onCompiler, onNode","provided",null);const{callData:i,sourceCode:a,args:o,fee:s,gasLimit:c,gasPrice:u}="function"==typeof t?await t(e):t,l=null!=i?i:await(async()=>{if(null==li(this,Tp)){const e=await Jn(this.address,{onNode:r});if("generalized"!==e.kind)throw new L("account kind","generalized",e.kind);ui(this,Tp,e.authFun)}if(null==li(this,Tp))throw new re("Account in generalised, but authFun not provided");if(null==a||null==o)throw new Ie("Auth data must contain sourceCode and args or callData.");const e=await pd.initialize({onCompiler:n,onNode:r,sourceCode:a});return e._calldata.encode(e._name,li(this,Tp),o)})(),A=await na({tag:vn.GaMetaTx,tx:{tag:vn.SignedTx,encodedTx:$t(e),signatures:[]},gaId:this.address,authData:l,fee:s,gasLimit:c,gasPrice:u,onNode:r});return ta({tag:vn.SignedTx,encodedTx:$t(A),signatures:[]})}}var _p=n(8287).Buffer;const Qp=224;class Pp extends xl{constructor(e,t,n){super(),this.transport=e,this.index=t,this.address=n,e.decorateAppAPIMethods(this,["signTransaction","signMessage"],"w0w")}async sign(){throw new ee("RAW signing using Ledger HW")}async signTypedData(){throw new ee("Typed data signing using Ledger HW")}async signDelegationToContract(){throw new ee("signing delegation to contract using Ledger HW")}async signNameDelegationToContract(){throw new ee("signing delegation to contract using Ledger HW")}async signAllNamesDelegationToContract(){throw new ee("signing delegation to contract using Ledger HW")}async signOracleQueryDelegationToContract(){throw new ee("signing delegation to contract using Ledger HW")}async signDelegation(){throw new ee("signing delegation using Ledger HW")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new ee("innerTx option in AccountLedger");if(null==n)throw new L("networkId","provided",n);const r=$t(e);let i=0;const a=_p.from(n),o=[];for(;i!==r.length;){const e=0===i?141-a.length:150,t=i+e>r.length?r.length-i:e,n=_p.alloc(0===i?9+a.length+t:t);if(0===i){let e=n.writeUInt32BE(this.index,0);e=n.writeUInt32BE(r.length,e),e=n.writeUInt8(a.length,e),e+=a.copy(n,e,0,a.length),r.copy(n,e,0,150-e)}else r.copy(n,0,i,i+t);o.push(n),i+=t}const s=await o.reduce((async(e,t,n)=>(await e,this.transport.send(Qp,4,0===n?0:128,0,t))),Promise.resolve(_p.alloc(0))),c=[s.subarray(0,64)];return ta({tag:vn.SignedTx,encodedTx:r,signatures:c})}async signMessage(e){let t=0;const n=_p.from(e),r=[];for(;t!==n.length;){const e=0===t?142:150,i=t+e>n.length?n.length-t:e,a=_p.alloc(0===t?8+i:i);0===t?(a.writeUInt32BE(this.index,0),a.writeUInt32BE(n.length,4),n.copy(a,8,t,t+i)):n.copy(a,0,t,t+i),r.push(a),t+=i}const i=await r.reduce((async(e,t,n)=>(await e,this.transport.send(Qp,8,0===n?0:128,0,t))),Promise.resolve(_p.alloc(0)));return i.subarray(0,64)}}var zp=n(8287).Buffer;class Rp{constructor(e){this.transport=e,this.versionCheckPromise=this.getAppConfiguration().then((({version:e})=>{const t=[e,"0.4.4","0.5.0"];if(!_r(...t))throw new te("app on ledger",...t)})),e.decorateAppAPIMethods(this,["getAddress","getAppConfiguration"],"w0w")}async getAppConfiguration(){await this.versionCheckPromise;const e=await this.transport.send(Qp,6,0,0);return{version:[e[1],e[2],e[3]].join(".")}}async getAddress(e,t=!1){await this.versionCheckPromise;const n=zp.alloc(4);n.writeUInt32BE(e,0);const r=await this.transport.send(Qp,2,t?1:0,0,n),i=r[0];return r.subarray(1,1+i).toString("ascii")}async initialize(e){return await this.versionCheckPromise,new Pp(this.transport,e,await this.getAddress(e))}async discover(e){let t=0;const n=[];let r;do{null!=r&&n.push(r),r=await this.initialize(t),t+=1}while(await e.getAccountByPubkey(r.address).then((()=>!0),(()=>!1)));return n}}class kp{}const Op={type:{name:"Composite",className:"Contract",modelProperties:{code:{serializedName:"code",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},Mp={type:{name:"Composite",className:"CompileOpts",modelProperties:{fileSystem:{serializedName:"file_system",type:{name:"Dictionary",value:{type:{name:"any"}}}},srcFile:{serializedName:"src_file",type:{name:"String"}}}}},Dp={type:{name:"Composite",className:"CompilerError",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},pos:{serializedName:"pos",type:{name:"Composite",className:"ErrorPos"}},message:{serializedName:"message",required:!0,type:{name:"String"}},context:{serializedName:"context",type:{name:"String"}}}}},qp={type:{name:"Composite",className:"ErrorPos",modelProperties:{file:{serializedName:"file",type:{name:"String"}},line:{serializedName:"line",required:!0,type:{name:"Number"}},col:{serializedName:"col",required:!0,type:{name:"Number"}}}}},Fp={type:{name:"Composite",className:"CompileResult",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},aci:{serializedName:"aci",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}},warnings:{serializedName:"warnings",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}}}}},Up={type:{name:"Composite",className:"SophiaCallResultInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},Gp={type:{name:"Composite",className:"BytecodeCallResultInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},Lp={type:{name:"Composite",className:"DecodedCallresult",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Hp={type:{name:"Composite",className:"FunctionCallInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},jp={type:{name:"Composite",className:"Calldata",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}}}}},Vp={type:{name:"Composite",className:"DecodeCalldataBytecode",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},$p={type:{name:"Composite",className:"DecodedCalldata",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},Yp={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}}}}},Jp={type:{name:"Composite",className:"DecodeCalldataSource",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}}}}},Kp={type:{name:"Composite",className:"ByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Wp={type:{name:"Composite",className:"FateAssembler",modelProperties:{fateAssembler:{serializedName:"fate-assembler",required:!0,type:{name:"String"}}}}},Xp={type:{name:"Composite",className:"ValidateByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},Zp={type:{name:"Composite",className:"CompilerVersion",modelProperties:{version:{serializedName:"version",required:!0,type:{name:"String"}}}}},em={type:{name:"Composite",className:"ApiVersion",modelProperties:{apiVersion:{serializedName:"api-version",required:!0,type:{name:"String"}}}}},tm={type:{name:"Composite",className:"SophiaBinaryData",modelProperties:{sophiaType:{serializedName:"sophia-type",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},nm={type:{name:"Composite",className:"SophiaJsonData",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},rm={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},im={parameterPath:"body",mapper:Op},am={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},om={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},sm={parameterPath:"body",mapper:Up},cm={parameterPath:"body",mapper:Gp},um={parameterPath:"body",mapper:Hp},lm={parameterPath:"body",mapper:Vp},Am={parameterPath:"body",mapper:Jp},dm={parameterPath:"body",mapper:Kp},pm={parameterPath:"body",mapper:Xp};class mm extends Rs{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-compiler/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}generateACI(e,t){return this.sendOperationRequest({body:e,options:t},gm)}compileContract(e,t){return this.sendOperationRequest({body:e,options:t},fm)}decodeCallResult(e,t){return this.sendOperationRequest({body:e,options:t},ym)}decodeCallResultBytecode(e,t){return this.sendOperationRequest({body:e,options:t},Cm)}encodeCalldata(e,t){return this.sendOperationRequest({body:e,options:t},Im)}decodeCalldataBytecode(e,t){return this.sendOperationRequest({body:e,options:t},wm)}decodeCalldataSource(e,t){return this.sendOperationRequest({body:e,options:t},Em)}getFateAssemblerCode(e,t){return this.sendOperationRequest({body:e,options:t},Bm)}validateByteCode(e,t){return this.sendOperationRequest({body:e,options:t},Nm)}getCompilerVersion(e,t){return this.sendOperationRequest({body:e,options:t},bm)}version(e){return this.sendOperationRequest({options:e},vm)}apiVersion(e){return this.sendOperationRequest({options:e},Sm)}api(e){return this.sendOperationRequest({options:e},Tm)}}const hm=za(u,!1),gm={path:"/aci",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:im,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},fm={path:"/compile",httpMethod:"POST",responses:{200:{bodyMapper:Fp},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:im,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},ym={path:"/decode-call-result",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"any"}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:sm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},Cm={path:"/decode-call-result/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:Lp},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:cm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},Im={path:"/encode-calldata",httpMethod:"POST",responses:{200:{bodyMapper:jp},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:um,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},wm={path:"/decode-calldata/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:$p},400:{bodyMapper:Yp,isError:!0}},requestBody:lm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},Em={path:"/decode-calldata/source",httpMethod:"POST",responses:{200:{bodyMapper:$p},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Am,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},Bm={path:"/fate-assembler",httpMethod:"POST",responses:{200:{bodyMapper:Wp},400:{bodyMapper:Yp,isError:!0}},requestBody:dm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},Nm={path:"/validate-byte-code",httpMethod:"POST",responses:{200:{},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:pm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},bm={path:"/compiler-version",httpMethod:"POST",responses:{200:{bodyMapper:Zp},400:{bodyMapper:Yp,isError:!0}},requestBody:dm,urlParameters:[om],headerParameters:[rm,am],mediaType:"json",serializer:hm},vm={path:"/version",httpMethod:"GET",responses:{200:{bodyMapper:Zp},500:{bodyMapper:Yp,isError:!0}},urlParameters:[om],headerParameters:[am],serializer:hm},Sm={path:"/api-version",httpMethod:"GET",responses:{200:{bodyMapper:em},500:{bodyMapper:Yp,isError:!0}},urlParameters:[om],headerParameters:[am],serializer:hm},Tm={path:"/api",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Dictionary",value:{type:{name:"any"}}}}},400:{bodyMapper:Yp,isError:!0}},urlParameters:[om],headerParameters:[am],serializer:hm};class xm extends kp{constructor(e,{ignoreVersion:t=!1}={}){let n;super(),this.api=new mm(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[ga("compiler",(async e=>(null!=n||(n=(await this.api.apiVersion(e)).apiVersion),n)),"7.3.0","9.0.0")],ha((e=>{let t="";return"reason"in e&&(t+=` ${e.reason}${null!=e.parameter?` in ${e.parameter}`:""}${null!=e.info?` (${JSON.stringify(e.info)})`:""}`),Array.isArray(e)&&(t+=`\n${e.map((e=>`${e.type}:${e.pos.line}:${e.pos.col}: ${e.message}${null!=e.context?` (${e.context})`:""}`)).join("\n")}`),t}))]}),this.api.pipeline.removePolicy({name:la}),this.api.pipeline.removePolicy({name:Aa})}async compileBySourceCode(e,t){try{var n;const r=await this.api.compileContract({code:e,options:{fileSystem:t}});null!==(n=r.warnings)&&void 0!==n||(r.warnings=[]);const i=r.warnings.map((({type:e,...t})=>t));return{...r,warnings:i}}catch(e){if(e instanceof ft&&400===e.statusCode)throw new M(e.message);throw e}}async compile(e){throw new ee("File system access, use CompilerHttpNode instead")}async generateAciBySourceCode(e,t){try{return await this.api.generateACI({code:e,options:{fileSystem:t}})}catch(e){if(e instanceof ft&&400===e.statusCode)throw new M(e.message);throw e}}async generateAci(e){throw new ee("File system access, use CompilerHttpNode instead")}async validateBySourceCode(e,t,n){try{return await this.api.validateByteCode({bytecode:e,source:t,options:{fileSystem:n}}),!0}catch{return!1}}async validate(e,t){throw new ee("File system access, use CompilerHttpNode instead")}async version(){return(await this.api.version()).version}}function _m(e){return e.replace(/_./g,(e=>e[1].toUpperCase()))}var Qm=n(952);const Pm=1e4,zm=15e3;function Rm(e,...t){const[n,...r]=t;e._eventEmitter.emit(n,...r)}function km(e,t){if(null==t)throw new Ce;e._debug("enter state",t.handler.name),e._fsm=t,null!=t?.handler?.enter&&t.handler.enter(e),Fm(e)}function Om(e,t,n){e._debug(t,`(prev. ${e._status})`,null!=n?n:""),t!==e._status&&(e._status=t,Rm(e,"statusChanged",t))}function Mm(e,t){e._state=t,Rm(e,"stateChanged",t)}function Dm(e,t){e._debug("send message",t.method,t.params),e._websocket.send(bp.stringify({jsonrpc:"2.0",...t}))}function qm(e,t,n={}){Dm(e,{method:t,params:n})}async function Fm(e){if(e._isActionQueueLocked)return;const t=e._actionQueue;if(0===t.length)return;const n=t.findIndex((t=>t.guard(e,e._fsm)));if(-1===n)return;e._actionQueue=t.filter(((e,t)=>n!==t)),e._isActionQueueLocked=!0;const r=await t[n].action(e,e._fsm);e._isActionQueueLocked=!1,km(e,r)}async function Um(e,t){const{handler:n,state:r}=e._fsm,i=await Promise.resolve(n(e,t,r));if(km(e,i),"OffChainNewContract"===t?.params?.data?.updates?.[0]?.op&&"channelOpen"===i?.handler.name){const n=e.round();if(null==n)throw new ie("Round is null");const r=t?.params?.data?.updates?.[0]?.owner;Rm(e,"newContract",tn(r,n+1))}}function Gm(e){e._websocket.close(),clearTimeout(e._pingTimeoutId)}function Lm(e){clearTimeout(e._pingTimeoutId),e._pingTimeoutId=setTimeout((()=>{qm(e,"channels.system",{action:"ping"}),e._pingTimeoutId=setTimeout((()=>{Gm(e),Rm(e,"error",new ge)}),zm)}),Pm)}async function Hm(e,t,n){return new Promise(((r,i)=>{const a=e._nextRpcMessageId;e._nextRpcMessageId+=1,e._rpcCallbacks.set(a,(e=>{if(null!=e.error){var t;const n=null!==(t=e.error.data[0].message)&&void 0!==t?t:"";i(new me(e.error.message+n))}else r(e.result)})),Dm(e,{method:t,id:a,params:n})}))}async function jm(e,t,n,r){var i;let a;if(null!=n.tx)a=await r(n.tx);else{if(null==n.signed_tx)throw new O("Can't find transaction in message");a=await async function(e,t){const{signatures:n,encodedTx:r}=ra(e,vn.SignedTx),i=ta(r),a=await t(i);if("string"==typeof a){const{signatures:e}=ra(a,vn.SignedTx);return ta({tag:vn.SignedTx,signatures:n.concat(e),encodedTx:$t(i)})}return a}(n.signed_tx,r)}const o="string"!=typeof a,s=null!=n.tx?"tx":"signed_tx";return qm(e,t,o?{error:null!==(i=a)&&void 0!==i?i:1}:{[s]:a}),o}function Vm(e,t,n){return n?.reject?.(Object.assign(new fe(`Unexpected message received:\n\n${JSON.stringify(t)}`),{wsMessage:t})),{handler:Zm}}function $m(e,t,n,r){if(null!=r&&"channels.update"===t.method)return r(e,t,n);if("channels.conflict"===t.method)return n.resolve({accepted:!1,errorCode:t.params.data.error_code,errorMessage:t.params.data.error_msg}),{handler:Zm};if("channels.info"===t.method&&"aborted_update"===t.params.data.event)return n.resolve({accepted:!1}),{handler:Zm};if(null!=t.error){const e=t.error.data.map((e=>e.code));return e.includes(1001)?n.reject(new V("Insufficient balance")):e.includes(1002)?n.reject(new H("Amount cannot be negative")):n.reject(new he(t.error.message)),{handler:Zm}}return Vm(0,t,n)}function Ym(e,t){if("channels.info"===t.method){const n=t.params.data.event;let r=null;return"channel_accept"===n&&(r="accepted"),"funding_created"===n&&(r="halfSigned"),null!=r?(Om(e,r),{handler:Km}):"channel_reestablished"===t.params.data.event?{handler:Xm}:"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:Ym}):{handler:Ym}}if("channels.error"===t.method)return Rm(e,"error",new he(t?.payload?.message)),{handler:rh}}async function Jm(e,t,n){if("channels.info"===t.method&&"fsm_up"===t.params.data.event){e._fsmId=t.params.data.fsm_id;const{signedTx:n}=await e.state();return Mm(e,null==n?"":ta(n)),{handler:Zm}}return Vm(0,t,n)}async function Km(e,t){const n="initiator"===e._options.role?"initiator_sign":"responder_sign";if(t.method===`channels.sign.${n}`)return await jm(e,`channels.${n}`,t.params.data,(async t=>e._options.sign(n,t))),{handler:Wm}}function Wm(e,t){if("channels.on_chain_tx"===t.method){const{info:n}=t.params.data,{role:r}=e._options;if("funding_signed"===n&&"initiator"===r||"funding_created"===n&&"responder"===r)return{handler:function t(n,r){if("channels.info"===r.method)switch(r.params.data.event){case"funding_created":case"own_funding_locked":return{handler:t};case"funding_locked":return{handler:Xm}}if("channels.on_chain_tx"===r.method)return Rm(e,"onChainTx",r.params.data.tx,{info:r.params.data.info,type:r.params.data.type}),{handler:t}}}}if("channels.info"===t.method&&"funding_signed"===t.params.data.event&&"initiator"===e._options.role)return e._channelId=t.params.channel_id,Om(e,"signed"),{handler:Wm}}function Xm(e,t){if("channels.info"===t.method&&"open"===t.params.data.event)return e._channelId=t.params.channel_id,{handler(t,n){if("channels.update"===n.method)return Mm(e,n.params.data.state),{handler:Zm}}}}async function Zm(e,t,n){switch(t.method){case"channels.info":switch(t.params.data.event){case"update":case"withdraw_created":case"deposit_created":return{handler:eh};case"own_withdraw_locked":case"withdraw_locked":case"own_deposit_locked":case"deposit_locked":case"peer_disconnected":case"channel_reestablished":case"open":return Rm(e,_m(t.params.data.event)),{handler:Zm};case"fsm_up":return e._fsmId=t.params.data.fsm_id,{handler:Zm};case"timeout":case"close_mutual":case"shutdown":return{handler:Zm};case"closing":return Om(e,"closing"),{handler:Zm};case"closed_confirmed":return Om(e,"closed"),{handler:rh};case"died":return Om(e,"died"),{handler:rh}}break;case"channels.on_chain_tx":return Rm(e,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),{handler:Zm};case"channels.leave":return{handler:Zm};case"channels.update":return Mm(e,t.params.data.state),{handler:Zm};case"channels.sign.shutdown_sign_ack":return eh(e,t,n)}}async function eh(e,t,n){var r;const[,i]=null!==(r=t.method.match(/^channels\.sign\.([^.]+)$/))&&void 0!==r?r:[];return null==i?Vm(0,t,n):await jm(e,`channels.${i}`,t.params.data,(async n=>e._options.sign(i,n,{updates:t.params.data.updates})))?{handler:function e(t,r){return null!=r.error?{handler:e,state:n}:"channels.conflict"===r.method?{handler:Zm}:Vm(0,r,n)},state:n}:{handler:Zm}}async function th(e,t,n){return"channels.sign.shutdown_sign"!==t.method?Vm(0,t,n):(await jm(e,"channels.shutdown_sign",t.params.data,(async e=>n.sign(e))),{handler(e,t){return"channels.on_chain_tx"!==t.method?Vm(0,t,n):{handler:rh,state:n}},state:n})}function nh(e,t,n){return"channels.leave"===t.method?(n.resolve({channelId:t.params.channel_id,signedTx:t.params.data.state}),Gm(e),{handler:rh}):"channels.error"===t.method?(n.reject(new he(t.data.message)),{handler:Zm}):Vm(0,t,n)}function rh(e,t,n){return null==n?{handler:rh}:"closing"===t.params.data.event?{handler:rh,state:n}:"channel_closed"===t.params.data.info?(n.closeTx=t.params.data.tx,{handler:rh,state:n}):"closed_confirmed"===t.params.data.event?(n.resolve(n.closeTx),{handler:rh}):{handler:rh,state:n}}Zm.enter=e=>{Om(e,"open")};var ih=n(7007),ah=n.n(ih);let oh=0;var sh=new WeakMap;class ch{constructor(){var e,t,n;Rd(this,"_eventEmitter",new(ah())),Rd(this,"_nextRpcMessageId",0),Rd(this,"_rpcCallbacks",new Map),Rd(this,"_messageQueue",[]),Rd(this,"_isMessageQueueLocked",!1),Rd(this,"_actionQueue",[]),Rd(this,"_isActionQueueLocked",!1),Rd(this,"_status","disconnected"),Rd(this,"_state",""),n={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=sh),t.set(e,n),oh+=1,ui(this,sh,oh)}_debug(...e){!0===this._options.debug&&console.debug(`Channel #${li(this,sh)}`,...e)}static async initialize(e){return ch._initialize(new ch,e)}static async _initialize(e,t){return await async function(e,t,n,{url:r,...i}){e._options={url:r,...i};const a=new URL(r);Object.entries(i).filter((([e])=>!["sign","debug"].includes(e))).forEach((([e,t])=>a.searchParams.set(e.replace(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)),t.toString()))),a.searchParams.set("protocol","json-rpc"),Om(e,"connecting"),e._websocket=new Qm.w3cwebsocket(a.toString()),await new Promise(((r,a)=>{Object.assign(e._websocket,{onerror:a,onopen:async a=>{if(r(),Om(e,"connected",a),null!=i.reconnectTx){km(e,{handler:n});const{signedTx:t}=await e.state();if(null==t)throw new O("`signedTx` missed in state while reconnection");Mm(e,ta(t))}else km(e,{handler:t});Lm(e)},onclose:t=>{Om(e,"disconnected",t),clearTimeout(e._pingTimeoutId)},onmessage:({data:t})=>function(e,t){const n=bp.parse(t);if(e._debug("received message",n.method,n.params),null==n.id)"channels.message"!==n.method?"channels.system.pong"!==n.method?(e._messageQueue.push(n),async function(e){if(!e._isMessageQueueLocked){for(e._isMessageQueueLocked=!0;e._messageQueue.length>0;){const t=e._messageQueue.shift();if(null==t)throw new ie;try{await Um(e,t)}catch(n){bt(n),Rm(e,"error",new ye(n,t))}}e._isMessageQueueLocked=!1}}(e)):n.params.channel_id!==e._channelId&&null!=e._channelId||Lm(e):Rm(e,"message",n.params.data.message);else{const t=e._rpcCallbacks.get(n.id);if(null==t)return void Rm(e,"error",new O(`Can't find callback by id: ${n.id}`));try{t(n)}finally{e._rpcCallbacks.delete(n.id)}}}(e,t)})}))}(e,null!=t.existingFsmId?Jm:Ym,Zm,t),e}on(e,t){this._eventEmitter.on(e,t)}off(e,t){this._eventEmitter.removeListener(e,t)}disconnect(){return Gm(this)}status(){return this._status}async state(){const e=(t=await Hm(this,"channels.get.offchain_state",{}),Object.entries(t).reduce(((e,[t,n])=>({...e,[_m(t)]:n})),{}));var t;return{calls:ra(e.calls,vn.CallsMtree),...""!==e.halfSignedTx&&{halfSignedTx:ra(e.halfSignedTx,vn.SignedTx)},...""!==e.signedTx&&{signedTx:ra(e.signedTx,vn.SignedTx)},trees:ra(e.trees,vn.StateTrees)}}round(){if(""===this._state)return null;const e=ra(this._state,vn.SignedTx).encodedTx;switch(e.tag){case vn.ChannelCreateTx:return 1;case vn.ChannelOffChainTx:case vn.ChannelWithdrawTx:case vn.ChannelDepositTx:return e.round;default:return null}}id(){if(null==this._channelId)throw new O("Channel is not initialized");return this._channelId}fsmId(){if(null==this._fsmId)throw new O("Channel is not initialized");return this._fsmId}async enqueueAction(e){return async function(e,t,n){const r=new Promise(((r,i)=>{e._actionQueue.push({guard:t,action(){const e=n();return{...e,state:{...e.state,resolve:r,reject:i}}}})}));return Fm(e),r}(this,((e,t)=>t?.handler===Zm),e)}async leave(){return this.enqueueAction((()=>(qm(this,"channels.leave"),{handler:nh})))}async shutdown(e){return this.enqueueAction((()=>(qm(this,"channels.shutdown"),{handler:th,state:{sign:e}})))}static async reconnect(e,t){const{sign:n}=e;return ch.initialize({...e,reconnectTx:await n("reconnect",ta({...t,tag:vn.ChannelClientReconnectTx}))})}}class uh extends ch{async update(e,t,n,r,i=[]){return this.enqueueAction((()=>{qm(this,"channels.update.new",{from:e,to:t,amount:n,meta:i});const a=async(e,t,n)=>"channels.sign.update"===t.method?await jm(this,"channels.update",t.params.data,(async e=>r(e,{updates:t.params.data.updates})))?{handler:a,state:n}:{handler:(e,t)=>$m(this,t,n,(()=>(Mm(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Zm}))),state:n}:"channels.error"===t.method?(n.reject(new he(t.data.message)),{handler:Zm}):$m(this,t,n);return{handler:a}}))}async poi({accounts:e,contracts:t}){return ra((await Hm(this,"channels.get.poi",{accounts:e,contracts:t})).poi,vn.TreesPoi)}async balances(e){return Object.fromEntries((await Hm(this,"channels.get.balances",{accounts:e})).map((e=>[e.account,e.balance])))}async awaitingActionTx(e,t,n){if(t.method!==`channels.sign.${e}_tx`)return Vm(0,t,n);const r=(t,i)=>{if("channels.on_chain_tx"===i.method)return n.onOnChainTx?.(i.params.data.tx),{handler:r,state:n};if("channels.info"===i.method&&[`own_${e}_locked`,`${e}_locked`].includes(i.params.data.event)){const t="deposit"===e?"Deposit":"Withdraw",a=i.params.data.event.startsWith("own_");return n[`on${a?"Own":""}${t}Locked`]?.(),{handler:r,state:n}}return $m(this,i,n,(()=>(Mm(this,i.params.data.state),n.resolve({accepted:!0,signedTx:i.params.data.state}),{handler:Zm})))},{sign:i}=n;return await jm(this,`channels.${e}_tx`,t.params.data,(async e=>i(e,{updates:t.params.data.updates}))),{handler:r,state:n}}async withdraw(e,t,{onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:i}={}){return this.enqueueAction((()=>(qm(this,"channels.withdraw",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("withdraw",t,n),state:{sign:t,onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:i}})))}async deposit(e,t,{onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:i}={}){return this.enqueueAction((()=>(qm(this,"channels.deposit",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("deposit",t,n),state:{sign:t,onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:i}})))}async sendMessage(e,t){const n="object"==typeof e?JSON.stringify(e):e;"connecting"===this.status()&&(await new Promise((e=>{const t=n=>{"connecting"!==n&&(e(),this.off("statusChanged",t))};this.on("statusChanged",t)})),await Ct(500)),qm(this,"channels.message",{info:n,to:t})}}function lh(e){return Object.entries(e).reduce(((e,[t,n])=>({...e,[_m(t)]:n})),{})}class Ah extends uh{static async initialize(e){return ch._initialize(new Ah,e)}async createContract({code:e,callData:t,deposit:n,vmVersion:r,abiVersion:i},a){return this.enqueueAction((()=>(qm(this,"channels.update.new_contract",{code:e,call_data:t,deposit:n,vm_version:r,abi_version:i}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?Vm(0,t,n):(await jm(this,"channels.update",t.params.data,(async e=>n.sign(e))),{handler:(e,t,n)=>$m(this,t,n,(()=>{const e=ra(t.params.data.state,vn.SignedTx).encodedTx;if(e.tag!==vn.ChannelOffChainTx)throw new O(`Tag should be ${vn[vn.ChannelOffChainTx]}, got ${vn[e.tag]} instead`);const r="initiator"===this._options.role?"initiatorId":"responderId",i=this._options[r];Mm(this,t.params.data.state);const a=tn(i,e.round);return Rm(this,"newContract",a),n.resolve({accepted:!0,address:a,signedTx:t.params.data.state}),{handler:Zm}})),state:n}),state:{sign:a}})))}async callContract({amount:e,callData:t,contract:n,abiVersion:r},i){return this.enqueueAction((()=>(qm(this,"channels.update.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?Vm(0,t,n):(await jm(this,"channels.update",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>$m(this,t,n,(()=>(Mm(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Zm}))),state:n}),state:{sign:i}})))}async forceProgress({amount:e,callData:t,contract:n,abiVersion:r,gasLimit:i=1e6,gasPrice:a=fn},o,{onOnChainTx:s}={}){return this.enqueueAction((()=>(qm(this,"channels.force_progress",{amount:e,call_data:t,contract_id:n,abi_version:r,gas_price:a,gas:i}),{handler:async(e,t,n)=>"channels.sign.force_progress_tx"!==t.method?Vm(0,t,n):(await jm(this,"channels.force_progress_sign",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>("channels.on_chain_tx"===t.method&&(n.onOnChainTx?.(t.params.data.tx),Rm(this,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),n.resolve({accepted:!0,tx:t.params.data.tx})),Vm(0,t,n)),state:n}),state:{sign:o,onOnChainTx:s}})))}async callContractStatic({amount:e,callData:t,contract:n,abiVersion:r}){return lh(await Hm(this,"channels.dry_run.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}))}async getContractCall({caller:e,contract:t,round:n}){return lh(await Hm(this,"channels.get.contract_call",{caller_id:e,contract_id:t,round:n}))}async getContractState(e){const t=await Hm(this,"channels.get.contract",{pubkey:e});return lh({...t,contract:lh(t.contract)})}async cleanContractCalls(){return this.enqueueAction((()=>(qm(this,"channels.clean_contract_calls"),{handler(e,t,n){return"channels.calls_pruned.reply"===t.method?(n.resolve(),{handler:Zm}):(n.reject(new fe("Unexpected message received")),{handler:rh})}})))}}var dh=null;"undefined"!=typeof WebSocket?dh=WebSocket:"undefined"!=typeof MozWebSocket?dh=MozWebSocket:void 0!==n.g?dh=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?dh=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(dh=self.WebSocket||self.MozWebSocket);var ph=dh;function mh(e,t){gh(e,t),t.add(e)}function hh(e,t,n){gh(e,t),t.set(e,n)}function gh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fh(e,t,n){return function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(t,e),n}var yh=function(e){return e.Middleware="mdw",e.Node="node",e.All="all",e}(yh||{});class Ch extends P{constructor(e){super(e),this.name="MiddlewareSubscriberError"}}class Ih extends Ch{constructor(e){super("Connection closed"),this.closeEvent=e,this.name="MiddlewareSubscriberDisconnected"}}var wh=new WeakMap,Eh=new WeakMap,Bh=new WeakMap,Nh=new WeakMap,bh=new WeakSet,vh=new WeakSet,Sh=new WeakSet,Th=new WeakSet,xh=new WeakSet,_h=new WeakSet;class Qh{get webSocket(){return li(this,Bh)}constructor(e){mh(this,_h),mh(this,xh),mh(this,Th),mh(this,Sh),mh(this,vh),mh(this,bh),hh(this,Nh,{get:Ph,set:void 0}),hh(this,wh,{writable:!0,value:[]}),hh(this,Eh,{writable:!0,value:[]}),hh(this,Bh,{writable:!0,value:void 0}),this.url=e}async reconnect(){fh(this,Th,Oh).call(this),ui(this,Bh,await new Promise((e=>{const t=new ph(this.url);Object.assign(t,{onopen:()=>e(t),onerror:e=>{fh(this,Sh,kh).call(this,(()=>!0),void 0,e.error)},onmessage:e=>{if("string"!=typeof e.data)throw new re("Unknown incoming message type: "+typeof e.data);fh(this,xh,Mh).call(this,JSON.parse(e.data))},onclose:e=>{fh(this,Sh,kh).call(this,(()=>!0),void 0,new Ih(e)),fh(this,Th,Oh).call(this,!0)}})}))),await Promise.all([...li(this,Nh)].map((e=>fh(this,vh,Rh).call(this,!0,e))))}subscribeKeyBlocks(e){return fh(this,_h,Dh).call(this,"KeyBlocks",yh.Middleware,e)}subscribeKeyBlocksNode(e){return fh(this,_h,Dh).call(this,"KeyBlocks",yh.Node,e)}subscribeKeyBlocksAll(e){return fh(this,_h,Dh).call(this,"KeyBlocks",yh.All,e)}subscribeMicroBlocks(e){return fh(this,_h,Dh).call(this,"MicroBlocks",yh.Middleware,e)}subscribeMicroBlocksNode(e){return fh(this,_h,Dh).call(this,"MicroBlocks",yh.Node,e)}subscribeMicroBlocksAll(e){return fh(this,_h,Dh).call(this,"MicroBlocks",yh.All,e)}subscribeTransactions(e){return fh(this,_h,Dh).call(this,"Transactions",yh.Middleware,e)}subscribeTransactionsNode(e){return fh(this,_h,Dh).call(this,"Transactions",yh.Node,e)}subscribeTransactionsAll(e){return fh(this,_h,Dh).call(this,"Transactions",yh.All,e)}subscribeObject(e,t){return fh(this,_h,Dh).call(this,e,yh.Middleware,t)}subscribeObjectNode(e,t){return fh(this,_h,Dh).call(this,e,yh.Node,t)}subscribeObjectAll(e,t){return fh(this,_h,Dh).call(this,e,yh.All,t)}}function Ph(){return new Set(li(this,wh).map((([e])=>e)))}function zh(e){if(null==li(this,Bh))throw new ie;li(this,Bh).send(JSON.stringify(e))}function Rh(e,t){if(null==li(this,Bh))return;const n=["KeyBlocks","MicroBlocks","Transactions"].includes(t)?t:"Object";fh(this,bh,zh).call(this,{op:e?"Subscribe":"Unsubscribe",payload:n,..."Object"===n&&{target:t}}),li(this,Eh).push([e,t])}function kh(e,t,n){li(this,wh).filter((([t,n])=>e(t,n))).forEach((([,,e])=>e(t,n)))}function Oh(e=!1){null!=li(this,Bh)&&(e||li(this,Bh).close(),Object.assign(li(this,Bh),{onopen:void 0,onerror:void 0,onmessage:void 0}),ui(this,Bh,void 0))}function Mh(e){if("string"==typeof e||Array.isArray(e)){const t=li(this,Eh).shift();if(null==t)throw new re("Request queue is empty");const[n,r]=t;let i;return"string"==typeof e&&(i=new Ch(e)),e.includes(r)!==n&&(i=new re(`Expected ${r} to be${n?"":" not"} included into ${e}`)),void(null!=i&&fh(this,Sh,kh).call(this,(e=>r===e),void 0,i))}fh(this,Sh,kh).call(this,((t,n)=>!(t!==e.subscription&&t!==e.target||n!==e.source&&n!==yh.All)),e.payload)}function Dh(e,t,n){const r=[e,t,n];return 0===li(this,Nh).size&&this.reconnect(),li(this,Nh).has(e)||fh(this,vh,Rh).call(this,!0,e),li(this,wh).push(r),()=>{ui(this,wh,li(this,wh).filter((e=>e!==r))),li(this,Nh).has(e)||fh(this,vh,Rh).call(this,!1,e),0===li(this,Nh).size&&fh(this,Th,Oh).call(this)}}const qh={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Fh={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},Uh={parameterPath:"id",mapper:{serializedName:"id",required:!0,type:{name:"String"}}},Gh={parameterPath:"limit",mapper:{defaultValue:10,constraints:{InclusiveMaximum:100,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},Lh={parameterPath:"scope",mapper:{constraints:{Pattern:new RegExp("(txi|gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},Hh={parameterPath:"direction",mapper:{serializedName:"direction",type:{name:"String"}}},jh={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",type:{name:"String"}}},Vh={parameterPath:"accountId",mapper:{serializedName:"accountId",required:!0,type:{name:"String"}}},$h={parameterPath:["options","contract"],mapper:{serializedName:"contract",type:{name:"String"}}},Yh={parameterPath:"contractId",mapper:{serializedName:"contractId",required:!0,type:{name:"String"}}},Jh={parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},Kh={parameterPath:"hashOrKbi",mapper:{serializedName:"hash_or_kbi",required:!0,type:{name:"String"}}},Wh={parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}},Xh={parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}},Zh={type:{name:"Composite",className:"Paths1I5J7OcV2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Activity"}}}}}}},eg={type:{name:"Composite",className:"Activity",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},type:{serializedName:"type",required:!0,type:{name:"String"}}}}},tg={type:{name:"Composite",className:"PaginatedResponse",modelProperties:{next:{serializedName:"next",required:!0,nullable:!0,type:{name:"String"}},prev:{serializedName:"prev",required:!0,nullable:!0,type:{name:"String"}}}}},ng={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},rg={type:{name:"Composite",className:"Paths17FlgdkV2Aex141GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141Response"}}}}}}},ig={type:{name:"Composite",className:"Aex141Response",modelProperties:{baseUrl:{serializedName:"base_url",required:!0,type:{name:"String"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxi:{serializedName:"contract_txi",required:!0,type:{name:"String"}},extensions:{serializedName:"extensions",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},limits:{serializedName:"limits",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},ag={type:{name:"Composite",className:"PathsAxw0PwV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141OwnedTokenResponse"}}}}}}},og={type:{name:"Composite",className:"Aex141OwnedTokenResponse",modelProperties:{accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}}}}},sg={type:{name:"Composite",className:"PathsN3Ru7DV2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141OwnedTokenResponse"}}}}}}},cg={type:{name:"Composite",className:"PathsRa6Pv6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplatesResponse"}}}}}}},ug={type:{name:"Composite",className:"Aex141TemplatesResponse",modelProperties:{contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},edition:{serializedName:"edition",type:{name:"Dictionary",value:{type:{name:"any"}}}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},templateId:{serializedName:"template_id",required:!0,type:{name:"Number"}},txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},lg={type:{name:"Composite",className:"Paths19B9O7TV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplateTokensResponse"}}}}}}},Ag={type:{name:"Composite",className:"Aex141TemplateTokensResponse",modelProperties:{logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},dg={type:{name:"Composite",className:"Paths1Fe570RV2Aex9GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9Response"}}}}}}},pg={type:{name:"Composite",className:"Aex9Response",modelProperties:{contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxi:{serializedName:"contract_txi",required:!0,type:{name:"Number"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},eventSupply:{serializedName:"event_supply",required:!0,type:{name:"Number"}},extensions:{serializedName:"extensions",type:{name:"Sequence",element:{type:{name:"String"}}}},holders:{serializedName:"holders",required:!0,type:{name:"Number"}},initialSupply:{serializedName:"initial_supply",required:!0,type:{name:"Number"}},name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}}}}},mg={type:{name:"Composite",className:"PathsO9MbpkV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9BalanceResponse"}}}}}}},hg={type:{name:"Composite",className:"Aex9BalanceResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tokenName:{serializedName:"token_name",required:!0,type:{name:"String"}},tokenSymbol:{serializedName:"token_symbol",required:!0,type:{name:"String"}},txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}},txIndex:{serializedName:"tx_index",required:!0,type:{name:"Number"}},txType:{serializedName:"tx_type",required:!0,type:{name:"String"}}}}},gg={type:{name:"Composite",className:"PathsY2JwfkV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9TransferResponse"}}}}}}},fg={type:{name:"Composite",className:"Aex9TransferResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"Number"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},callTxi:{serializedName:"call_txi",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"Number"}},recipient:{serializedName:"recipient",required:!0,type:{name:"String"}},sender:{serializedName:"sender",required:!0,type:{name:"String"}}}}},yg={type:{name:"Composite",className:"Paths5U7W2V2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9TransferResponse"}}}}}}},Cg={type:{name:"Composite",className:"Paths12TleqhV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9TransferResponse"}}}}}}},Ig={type:{name:"Composite",className:"Paths1C2B0UpV2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9ContractBalanceResponse"}}}}}}},wg={type:{name:"Composite",className:"Aex9ContractBalanceResponse",modelProperties:{accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},lastLogIdx:{serializedName:"last_log_idx",required:!0,type:{name:"Number"}},lastTxHash:{serializedName:"last_tx_hash",required:!0,type:{name:"String"}}}}},Eg={type:{name:"Composite",className:"PathsBelvp6V2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{account:{serializedName:"account",type:{name:"String"}},amount:{serializedName:"amount",type:{name:"Number"}},contract:{serializedName:"contract",type:{name:"String"}}}}},Bg={type:{name:"Composite",className:"Paths11X7LpcV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{account:{serializedName:"account",type:{name:"String"}},amount:{serializedName:"amount",type:{name:"Number"}},contract:{serializedName:"contract",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}}}}},Ng={type:{name:"Composite",className:"Paths5LeqfqV2BlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Block"}}}}}}},bg={type:{name:"Composite",className:"Block",modelProperties:{beneficiary:{serializedName:"beneficiary",type:{name:"String"}},hash:{serializedName:"hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},info:{serializedName:"info",type:{name:"String"}},miner:{serializedName:"miner",type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},pow:{serializedName:"pow",type:{name:"Sequence",element:{type:{name:"Number"}}}},prevHash:{serializedName:"prev_hash",type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",type:{name:"String"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},target:{serializedName:"target",type:{name:"Number"}},time:{serializedName:"time",type:{name:"Number"}},version:{serializedName:"version",type:{name:"Number"}}}}},vg={type:{name:"Composite",className:"NotFoundResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},Sg={type:{name:"Composite",className:"PathsC25EgV2ChannelsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Channel"}}}}}}},Tg={type:{name:"Composite",className:"Channel",modelProperties:{amount:{serializedName:"amount",type:{name:"Number"}},channel:{serializedName:"channel",type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",type:{name:"Number"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Dictionary",value:{type:{name:"any"}}}},initiator:{serializedName:"initiator",type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",type:{name:"Number"}},lastUpdatedHeight:{serializedName:"last_updated_height",type:{name:"String"}},lastUpdatedTime:{serializedName:"last_updated_time",type:{name:"Number"}},lastUpdatedTxType:{serializedName:"last_updated_tx_type",type:{name:"String"}},lockPeriod:{serializedName:"lock_period",type:{name:"Number"}},lockedUntil:{serializedName:"locked_until",type:{name:"Number"}},responder:{serializedName:"responder",type:{name:"String"}},responderAmount:{serializedName:"responder_amount",type:{name:"Number"}},round:{serializedName:"round",type:{name:"Number"}},soloRound:{serializedName:"solo_round",type:{name:"Number"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},updatesCount:{serializedName:"updates_count",type:{name:"String"}}}}},xg={type:{name:"Composite",className:"Paths1Csrt0IV2ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractCall"}}}}}}},_g={type:{name:"Composite",className:"ContractCall",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},callTxHash:{serializedName:"call_tx_hash",type:{name:"String"}},callTxi:{serializedName:"call_txi",type:{name:"Number"}},contractId:{serializedName:"contract_id",type:{name:"String"}},contractTxi:{serializedName:"contract_txi",type:{name:"Number"}},function:{serializedName:"function",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},internalTx:{serializedName:"internal_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},localIdx:{serializedName:"local_idx",type:{name:"Number"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}}}}},Qg={type:{name:"Composite",className:"Paths9Ya94MV2ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractLog"}}}}}}},Pg={type:{name:"Composite",className:"ContractLog",modelProperties:{args:{serializedName:"args",type:{name:"Sequence",element:{type:{name:"Number"}}}},blockHash:{serializedName:"block_hash",type:{name:"String"}},callTxHash:{serializedName:"call_tx_hash",type:{name:"String"}},callTxi:{serializedName:"call_txi",type:{name:"Number"}},contractId:{serializedName:"contract_id",type:{name:"String"}},contractTxi:{serializedName:"contract_txi",type:{name:"Number"}},data:{serializedName:"data",type:{name:"String"}},eventHash:{serializedName:"event_hash",type:{name:"String"}},extCallerContractId:{serializedName:"ext_caller_contract_id",type:{name:"String"}},extCallerContractTxi:{serializedName:"ext_caller_contract_txi",type:{name:"Number"}},height:{serializedName:"height",type:{name:"Number"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},parentContractId:{serializedName:"parent_contract_id",nullable:!0,type:{name:"Number"}}}}},zg={type:{name:"Composite",className:"Contract",modelProperties:{aexnType:{serializedName:"aexn_type",type:{name:"String"}},blockHash:{serializedName:"block_hash",type:{name:"String"}},createTx:{serializedName:"create_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},sourceTxHash:{serializedName:"source_tx_hash",type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",type:{name:"String"}}}}},Rg={type:{name:"Composite",className:"PathsRzn6HzV2DeltastatsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"DeltaStat"}}}}}}},kg={type:{name:"Composite",className:"DeltaStat",modelProperties:{auctionsStarted:{serializedName:"auctions_started",type:{name:"Number"}},blockReward:{serializedName:"block_reward",type:{name:"Number"}},contractsCreated:{serializedName:"contracts_created",type:{name:"Number"}},devReward:{serializedName:"dev_reward",type:{name:"Number"}},height:{serializedName:"height",type:{name:"Number"}},lastTxHash:{serializedName:"last_tx_hash",type:{name:"String"}},namesActivated:{serializedName:"names_activated",type:{name:"Number"}},namesExpired:{serializedName:"names_expired",type:{name:"Number"}},namesRevoked:{serializedName:"names_revoked",type:{name:"Number"}},oraclesExpired:{serializedName:"oracles_expired",type:{name:"Number"}},oraclesRegistered:{serializedName:"oracles_registered",type:{name:"Number"}}}}},Og={type:{name:"Composite",className:"Paths10TrrshV2KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"KeyBlock"}}}}}}},Mg={type:{name:"Composite",className:"KeyBlock",modelProperties:{beneficiary:{serializedName:"beneficiary",type:{name:"String"}},hash:{serializedName:"hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},info:{serializedName:"info",type:{name:"String"}},miner:{serializedName:"miner",type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"String"}},pow:{serializedName:"pow",type:{name:"Sequence",element:{type:{name:"Number"}}}},prevHash:{serializedName:"prev_hash",type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",type:{name:"String"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},target:{serializedName:"target",type:{name:"Number"}},time:{serializedName:"time",type:{name:"Number"}},version:{serializedName:"version",type:{name:"Number"}}}}},Dg={type:{name:"Composite",className:"Paths7Hfka2V2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"MicroBlock"}}}}}}},qg={type:{name:"Composite",className:"MicroBlock",modelProperties:{hash:{serializedName:"hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},microBlockIndex:{serializedName:"micro_block_index",type:{name:"Number"}},pofHash:{serializedName:"pof_hash",type:{name:"Sequence",element:{type:{name:"Number"}}}},prevHash:{serializedName:"prev_hash",type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",type:{name:"String"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},time:{serializedName:"time",type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",type:{name:"Number"}},version:{serializedName:"version",type:{name:"Number"}}}}},Fg={type:{name:"Composite",className:"Paths1RxrrvbV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Tx"}}}}}}},Ug={type:{name:"Composite",className:"Tx",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},hash:{serializedName:"hash",type:{name:"String"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"Number"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},txIndex:{serializedName:"tx_index",type:{name:"Number"}}}}},Gg={type:{name:"Composite",className:"Paths16Srg6EV2NamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Name"}}}}}}},Lg={type:{name:"Composite",className:"Name",modelProperties:{active:{serializedName:"active",type:{name:"Boolean"}},hash:{serializedName:"hash",type:{name:"String"}},info:{serializedName:"info",type:{name:"Composite",className:"NameInfo"}},previous:{serializedName:"previous",type:{name:"Sequence",element:{type:{name:"Composite",className:"Name"}}}},status:{serializedName:"status",type:{name:"String"}}}}},Hg={type:{name:"Composite",className:"NameInfo",modelProperties:{activationTime:{serializedName:"activation_time",type:{name:"Number"}},activeFrom:{serializedName:"active_from",type:{name:"Number"}},claims:{serializedName:"claims",type:{name:"Sequence",element:{type:{name:"Number"}}}},expireHeight:{serializedName:"expire_height",type:{name:"Number"}},ownership:{serializedName:"ownership",type:{name:"Composite",className:"NameInfoOwnership"}},pointers:{serializedName:"pointers",type:{name:"Composite",className:"NameInfoPointers"}},transfers:{serializedName:"transfers",type:{name:"Sequence",element:{type:{name:"Number"}}}},updates:{serializedName:"updates",type:{name:"String"}}}}},jg={type:{name:"Composite",className:"NameInfoOwnership",modelProperties:{current:{serializedName:"current",type:{name:"String"}},original:{serializedName:"original",type:{name:"String"}}}}},Vg={type:{name:"Composite",className:"NameInfoPointers",modelProperties:{accountPubkey:{serializedName:"account_pubkey",type:{name:"String"}}}}},$g={type:{name:"Composite",className:"Auction",modelProperties:{active:{serializedName:"active",type:{name:"Boolean"}},info:{serializedName:"info",type:{name:"Composite",className:"AuctionInfo"}}}}},Yg={type:{name:"Composite",className:"AuctionInfo",modelProperties:{auctionEnd:{serializedName:"auction_end",type:{name:"Number"}},bids:{serializedName:"bids",type:{name:"Sequence",element:{type:{name:"Number"}}}},lastBid:{serializedName:"last_bid",type:{name:"Composite",className:"AuctionInfoLastBid"}},name:{serializedName:"name",type:{name:"String"}},previous:{serializedName:"previous",type:{name:"Composite",className:"Auction"}},status:{serializedName:"status",type:{name:"String"}},txIndex:{serializedName:"tx_index",type:{name:"Number"}}}}},Jg={type:{name:"Composite",className:"AuctionInfoLastBid",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},hash:{serializedName:"hash",type:{name:"String"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"Number"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Kg={type:{name:"Composite",className:"Paths1I6PwfdV2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem"}}}}}}},Wg={type:{name:"Composite",className:"Paths7P6Qc1V2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0PropertiesDataItemsAllof1",modelProperties:{status:{serializedName:"status",type:{name:"String"}}}}},Xg={type:{name:"Composite",className:"NameClaim",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Zg={type:{name:"Composite",className:"PathsDjelzuV2NamesIdPointeesGetResponses200ContentApplicationJsonSchema",modelProperties:{active:{serializedName:"active",type:{name:"Dictionary",value:{type:{name:"any"}}}},inactive:{serializedName:"inactive",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},ef={type:{name:"Composite",className:"NameTransfer",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},tf={type:{name:"Composite",className:"NameUpdate",modelProperties:{blockHash:{serializedName:"block_hash",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},nf={type:{name:"Composite",className:"PathsMherz6V2OraclesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Oracle"}}}}}}},rf={type:{name:"Composite",className:"Oracle",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},extends:{serializedName:"extends",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleExtendsItem"}}}},oracle:{serializedName:"oracle",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"Number"}},register:{serializedName:"register",required:!0,type:{name:"Number"}},registerTime:{serializedName:"register_time",type:{name:"Number"}}}}},af={type:{name:"Composite",className:"OracleExtendsItem",modelProperties:{query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}}}}},of={type:{name:"Composite",className:"Paths1LaqrzqV2OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},sf={type:{name:"Composite",className:"OracleQuery",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"Number"}},fee:{serializedName:"fee",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"Number"}},queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},queryTtl:{serializedName:"query_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},response:{serializedName:"response",type:{name:"Composite",className:"OracleResponse"}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},sourceTxHash:{serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},cf={type:{name:"Composite",className:"OracleResponse",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"Number"}},fee:{serializedName:"fee",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",type:{name:"Composite",className:"OracleResponse"}},queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},sourceTxHash:{serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},uf={type:{name:"Composite",className:"Paths3PnwziV2OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleResponse"}}}}}}},lf={type:{name:"Composite",className:"Status",modelProperties:{mdwAsyncTasks:{serializedName:"mdw_async_tasks",type:{name:"Composite",className:"StatusMdwAsyncTasks"}},mdwGensPerMinute:{serializedName:"mdw_gens_per_minute",required:!0,type:{name:"Number"}},mdwHeight:{serializedName:"mdw_height",required:!0,type:{name:"Number"}},mdwLastMigration:{serializedName:"mdw_last_migration",required:!0,type:{name:"Number"}},mdwRevision:{serializedName:"mdw_revision",required:!0,type:{name:"String"}},mdwSynced:{serializedName:"mdw_synced",required:!0,type:{name:"Boolean"}},mdwSyncing:{serializedName:"mdw_syncing",required:!0,type:{name:"Boolean"}},mdwTxIndex:{serializedName:"mdw_tx_index",required:!0,type:{name:"Number"}},mdwVersion:{serializedName:"mdw_version",required:!0,type:{name:"String"}},nodeHeight:{serializedName:"node_height",required:!0,type:{name:"Number"}},nodeProgress:{serializedName:"node_progress",required:!0,type:{name:"Number"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},nodeSyncing:{serializedName:"node_syncing",required:!0,type:{name:"Boolean"}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}}}}},Af={type:{name:"Composite",className:"StatusMdwAsyncTasks",modelProperties:{longTasks:{serializedName:"long_tasks",required:!0,type:{name:"Number"}},producerBuffer:{serializedName:"producer_buffer",required:!0,type:{name:"Number"}},totalPending:{serializedName:"total_pending",required:!0,type:{name:"Number"}}}}},df={type:{name:"Composite",className:"PathsDpxn99V2TotalstatsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"TotalStat"}}}}}}},pf={type:{name:"Composite",className:"TotalStat",modelProperties:{auctionsStarted:{serializedName:"auctions_started",type:{name:"Number"}},blockReward:{serializedName:"block_reward",type:{name:"Number"}},contractsCreated:{serializedName:"contracts_created",type:{name:"Number"}},devReward:{serializedName:"dev_reward",type:{name:"Number"}},height:{serializedName:"height",type:{name:"Number"}},lastTxHash:{serializedName:"last_tx_hash",type:{name:"String"}},namesActivated:{serializedName:"names_activated",type:{name:"Number"}},namesExpired:{serializedName:"names_expired",type:{name:"Number"}},namesRevoked:{serializedName:"names_revoked",type:{name:"Number"}},oraclesExpired:{serializedName:"oracles_expired",type:{name:"Number"}},oraclesRegistered:{serializedName:"oracles_registered",type:{name:"Number"}}}}},mf={type:{name:"Composite",className:"Paths17Cjtx5V2TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Transfer"}}}}}}},hf={type:{name:"Composite",className:"Transfer",modelProperties:{accountId:{serializedName:"account_id",type:{name:"String"}},amount:{serializedName:"amount",type:{name:"Number"}},height:{serializedName:"height",type:{name:"Number"}},kind:{serializedName:"kind",type:{name:"String"}},refTxi:{serializedName:"ref_txi",nullable:!0,type:{name:"Number"}}}}},gf={type:{name:"Composite",className:"Paths1R74KpvV2TxsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",type:{name:"Sequence",element:{type:{name:"Composite",className:"Tx"}}}}}}},ff={type:{name:"Composite",className:"Paths16Tt677V2TxsCountIdGetResponses200ContentApplicationJsonSchema",modelProperties:{channelCloseMutualTx:{serializedName:"channel_close_mutual_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelCloseSoloTx:{serializedName:"channel_close_solo_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelCreateTx:{serializedName:"channel_create_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelDepositTx:{serializedName:"channel_deposit_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelForceProgressTx:{serializedName:"channel_force_progress_tx",type:{name:"Number"}},channelOffchainTx:{serializedName:"channel_offchain_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelSettleTx:{serializedName:"channel_settle_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelSlashTx:{serializedName:"channel_slash_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelSnapshotSoloTx:{serializedName:"channel_snapshot_solo_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},channelWithdrawTx:{serializedName:"channel_withdraw_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},contractCallTx:{serializedName:"contract_call_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},contractCreateTx:{serializedName:"contract_create_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},gaAttachTx:{serializedName:"ga_attach_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},gaMetaTx:{serializedName:"ga_meta_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},nameClaimTx:{serializedName:"name_claim_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},namePreclaimTx:{serializedName:"name_preclaim_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},nameRevokeTx:{serializedName:"name_revoke_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},nameTransferTx:{serializedName:"name_transfer_tx",type:{name:"Number"}},nameUpdateTx:{serializedName:"name_update_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},oracleExtendTx:{serializedName:"oracle_extend_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},oracleQueryTx:{serializedName:"oracle_query_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},oracleRegisterTx:{serializedName:"oracle_register_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},oracleResponseTx:{serializedName:"oracle_response_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},payingForTx:{serializedName:"paying_for_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},spendTx:{serializedName:"spend_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},yf={type:{name:"Composite",className:"Aex141TransferEvent",modelProperties:{blockHeight:{serializedName:"block_height",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"Number"}},recipientId:{serializedName:"recipient_id",type:{name:"String"}},senderId:{serializedName:"sender_id",type:{name:"String"}},tokenId:{serializedName:"token_id",type:{name:"Number"}},txHash:{serializedName:"tx_hash",type:{name:"String"}}}}},Cf={type:{name:"Composite",className:"Aex9TransferEvent",modelProperties:{amount:{serializedName:"amount",type:{name:"Number"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},contractId:{serializedName:"contract_id",type:{name:"String"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"Number"}},recipientId:{serializedName:"recipient_id",type:{name:"String"}},senderId:{serializedName:"sender_id",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}}}}},If={type:{name:"Composite",className:"InternalContractCallEvent",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},callTxHash:{serializedName:"call_tx_hash",type:{name:"String"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}}}}},wf={type:{name:"Composite",className:"InternalTransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"Number"}},kind:{serializedName:"kind",required:!0,type:{name:"String"}},refTxHash:{serializedName:"ref_tx_hash",required:!0,type:{name:"String"}}}}},Ef={type:{name:"Composite",className:"NameClaimEvent",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Bf={type:{name:"Composite",className:"PathsKlr2M2V2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Zh.type.modelProperties,...tg.type.modelProperties}}},Nf={type:{name:"Composite",className:"PathsFlc7UjV2Aex141GetResponses200ContentApplicationJsonSchema",modelProperties:{...rg.type.modelProperties,...tg.type.modelProperties}}},bf={type:{name:"Composite",className:"PathsSs61ZgV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchema",modelProperties:{...ag.type.modelProperties,...tg.type.modelProperties}}},vf={type:{name:"Composite",className:"Paths1Ilysy5V2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchema",modelProperties:{...sg.type.modelProperties,...tg.type.modelProperties}}},Sf={type:{name:"Composite",className:"Paths17O9Fn6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...cg.type.modelProperties,...tg.type.modelProperties}}},Tf={type:{name:"Composite",className:"PathsNuoourV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...lg.type.modelProperties,...tg.type.modelProperties}}},xf={type:{name:"Composite",className:"Paths1Wbogg8V2Aex9GetResponses200ContentApplicationJsonSchema",modelProperties:{...dg.type.modelProperties,...tg.type.modelProperties}}},_f={type:{name:"Composite",className:"Paths1BsirxgV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchema",modelProperties:{...tg.type.modelProperties,...mg.type.modelProperties}}},Qf={type:{name:"Composite",className:"Paths1V0FiznV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchema",modelProperties:{...gg.type.modelProperties,...tg.type.modelProperties}}},Pf={type:{name:"Composite",className:"Paths1X48QgjV2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchema",modelProperties:{...yg.type.modelProperties,...tg.type.modelProperties}}},zf={type:{name:"Composite",className:"Paths1DkkopqV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchema",modelProperties:{...Cg.type.modelProperties,...tg.type.modelProperties}}},Rf={type:{name:"Composite",className:"PathsNi359V2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ig.type.modelProperties,...tg.type.modelProperties}}},kf={type:{name:"Composite",className:"Paths15Ih6XV2BlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ng.type.modelProperties,...tg.type.modelProperties}}},Of={type:{name:"Composite",className:"Paths1Txl2A9V2ChannelsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Sg.type.modelProperties,...tg.type.modelProperties}}},Mf={type:{name:"Composite",className:"Paths187U0XzV2ContractsCallsGetResponses200ContentApplicationJsonSchema",modelProperties:{...xg.type.modelProperties,...tg.type.modelProperties}}},Df={type:{name:"Composite",className:"PathsB246H1V2ContractsLogsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Qg.type.modelProperties,...tg.type.modelProperties}}},qf={type:{name:"Composite",className:"Paths7Pbec0V2DeltastatsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Rg.type.modelProperties,...tg.type.modelProperties}}},Ff={type:{name:"Composite",className:"Paths1Ulxr59V2KeyBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Og.type.modelProperties,...tg.type.modelProperties}}},Uf={type:{name:"Composite",className:"PathsO99PhzV2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Dg.type.modelProperties,...tg.type.modelProperties}}},Gf={type:{name:"Composite",className:"PathsGuqvhdV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Fg.type.modelProperties,...tg.type.modelProperties}}},Lf={type:{name:"Composite",className:"PathsK9TkttV2NamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Gg.type.modelProperties,...tg.type.modelProperties}}},Hf={type:{name:"Composite",className:"Paths3Msq0DV2NamesSearchGetResponses200ContentApplicationJsonSchema",modelProperties:{...Kg.type.modelProperties,...tg.type.modelProperties}}},jf={type:{name:"Composite",className:"PathsB0YvynV2OraclesGetResponses200ContentApplicationJsonSchema",modelProperties:{...nf.type.modelProperties,...tg.type.modelProperties}}},Vf={type:{name:"Composite",className:"Paths4Bbr8KV2OraclesIdQueriesGetResponses200ContentApplicationJsonSchema",modelProperties:{...of.type.modelProperties,...tg.type.modelProperties}}},$f={type:{name:"Composite",className:"Paths1Ky8Ew4V2OraclesIdResponsesGetResponses200ContentApplicationJsonSchema",modelProperties:{...uf.type.modelProperties,...tg.type.modelProperties}}},Yf={type:{name:"Composite",className:"Paths15PsutbV2TotalstatsGetResponses200ContentApplicationJsonSchema",modelProperties:{...df.type.modelProperties,...tg.type.modelProperties}}},Jf={type:{name:"Composite",className:"PathsIgs9Z1V2TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...mf.type.modelProperties,...tg.type.modelProperties}}},Kf={type:{name:"Composite",className:"PathsFclv4TV2TxsGetResponses200ContentApplicationJsonSchema",modelProperties:{...gf.type.modelProperties,...tg.type.modelProperties}}},Wf={type:{name:"Composite",className:"Paths1R02SlwV2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema",modelProperties:{...Eg.type.modelProperties}}},Xf={type:{name:"Composite",className:"Paths1T9RwnyV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema",modelProperties:{...Bg.type.modelProperties}}},Zf={type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem",modelProperties:{...Lg.type.modelProperties,...Wg.type.modelProperties}}};class ey extends Rs{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-middleware/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountActivities(e,t){return this.sendOperationRequest({id:e,options:t},ny)}getSortedAex141Contracts(e){return this.sendOperationRequest({options:e},ry)}getAex141OwnedTokens(e,t){return this.sendOperationRequest({accountId:e,options:t},iy)}getAex141TokenOwner(e,t,n){return this.sendOperationRequest({contractId:e,tokenId:t,options:n},ay)}getAex141ContractOwners(e,t){return this.sendOperationRequest({contractId:e,options:t},oy)}getAex141ContractTemplates(e,t){return this.sendOperationRequest({contractId:e,options:t},sy)}getAex141TemplateTokens(e,t,n){return this.sendOperationRequest({contractId:e,templateId:t,options:n},cy)}getAex141ByContract(e,t){return this.sendOperationRequest({id:e,options:t},uy)}getSortedAex9Tokens(e){return this.sendOperationRequest({options:e},ly)}getAex9AccountBalances(e,t){return this.sendOperationRequest({accountId:e,options:t},Ay)}getAex9TokensCount(e){return this.sendOperationRequest({options:e},dy)}getAex9PairTransfers(e,t,n){return this.sendOperationRequest({sender:e,recipient:t,options:n},py)}getAex9SenderTransfers(e,t){return this.sendOperationRequest({id:e,options:t},my)}getAex9RecipientTransfers(e,t){return this.sendOperationRequest({id:e,options:t},hy)}getAex9ContractBalances(e,t){return this.sendOperationRequest({contractId:e,options:t},gy)}getAex9ContractAccountBalance(e,t,n,r){return this.sendOperationRequest({contractId:e,accountId:t,hash:n,options:r},fy)}getAex9ContractAccountBalanceHistory(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},yy)}getAex9LogsCount(e,t){return this.sendOperationRequest({contractId:e,options:t},Cy)}getAex9ByContract(e,t){return this.sendOperationRequest({id:e,options:t},Iy)}getBlocks(e){return this.sendOperationRequest({options:e},wy)}getBlock(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},Ey)}getBlockByMbi(e,t,n){return this.sendOperationRequest({kbi:e,mbi:t,options:n},By)}getChannels(e){return this.sendOperationRequest({options:e},Ny)}getChannel(e,t){return this.sendOperationRequest({id:e,options:t},by)}getContractsCalls(e){return this.sendOperationRequest({options:e},vy)}getContractsLogs(e){return this.sendOperationRequest({options:e},Sy)}getContract(e,t){return this.sendOperationRequest({id:e,options:t},Ty)}getDeltastats(e){return this.sendOperationRequest({options:e},xy)}getKeyBlocks(e){return this.sendOperationRequest({options:e},_y)}getKeyBlock(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},Qy)}getKeyBlockMicroBlocks(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},Py)}getMicroBlock(e,t){return this.sendOperationRequest({hash:e,options:t},zy)}getMicroBlockTransactions(e,t){return this.sendOperationRequest({hash:e,options:t},Ry)}getNames(e){return this.sendOperationRequest({options:e},ky)}getNamesAuctions(e){return this.sendOperationRequest({options:e},Oy)}searchNames(e){return this.sendOperationRequest({options:e},My)}getName(e,t){return this.sendOperationRequest({id:e,options:t},Dy)}getNameAuction(e,t){return this.sendOperationRequest({id:e,options:t},qy)}getNameClaims(e,t){return this.sendOperationRequest({id:e,options:t},Fy)}getNamePointees(e,t){return this.sendOperationRequest({id:e,options:t},Uy)}getNamePointers(e,t){return this.sendOperationRequest({id:e,options:t},Gy)}getNameTransfers(e,t){return this.sendOperationRequest({id:e,options:t},Ly)}getNameUpdates(e,t){return this.sendOperationRequest({id:e,options:t},Hy)}getOracles(e){return this.sendOperationRequest({options:e},jy)}getOracle(e,t){return this.sendOperationRequest({id:e,options:t},Vy)}getOracleQueries(e,t){return this.sendOperationRequest({id:e,options:t},$y)}getOracleResponses(e,t){return this.sendOperationRequest({id:e,options:t},Yy)}getStatus(e){return this.sendOperationRequest({options:e},Jy)}getTotalstats(e){return this.sendOperationRequest({options:e},Ky)}getTransfers(e){return this.sendOperationRequest({options:e},Wy)}getTxs(e){return this.sendOperationRequest({options:e},Xy)}getTxCount(e){return this.sendOperationRequest({options:e},Zy)}getTxCountById(e,t){return this.sendOperationRequest({id:e,options:t},eC)}getTx(e,t){return this.sendOperationRequest({hashOrIndex:e,options:t},tC)}}const ty=za(l,!1),ny={path:"/v2/accounts/{id}/activities",httpMethod:"GET",responses:{200:{bodyMapper:Bf},400:{bodyMapper:ng,isError:!0}},queryParameters:[{parameterPath:["options","ownedOnly"],mapper:{serializedName:"owned_only",type:{name:"Boolean"}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"String"}}},Gh,Lh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},ry={path:"/v2/aex141",httpMethod:"GET",responses:{200:{bodyMapper:Nf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh,{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},jh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},iy={path:"/v2/aex141/owned-nfts/{accountId}",httpMethod:"GET",responses:{200:{bodyMapper:bf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh,$h],urlParameters:[Fh,Vh],headerParameters:[qh],serializer:ty},ay={path:"/v2/aex141/{contractId}/owner/{tokenId}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"String"}}},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Yh,{parameterPath:"tokenId",mapper:{serializedName:"tokenId",required:!0,type:{name:"Number"}}}],headerParameters:[qh],serializer:ty},oy={path:"/v2/aex141/{contractId}/owners",httpMethod:"GET",responses:{200:{bodyMapper:vf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,Yh],headerParameters:[qh],serializer:ty},sy={path:"/v2/aex141/{contractId}/templates",httpMethod:"GET",responses:{200:{bodyMapper:Sf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,Yh],headerParameters:[qh],serializer:ty},cy={path:"/v2/aex141/{contractId}/templates/{templateId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:Tf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,Yh,{parameterPath:"templateId",mapper:{serializedName:"templateId",required:!0,type:{name:"Number"}}}],headerParameters:[qh],serializer:ty},uy={path:"/v2/aex141/{id}",httpMethod:"GET",responses:{200:{bodyMapper:ig},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},ly={path:"/v2/aex9",httpMethod:"GET",responses:{200:{bodyMapper:xf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh,jh,{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}}],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Ay={path:"/v2/aex9/account-balances/{account_id}",httpMethod:"GET",responses:{200:{bodyMapper:_f},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,{parameterPath:"accountId",mapper:{serializedName:"account_id",required:!0,type:{name:"String"}}}],headerParameters:[qh],serializer:ty},dy={path:"/v2/aex9/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}}},urlParameters:[Fh],headerParameters:[qh],serializer:ty},py={path:"/v2/aex9/transfers/from-to/{sender}/{recipient}",httpMethod:"GET",responses:{200:{bodyMapper:Qf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,{parameterPath:"sender",mapper:{serializedName:"sender",required:!0,type:{name:"String"}}},{parameterPath:"recipient",mapper:{serializedName:"recipient",required:!0,type:{name:"String"}}}],headerParameters:[qh],serializer:ty},my={path:"/v2/aex9/transfers/from/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Pf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},hy={path:"/v2/aex9/transfers/to/{id}",httpMethod:"GET",responses:{200:{bodyMapper:zf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},gy={path:"/v2/aex9/{contractId}/balances",httpMethod:"GET",responses:{200:{bodyMapper:Rf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh,Jh],urlParameters:[Fh,Yh],headerParameters:[qh],serializer:ty},fy={path:"/v2/aex9/{contractId}/balances/{accountId}",httpMethod:"GET",responses:{200:{bodyMapper:Wf},400:{bodyMapper:ng,isError:!0}},queryParameters:[{parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}}],urlParameters:[Fh,Vh,Yh],headerParameters:[qh],serializer:ty},yy={path:"/v2/aex9/{contractId}/balances/{accountId}/history",httpMethod:"GET",responses:{200:{bodyMapper:Xf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Vh,Yh],headerParameters:[qh],serializer:ty},Cy={path:"/v2/aex9/{contractId}/logs-count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Yh],headerParameters:[qh],serializer:ty},Iy={path:"/v2/aex9/{id}",httpMethod:"GET",responses:{200:{bodyMapper:pg},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},wy={path:"/v2/blocks",httpMethod:"GET",responses:{200:{bodyMapper:kf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Ey={path:"/v2/blocks/{hash_or_kbi}",httpMethod:"GET",responses:{200:{bodyMapper:bg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Kh],headerParameters:[qh],serializer:ty},By={path:"/v2/blocks/{kbi}/{mbi}",httpMethod:"GET",responses:{200:{bodyMapper:bg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,{parameterPath:"kbi",mapper:{serializedName:"kbi",required:!0,type:{name:"Number"}}},{parameterPath:"mbi",mapper:{serializedName:"mbi",required:!0,type:{name:"Number"}}}],headerParameters:[qh],serializer:ty},Ny={path:"/v2/channels",httpMethod:"GET",responses:{200:{bodyMapper:Of},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh,{parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}}],urlParameters:[Fh],headerParameters:[qh],serializer:ty},by={path:"/v2/channels/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Tg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},vy={path:"/v2/contracts/calls",httpMethod:"GET",responses:{200:{bodyMapper:Mf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Sy={path:"/v2/contracts/logs",httpMethod:"GET",responses:{200:{bodyMapper:Df},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh,{parameterPath:["options","contractId"],mapper:{serializedName:"contract_id",type:{name:"String"}}},{parameterPath:["options","event"],mapper:{serializedName:"event",type:{name:"String"}}},{parameterPath:["options","function"],mapper:{serializedName:"function",type:{name:"String"}}},{parameterPath:["options","functionPrefix"],mapper:{serializedName:"function_prefix",type:{name:"String"}}},{parameterPath:["options","data"],mapper:{serializedName:"data",type:{name:"String"}}},{parameterPath:["options","aexnArgs"],mapper:{serializedName:"aexn-args",type:{name:"Boolean"}}}],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Ty={path:"/v2/contracts/{id}",httpMethod:"GET",responses:{200:{bodyMapper:zg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},xy={path:"/v2/deltastats",httpMethod:"GET",responses:{200:{bodyMapper:qf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},_y={path:"/v2/key-blocks",httpMethod:"GET",responses:{200:{bodyMapper:Ff},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Qy={path:"/v2/key-blocks/{hash_or_kbi}",httpMethod:"GET",responses:{200:{bodyMapper:Mg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Kh],headerParameters:[qh],serializer:ty},Py={path:"/v2/key-blocks/{hash_or_kbi}/micro-blocks",httpMethod:"GET",responses:{200:{bodyMapper:Uf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Kh],headerParameters:[qh],serializer:ty},zy={path:"/v2/micro-blocks/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:qg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Wh],headerParameters:[qh],serializer:ty},Ry={path:"/v2/micro-blocks/{hash}/txs",httpMethod:"GET",responses:{200:{bodyMapper:Gf},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Wh],headerParameters:[qh],serializer:ty},ky={path:"/v2/names",httpMethod:"GET",responses:{200:{bodyMapper:Lf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Hh,Jh,{parameterPath:["options","ownedBy"],mapper:{serializedName:"owned_by",type:{name:"String"}}},Xh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Oy={path:"/v2/names/auctions",httpMethod:"GET",responses:{200:{bodyMapper:$g},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},My={path:"/v2/names/search",httpMethod:"GET",responses:{200:{bodyMapper:Hf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Dy={path:"/v2/names/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Lg},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},qy={path:"/v2/names/{id}/auction",httpMethod:"GET",responses:{200:{bodyMapper:$g},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Fy={path:"/v2/names/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:Xg},404:{bodyMapper:vg,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Uy={path:"/v2/names/{id}/pointees",httpMethod:"GET",responses:{200:{bodyMapper:Zg},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Gy={path:"/v2/names/{id}/pointers",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Dictionary",value:{type:{name:"any"}}}}},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Ly={path:"/v2/names/{id}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:ef},404:{bodyMapper:vg,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Hy={path:"/v2/names/{id}/updates",httpMethod:"GET",responses:{200:{bodyMapper:tf},404:{bodyMapper:vg,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},jy={path:"/v2/oracles",httpMethod:"GET",responses:{200:{bodyMapper:jf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh,Xh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Vy={path:"/v2/oracles/{id}",httpMethod:"GET",responses:{200:{bodyMapper:rf},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},$y={path:"/v2/oracles/{id}/queries",httpMethod:"GET",responses:{200:{bodyMapper:Vf},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Yy={path:"/v2/oracles/{id}/responses",httpMethod:"GET",responses:{200:{bodyMapper:$f},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},Jy={path:"/v2/status",httpMethod:"GET",responses:{200:{bodyMapper:lf}},urlParameters:[Fh],headerParameters:[qh],serializer:ty},Ky={path:"/v2/totalstats",httpMethod:"GET",responses:{200:{bodyMapper:Yf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Wy={path:"/v2/transfers",httpMethod:"GET",responses:{200:{bodyMapper:Jf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Xy={path:"/v2/txs",httpMethod:"GET",responses:{200:{bodyMapper:Kf},400:{bodyMapper:ng,isError:!0}},queryParameters:[Gh,Lh,Hh,$h,{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:"Multi"},{parameterPath:["options","typeGroup"],mapper:{serializedName:"type_group",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:"Multi"},{parameterPath:["options","account"],mapper:{serializedName:"account",type:{name:"String"}}},{parameterPath:["options","channel"],mapper:{serializedName:"channel",type:{name:"String"}}},{parameterPath:["options","oracle"],mapper:{serializedName:"oracle",type:{name:"String"}}},{parameterPath:["options","senderId"],mapper:{serializedName:"sender_id",type:{name:"String"}}},{parameterPath:["options","recipientId"],mapper:{serializedName:"recipient_id",type:{name:"String"}}},{parameterPath:["options","entrypoint"],mapper:{serializedName:"entrypoint",type:{name:"String"}}}],urlParameters:[Fh],headerParameters:[qh],serializer:ty},Zy={path:"/v2/txs/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}}},queryParameters:[Lh,{parameterPath:["options","txType"],mapper:{serializedName:"tx_type",type:{name:"String"}}},{parameterPath:["options","id"],mapper:{serializedName:"id",type:{name:"String"}}}],urlParameters:[Fh],headerParameters:[qh],serializer:ty},eC={path:"/v2/txs/count/{id}",httpMethod:"GET",responses:{200:{bodyMapper:ff},400:{bodyMapper:ng,isError:!0}},urlParameters:[Fh,Uh],headerParameters:[qh],serializer:ty},tC={path:"/v2/txs/{hash_or_index}",httpMethod:"GET",responses:{200:{bodyMapper:Ug},400:{bodyMapper:ng,isError:!0},404:{bodyMapper:vg,isError:!0}},urlParameters:[Fh,{parameterPath:"hashOrIndex",mapper:{serializedName:"hash_or_index",required:!0,type:{name:"String"}}}],headerParameters:[qh],serializer:ty};function nC(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function rC(e,t,n){return function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(t,e),n}const iC=[],aC=[];var oC=new WeakSet,sC=new WeakSet,cC=new WeakSet;class uC extends ey{constructor(...e){super(...e),nC(this,cC),nC(this,sC),nC(this,oC)}async sendOperationRequest(e,t){const n=It(e,(([e,t])=>[e,rC(this,sC,AC).call(this,t)]));return rC(this,cC,dC).call(this,await super.sendOperationRequest(n,t))}}function lC(e,t){return Array.isArray(e)?e.map((e=>rC(this,oC,lC).call(this,e,t))):null!=e&&"object"==typeof e?It(e,(([e,n])=>null==n?[e,n]:iC.some((t=>t===e))?[e,t.bigInt(n)]:aC.some((t=>t===e))?[e,t.number(n)]:[e,rC(this,oC,lC).call(this,n,t)])):e}function AC(e){return rC(this,oC,lC).call(this,e,{bigInt:e=>e instanceof _?e.toFixed():e.toString(),number:e=>e.toString()})}function dC(e){return rC(this,oC,lC).call(this,e,{bigInt:e=>BigInt(e),number:e=>+e})}class pC extends uC{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...i}={}){let a;super(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[ga("middleware",(async e=>(null!=a||(a=(await this.getStatus(e)).mdwVersion),a)),"1.47.0","2.0.0")],da(),pa(),fa(n,r),ha((e=>` ${e.error}`))],...i}),this.pipeline.removePolicy({name:la}),this.pipeline.removePolicy({name:Aa}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}}var mC=(e,t)=>(e.connect((e=>t.sendMessage(e)),(()=>t.disconnect())),t.connect((t=>e.sendMessage(t)),(()=>e.disconnect())),()=>{e.disconnect(),t.disconnect()});class hC{constructor({debug:e=!1}){this.debug=e}connect(e,t){if(this.isConnected())throw new Ke("You already connected")}disconnect(){if(!this.isConnected())throw new We("You dont have connection. Please connect before")}receiveMessage(e){this.debug&&console.log("Receive message:",e)}sendMessage(e){this.debug&&console.log("Send message:",e)}}function gC(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}var fC=new WeakMap,yC=new WeakMap,CC=new WeakMap;class IC extends hC{constructor({target:e,self:t=window,origin:n,sendDirection:r,receiveDirection:i=Gd.to_aepp,...a}={}){super(a),gC(this,fC,{writable:!0,value:void 0}),gC(this,yC,{writable:!0,value:void 0}),gC(this,CC,{writable:!0,value:void 0}),ui(this,yC,e),ui(this,CC,t),this.origin=n,this.sendDirection=r,this.receiveDirection=i}isConnected(){return null!=this.listener}connect(e,t){super.connect(e,t),this.listener=t=>{var n;if("object"!=typeof t.data||"2.0"!==(null!==(n=t.data.jsonrpc)&&void 0!==n?n:t.data.data?.jsonrpc))return;if(null!=this.origin&&this.origin!==t.origin)return;if(null!=li(this,yC)&&li(this,yC)!==t.source)return;this.receiveMessage(t);let{data:r}=t;if(null!=r.type){if(t.data.type!==this.receiveDirection)return;r=r.data}e(r,t.origin,t.source)},li(this,CC).addEventListener("message",this.listener),ui(this,fC,t)}disconnect(){if(super.disconnect(),null==this.listener||null==li(this,fC))throw new re("Expected to not happen, required for TS");li(this,CC).removeEventListener("message",this.listener),delete this.listener,li(this,fC).call(this),ui(this,fC,void 0)}sendMessage(e){var t;if(null==li(this,yC))throw new Xe("Can't send messages without target");const n=null!=this.sendDirection?{type:this.sendDirection,data:e}:e;super.sendMessage(n),li(this,yC).postMessage(n,null!==(t=this.origin)&&void 0!==t?t:"*")}}var wC=(e,t)=>{if(null==window)throw new X("Window object not found, you can run wallet detector only in browser");const n={};return e.connect((({method:e,params:r},i,a)=>{if(e!==jd.readyToConnect||null!=n[r.id])return;const o={info:r,getConnection(){return new IC({target:a,..."extension"===r.type?{sendDirection:Gd.to_waellet,receiveDirection:Gd.to_aepp,..."null"!==window.origin&&{origin:window.origin}}:{origin:r.origin}})}};n[o.info.id]=o,t({wallets:n,newWallet:o})}),(()=>{})),()=>e.disconnect()};var EC=new WeakMap;class BC extends hC{constructor({port:e,...t}){var n,r,i;super(t),i={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=EC),r.set(n,i),this.port=e}disconnect(){if(super.disconnect(),this.port.disconnect(),null==li(this,EC))throw new ie;this.port.onMessage.removeListener(li(this,EC)[0]),this.port.onDisconnect.removeListener(li(this,EC)[1]),ui(this,EC,void 0)}connect(e,t){super.connect(e,t),ui(this,EC,[(t,n)=>{var r;this.receiveMessage(t),e(t,null!==(r=n.sender?.url)&&void 0!==r?r:"",n)},t]),this.port.onMessage.addListener(li(this,EC)[0]),this.port.onDisconnect.addListener(li(this,EC)[1])}sendMessage(e){super.sendMessage(e),this.port.postMessage(e)}isConnected(){return null!=li(this,EC)}}class NC extends Yd{constructor(e){super("Broadcast failed"),Rd(this,"code",3),this.data=e,this.name="RpcBroadcastError"}}Rd(NC,"code",3);const bC=12;function vC(e,t){const n=(new _l.TypeResolver).resolveType(t,{});return(new _l.ContractByteArrayEncoder).encodeWithType(e,n)}function SC(e,t){const n=(new _l.TypeResolver).resolveType(t,{});return(new _l.ContractByteArrayEncoder).decodeWithType(e,n)}const TC=18e4,xC=36e3,_C=3600,QC=_C,PC={type:Oi.delta,value:500},zC={type:Oi.delta,value:10},RC={type:Oi.delta,value:10}}(),r}()}));
3
3
  //# sourceMappingURL=aepp-sdk.browser-script.js.map